diff --git a/api-spec/openapiSpecv3-2_0.json b/api-spec/openapiSpecv3-2_0.json index ad0d6ce4c..45fcd5336 100644 --- a/api-spec/openapiSpecv3-2_0.json +++ b/api-spec/openapiSpecv3-2_0.json @@ -61,6 +61,14 @@ ], "description": "Roles for version 9.12.0.cl" }, + { + "name": "26.4.0.cl", + "id": "26.4.0.cl", + "tags": [ + "26.4.0.cl" + ], + "description": "Roles for version 26.4.0.cl" + }, { "name": "10.12.0.cl", "id": "10.12.0.cl", @@ -187,7 +195,7 @@ "/api/rest/2.0/ai/agent/conversation/create": { "post": { "operationId": "createAgentConversation", - "description": "\nBeta Version: 10.13.0.cl or later\n\n\n\n\n\n#### Endpoint URL\n", + "description": "\nBeta Version: 10.13.0.cl or later\n\nVersion: 26.2.0.cl or later\n\nCreates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl.\n\nRequires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request.\n\n#### Usage guidelines\n\nThe request must include the `metadata_context` parameter to define the conversation context. The context type can be one of:\n\n- `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility.\n- `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user's queries.\n\n> **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`.\n\nThe `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation:\n\n- `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl\n- `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl\n- `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl\n- `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history\n\nIf the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations.\n\n#### Example request\n\n```json\n{\n \"metadata_context\": {\n \"type\": \"DATA_SOURCE\",\n \"data_source_context\": {\n \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n }\n },\n \"conversation_settings\": {}\n}\n```\n\n#### Error responses\n\n| Code | Description |\n| ---- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. |\n\n> ###### Note:\n>\n> - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl.\n> - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ "AI", "10.13.0.cl" @@ -210,6 +218,22 @@ "application/json": { "schema": { "$ref": "#/components/schemas/AgentConversation" + }, + "examples": { + "example_1": { + "summary": "Create a conversation with a specific data source", + "value": { + "conversation_id": "wwHQ5j8O8dQC", + "conversation_identifier": "wwHQ5j8O8dQC" + } + }, + "example_2": { + "summary": "Create a conversation using auto mode where the agent automatically discovers and selects the most relevant datasets for the user's queries", + "value": { + "conversation_id": "aaHQ5j8O8dQC", + "conversation_identifier": "aaHQ5j8O8dQC" + } + } } } } @@ -234,6 +258,26 @@ } } }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "500": { "description": "Operation failed", "content": { @@ -250,7 +294,7 @@ "/api/rest/2.0/ai/conversation/create": { "post": { "operationId": "createConversation", - "description": "\nBeta Version: 10.4.0.cl or later\n\nCreates a Conversation object to start an AI-driven conversation based on a specific data model.\n\nRequires at least view access to the metadata object specified in the request.\n\n#### Usage guidelines\n\nThis API requires the `metadata_identifier` parameter to define the context for the conversation.\n\nYou can also specify the tokens to initiate the conversation as shown in this example:\n\n`\"tokens\": \"[tea],[sales],[type]\"`\n\nIf the API request is successful, ThoughtSpot returns the ID of the conversation.\n\n> ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", + "description": "\nBeta Version: 10.4.0.cl or later\n\nVersion: 10.4.0.cl or later\n\nCreates a new conversation session tied to a specific data model for AI-driven natural language querying.\n\nRequires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request.\n\n#### Usage guidelines\n\nThe request must include:\n- `metadata_identifier`: the unique ID of the data source that provides context for the conversation\n\nOptionally, you can provide:\n- `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`)\n\nIf the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation.\n\n#### Error responses\n\n| Code | Description |\n|------|-------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. |\n\n> ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ "AI", "10.4.0.cl" @@ -297,6 +341,26 @@ } } }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "500": { "description": "Operation failed", "content": { @@ -313,7 +377,7 @@ "/api/rest/2.0/ai/data-source-suggestions": { "post": { "operationId": "getDataSourceSuggestions", - "description": "\nBeta Version: 10.15.0.cl or later\n\nProvides relevant data source recommendations for a user-submitted natural language query.\n\nTo use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response.\n\n#### Usage guidelines\n\nThe request must include a `query` string via the request body.\n\nThe returned results include metadata such as:\n- `confidence`: a float indicating the model's confidence in the relevance of each recommendation\n- `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source\n- `reasoning`: rationale provided by the LLM to explain why each data source was recommended\n\nIf the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning.\n\n> ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available.\n> * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", + "description": "\nBeta Version: 10.15.0.cl or later\n\nSuggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning.\n\nRequires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response.\n\n#### Usage guidelines\n\nThe request must include:\n- `query`: the natural language question to find relevant data sources for\n\nIf the request is successful, the API returns a ranked list of suggested data sources, each containing:\n- `confidence`: a float score indicating the model's confidence in the relevance of the suggestion\n- `details`: metadata about the data source\n - `data_source_identifier`: the unique ID of the data source\n - `data_source_name`: the display name of the data source\n - `description`: a description of the data source\n- `reasoning`: LLM-generated rationale explaining why the data source was recommended\n\n#### Error responses\n\n| Code | Description |\n|------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. |\n\n> ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available.\n> * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ "AI", "10.15.0.cl" @@ -360,6 +424,26 @@ } } }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "500": { "description": "Operation failed", "content": { @@ -376,7 +460,7 @@ "/api/rest/2.0/ai/instructions/get": { "post": { "operationId": "getNLInstructions", - "description": "\nBeta Version: 10.15.0.cl or later\n\nThis API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries.\n\n#### Usage guidelines\n\nTo retrieve NL instructions for a data-model, the request must include:\n- `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions\n\nThe API returns a response object with:\n- `nl_instructions_info`: An array of instruction objects, each containing:\n - `instructions`: Array of text instructions for natural language processing\n - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future.\n\n#### Instructions Scope\n\n- **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported)\n\n> ###### Note:\n> * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists.\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * Available from version 10.15.0.cl and later.\n> * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster.\n> * Use this API to view currently configured instructions before modifying them with `setNLInstructions`.\n\n\n\n#### Endpoint URL\n", + "description": "\nBeta Version: 10.15.0.cl or later\n\nRetrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses.\n\nRequires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists.\n\n#### Usage guidelines\n\nThe request must include:\n\n- `data_source_identifier`: the unique ID of the data model to retrieve instructions for\n\nIf the request is successful, the API returns:\n\n- `nl_instructions_info`: an array of instruction objects, each containing:\n - `instructions`: the configured text instructions for AI processing\n - `scope`: the scope of the instruction — currently only `GLOBAL` is supported\n\n#### Instructions scope\n\n- **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported)\n\n#### Error responses\n\n| Code | Description |\n|------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. |\n\n> ###### Note:\n>\n> - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists.\n> - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> - Available from version 10.15.0.cl and later.\n> - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster.\n> - Use this API to review currently configured instructions before modifying them with `setNLInstructions`.\n\n\n\n\n#### Endpoint URL\n", "tags": [ "AI", "10.15.0.cl" @@ -423,6 +507,26 @@ } } }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "500": { "description": "Operation failed", "content": { @@ -439,7 +543,7 @@ "/api/rest/2.0/ai/relevant-questions/": { "post": { "operationId": "getRelevantQuestions", - "description": "\nBeta Version: 10.13.0.cl or later\n\nBreaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata.\n\nTo use this API, the user must have at least view-level access to the referenced metadata objects.\n\n#### Usage guidelines\n\nTo accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`.\n\nYou can further enhance the quality and precision of breakdown by providing additional `ai_context` such as:\n\n- `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response.\n- `instructions`: User specific text instructions sent to AI system for processing the query.\n\nAdditional optional parameters include:\n\n- `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified.\n- `bypass_cache`: If set to true, forces fresh computation instead of returning cached results.\n\nIf the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user's original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source.\n\n> ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n#### Endpoint URL\n", + "description": "\nBeta Version: 10.13.0.cl or later\n\nBreaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source.\n\nRequires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects.\n\n#### Usage guidelines\n\nThe request must include:\n- `query`: the natural language question to decompose into analytical sub-questions\n- `metadata_context`: at least one of the following context identifiers to guide question generation:\n - `conversation_identifier` — an existing conversation session ID\n - `answer_identifiers` — a list of Answer GUIDs\n - `liveboard_identifiers` — a list of Liveboard GUIDs\n - `data_source_identifiers` — a list of data source GUIDs\n\nOptional parameters for refining the output:\n- `ai_context`: additional context to improve response quality\n - `content` — supplementary text or CSV data as string input\n - `instructions` — custom text instructions for the AI system\n- `limit_relevant_questions`: maximum number of questions to return (default: `5`)\n- `bypass_cache`: if `true`, forces fresh computation instead of returning cached results\n\nIf the request is successful, the API returns a list of relevant analytical questions, each containing:\n- `query`: the generated sub-question\n- `data_source_identifier`: the unique ID of the data source the question targets\n- `data_source_name`: the display name of the corresponding data source\n\n#### Error responses\n\n| Code | Description |\n|------|---------------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. |\n\n> ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ "AI", "10.13.0.cl" @@ -486,6 +590,26 @@ } } }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "500": { "description": "Operation failed", "content": { @@ -502,7 +626,7 @@ "/api/rest/2.0/ai/analytical-questions": { "post": { "operationId": "queryGetDecomposedQuery", - "description": "\nBeta Version: 10.7.0.cl or later\n\n\n\n\n\n#### Endpoint URL\n", + "description": "\nBeta Version: 10.7.0.cl or later\n\nVersion: 10.7.0.cl or later\n\n**Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl).\n\nBreaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution.\n\nRequires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects.\n\n#### Usage guidelines\n\nThe request accepts the following parameters:\n\n- `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag\n- `worksheetIds`: list of data source identifiers to scope the decomposition\n- `answerIds`: list of Answer GUIDs whose data guides the response\n- `liveboardIds`: list of Liveboard GUIDs whose data guides the response\n- `conversationId`: an existing conversation session ID for context continuity\n- `content`: supplementary text or CSV data to improve response quality\n- `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`)\n\nIf the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with:\n- `query`: the generated analytical sub-question\n- `worksheetId`: the unique ID of the data source the question targets\n- `worksheetName`: the display name of the corresponding data source\n\n#### Error responses\n\n| Code | Description |\n|------|---------------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. |\n\n> ###### Note:\n> * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations.\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "deprecated": true, "tags": [ "AI", @@ -550,6 +674,26 @@ } } }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "500": { "description": "Operation failed", "content": { @@ -566,7 +710,7 @@ "/api/rest/2.0/ai/agent/{conversation_identifier}/converse": { "post": { "operationId": "sendAgentMessage", - "description": "\nBeta Version: 10.15.0.cl or later\n\nThis API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. \nTo use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message.\n\n\n#### Usage guidelines\n\nTo initiate or continue a conversation, the request must include:\n- `conversation_identifier`: a unique session ID for continuity and message tracking\n- `messages`: an array of one or more text messages, each with a value and type\n\nThe API returns a array of object with a type, message, and metadata.\n- `type`: Type of the message — text, answer, or error.\n- `message`: Main content of the response.\n- `metadata`: Additional info depending on the message type.\n\n> ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n#### Endpoint URL\n", + "description": "\nBeta Version: 10.15.0.cl or later\n\n**Deprecated** — Use `sendAgentConversationMessage` instead.\n\nSend natural language messages to an existing Spotter agent conversation and returns the complete response synchronously.\n\nRequires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`.\nA conversation must first be created using the `createAgentConversation` API.\n\n#### Usage guidelines\n\nThe request must include:\n\n- `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking\n- `messages`: an array of one or more text messages to send to the agent\n\nThe API returns an array of response objects, each containing:\n\n- `type`: the kind of response — `text`, `answer`, or `error`\n- `message`: the main content of the response\n- `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details)\n\n#### Error responses\n\n| Code | Description |\n|------|----------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. |\n\n> ###### Note:\n>\n> - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations.\n> - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ "AI", "10.15.0.cl" @@ -623,6 +767,26 @@ } } }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "500": { "description": "Operation failed", "content": { @@ -639,7 +803,7 @@ "/api/rest/2.0/ai/agent/converse/sse": { "post": { "operationId": "sendAgentMessageStreaming", - "description": "\nBeta Version: 10.13.0.cl or later\n\nThis API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. \nTo use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message.\n\n\n#### Usage guidelines\n\nTo initiate or continue a conversation, the request must include:\n- `conversation_identifier`: a unique session ID for continuity and message tracking\n- `messages`: an array of one or more text messages, each with a value and type\n\nAdditionally, user can specify what tool can be included `conversation_settings` parameter, which supports:\n- `enable_contextual_change_analysis` (default: false)\n- `enable_natural_language_answer_generation` (default: true)\n- `enable_reasoning` (default: false)\n\nIf the request is valid, the API returns a stream of messages in real time, including:\n- `ack`: confirms receipt of the request\n- `text / text-chunk`: content chunks, optionally formatted (e.g., markdown)\n- `answer`: the final structured response with metadata and analytics\n- `error`: if a failure occurs\n- `notification`: notification messages for operation being performed\n\n> ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n> * The streaming protocol uses Server-Sent Events (SSE)\n\n\n\n#### Endpoint URL\n", + "description": "\nBeta Version: 10.13.0.cl or later\n\n**Deprecated** — Use `sendAgentConversationMessageStreaming` instead.\n\nSends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream.\n\nRequires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API.\n\n#### Usage guidelines\n\nThe request must include:\n\n- `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking\n- `messages`: an array of one or more text messages to send to the agent\n\nIf the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include:\n\n- `ack`: confirms receipt of the request (`node_id`)\n- `conv_title`: conversation title (`title`, `conv_id`)\n- `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`)\n- `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`)\n- `text`: full text block with same structure as `text-chunk`\n- `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`)\n- `error`: if a failure occurs\n\n#### Error responses\n\n| Code | Description |\n|------|----------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. |\n\n> ###### Note:\n>\n> - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations.\n> - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n> - The streaming protocol uses Server-Sent Events (SSE).\n\n\n\n\n#### Endpoint URL\n", "tags": [ "AI", "10.13.0.cl" @@ -686,6 +850,26 @@ } } }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "500": { "description": "Operation failed", "content": { @@ -702,7 +886,7 @@ "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse": { "post": { "operationId": "sendMessage", - "description": "\nBeta Version: 10.4.0.cl or later\n\nAllows sending a follow-up message to an ongoing conversation within the context of the metadata model.\n\nRequires at least view access to the metadata object specified in the request.\n\n#### Usage guidelines\n\nThe API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body.\n\nIf the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type.\n\n> ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", + "description": "\nBeta Version: 10.4.0.cl or later\n\nSends a follow-up message to an existing conversation within the context of a data model.\n\nRequires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API.\n\n#### Usage guidelines\n\nThe request must include:\n- `conversation_identifier`: the unique session ID returned by `createConversation`\n- `metadata_identifier`: the unique ID of the data source used for the conversation\n- `message`: a natural language string with the follow-up question\n\nIf the request is successful, the API returns an array of response messages, each containing:\n- `session_identifier`: the unique ID of the generated response\n- `generation_number`: the generation number of the response\n- `message_type`: the type of the response (e.g., `TSAnswer`)\n- `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`)\n- `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response\n\n#### Error responses\n\n| Code | Description |\n|------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. |\n\n> ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ "AI", "10.4.0.cl" @@ -765,6 +949,26 @@ } } }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "500": { "description": "Operation failed", "content": { @@ -781,7 +985,7 @@ "/api/rest/2.0/ai/instructions/set": { "post": { "operationId": "setNLInstructions", - "description": "\nBeta Version: 10.15.0.cl or later\n\nThis API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses.\n\n#### Usage guidelines\n\nTo set NL instructions for a data-model, the request must include:\n- `data_source_identifier`: The unique ID of the data-model for which to set NL instructions\n- `nl_instructions_info`: An array of instruction objects, each containing:\n - `instructions`: Array of text instructions for the LLM\n - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future.\n\nThe API returns a response object with:\n- `success`: Boolean indicating whether the operation was successful\n\n#### Instructions Scope\n\n- **GLOBAL**: Instructions that apply globally for that data-model across the system\n\n> ###### Note:\n> * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists.\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * Available from version 10.15.0.cl and later.\n> * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster.\n> * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model.\n\n\n\n\n#### Endpoint URL\n", + "description": "\nBeta Version: 10.15.0.cl or later\n\nThis API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses.\n\nRequires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists.\n\n#### Usage guidelines\n\nTo set NL instructions for a data-model, the request must include:\n\n- `data_source_identifier`: The unique ID of the data-model for which to set NL instructions\n- `nl_instructions_info`: An array of instruction objects, each containing:\n - `instructions`: Array of text instructions for the LLM\n - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future.\n\n#### Instructions scope\n\n- **GLOBAL**: instructions that apply to all users querying this data model\n\nIf the request is successful, the API returns:\n\n- `success`: a boolean indicating whether the operation completed successfully\n\n#### Error responses\n\n| Code | Description |\n|------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. |\n\n> ###### Note:\n>\n> - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists.\n> - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> - Available from version 10.15.0.cl and later.\n> - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster.\n> - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model.\n\n\n\n\n#### Endpoint URL\n", "tags": [ "AI", "10.15.0.cl" @@ -828,6 +1032,26 @@ } } }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "500": { "description": "Operation failed", "content": { @@ -844,7 +1068,7 @@ "/api/rest/2.0/ai/answer/create": { "post": { "operationId": "singleAnswer", - "description": "\nBeta Version: 10.4.0.cl or later\n\nProcesses a natural language query and returns an AI-generated response based on a specified data model.\n\nRequires at least view access to the metadata object specified in the request.\n\n> ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", + "description": "\nBeta Version: 10.4.0.cl or later\n\nProcesses a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session.\n\nRequires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request.\n\n#### Usage guidelines\n\nThe request must include:\n- `query`: a natural language question (e.g., \"What were total sales last quarter?\")\n- `metadata_identifier`: the unique ID of the data source to query against\n\nIf the request is successful, the API returns a response message containing:\n- `session_identifier`: the unique ID of the generated response\n- `generation_number`: the generation number of the response\n- `message_type`: the type of the response (e.g., `TSAnswer`)\n- `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`)\n- `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response\n\n#### Error responses\n\n| Code | Description |\n|------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| 401 | Unauthorized — authentication token is missing, expired, or invalid. |\n| 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. |\n\n> ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available.\n> * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\n\n\n\n#### Endpoint URL\n", "tags": [ "AI", "10.4.0.cl" @@ -891,6 +1115,26 @@ } } }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "500": { "description": "Operation failed", "content": { @@ -1061,7 +1305,278 @@ } }, "400": { - "description": "Invalid request. This could be due to missing or incorrect parameters.", + "description": "Invalid request. This could be due to missing or incorrect parameters.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access. The request could not be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access. The user does not have permission to access this resource.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "An unexpected error occurred on the server.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/rest/2.0/auth/token/full": { + "post": { + "operationId": "getFullAccessToken", + "description": "\n Version: 9.0.0.cl or later\n\nGenerates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS).\n\n#### Usage guidelines\n\nYou can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page.\n\n**Note**:\n* When both `password` and `secret_key` are included in the API request, `password` takes precedence.\n* If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance.\n\nThe token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required.\n\n#### Just-in-time provisioning\n\nFor [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request:\n\n* `auto_create`\n* `username`\n* `display_name`\n* `email`\n* `group_identifiers`\n\nSet `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated.\n\nTo add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required.\n\n#### Important point to note\nAll options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Authentication", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetFullAccessTokenRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Bearer auth token creation successful.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Token" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/rest/2.0/auth/token/object": { + "post": { + "operationId": "getObjectAccessToken", + "description": "\n Version: 9.0.0.cl or later\n\nGenerates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security).\n\n#### Usage guidelines\n\nYou can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page.\n\n**Note**:\n* When both `password` and `secret_key` are included in the API request, `password` takes precedence.\n* If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance.\n\nThe token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required.\n\n#### Just-in-time provisioning\n\nFor [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request:\n\n* `auto_create`\n* `username`\n* `display_name`\n* `email`\n* `group_identifiers`\n\nSet `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated.\n\nTo add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required.\n\n#### Important point to note\n\nAll options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Authentication", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetObjectAccessTokenRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Bearer auth token creation successful.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Token" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/rest/2.0/auth/session/login": { + "post": { + "operationId": "login", + "description": "\n Version: 9.0.0.cl or later\n\nCreates a login session for a ThoughtSpot user with Basic authentication.\n\nIn Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context.\n\n**Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance.\n\nA successful login returns a session cookie that can be used in your subsequent API requests.\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Authentication", + "9.0.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "User login successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/auth/session/logout": { + "post": { + "operationId": "logout", + "description": "\n Version: 9.0.0.cl or later\n\n\nLogs out a user from their current session.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Authentication", + "9.0.0.cl" + ], + "parameters": [], + "responses": { + "204": { + "description": "User logout successful." + }, + "400": { + "description": "Invalid request.", "content": { "application/json": { "schema": { @@ -1071,7 +1586,7 @@ } }, "401": { - "description": "Unauthorized access. The request could not be authenticated.", + "description": "Unauthorized access.", "content": { "application/json": { "schema": { @@ -1081,7 +1596,7 @@ } }, "403": { - "description": "Forbidden access. The user does not have permission to access this resource.", + "description": "Forbidden access.", "content": { "application/json": { "schema": { @@ -1091,7 +1606,7 @@ } }, "500": { - "description": "An unexpected error occurred on the server.", + "description": "Unexpected error", "content": { "application/json": { "schema": { @@ -1100,14 +1615,13 @@ } } } - }, - "security": [] + } } }, - "/api/rest/2.0/auth/token/full": { + "/api/rest/2.0/auth/token/revoke": { "post": { - "operationId": "getFullAccessToken", - "description": "\n Version: 9.0.0.cl or later\n\nGenerates an authentication token for creating a full session in ThoughtSpot for a given user. Recommended for use cases that do not require Attribute-based access control (ABAC) via Row Level Security (RLS).\n\n#### Usage guidelines\n\nYou can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page.\n\n**Note**:\n* When both `password` and `secret_key` are included in the API request, `password` takes precedence.\n* If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance.\n\nThe token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required.\n\n#### Just-in-time provisioning\n\nFor [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request:\n\n* `auto_create`\n* `username`\n* `display_name`\n* `email`\n* `group_identifiers`\n\nSet `auto_create` to `true` if the username does not exist in ThoughtSpot. If the user already exists in ThoughtSpot and `auto_create` is set to `true`, user properties such as display name, email and group assignment will be updated.\n\nTo add a new user and assign privileges during auto-creation, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH` (**Can Enable or Disable Trusted Authentication**) privilege is required.\n\n#### Important point to note\nAll options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created.\n\n\n\n\n#### Endpoint URL\n", + "operationId": "revokeToken", + "description": "\n Version: 9.0.0.cl or later\n\n\nRevokes the authentication token issued for current user session.\n\nThe token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint.\nthe users will not be able to access ThoughtSpot objects until a new token is obtained.\n\nTo restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token).\n\n\n\n\n#### Endpoint URL\n", "tags": [ "Authentication", "9.0.0.cl" @@ -1116,7 +1630,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetFullAccessTokenRequest" + "$ref": "#/components/schemas/RevokeTokenRequest" } } }, @@ -1124,15 +1638,8 @@ }, "parameters": [], "responses": { - "200": { - "description": "Bearer auth token creation successful.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Token" - } - } - } + "204": { + "description": "Token successfully revoked." }, "400": { "description": "Invalid request.", @@ -1174,23 +1681,22 @@ } } } - }, - "security": [] + } } }, - "/api/rest/2.0/auth/token/object": { + "/api/rest/2.0/auth/token/validate": { "post": { - "operationId": "getObjectAccessToken", - "description": "\n Version: 9.0.0.cl or later\n\nGenerates an authentication token that provides access to a specific metadata object. This object list is intersected with the list of objects the user is allowed to access via group membership. For more information, see [Object security](https://docs.thoughtspot.com/cloud/latest/security-data-object#object_security).\n\n#### Usage guidelines\n\nYou can generate a token for a user by providing a `username` and `password`, or by using the `secret_key` generated for your instance. To generate a `secret_key`, the administrator must enable [Trusted authentication](https://developers.thoughtspot.com/docs/trusted-auth-secret-key) in the **Develop** > **Customizations** > **Security Settings** page.\n\n**Note**:\n* When both `password` and `secret_key` are included in the API request, `password` takes precedence.\n* If [Multi-Factor Authentication (MFA)](https://docs.thoughtspot.com/cloud/latest/authentication-local-mfa) is enabled on your instance, the API login request with `username` and `password` returns an error. You can switch to token-based authentication with `secret_key` or contact ThoughtSpot Support for assistance.\n\nThe token obtained from ThoughtSpot is valid for 5 minutes by default. You can configure the token expiration time as required.\n\n#### Just-in-time provisioning\n\nFor [just-in-time user creation and provisioning](https://developers.thoughtspot.com/docs/just-in-time-provisioning), specify the following attributes in the API request:\n\n* `auto_create`\n* `username`\n* `display_name`\n* `email`\n* `group_identifiers`\n\nSet `auto_create` to `true` if the user is not available in ThoughtSpot. If the user already exists in ThoughtSpot and the `auto_create` parameter is set to `true`, user properties such as display name, email, and group assignment will be updated.\n\nTo add a new user and assign privileges, the `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege is required. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled, the `CONTROL_TRUSTED_AUTH`(**Can Enable or Disable Trusted Authentication**) privilege is required.\n\n#### Important point to note\n\nAll options in the token creation APIs that define user access to data in ThoughtSpot will take effect during token creation, not when the token is used for authentication. For example, `auto_create:true` will create the user when the authentication token is created.\n\n\n\n\n#### Endpoint URL\n", + "operationId": "validateToken", + "description": "\n Version: 9.12.0.cl or later\n\n\nValidates the authentication token specified in the API request.\n\nIf your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token).\n\n\n\n\n#### Endpoint URL\n", "tags": [ "Authentication", - "9.0.0.cl" + "9.12.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetObjectAccessTokenRequest" + "$ref": "#/components/schemas/ValidateTokenRequest" } } }, @@ -1199,11 +1705,11 @@ "parameters": [], "responses": { "200": { - "description": "Bearer auth token creation successful.", + "description": "Token validation successful.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Token" + "$ref": "#/components/schemas/TokenValidationResponse" } } } @@ -1248,23 +1754,22 @@ } } } - }, - "security": [] + } } }, - "/api/rest/2.0/auth/session/login": { + "/api/rest/2.0/collections/create": { "post": { - "operationId": "login", - "description": "\n Version: 9.0.0.cl or later\n\nCreates a login session for a ThoughtSpot user with Basic authentication.\n\nIn Basic authentication method, REST clients log in to ThoughtSpot using `username` and `password` attributes. On a multi-tenant cluster with Orgs, users can pass the ID of the Org in the API request to log in to a specific Org context.\n\n**Note**: If Multi-Factor Authentication (MFA) is enabled on your instance, the API login request with basic authentication (`username` and `password` ) returns an error. Contact ThoughtSpot Support for assistance.\n\nA successful login returns a session cookie that can be used in your subsequent API requests.\n\n\n\n#### Endpoint URL\n", + "operationId": "createCollection", + "description": "\n Version: 26.4.0.cl or later\n\nCreates a new collection in ThoughtSpot.\n\nCollections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure.\n\n#### Supported operations\n\nThe API endpoint lets you perform the following operations:\n\n* Create a new collection\n* Add metadata objects (Liveboards, Answers, Logical Tables) to the collection\n* Create nested collections by adding sub-collections\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Authentication", - "9.0.0.cl" + "Collections", + "26.4.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LoginRequest" + "$ref": "#/components/schemas/CreateCollectionRequest" } } }, @@ -1272,8 +1777,15 @@ }, "parameters": [], "responses": { - "204": { - "description": "User login successful." + "200": { + "description": "Collection created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Collection" + } + } + } }, "400": { "description": "Invalid request.", @@ -1318,18 +1830,35 @@ } } }, - "/api/rest/2.0/auth/session/logout": { + "/api/rest/2.0/collections/delete": { "post": { - "operationId": "logout", - "description": "\n Version: 9.0.0.cl or later\n\n\nLogs out a user from their current session.\n\n\n\n\n#### Endpoint URL\n", + "operationId": "deleteCollection", + "description": "\n Version: 26.4.0.cl or later\n\nDeletes one or more collections from ThoughtSpot.\n\n#### Delete options\n\n* **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped.\n* **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion.\n\n#### Response\n\nThe response includes:\n* **metadata_deleted**: List of metadata objects that were successfully deleted\n* **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Authentication", - "9.0.0.cl" + "Collections", + "26.4.0.cl" ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteCollectionRequest" + } + } + }, + "required": true + }, "parameters": [], "responses": { - "204": { - "description": "User logout successful." + "200": { + "description": "Collections deleted successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectionDeleteResponse" + } + } + } }, "400": { "description": "Invalid request.", @@ -1361,6 +1890,16 @@ } } }, + "404": { + "description": "Resource not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "500": { "description": "Unexpected error", "content": { @@ -1374,19 +1913,19 @@ } } }, - "/api/rest/2.0/auth/token/revoke": { + "/api/rest/2.0/collections/search": { "post": { - "operationId": "revokeToken", - "description": "\n Version: 9.0.0.cl or later\n\n\nRevokes the authentication token issued for current user session.\n\nThe token of your current session expires when you make a call to the `/api/rest/2.0/auth/token/revoke` endpoint.\nthe users will not be able to access ThoughtSpot objects until a new token is obtained.\n\nTo restart your session, request for a new token from ThoughtSpot. See [Get Full Access Token](#/http/api-endpoints/authentication/get-full-access-token).\n\n\n\n\n#### Endpoint URL\n", + "operationId": "searchCollections", + "description": "\n Version: 26.4.0.cl or later\n\nGets a list of collections available in ThoughtSpot.\n\nTo get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria.\n\n#### Search options\n\n* **name_pattern**: Use '%' as a wildcard character to match collection names\n* **collection_identifiers**: Search for specific collections by their GUIDs or names\n* **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response\n\n**NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`.\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Authentication", - "9.0.0.cl" + "Collections", + "26.4.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RevokeTokenRequest" + "$ref": "#/components/schemas/SearchCollectionsRequest" } } }, @@ -1394,8 +1933,15 @@ }, "parameters": [], "responses": { - "204": { - "description": "Token successfully revoked." + "200": { + "description": "Successfully retrieved list of collections", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectionSearchResponse" + } + } + } }, "400": { "description": "Invalid request.", @@ -1440,35 +1986,38 @@ } } }, - "/api/rest/2.0/auth/token/validate": { + "/api/rest/2.0/collections/{collection_identifier}/update": { "post": { - "operationId": "validateToken", - "description": "\n Version: 9.12.0.cl or later\n\n\nValidates the authentication token specified in the API request.\n\nIf your token is not valid, [Get a new token](#/http/api-endpoints/authentication/get-full-access-token).\n\n\n\n\n#### Endpoint URL\n", + "operationId": "updateCollection", + "description": "\n Version: 26.4.0.cl or later\n\nUpdates an existing collection in ThoughtSpot.\n\n#### Supported operations\n\nThis API endpoint lets you perform the following operations:\n\n* Update collection name and description\n* Change visibility settings\n* Add metadata objects to the collection (operation: ADD)\n* Remove metadata objects from the collection (operation: REMOVE)\n* Replace all metadata objects in the collection (operation: REPLACE)\n\n#### Operation types\n\n* **ADD**: Adds the specified metadata objects to the existing collection without removing current items\n* **REMOVE**: Removes only the specified metadata objects from the collection\n* **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior)\n\n\n\n\n#### Endpoint URL\n", "tags": [ - "Authentication", - "9.12.0.cl" + "Collections", + "26.4.0.cl" ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidateTokenRequest" + "$ref": "#/components/schemas/UpdateCollectionRequest" } } }, "required": true }, - "parameters": [], + "parameters": [ + { + "in": "path", + "name": "collection_identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique GUID of the collection. Note: Collection names cannot be used as\nidentifiers since duplicate names are allowed." + } + ], "responses": { - "200": { - "description": "Token validation successful.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TokenValidationResponse" - } - } - } + "204": { + "description": "Collection updated successfully. No content returned." }, "400": { "description": "Invalid request.", @@ -1500,6 +2049,16 @@ } } }, + "404": { + "description": "Resource not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, "500": { "description": "Unexpected error", "content": { @@ -1807,7 +2366,7 @@ "/api/rest/2.0/connection/create": { "post": { "operationId": "createConnection", - "description": "\n Version: 9.2.0.cl or later\n\nCreates a connection to a data warehouse for live query services. \n\nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\n#### Create a connection without tables\n\nTo create a connection without tables:\n\n1. Pass these parameters in your API request.\n * Name of the connection.\n * Type of the data warehouse to connect to.\n * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection:\n ```\n {\n \"configuration\":{\n \"accountName\":\"thoughtspot_partner\",\n \"user\":\"tsadmin\",\n \"password\":\"TestConn123\",\n \"role\":\"sysadmin\",\n \"warehouse\":\"MEDIUM_WH\"\n },\n \"externalDatabases\":[\n\n ]\n }\n ```\n2. Set `validate` to `false`.\n\n#### Create a connection with tables\n\nTo create a connection with tables:\n\n1. Pass these parameters in your API request.\n * Name of the connection.\n * Type of the data warehouse to connect to.\n * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example:\n ```\n {\n \"configuration\":{\n \"accountName\":\"thoughtspot_partner\",\n \"user\":\"tsadmin\",\n \"password\":\"TestConn123\",\n \"role\":\"sysadmin\",\n \"warehouse\":\"MEDIUM_WH\"\n },\n \"externalDatabases\":[\n {\n \"name\":\"AllDatatypes\",\n \"isAutoCreated\":false,\n \"schemas\":[\n {\n \"name\":\"alldatatypes\",\n \"tables\":[\n {\n \"name\":\"allDatatypes\",\n \"type\":\"TABLE\",\n \"description\":\"\",\n \"selected\":true,\n \"linked\":true,\n \"columns\":[\n {\n \"name\":\"CNUMBER\",\n \"type\":\"INT64\",\n \"canImport\":true,\n \"selected\":true,\n \"isLinkedActive\":true,\n \"isImported\":false,\n \"tableName\":\"allDatatypes\",\n \"schemaName\":\"alldatatypes\",\n \"dbName\":\"AllDatatypes\"\n },\n {\n \"name\":\"CDECIMAL\",\n \"type\":\"INT64\",\n \"canImport\":true,\n \"selected\":true,\n \"isLinkedActive\":true,\n \"isImported\":false,\n \"tableName\":\"allDatatypes\",\n \"schemaName\":\"alldatatypes\",\n \"dbName\":\"AllDatatypes\"\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ```\n2. Set `validate` to `true`.\n\n\n\n\n#### Endpoint URL\n", + "description": "\n Version: 9.2.0.cl or later\n\nCreates a connection to a data warehouse for live query services. \n\nRequires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required.\n\n#### Create a connection without tables\n\nTo create a connection without tables:\n\n1. Pass these parameters in your API request.\n * Name of the connection.\n * Type of the data warehouse to connect to.\n * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection:\n ```\n {\n \"configuration\":{\n \"accountName\":\"thoughtspot_partner\",\n \"user\":\"tsadmin\",\n \"password\":\"TestConn123\",\n \"role\":\"sysadmin\",\n \"warehouse\":\"MEDIUM_WH\"\n },\n \"authenticationType\": \"SERVICE_ACCOUNT\",\n \"externalDatabases\":[\n\n ]\n }\n ```\n2. Set `validate` to `false`.\n\n**NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type.\n\n#### Create a connection with tables\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required.\n\nTo create a connection with tables:\n\n1. Pass these parameters in your API request.\n * Name of the connection.\n * Type of the data warehouse to connect to.\n * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example:\n ```\n {\n \"configuration\":{\n \"accountName\":\"thoughtspot_partner\",\n \"user\":\"tsadmin\",\n \"password\":\"TestConn123\",\n \"role\":\"sysadmin\",\n \"warehouse\":\"MEDIUM_WH\"\n },\n \"authenticationType\": \"SERVICE_ACCOUNT\",\n \"externalDatabases\":[\n {\n \"name\":\"AllDatatypes\",\n \"isAutoCreated\":false,\n \"schemas\":[\n {\n \"name\":\"alldatatypes\",\n \"tables\":[\n {\n \"name\":\"allDatatypes\",\n \"type\":\"TABLE\",\n \"description\":\"\",\n \"selected\":true,\n \"linked\":true,\n \"columns\":[\n {\n \"name\":\"CNUMBER\",\n \"type\":\"INT64\",\n \"canImport\":true,\n \"selected\":true,\n \"isLinkedActive\":true,\n \"isImported\":false,\n \"tableName\":\"allDatatypes\",\n \"schemaName\":\"alldatatypes\",\n \"dbName\":\"AllDatatypes\"\n },\n {\n \"name\":\"CDECIMAL\",\n \"type\":\"INT64\",\n \"canImport\":true,\n \"selected\":true,\n \"isLinkedActive\":true,\n \"isImported\":false,\n \"tableName\":\"allDatatypes\",\n \"schemaName\":\"alldatatypes\",\n \"dbName\":\"AllDatatypes\"\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n }\n ```\n2. Set `validate` to `true`.\n\n**NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type.\n\n\n\n\n#### Endpoint URL\n", "tags": [ "Connections", "9.2.0.cl" @@ -4692,6 +5251,158 @@ } } }, + "/api/rest/2.0/jobs/history/communication-channels/search": { + "post": { + "operationId": "searchChannelHistory", + "description": "\n Version: 26.4.0.cl or later\n\nSearches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action.\n\n**NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply:\n\n- `job_ids`, `channel_identifiers`, and `events` each accept at most one element.\n- When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored.\n- When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field.\n- Records older than the configured retention period are not returned.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Jobs", + "26.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchChannelHistoryRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "Channel status logs retrieved successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchChannelHistoryResponse" + }, + "examples": { + "example_1": { + "description": "Search webhook channel history by channel identifier and event", + "value": { + "jobs": [ + { + "id": "n.6170538a-a4d4-4712-91bf-39b353db2b72", + "status": "SUCCESS", + "creation_time_in_millis": 1771599720674, + "event": { + "type": "LIVEBOARD_SCHEDULE", + "id": "2bb2ff83-b8d9-4d2b-8913-b2589bb6831b", + "name": "schedule-identifier", + "run_id": "90c4f1b0-08c9-4a6c-8e61-49cffd9f1550" + }, + "recipients": [ + { + "type": "USER", + "id": "d211f619-8b72-45d3-92a7-69dde41159c7", + "name": "admin-user", + "email": "admin@example.com" + } + ], + "detail": "", + "try_count": 1 + }, + { + "id": "n.5c5bbedb-c425-48c0-8b54-a17267b08e7c", + "status": "SUCCESS", + "creation_time_in_millis": 1771599600508, + "event": { + "type": "LIVEBOARD_SCHEDULE", + "id": "2bb2ff83-b8d9-4d2b-8913-b2589bb6831b", + "name": "schedule-identifier", + "run_id": "b9834966-fe85-4fa9-8a10-9889c01d4826" + }, + "recipients": [ + { + "type": "USER", + "id": "d211f619-8b72-45d3-92a7-69dde41159c7", + "name": "admin-user", + "email": "admin@example.com" + } + ], + "detail": "", + "try_count": 1 + } + ] + } + }, + "example_2": { + "description": "Search webhook channel history by job ID", + "value": { + "jobs": [ + { + "id": "n.5c5bbedb-c425-48c0-8b54-a17267b08e7c", + "status": "SUCCESS", + "creation_time_in_millis": 1771599600508, + "event": { + "type": "LIVEBOARD_SCHEDULE", + "id": "2bb2ff83-b8d9-4d2b-8913-b2589bb6831b", + "name": "schedule-identifier", + "run_id": "b9834966-fe85-4fa9-8a10-9889c01d4826" + }, + "recipients": [ + { + "type": "USER", + "id": "d211f619-8b72-45d3-92a7-69dde41159c7", + "name": "admin-user", + "email": "admin@example.com" + } + ], + "detail": "", + "try_count": 1 + } + ] + } + } + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, "/api/rest/2.0/logs/fetch": { "post": { "operationId": "fetchLogs", @@ -5510,7 +6221,8 @@ "/api/rest/2.0/metadata/parameterize": { "post": { "operationId": "parameterizeMetadata", - "description": "\nParameterize fields in metadata objects.
Beta Version: 10.9.0.cl or later\n\nAllows parameterizing fields in metadata objects in ThoughtSpot.\n\nRequires appropriate permissions to modify the metadata object.\n\nThe API endpoint allows parameterizing the following types of metadata objects:\n* Logical Tables\n* Connections\n* Connection Configs\n\nFor a Logical Table the field type must be `ATTRIBUTE` and field name can be one of:\n* databaseName\n* schemaName\n* tableName\n\nFor a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized.\n\nFor Connection Config, the only supported field name is:\n* impersonate_user\n\n\n\n\n#### Endpoint URL\n", + "description": "\nParameterize fields in metadata objects.
Beta Version: 10.9.0.cl or later\n\n**Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead.\n\nAllows parameterizing fields in metadata objects in ThoughtSpot.\n\nRequires appropriate permissions to modify the metadata object.\n\nThe API endpoint allows parameterizing the following types of metadata objects:\n* Logical Tables\n* Connections\n* Connection Configs\n\nFor a Logical Table the field type must be `ATTRIBUTE` and field name can be one of:\n* databaseName\n* schemaName\n* tableName\n\nFor a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized.\n\nFor Connection Config, the only supported field name is:\n* impersonate_user\n\n\n\n\n#### Endpoint URL\n", + "deprecated": true, "tags": [ "Metadata", "10.9.0.cl" @@ -5573,6 +6285,72 @@ } } }, + "/api/rest/2.0/metadata/parameterize-fields": { + "post": { + "operationId": "parameterizeMetadataFields", + "description": "\nParameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE.
Version: 26.4.0.cl or later\n\nAllows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE.\n\nRequires appropriate permissions to modify the metadata object.\n\nThe API endpoint allows parameterizing the following types of metadata objects:\n* Logical Tables\n* Connections\n* Connection Configs\n\nFor a Logical Table, the field type must be `ATTRIBUTE` and field names can include:\n* databaseName\n* schemaName\n* tableName\n\nFor a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized.\n\nFor Connection Config, supported field names include:\n* impersonate_user\n\nYou can parameterize multiple fields at once by providing an array of field names.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Metadata", + "26.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ParameterizeMetadataFieldsRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Parameterize successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, "/api/rest/2.0/metadata/search": { "post": { "operationId": "searchMetadata", @@ -8344,6 +9122,79 @@ } } }, + "/api/rest/2.0/system/communication-channels/validate": { + "post": { + "operationId": "validateCommunicationChannel", + "description": "\nBeta Version: 26.4.0.cl or later\n\nValidates a communication channel configuration to ensure it is properly set up and can receive events.\n- Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK).\n- Use `channel_identifier` to provide the unique identifier or name for the communication channel.\n- Use `event_type` to specify the event type to validate for this channel.\n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action.\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "System", + "26.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateCommunicationChannelRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "200": { + "description": "communication channel configuration validated successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommunicationChannelValidateResponse" + } + } + } + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, "/api/rest/2.0/tags/assign": { "post": { "operationId": "assignTag", @@ -9602,12 +10453,155 @@ }, "/api/rest/2.0/template/variables/{identifier}/delete": { "post": { - "operationId": "deleteVariable", - "description": "\nDelete a variable
Beta Version: 10.14.0.cl or later\n\nAllows deleting a variable from ThoughtSpot.\n\nRequires ADMINISTRATION role and TENANT scope.\nThe CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope.\n\nThe API endpoint requires:\n* The variable identifier (ID or name)\n\nThe operation will fail if:\n* The user lacks required permissions\n* The variable doesn't exist\n* The variable is being used by other objects \n\n\n\n#### Endpoint URL\n", + "operationId": "deleteVariable", + "description": "\nDelete a variable
Beta Version: 10.14.0.cl or later\n\n**Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead.\n\nAllows deleting a variable from ThoughtSpot.\n\nRequires ADMINISTRATION role and TENANT scope.\nThe CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope.\n\nThe API endpoint requires:\n* The variable identifier (ID or name)\n\nThe operation will fail if:\n* The user lacks required permissions\n* The variable doesn't exist\n* The variable is being used by other objects \n\n\n\n#### Endpoint URL\n", + "deprecated": true, + "tags": [ + "Variable", + "10.14.0.cl" + ], + "parameters": [ + { + "in": "path", + "name": "identifier", + "required": true, + "schema": { + "type": "string" + }, + "description": "Unique id or name of the variable" + } + ], + "responses": { + "204": { + "description": "Deleting the variable is successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/template/variables/delete": { + "post": { + "operationId": "deleteVariables", + "description": "\nDelete variable(s)
Beta Version: 26.4.0.cl or later\n\nAllows deleting multiple variables from ThoughtSpot.\n\nRequires ADMINISTRATION role and TENANT scope.\nThe CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope.\n\nThe API endpoint requires:\n* The variable identifiers (IDs or names)\n\nThe operation will fail if:\n* The user lacks required permissions\n* Any of the variables don't exist\n* Any of the variables are being used by other objects\n\n\n\n\n#### Endpoint URL\n", + "tags": [ + "Variable", + "26.4.0.cl" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteVariablesRequest" + } + } + }, + "required": true + }, + "parameters": [], + "responses": { + "204": { + "description": "Deletion of variable(s) is successful." + }, + "400": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/api/rest/2.0/template/variables/{identifier}/update-values": { + "post": { + "operationId": "putVariableValues", + "description": "\nUpdate values for a variable
Beta Version: 26.4.0.cl or later\n\nAllows updating values for a specific variable in ThoughtSpot.\n\nRequires ADMINISTRATION role.\nThe CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope.\n\nThe API endpoint allows:\n* Adding new values to the variable\n* Replacing existing values\n* Deleting values from the variable\n* Resetting all values\n\nWhen updating variable values, you need to specify:\n* The variable identifier (ID or name)\n* The values to add/replace/remove\n* The operation to perform (ADD, REPLACE, REMOVE, RESET)\n\nBehaviour based on operation type:\n* ADD - Adds values to the variable if this is a list type variable, else same as replace.\n* REPLACE - Replaces all values of a given set of constraints with the current set of values.\n* REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value.\n* RESET - Removes all constraints for the given variable, scope is ignored\n\n\n\n\n#### Endpoint URL\n", "tags": [ "Variable", - "10.14.0.cl" + "26.4.0.cl" ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PutVariableValuesRequest" + } + } + }, + "required": true + }, "parameters": [ { "in": "path", @@ -9616,12 +10610,12 @@ "schema": { "type": "string" }, - "description": "Unique id or name of the variable" + "description": "Unique ID or name of the variable" } ], "responses": { "204": { - "description": "Deleting the variable is successful." + "description": "Variable values updated successfully." }, "400": { "description": "Invalid request.", @@ -9821,7 +10815,8 @@ "/api/rest/2.0/template/variables/update-values": { "post": { "operationId": "updateVariableValues", - "description": "\nUpdate values for multiple variables
Beta Version: 10.14.0.cl or later\n\nAllows updating values for multiple variables in ThoughtSpot.\n\nRequires ADMINISTRATION role.\nThe CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope.\n\nThe API endpoint allows:\n* Adding new values to variables\n* Replacing existing values\n* Deleting values from variables\n\nWhen updating variable values, you need to specify:\n* The variable identifiers\n* The values to add/replace/remove for each variable\n* The operation to perform (ADD, REPLACE, REMOVE, RESET)\n\nBehaviour based on operation type:\n* ADD - Adds values to the variable if this is a list type variable, else same as replace.\n* REPLACE - Replaces all values of a given set of constraints with the current set of values.\n* REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value.\n* RESET - Removes all constrains for a given variable, scope is ignored\n\n\n\n\n#### Endpoint URL\n", + "description": "\nUpdate values for multiple variables
Beta Version: 10.14.0.cl or later\n\n**Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead.\n\nAllows updating values for multiple variables in ThoughtSpot.\n\nRequires ADMINISTRATION role.\nThe CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope.\n\nThe API endpoint allows:\n* Adding new values to variables\n* Replacing existing values\n* Deleting values from variables\n\nWhen updating variable values, you need to specify:\n* The variable identifiers\n* The values to add/replace/remove for each variable\n* The operation to perform (ADD, REPLACE, REMOVE, RESET)\n\nBehaviour based on operation type:\n* ADD - Adds values to the variable if this is a list type variable, else same as replace.\n* REPLACE - Replaces all values of a given set of constraints with the current set of values.\n* REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value.\n* RESET - Removes all constrains for a given variable, scope is ignored\n\n\n\n\n#### Endpoint URL\n", + "deprecated": true, "tags": [ "Variable", "10.14.0.cl" @@ -14746,7 +15741,8 @@ "CONNECTION_PROPERTY", "TABLE_MAPPING", "CONNECTION_PROPERTY_PER_PRINCIPAL", - "FORMULA_VARIABLE" + "FORMULA_VARIABLE", + "USER_PROPERTY" ], "description": "Type of variable", "nullable": true @@ -14773,7 +15769,7 @@ "USER", "USER_GROUP" ], - "description": "Principal type", + "description": "Type of principal to filter by. Use USER to filter values assigned to specific users, or USER_GROUP to filter values assigned to groups.", "nullable": true }, "principal_identifier": { @@ -14783,11 +15779,11 @@ }, "model_identifier": { "type": "string", - "description": "Model Identifier", + "description": "Unique ID or name of the model to filter by. Applicable only for FORMULA_VARIABLE type.", "nullable": true } }, - "description": "Input for variable scope in search" + "description": "Input for filtering variable values by scope in search operations" }, "Variable": { "type": "object", @@ -14810,7 +15806,8 @@ "CONNECTION_PROPERTY", "TABLE_MAPPING", "CONNECTION_PROPERTY_PER_PRINCIPAL", - "FORMULA_VARIABLE" + "FORMULA_VARIABLE", + "USER_PROPERTY" ], "description": "Type of the variable", "nullable": true @@ -14860,7 +15857,7 @@ "USER", "USER_GROUP" ], - "description": "Principal type", + "description": "Type of principal to which this value applies. Use USER to assign the value to a specific user, or USER_GROUP to assign it to a group.", "nullable": true }, "principal_identifier": { @@ -15179,6 +16176,14 @@ "description": "Redacted configuration for webhook signature verification.", "nullable": true }, + "additional_headers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookKeyValuePair" + }, + "description": "Additional headers as an array of key-value pairs.
Version: 26.4.0.cl or later", + "nullable": true + }, "creation_time_in_millis": { "type": "number", "format": "float", @@ -15337,6 +16342,24 @@ } } }, + "WebhookKeyValuePair": { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "Header name." + }, + "value": { + "type": "string", + "description": "Header value." + } + }, + "description": "Key-value pair for additional webhook headers." + }, "WebhookUser": { "type": "object", "required": [ @@ -15384,70 +16407,354 @@ "nullable": true } }, - "description": "Storage configuration containing provider-specific settings." + "description": "Storage configuration containing provider-specific settings." + }, + "AwsS3Config": { + "type": "object", + "required": [ + "bucket_name", + "region", + "role_arn" + ], + "properties": { + "bucket_name": { + "type": "string", + "description": "Name of the S3 bucket where webhook payloads are stored." + }, + "region": { + "type": "string", + "description": "AWS region where the S3 bucket is located." + }, + "role_arn": { + "type": "string", + "description": "ARN of the IAM role used for S3 access." + }, + "external_id": { + "type": "string", + "description": "External ID for secure cross-account role assumption.", + "nullable": true + }, + "path_prefix": { + "type": "string", + "description": "Path prefix for organizing objects within the bucket.", + "nullable": true + } + }, + "description": "AWS S3 storage configuration details." + }, + "WebhookPagination": { + "type": "object", + "required": [ + "record_offset", + "record_size", + "total_count", + "has_more" + ], + "properties": { + "record_offset": { + "type": "integer", + "format": "int32", + "description": "The starting record number from where the records are included." + }, + "record_size": { + "type": "integer", + "format": "int32", + "description": "The number of records included in the response." + }, + "total_count": { + "type": "integer", + "format": "int32", + "description": "Total number of webhook configurations available." + }, + "has_more": { + "type": "boolean", + "description": "Indicates whether more records are available beyond the current response." + } + } + }, + "CollectionSearchResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Collection" + }, + "description": "List of collections matching the search criteria." + }, + "record_offset": { + "type": "integer", + "format": "int32", + "description": "The starting record number from where the records are included.", + "nullable": true + }, + "record_size": { + "type": "integer", + "format": "int32", + "description": "The number of records returned.", + "nullable": true + }, + "is_last_batch": { + "type": "boolean", + "description": "Indicates if this is the last batch of results.", + "nullable": true + }, + "count": { + "type": "integer", + "format": "int32", + "description": "Total count of records returned.", + "nullable": true + } + }, + "description": "Response object for search collections operation." + }, + "Collection": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the collection." + }, + "name": { + "type": "string", + "description": "Name of the collection." + }, + "description": { + "type": "string", + "description": "Description of the collection.", + "nullable": true + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionMetadataItem" + }, + "description": "Metadata objects in the collection.", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "Creation timestamp in milliseconds.", + "nullable": true + }, + "updated_at": { + "type": "string", + "description": "Last updated timestamp in milliseconds.", + "nullable": true + }, + "author_name": { + "type": "string", + "description": "Name of the author who created the collection.", + "nullable": true + }, + "author_id": { + "type": "string", + "description": "Unique identifier of the author.", + "nullable": true + }, + "org": { + "$ref": "#/components/schemas/CollectionEntityIdentifier", + "description": "Org associated with the collection.", + "nullable": true + } + }, + "description": "Response object for a collection." + }, + "CollectionMetadataItem": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of the metadata object.", + "nullable": true + }, + "identifiers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionEntityIdentifier" + }, + "description": "List of identifiers for this metadata type.", + "nullable": true + } + }, + "description": "Metadata item in a collection response." + }, + "CollectionEntityIdentifier": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "Unique identifier of the entity.", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the entity.", + "nullable": true + } + }, + "description": "Entity identifier with name." + }, + "ChannelHistoryEventInput": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "LIVEBOARD_SCHEDULE" + ], + "description": "Type of the event." + }, + "identifier": { + "type": "string", + "description": "Unique ID or name of the event.", + "nullable": true + } + }, + "description": "Event specification for channel history search." + }, + "SearchChannelHistoryResponse": { + "type": "object", + "required": [ + "jobs" + ], + "properties": { + "jobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelHistoryJob" + }, + "description": "List of job execution records." + } + }, + "description": "Response wrapper for channel delivery history." + }, + "ChannelHistoryJob": { + "type": "object", + "required": [ + "id", + "status", + "creation_time_in_millis" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this job." + }, + "status": { + "type": "string", + "enum": [ + "PENDING", + "RETRY", + "SUCCESS", + "FAILED" + ], + "description": "Delivery status of this job." + }, + "creation_time_in_millis": { + "type": "number", + "format": "float", + "description": "Timestamp when this job was created (epoch milliseconds)." + }, + "event": { + "$ref": "#/components/schemas/ChannelHistoryEventInfo", + "description": "Event metadata for the triggering event associated with this job.", + "nullable": true + }, + "recipients": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobRecipient" + }, + "description": "The users, groups or external recipients for this job.", + "nullable": true + }, + "detail": { + "type": "string", + "description": "Additional delivery details such as HTTP response code or error message.", + "nullable": true + }, + "try_count": { + "type": "integer", + "format": "int32", + "description": "Number of attempts made. 1 indicates first attempt.", + "nullable": true + } + }, + "description": "A single job execution record for a channel." }, - "AwsS3Config": { + "ChannelHistoryEventInfo": { "type": "object", "required": [ - "bucket_name", - "region", - "role_arn" + "type", + "id" ], "properties": { - "bucket_name": { - "type": "string", - "description": "Name of the S3 bucket where webhook payloads are stored." - }, - "region": { + "type": { "type": "string", - "description": "AWS region where the S3 bucket is located." + "enum": [ + "LIVEBOARD_SCHEDULE" + ], + "description": "Type of the event." }, - "role_arn": { + "id": { "type": "string", - "description": "ARN of the IAM role used for S3 access." + "description": "Unique ID of the event." }, - "external_id": { + "name": { "type": "string", - "description": "External ID for secure cross-account role assumption.", + "description": "Name of the event.", "nullable": true }, - "path_prefix": { + "run_id": { "type": "string", - "description": "Path prefix for organizing objects within the bucket.", + "description": "Unique run ID for this event execution.", "nullable": true } }, - "description": "AWS S3 storage configuration details." + "description": "Event metadata for the triggering event associated with a job." }, - "WebhookPagination": { + "JobRecipient": { "type": "object", "required": [ - "record_offset", - "record_size", - "total_count", - "has_more" + "type" ], "properties": { - "record_offset": { - "type": "integer", - "format": "int32", - "description": "The starting record number from where the records are included." + "type": { + "type": "string", + "enum": [ + "USER", + "EXTERNAL" + ], + "description": "Type of the recipient." }, - "record_size": { - "type": "integer", - "format": "int32", - "description": "The number of records included in the response." + "id": { + "type": "string", + "description": "Unique ID of the recipient.", + "nullable": true }, - "total_count": { - "type": "integer", - "format": "int32", - "description": "Total number of webhook configurations available." + "name": { + "type": "string", + "description": "Name of the recipient.", + "nullable": true }, - "has_more": { - "type": "boolean", - "description": "Indicates whether more records are available beyond the current response." + "email": { + "type": "string", + "description": "Email of the recipient.", + "nullable": true } - } + }, + "description": "A recipient (user, group, or external) for a job execution." }, "GenericInfo": { "type": "object", @@ -16504,6 +17811,126 @@ }, "description": "Input for org-level non-embed access configuration." }, + "CommunicationChannelValidateResponse": { + "type": "object", + "required": [ + "channel_type", + "channel_id", + "event_type", + "job_id", + "result_code" + ], + "properties": { + "channel_type": { + "type": "string", + "enum": [ + "WEBHOOK" + ], + "description": "Type of communication channel that was validated." + }, + "channel_id": { + "type": "string", + "description": "ID of the communication channel (e.g., webhook_id)." + }, + "channel_name": { + "type": "string", + "description": "Name of the communication channel (e.g., webhook name).", + "nullable": true + }, + "event_type": { + "type": "string", + "enum": [ + "LIVEBOARD_SCHEDULE" + ], + "description": "Event type that was validated." + }, + "job_id": { + "type": "string", + "description": "Unique Job Id of the validation." + }, + "result_code": { + "type": "string", + "enum": [ + "SUCCESS", + "FAILED", + "PARTIAL_SUCCESS" + ], + "description": "Overall result of the validation." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelValidationDetail" + }, + "description": "Detailed results of various validation sub-steps.", + "nullable": true + } + }, + "description": "Response containing validation results for communication channel configuration." + }, + "ChannelValidationDetail": { + "type": "object", + "required": [ + "validation_step", + "status" + ], + "properties": { + "validation_step": { + "type": "string", + "enum": [ + "HTTP_CONNECTION_CHECK", + "STORAGE_FILE_UPLOAD_CHECK" + ], + "description": "The validation step that was performed." + }, + "status": { + "type": "string", + "enum": [ + "SUCCESS", + "FAILED" + ], + "description": "Status of this validation step." + }, + "http_status": { + "type": "integer", + "format": "int32", + "description": "HTTP status code returned by the channel (if applicable).", + "nullable": true + }, + "error_message": { + "type": "string", + "description": "Error message from the channel or validation process.", + "nullable": true + }, + "aws_s3_info": { + "$ref": "#/components/schemas/ChannelValidationAwsS3Info", + "description": "AWS S3 storage information from the validation step.", + "nullable": true + } + }, + "description": "Validation detail result for a sub-step." + }, + "ChannelValidationAwsS3Info": { + "type": "object", + "properties": { + "bucket_name": { + "type": "string", + "description": "Name of the S3 bucket.", + "nullable": true + }, + "file_name": { + "type": "string", + "description": "Name of the uploaded file.", + "nullable": true + }, + "object_key": { + "type": "string", + "description": "Key of the object in S3 storage.", + "nullable": true + } + }, + "description": "AWS S3 storage information returned from a validation step." + }, "TagMetadataTypeInput": { "type": "object", "required": [ @@ -16685,7 +18112,7 @@ }, "include_obj_id": { "type": "boolean", - "default": false, + "default": true, "description": "Boolean flag to export Object ID of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature.", "nullable": true }, @@ -18824,6 +20251,52 @@ "type": "string", "description": "The unique name of the org" }, + "principal_type": { + "type": "string", + "enum": [ + "USER", + "USER_GROUP" + ], + "description": "Type of principal to which the variable value applies. Use USER to assign values to a specific user, or USER_GROUP to assign values to a group.", + "nullable": true + }, + "principal_identifier": { + "type": "string", + "description": "Unique ID or name of the principal", + "nullable": true + }, + "model_identifier": { + "type": "string", + "description": "Unique ID or name of the model. Required for FORMULA_VARIABLE type to scope the variable value to a specific worksheet.", + "nullable": true + }, + "priority": { + "type": "integer", + "format": "int32", + "description": "The priority level for this scope assignment, used for conflict resolution when multiple values match. Higher priority values (larger numbers) take precedence.", + "nullable": true + } + }, + "description": "Input for defining the scope of variable value assignments in batch update operations" + }, + "VariablePutAssignmentInput": { + "type": "object", + "required": [ + "assigned_values" + ], + "properties": { + "assigned_values": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Values of the variable" + }, + "org_identifier": { + "type": "string", + "description": "The unique name of the org", + "nullable": true + }, "principal_type": { "type": "string", "enum": [ @@ -18850,7 +20323,7 @@ "nullable": true } }, - "description": "Input for variable value update in batch operations" + "description": "Input for variable value put operations" }, "CreateEmailCustomizationResponse": { "type": "object", @@ -19030,6 +20503,11 @@ "type": "boolean", "description": "Whether to hide contact support url.
Version: 26.2.0.cl or later", "nullable": true + }, + "hide_logo_url": { + "type": "boolean", + "description": "Whether to hide logo
Version: 26.4.0.cl or later", + "nullable": true } }, "description": "Email customization configuration properties" @@ -19251,6 +20729,24 @@ }, "description": "Input type for AWS S3 storage configuration." }, + "WebhookKeyValuePairInput": { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "Header name." + }, + "value": { + "type": "string", + "description": "Header value." + } + }, + "description": "Key-value pair input for additional webhook headers." + }, "WebhookDeleteResponse": { "type": "object", "required": [ @@ -19288,25 +20784,93 @@ }, "WebhookDeleteFailure": { "type": "object", - "required": [ - "id", - "name", - "error" - ], + "required": [ + "id", + "name", + "error" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the webhook that failed to delete." + }, + "name": { + "type": "string", + "description": "Name of the webhook that failed to delete." + }, + "error": { + "type": "string", + "description": "Error message describing why the deletion failed." + } + } + }, + "CollectionMetadataInput": { + "type": "object", + "required": [ + "type", + "identifiers" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "LIVEBOARD", + "ANSWER", + "LOGICAL_TABLE", + "COLLECTION" + ], + "description": "Type of metadata object." + }, + "identifiers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of unique IDs or names of metadata objects." + } + }, + "description": "Input type for metadata to be added to a collection." + }, + "CollectionDeleteResponse": { + "type": "object", + "properties": { + "metadata_deleted": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDeleteTypeIdentifiers" + }, + "description": "List of metadata objects that were successfully deleted.", + "nullable": true + }, + "metadata_skipped": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDeleteTypeIdentifiers" + }, + "description": "List of metadata objects that were skipped during deletion.\nObjects may be skipped due to lack of permissions, dependencies, or other constraints.", + "nullable": true + } + }, + "description": "Response object for delete collection operation." + }, + "CollectionDeleteTypeIdentifiers": { + "type": "object", "properties": { - "id": { - "type": "string", - "description": "Unique identifier of the webhook that failed to delete." - }, - "name": { + "type": { "type": "string", - "description": "Name of the webhook that failed to delete." + "description": "Type of the metadata object (e.g., Collection, Worksheet, Table).", + "nullable": true }, - "error": { - "type": "string", - "description": "Error message describing why the deletion failed." + "identifiers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GenericInfo" + }, + "description": "List of metadata identifiers belonging to the given type.", + "nullable": true } - } + }, + "description": "Group of metadata objects identified by type." }, "Runtime_Filter": { "type": "object", @@ -19846,6 +21410,135 @@ "token" ] }, + "CreateCollectionRequest": { + "type": "object", + "properties": { + "name": { + "description": "Name of the collection.", + "type": "string" + }, + "description": { + "description": "Description of the collection.", + "type": "string" + }, + "metadata": { + "description": "Metadata objects to add to the collection.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionMetadataInput" + } + } + }, + "required": [ + "name" + ] + }, + "DeleteCollectionRequest": { + "type": "object", + "properties": { + "collection_identifiers": { + "description": "Unique GUIDs of collections to delete. Note: Collection names cannot be\nused as identifiers since duplicate names are allowed.", + "type": "array", + "items": { + "type": "string" + } + }, + "delete_children": { + "description": "Flag to delete child objects of the collection that the user has access to.", + "default": false, + "type": "boolean", + "nullable": true + }, + "dry_run": { + "description": "Preview deletion without actually deleting. When set to true, returns\nwhat would be deleted without performing the actual deletion.", + "default": false, + "type": "boolean", + "nullable": true + } + }, + "required": [ + "collection_identifiers" + ] + }, + "SearchCollectionsRequest": { + "type": "object", + "properties": { + "name_pattern": { + "description": "A pattern to match case-insensitive name of the Collection object.\nUse '%' for wildcard match.", + "type": "string" + }, + "record_offset": { + "description": "The starting record number from where the records should be included.", + "default": 0, + "type": "integer", + "format": "int32" + }, + "record_size": { + "description": "The number of records that should be included.\n-1 implies no pagination.", + "default": 10, + "type": "integer", + "format": "int32" + }, + "collection_identifiers": { + "description": "Unique GUIDs of collections to search. Note: Collection names cannot be\nused as identifiers since duplicate names are allowed.", + "type": "array", + "items": { + "type": "string" + } + }, + "created_by_user_identifiers": { + "description": "Filter collections by author. Provide unique IDs or names of users\nwho created the collections.", + "type": "array", + "items": { + "type": "string" + } + }, + "include_metadata": { + "description": "Include collection metadata items in the response.", + "default": false, + "type": "boolean", + "nullable": true + }, + "sort_options": { + "description": "Sort options.", + "allOf": [ + { + "$ref": "#/components/schemas/SortOptions" + } + ] + } + } + }, + "UpdateCollectionRequest": { + "type": "object", + "properties": { + "name": { + "description": "Name of the collection.", + "type": "string" + }, + "description": { + "description": "Description of the collection.", + "type": "string" + }, + "metadata": { + "description": "Metadata objects to add, remove, or replace in the collection.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionMetadataInput" + } + }, + "operation": { + "description": "Type of update operation. Default operation type is REPLACE.", + "default": "REPLACE", + "type": "string", + "enum": [ + "ADD", + "REMOVE", + "REPLACE" + ] + } + } + }, "ConnectionConfigurationSearchRequest": { "type": "object", "properties": { @@ -21379,6 +23072,57 @@ } } }, + "SearchChannelHistoryRequest": { + "type": "object", + "properties": { + "channel_type": { + "description": "Type of communication channel to search history for.", + "type": "string", + "enum": [ + "WEBHOOK" + ] + }, + "job_ids": { + "description": "List of job execution record IDs to retrieve.", + "type": "array", + "items": { + "type": "string" + } + }, + "channel_identifiers": { + "description": "List of channel IDs or names to filter by.", + "type": "array", + "items": { + "type": "string" + } + }, + "channel_status": { + "description": "Filter by channel delivery status.", + "type": "string", + "enum": [ + "PENDING", + "RETRY", + "SUCCESS", + "FAILED" + ] + }, + "events": { + "description": "Filter by events that triggered the channel.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelHistoryEventInput" + } + }, + "start_epoch_time_in_millis": { + "description": "Filter records created on or after this time (epoch milliseconds).", + "type": "number", + "format": "float" + } + }, + "required": [ + "channel_type" + ] + }, "FetchLogsRequest": { "type": "object", "properties": { @@ -21830,6 +23574,49 @@ "variable_identifier" ] }, + "ParameterizeMetadataFieldsRequest": { + "type": "object", + "properties": { + "metadata_type": { + "description": "Type of metadata object to parameterize.", + "type": "string", + "enum": [ + "LOGICAL_TABLE", + "CONNECTION", + "CONNECTION_CONFIG" + ] + }, + "metadata_identifier": { + "description": "Unique ID or name of the metadata object to parameterize.", + "type": "string" + }, + "field_type": { + "description": "Type of field in the metadata to parameterize.", + "type": "string", + "enum": [ + "ATTRIBUTE", + "CONNECTION_PROPERTY" + ] + }, + "field_names": { + "description": "JSON array of field names to parameterize. Example: [schemaName, databaseName, tableName]", + "type": "array", + "items": { + "type": "string" + } + }, + "variable_identifier": { + "description": "Unique ID or name of the variable to use for parameterization of these fields.", + "type": "string" + } + }, + "required": [ + "metadata_identifier", + "field_type", + "field_names", + "variable_identifier" + ] + }, "SearchMetadataRequest": { "type": "object", "properties": { @@ -24489,6 +26276,34 @@ "configuration" ] }, + "ValidateCommunicationChannelRequest": { + "type": "object", + "properties": { + "channel_type": { + "description": "Type of communication channel to validate (e.g., WEBHOOK).", + "type": "string", + "enum": [ + "WEBHOOK" + ] + }, + "channel_identifier": { + "description": "Unique identifier or name for the communication channel.", + "type": "string" + }, + "event_type": { + "description": "Event type to validate for this channel.", + "type": "string", + "enum": [ + "LIVEBOARD_SCHEDULE" + ] + } + }, + "required": [ + "channel_type", + "channel_identifier", + "event_type" + ] + }, "AssignTagRequest": { "type": "object", "properties": { @@ -25233,6 +27048,46 @@ "name" ] }, + "DeleteVariablesRequest": { + "type": "object", + "properties": { + "identifiers": { + "description": "Unique id(s) or name(s) of the variable(s) to delete", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "identifiers" + ] + }, + "PutVariableValuesRequest": { + "type": "object", + "properties": { + "operation": { + "description": "Operation to perform", + "type": "string", + "enum": [ + "ADD", + "REMOVE", + "REPLACE", + "RESET" + ] + }, + "variable_assignment": { + "description": "Variable assignments", + "type": "array", + "items": { + "$ref": "#/components/schemas/VariablePutAssignmentInput" + } + } + }, + "required": [ + "variable_assignment" + ] + }, "SearchVariablesRequest": { "type": "object", "properties": { @@ -25289,14 +27144,14 @@ "type": "object", "properties": { "variable_assignment": { - "description": "Variables and values to update", + "description": "Array of variable assignment objects specifying the variable identifier, values to assign, and the operation type (ADD, REMOVE, REPLACE, or RESET) to perform on each variable.", "type": "array", "items": { "$ref": "#/components/schemas/VariableUpdateAssignmentInput" } }, "variable_value_scope": { - "description": "Variables and values to update", + "description": "Array of scope objects defining where the variable values apply, including organization context, optional principal constraints (user or group), model reference for formula variables, and priority for conflict resolution.", "type": "array", "items": { "$ref": "#/components/schemas/VariableUpdateScopeInput" @@ -25609,6 +27464,13 @@ "$ref": "#/components/schemas/StorageDestinationInput" } ] + }, + "additional_headers": { + "description": "Additional headers as an array of key-value pairs.\nExample: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}]
Version: 26.4.0.cl or later", + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookKeyValuePairInput" + } } }, "required": [ @@ -25724,6 +27586,13 @@ "$ref": "#/components/schemas/StorageDestinationInput" } ] + }, + "additional_headers": { + "description": "Additional headers as an array of key-value pairs.\nExample: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}]
Version: 26.4.0.cl or later", + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookKeyValuePairInput" + } } } } diff --git a/sdks/java/.openapi-generator/FILES b/sdks/java/.openapi-generator/FILES index 82da35cec..9c76b158c 100644 --- a/sdks/java/.openapi-generator/FILES +++ b/sdks/java/.openapi-generator/FILES @@ -40,8 +40,21 @@ docs/CALLBACKInput.md docs/CALLBACKInputMandatory.md docs/CalendarResponse.md docs/ChangeUserPasswordRequest.md +docs/ChannelHistoryEventInfo.md +docs/ChannelHistoryEventInput.md +docs/ChannelHistoryJob.md +docs/ChannelValidationAwsS3Info.md +docs/ChannelValidationDetail.md docs/ClusterNonEmbedAccess.md docs/ClusterNonEmbedAccessInput.md +docs/Collection.md +docs/CollectionDeleteResponse.md +docs/CollectionDeleteTypeIdentifiers.md +docs/CollectionEntityIdentifier.md +docs/CollectionMetadataInput.md +docs/CollectionMetadataItem.md +docs/CollectionSearchResponse.md +docs/CollectionsApi.md docs/Column.md docs/ColumnSecurityRule.md docs/ColumnSecurityRuleColumn.md @@ -57,6 +70,7 @@ docs/CommitHistoryResponse.md docs/CommitResponse.md docs/CommiterType.md docs/CommunicationChannelPreferencesResponse.md +docs/CommunicationChannelValidateResponse.md docs/ConfigureCommunicationChannelPreferencesRequest.md docs/ConfigureSecuritySettingsRequest.md docs/ConnectionConfigurationResponse.md @@ -71,6 +85,7 @@ docs/ConvertWorksheetToModelRequest.md docs/CopyObjectRequest.md docs/CreateAgentConversationRequest.md docs/CreateCalendarRequest.md +docs/CreateCollectionRequest.md docs/CreateConfigRequest.md docs/CreateConnectionConfigurationRequest.md docs/CreateConnectionRequest.md @@ -107,12 +122,14 @@ docs/DefaultActionConfig.md docs/DefaultActionConfigInput.md docs/DefaultActionConfigInputCreate.md docs/DefaultActionConfigSearchInput.md +docs/DeleteCollectionRequest.md docs/DeleteConfigRequest.md docs/DeleteConnectionConfigurationRequest.md docs/DeleteConnectionRequest.md docs/DeleteMetadataRequest.md docs/DeleteMetadataTypeInput.md docs/DeleteOrgEmailCustomizationRequest.md +docs/DeleteVariablesRequest.md docs/DeleteWebhookConfigurationsRequest.md docs/DeployCommitRequest.md docs/DeployResponse.md @@ -185,6 +202,8 @@ docs/JWTMetadataObject.md docs/JWTParameter.md docs/JWTUserOptions.md docs/JWTUserOptionsFull.md +docs/JobRecipient.md +docs/JobsApi.md docs/LBContextInput.md docs/LiveboardContent.md docs/LiveboardDataResponse.md @@ -221,6 +240,7 @@ docs/OrgResponse.md docs/OrgType.md docs/OrgsApi.md docs/ParameterValues.md +docs/ParameterizeMetadataFieldsRequest.md docs/ParameterizeMetadataRequest.md docs/ParametersListItem.md docs/ParametersListItemInput.md @@ -238,6 +258,7 @@ docs/PrincipalsListItem.md docs/PrincipalsListItemInput.md docs/PublishMetadataListItem.md docs/PublishMetadataRequest.md +docs/PutVariableValuesRequest.md docs/QueryGetDecomposedQueryRequest.md docs/RecipientDetails.md docs/RecipientDetailsInput.md @@ -285,6 +306,9 @@ docs/Scope.md docs/ScriptSrcUrls.md docs/ScriptSrcUrlsInput.md docs/SearchCalendarsRequest.md +docs/SearchChannelHistoryRequest.md +docs/SearchChannelHistoryResponse.md +docs/SearchCollectionsRequest.md docs/SearchCommitsRequest.md docs/SearchCommunicationChannelPreferencesRequest.md docs/SearchConfigRequest.md @@ -351,6 +375,7 @@ docs/UnassignTagRequest.md docs/UnparameterizeMetadataRequest.md docs/UnpublishMetadataRequest.md docs/UpdateCalendarRequest.md +docs/UpdateCollectionRequest.md docs/UpdateColumnSecurityRulesRequest.md docs/UpdateConfigRequest.md docs/UpdateConnectionConfigurationRequest.md @@ -379,12 +404,14 @@ docs/UserObject.md docs/UserParameterOptions.md docs/UserPrincipal.md docs/UsersApi.md +docs/ValidateCommunicationChannelRequest.md docs/ValidateMergeRequest.md docs/ValidateTokenRequest.md docs/ValueScopeInput.md docs/Variable.md docs/VariableApi.md docs/VariableDetailInput.md +docs/VariablePutAssignmentInput.md docs/VariableUpdateAssignmentInput.md docs/VariableUpdateScopeInput.md docs/VariableValue.md @@ -400,6 +427,8 @@ docs/WebhookAuthentication.md docs/WebhookAuthenticationInput.md docs/WebhookDeleteFailure.md docs/WebhookDeleteResponse.md +docs/WebhookKeyValuePair.md +docs/WebhookKeyValuePairInput.md docs/WebhookOrg.md docs/WebhookPagination.md docs/WebhookResponse.md @@ -439,6 +468,7 @@ src/main/java/com/thoughtspot/client/ServerVariable.java src/main/java/com/thoughtspot/client/StringUtil.java src/main/java/com/thoughtspot/client/api/AiApi.java src/main/java/com/thoughtspot/client/api/AuthenticationApi.java +src/main/java/com/thoughtspot/client/api/CollectionsApi.java src/main/java/com/thoughtspot/client/api/ConnectionConfigurationsApi.java src/main/java/com/thoughtspot/client/api/ConnectionsApi.java src/main/java/com/thoughtspot/client/api/CustomActionApi.java @@ -447,6 +477,7 @@ src/main/java/com/thoughtspot/client/api/DataApi.java src/main/java/com/thoughtspot/client/api/DbtApi.java src/main/java/com/thoughtspot/client/api/EmailCustomizationApi.java src/main/java/com/thoughtspot/client/api/GroupsApi.java +src/main/java/com/thoughtspot/client/api/JobsApi.java src/main/java/com/thoughtspot/client/api/LogApi.java src/main/java/com/thoughtspot/client/api/MetadataApi.java src/main/java/com/thoughtspot/client/api/OrgsApi.java @@ -499,8 +530,20 @@ src/main/java/com/thoughtspot/client/model/CALLBACKInput.java src/main/java/com/thoughtspot/client/model/CALLBACKInputMandatory.java src/main/java/com/thoughtspot/client/model/CalendarResponse.java src/main/java/com/thoughtspot/client/model/ChangeUserPasswordRequest.java +src/main/java/com/thoughtspot/client/model/ChannelHistoryEventInfo.java +src/main/java/com/thoughtspot/client/model/ChannelHistoryEventInput.java +src/main/java/com/thoughtspot/client/model/ChannelHistoryJob.java +src/main/java/com/thoughtspot/client/model/ChannelValidationAwsS3Info.java +src/main/java/com/thoughtspot/client/model/ChannelValidationDetail.java src/main/java/com/thoughtspot/client/model/ClusterNonEmbedAccess.java src/main/java/com/thoughtspot/client/model/ClusterNonEmbedAccessInput.java +src/main/java/com/thoughtspot/client/model/Collection.java +src/main/java/com/thoughtspot/client/model/CollectionDeleteResponse.java +src/main/java/com/thoughtspot/client/model/CollectionDeleteTypeIdentifiers.java +src/main/java/com/thoughtspot/client/model/CollectionEntityIdentifier.java +src/main/java/com/thoughtspot/client/model/CollectionMetadataInput.java +src/main/java/com/thoughtspot/client/model/CollectionMetadataItem.java +src/main/java/com/thoughtspot/client/model/CollectionSearchResponse.java src/main/java/com/thoughtspot/client/model/Column.java src/main/java/com/thoughtspot/client/model/ColumnSecurityRule.java src/main/java/com/thoughtspot/client/model/ColumnSecurityRuleColumn.java @@ -516,6 +559,7 @@ src/main/java/com/thoughtspot/client/model/CommitHistoryResponse.java src/main/java/com/thoughtspot/client/model/CommitResponse.java src/main/java/com/thoughtspot/client/model/CommiterType.java src/main/java/com/thoughtspot/client/model/CommunicationChannelPreferencesResponse.java +src/main/java/com/thoughtspot/client/model/CommunicationChannelValidateResponse.java src/main/java/com/thoughtspot/client/model/ConfigureCommunicationChannelPreferencesRequest.java src/main/java/com/thoughtspot/client/model/ConfigureSecuritySettingsRequest.java src/main/java/com/thoughtspot/client/model/ConnectionConfigurationResponse.java @@ -528,6 +572,7 @@ src/main/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequest.java src/main/java/com/thoughtspot/client/model/CopyObjectRequest.java src/main/java/com/thoughtspot/client/model/CreateAgentConversationRequest.java src/main/java/com/thoughtspot/client/model/CreateCalendarRequest.java +src/main/java/com/thoughtspot/client/model/CreateCollectionRequest.java src/main/java/com/thoughtspot/client/model/CreateConfigRequest.java src/main/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequest.java src/main/java/com/thoughtspot/client/model/CreateConnectionRequest.java @@ -560,12 +605,14 @@ src/main/java/com/thoughtspot/client/model/DefaultActionConfig.java src/main/java/com/thoughtspot/client/model/DefaultActionConfigInput.java src/main/java/com/thoughtspot/client/model/DefaultActionConfigInputCreate.java src/main/java/com/thoughtspot/client/model/DefaultActionConfigSearchInput.java +src/main/java/com/thoughtspot/client/model/DeleteCollectionRequest.java src/main/java/com/thoughtspot/client/model/DeleteConfigRequest.java src/main/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequest.java src/main/java/com/thoughtspot/client/model/DeleteConnectionRequest.java src/main/java/com/thoughtspot/client/model/DeleteMetadataRequest.java src/main/java/com/thoughtspot/client/model/DeleteMetadataTypeInput.java src/main/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequest.java +src/main/java/com/thoughtspot/client/model/DeleteVariablesRequest.java src/main/java/com/thoughtspot/client/model/DeleteWebhookConfigurationsRequest.java src/main/java/com/thoughtspot/client/model/DeployCommitRequest.java src/main/java/com/thoughtspot/client/model/DeployResponse.java @@ -636,6 +683,7 @@ src/main/java/com/thoughtspot/client/model/JWTMetadataObject.java src/main/java/com/thoughtspot/client/model/JWTParameter.java src/main/java/com/thoughtspot/client/model/JWTUserOptions.java src/main/java/com/thoughtspot/client/model/JWTUserOptionsFull.java +src/main/java/com/thoughtspot/client/model/JobRecipient.java src/main/java/com/thoughtspot/client/model/LBContextInput.java src/main/java/com/thoughtspot/client/model/LiveboardContent.java src/main/java/com/thoughtspot/client/model/LiveboardDataResponse.java @@ -669,6 +717,7 @@ src/main/java/com/thoughtspot/client/model/OrgPreferenceSearchCriteriaInput.java src/main/java/com/thoughtspot/client/model/OrgResponse.java src/main/java/com/thoughtspot/client/model/OrgType.java src/main/java/com/thoughtspot/client/model/ParameterValues.java +src/main/java/com/thoughtspot/client/model/ParameterizeMetadataFieldsRequest.java src/main/java/com/thoughtspot/client/model/ParameterizeMetadataRequest.java src/main/java/com/thoughtspot/client/model/ParametersListItem.java src/main/java/com/thoughtspot/client/model/ParametersListItemInput.java @@ -686,6 +735,7 @@ src/main/java/com/thoughtspot/client/model/PrincipalsListItem.java src/main/java/com/thoughtspot/client/model/PrincipalsListItemInput.java src/main/java/com/thoughtspot/client/model/PublishMetadataListItem.java src/main/java/com/thoughtspot/client/model/PublishMetadataRequest.java +src/main/java/com/thoughtspot/client/model/PutVariableValuesRequest.java src/main/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequest.java src/main/java/com/thoughtspot/client/model/RecipientDetails.java src/main/java/com/thoughtspot/client/model/RecipientDetailsInput.java @@ -730,6 +780,9 @@ src/main/java/com/thoughtspot/client/model/Scope.java src/main/java/com/thoughtspot/client/model/ScriptSrcUrls.java src/main/java/com/thoughtspot/client/model/ScriptSrcUrlsInput.java src/main/java/com/thoughtspot/client/model/SearchCalendarsRequest.java +src/main/java/com/thoughtspot/client/model/SearchChannelHistoryRequest.java +src/main/java/com/thoughtspot/client/model/SearchChannelHistoryResponse.java +src/main/java/com/thoughtspot/client/model/SearchCollectionsRequest.java src/main/java/com/thoughtspot/client/model/SearchCommitsRequest.java src/main/java/com/thoughtspot/client/model/SearchCommunicationChannelPreferencesRequest.java src/main/java/com/thoughtspot/client/model/SearchConfigRequest.java @@ -792,6 +845,7 @@ src/main/java/com/thoughtspot/client/model/UnassignTagRequest.java src/main/java/com/thoughtspot/client/model/UnparameterizeMetadataRequest.java src/main/java/com/thoughtspot/client/model/UnpublishMetadataRequest.java src/main/java/com/thoughtspot/client/model/UpdateCalendarRequest.java +src/main/java/com/thoughtspot/client/model/UpdateCollectionRequest.java src/main/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequest.java src/main/java/com/thoughtspot/client/model/UpdateConfigRequest.java src/main/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequest.java @@ -819,11 +873,13 @@ src/main/java/com/thoughtspot/client/model/UserInfo.java src/main/java/com/thoughtspot/client/model/UserObject.java src/main/java/com/thoughtspot/client/model/UserParameterOptions.java src/main/java/com/thoughtspot/client/model/UserPrincipal.java +src/main/java/com/thoughtspot/client/model/ValidateCommunicationChannelRequest.java src/main/java/com/thoughtspot/client/model/ValidateMergeRequest.java src/main/java/com/thoughtspot/client/model/ValidateTokenRequest.java src/main/java/com/thoughtspot/client/model/ValueScopeInput.java src/main/java/com/thoughtspot/client/model/Variable.java src/main/java/com/thoughtspot/client/model/VariableDetailInput.java +src/main/java/com/thoughtspot/client/model/VariablePutAssignmentInput.java src/main/java/com/thoughtspot/client/model/VariableUpdateAssignmentInput.java src/main/java/com/thoughtspot/client/model/VariableUpdateScopeInput.java src/main/java/com/thoughtspot/client/model/VariableValue.java @@ -838,6 +894,8 @@ src/main/java/com/thoughtspot/client/model/WebhookAuthentication.java src/main/java/com/thoughtspot/client/model/WebhookAuthenticationInput.java src/main/java/com/thoughtspot/client/model/WebhookDeleteFailure.java src/main/java/com/thoughtspot/client/model/WebhookDeleteResponse.java +src/main/java/com/thoughtspot/client/model/WebhookKeyValuePair.java +src/main/java/com/thoughtspot/client/model/WebhookKeyValuePairInput.java src/main/java/com/thoughtspot/client/model/WebhookOrg.java src/main/java/com/thoughtspot/client/model/WebhookPagination.java src/main/java/com/thoughtspot/client/model/WebhookResponse.java @@ -848,6 +906,7 @@ src/main/java/com/thoughtspot/client/model/WebhookSortOptionsInput.java src/main/java/com/thoughtspot/client/model/WebhookUser.java src/test/java/com/thoughtspot/client/api/AiApiTest.java src/test/java/com/thoughtspot/client/api/AuthenticationApiTest.java +src/test/java/com/thoughtspot/client/api/CollectionsApiTest.java src/test/java/com/thoughtspot/client/api/ConnectionConfigurationsApiTest.java src/test/java/com/thoughtspot/client/api/ConnectionsApiTest.java src/test/java/com/thoughtspot/client/api/CustomActionApiTest.java @@ -856,6 +915,7 @@ src/test/java/com/thoughtspot/client/api/DataApiTest.java src/test/java/com/thoughtspot/client/api/DbtApiTest.java src/test/java/com/thoughtspot/client/api/EmailCustomizationApiTest.java src/test/java/com/thoughtspot/client/api/GroupsApiTest.java +src/test/java/com/thoughtspot/client/api/JobsApiTest.java src/test/java/com/thoughtspot/client/api/LogApiTest.java src/test/java/com/thoughtspot/client/api/MetadataApiTest.java src/test/java/com/thoughtspot/client/api/OrgsApiTest.java @@ -903,8 +963,20 @@ src/test/java/com/thoughtspot/client/model/CALLBACKInputTest.java src/test/java/com/thoughtspot/client/model/CALLBACKTest.java src/test/java/com/thoughtspot/client/model/CalendarResponseTest.java src/test/java/com/thoughtspot/client/model/ChangeUserPasswordRequestTest.java +src/test/java/com/thoughtspot/client/model/ChannelHistoryEventInfoTest.java +src/test/java/com/thoughtspot/client/model/ChannelHistoryEventInputTest.java +src/test/java/com/thoughtspot/client/model/ChannelHistoryJobTest.java +src/test/java/com/thoughtspot/client/model/ChannelValidationAwsS3InfoTest.java +src/test/java/com/thoughtspot/client/model/ChannelValidationDetailTest.java src/test/java/com/thoughtspot/client/model/ClusterNonEmbedAccessInputTest.java src/test/java/com/thoughtspot/client/model/ClusterNonEmbedAccessTest.java +src/test/java/com/thoughtspot/client/model/CollectionDeleteResponseTest.java +src/test/java/com/thoughtspot/client/model/CollectionDeleteTypeIdentifiersTest.java +src/test/java/com/thoughtspot/client/model/CollectionEntityIdentifierTest.java +src/test/java/com/thoughtspot/client/model/CollectionMetadataInputTest.java +src/test/java/com/thoughtspot/client/model/CollectionMetadataItemTest.java +src/test/java/com/thoughtspot/client/model/CollectionSearchResponseTest.java +src/test/java/com/thoughtspot/client/model/CollectionTest.java src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleColumnTest.java src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupOperationTest.java src/test/java/com/thoughtspot/client/model/ColumnSecurityRuleGroupTest.java @@ -920,6 +992,7 @@ src/test/java/com/thoughtspot/client/model/CommitHistoryResponseTest.java src/test/java/com/thoughtspot/client/model/CommitResponseTest.java src/test/java/com/thoughtspot/client/model/CommiterTypeTest.java src/test/java/com/thoughtspot/client/model/CommunicationChannelPreferencesResponseTest.java +src/test/java/com/thoughtspot/client/model/CommunicationChannelValidateResponseTest.java src/test/java/com/thoughtspot/client/model/ConfigureCommunicationChannelPreferencesRequestTest.java src/test/java/com/thoughtspot/client/model/ConfigureSecuritySettingsRequestTest.java src/test/java/com/thoughtspot/client/model/ConnectionConfigurationResponseTest.java @@ -932,6 +1005,7 @@ src/test/java/com/thoughtspot/client/model/ConvertWorksheetToModelRequestTest.ja src/test/java/com/thoughtspot/client/model/CopyObjectRequestTest.java src/test/java/com/thoughtspot/client/model/CreateAgentConversationRequestTest.java src/test/java/com/thoughtspot/client/model/CreateCalendarRequestTest.java +src/test/java/com/thoughtspot/client/model/CreateCollectionRequestTest.java src/test/java/com/thoughtspot/client/model/CreateConfigRequestTest.java src/test/java/com/thoughtspot/client/model/CreateConnectionConfigurationRequestTest.java src/test/java/com/thoughtspot/client/model/CreateConnectionRequestTest.java @@ -964,12 +1038,14 @@ src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputCreateTest.ja src/test/java/com/thoughtspot/client/model/DefaultActionConfigInputTest.java src/test/java/com/thoughtspot/client/model/DefaultActionConfigSearchInputTest.java src/test/java/com/thoughtspot/client/model/DefaultActionConfigTest.java +src/test/java/com/thoughtspot/client/model/DeleteCollectionRequestTest.java src/test/java/com/thoughtspot/client/model/DeleteConfigRequestTest.java src/test/java/com/thoughtspot/client/model/DeleteConnectionConfigurationRequestTest.java src/test/java/com/thoughtspot/client/model/DeleteConnectionRequestTest.java src/test/java/com/thoughtspot/client/model/DeleteMetadataRequestTest.java src/test/java/com/thoughtspot/client/model/DeleteMetadataTypeInputTest.java src/test/java/com/thoughtspot/client/model/DeleteOrgEmailCustomizationRequestTest.java +src/test/java/com/thoughtspot/client/model/DeleteVariablesRequestTest.java src/test/java/com/thoughtspot/client/model/DeleteWebhookConfigurationsRequestTest.java src/test/java/com/thoughtspot/client/model/DeployCommitRequestTest.java src/test/java/com/thoughtspot/client/model/DeployResponseTest.java @@ -1040,6 +1116,7 @@ src/test/java/com/thoughtspot/client/model/JWTMetadataObjectTest.java src/test/java/com/thoughtspot/client/model/JWTParameterTest.java src/test/java/com/thoughtspot/client/model/JWTUserOptionsFullTest.java src/test/java/com/thoughtspot/client/model/JWTUserOptionsTest.java +src/test/java/com/thoughtspot/client/model/JobRecipientTest.java src/test/java/com/thoughtspot/client/model/LBContextInputTest.java src/test/java/com/thoughtspot/client/model/LiveboardContentTest.java src/test/java/com/thoughtspot/client/model/LiveboardDataResponseTest.java @@ -1073,6 +1150,7 @@ src/test/java/com/thoughtspot/client/model/OrgResponseTest.java src/test/java/com/thoughtspot/client/model/OrgTest.java src/test/java/com/thoughtspot/client/model/OrgTypeTest.java src/test/java/com/thoughtspot/client/model/ParameterValuesTest.java +src/test/java/com/thoughtspot/client/model/ParameterizeMetadataFieldsRequestTest.java src/test/java/com/thoughtspot/client/model/ParameterizeMetadataRequestTest.java src/test/java/com/thoughtspot/client/model/ParametersListItemInputTest.java src/test/java/com/thoughtspot/client/model/ParametersListItemTest.java @@ -1090,6 +1168,7 @@ src/test/java/com/thoughtspot/client/model/PrincipalsListItemInputTest.java src/test/java/com/thoughtspot/client/model/PrincipalsListItemTest.java src/test/java/com/thoughtspot/client/model/PublishMetadataListItemTest.java src/test/java/com/thoughtspot/client/model/PublishMetadataRequestTest.java +src/test/java/com/thoughtspot/client/model/PutVariableValuesRequestTest.java src/test/java/com/thoughtspot/client/model/QueryGetDecomposedQueryRequestTest.java src/test/java/com/thoughtspot/client/model/RecipientDetailsInputTest.java src/test/java/com/thoughtspot/client/model/RecipientDetailsTest.java @@ -1134,6 +1213,9 @@ src/test/java/com/thoughtspot/client/model/ScopeTest.java src/test/java/com/thoughtspot/client/model/ScriptSrcUrlsInputTest.java src/test/java/com/thoughtspot/client/model/ScriptSrcUrlsTest.java src/test/java/com/thoughtspot/client/model/SearchCalendarsRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchChannelHistoryRequestTest.java +src/test/java/com/thoughtspot/client/model/SearchChannelHistoryResponseTest.java +src/test/java/com/thoughtspot/client/model/SearchCollectionsRequestTest.java src/test/java/com/thoughtspot/client/model/SearchCommitsRequestTest.java src/test/java/com/thoughtspot/client/model/SearchCommunicationChannelPreferencesRequestTest.java src/test/java/com/thoughtspot/client/model/SearchConfigRequestTest.java @@ -1196,6 +1278,7 @@ src/test/java/com/thoughtspot/client/model/UnassignTagRequestTest.java src/test/java/com/thoughtspot/client/model/UnparameterizeMetadataRequestTest.java src/test/java/com/thoughtspot/client/model/UnpublishMetadataRequestTest.java src/test/java/com/thoughtspot/client/model/UpdateCalendarRequestTest.java +src/test/java/com/thoughtspot/client/model/UpdateCollectionRequestTest.java src/test/java/com/thoughtspot/client/model/UpdateColumnSecurityRulesRequestTest.java src/test/java/com/thoughtspot/client/model/UpdateConfigRequestTest.java src/test/java/com/thoughtspot/client/model/UpdateConnectionConfigurationRequestTest.java @@ -1223,10 +1306,12 @@ src/test/java/com/thoughtspot/client/model/UserObjectTest.java src/test/java/com/thoughtspot/client/model/UserParameterOptionsTest.java src/test/java/com/thoughtspot/client/model/UserPrincipalTest.java src/test/java/com/thoughtspot/client/model/UserTest.java +src/test/java/com/thoughtspot/client/model/ValidateCommunicationChannelRequestTest.java src/test/java/com/thoughtspot/client/model/ValidateMergeRequestTest.java src/test/java/com/thoughtspot/client/model/ValidateTokenRequestTest.java src/test/java/com/thoughtspot/client/model/ValueScopeInputTest.java src/test/java/com/thoughtspot/client/model/VariableDetailInputTest.java +src/test/java/com/thoughtspot/client/model/VariablePutAssignmentInputTest.java src/test/java/com/thoughtspot/client/model/VariableTest.java src/test/java/com/thoughtspot/client/model/VariableUpdateAssignmentInputTest.java src/test/java/com/thoughtspot/client/model/VariableUpdateScopeInputTest.java @@ -1242,6 +1327,8 @@ src/test/java/com/thoughtspot/client/model/WebhookAuthenticationInputTest.java src/test/java/com/thoughtspot/client/model/WebhookAuthenticationTest.java src/test/java/com/thoughtspot/client/model/WebhookDeleteFailureTest.java src/test/java/com/thoughtspot/client/model/WebhookDeleteResponseTest.java +src/test/java/com/thoughtspot/client/model/WebhookKeyValuePairInputTest.java +src/test/java/com/thoughtspot/client/model/WebhookKeyValuePairTest.java src/test/java/com/thoughtspot/client/model/WebhookOrgTest.java src/test/java/com/thoughtspot/client/model/WebhookPaginationTest.java src/test/java/com/thoughtspot/client/model/WebhookResponseTest.java diff --git a/sdks/java/README.md b/sdks/java/README.md index 83dcb0e01..1c94faf90 100644 --- a/sdks/java/README.md +++ b/sdks/java/README.md @@ -14,7 +14,7 @@ Add this dependency to your project's POM: com.thoughtspot rest-api-sdk - 2.22.0 + 2.23.0 compile ``` @@ -29,7 +29,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "com.thoughtspot:rest-api-sdk:2.22.0" + implementation "com.thoughtspot:rest-api-sdk:2.23.0" } ``` diff --git a/sdks/java/api/openapi.yaml b/sdks/java/api/openapi.yaml index b482f7942..e851fba56 100644 --- a/sdks/java/api/openapi.yaml +++ b/sdks/java/api/openapi.yaml @@ -14,9 +14,56 @@ paths: post: description: |2+ - Version: 10.13.0.cl or later + Version: 26.2.0.cl or later + + + Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. + + Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. + + #### Usage guidelines + + The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: + + - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. + - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user's queries. + + > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ "type": "data_source", "data_source_context": { "guid": "" } }`. + + The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: + + - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl + - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl + - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl + - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history + + If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. + + #### Example request + + ```json + { + "metadata_context": { + "type": "DATA_SOURCE", + "data_source_context": { + "data_source_identifier": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" + } + }, + "conversation_settings": {} + } + ``` + #### Error responses + | Code | Description | + | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | + + > ###### Note: + > + > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. + > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. @@ -34,6 +81,19 @@ paths: "200": content: application/json: + examples: + example_1: + summary: Create a conversation with a specific data source + value: + conversation_id: wwHQ5j8O8dQC + conversation_identifier: wwHQ5j8O8dQC + example_2: + summary: Create a conversation using auto mode where the agent automatically + discovers and selects the most relevant datasets for the user's + queries + value: + conversation_id: aaHQ5j8O8dQC + conversation_identifier: aaHQ5j8O8dQC schema: $ref: '#/components/schemas/AgentConversation' description: Common successful response @@ -49,6 +109,18 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. "500": content: application/json: @@ -68,19 +140,26 @@ paths: Version: 10.4.0.cl or later - Creates a Conversation object to start an AI-driven conversation based on a specific data model. + Creates a new conversation session tied to a specific data model for AI-driven natural language querying. - Requires at least view access to the metadata object specified in the request. + Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines - This API requires the `metadata_identifier` parameter to define the context for the conversation. + The request must include: + - `metadata_identifier`: the unique ID of the data source that provides context for the conversation + + Optionally, you can provide: + - `tokens`: a token string to set initial context for the conversation (e.g., `"[sales],[item type],[state]"`) - You can also specify the tokens to initiate the conversation as shown in this example: + If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. - `"tokens": "[tea],[sales],[type]"` + #### Error responses - If the API request is successful, ThoughtSpot returns the ID of the conversation. + | Code | Description | + |------|-------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. @@ -117,6 +196,18 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. "500": content: application/json: @@ -136,20 +227,29 @@ paths: Version: 10.15.0.cl or later - Provides relevant data source recommendations for a user-submitted natural language query. + Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. - To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. + Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines - The request must include a `query` string via the request body. + The request must include: + - `query`: the natural language question to find relevant data sources for - The returned results include metadata such as: - - `confidence`: a float indicating the model's confidence in the relevance of each recommendation - - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - - `reasoning`: rationale provided by the LLM to explain why each data source was recommended + If the request is successful, the API returns a ranked list of suggested data sources, each containing: + - `confidence`: a float score indicating the model's confidence in the relevance of the suggestion + - `details`: metadata about the data source + - `data_source_identifier`: the unique ID of the data source + - `data_source_name`: the display name of the data source + - `description`: a description of the data source + - `reasoning`: LLM-generated rationale explaining why the data source was recommended - If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. + #### Error responses + + | Code | Description | + |------|--------------------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. @@ -186,6 +286,18 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. "500": content: application/json: @@ -205,28 +317,41 @@ paths: Version: 10.15.0.cl or later - This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. + Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. + + Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines - To retrieve NL instructions for a data-model, the request must include: - - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions + The request must include: - The API returns a response object with: - - `nl_instructions_info`: An array of instruction objects, each containing: - - `instructions`: Array of text instructions for natural language processing - - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. + - `data_source_identifier`: the unique ID of the data model to retrieve instructions for + + If the request is successful, the API returns: - #### Instructions Scope + - `nl_instructions_info`: an array of instruction objects, each containing: + - `instructions`: the configured text instructions for AI processing + - `scope`: the scope of the instruction — currently only `GLOBAL` is supported + + #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) + #### Error responses + + | Code | Description | + |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | + > ###### Note: - > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. - > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. - > * Available from version 10.15.0.cl and later. - > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. - > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + > + > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. + > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. + > - Available from version 10.15.0.cl and later. + > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. + @@ -258,6 +383,18 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. "500": content: application/json: @@ -277,25 +414,38 @@ paths: Version: 10.13.0.cl or later - Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. + Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. - To use this API, the user must have at least view-level access to the referenced metadata objects. + Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines - To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. - - You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - - - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - - `instructions`: User specific text instructions sent to AI system for processing the query. - - Additional optional parameters include: - - - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. - - If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user's original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. + The request must include: + - `query`: the natural language question to decompose into analytical sub-questions + - `metadata_context`: at least one of the following context identifiers to guide question generation: + - `conversation_identifier` — an existing conversation session ID + - `answer_identifiers` — a list of Answer GUIDs + - `liveboard_identifiers` — a list of Liveboard GUIDs + - `data_source_identifiers` — a list of data source GUIDs + + Optional parameters for refining the output: + - `ai_context`: additional context to improve response quality + - `content` — supplementary text or CSV data as string input + - `instructions` — custom text instructions for the AI system + - `limit_relevant_questions`: maximum number of questions to return (default: `5`) + - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results + + If the request is successful, the API returns a list of relevant analytical questions, each containing: + - `query`: the generated sub-question + - `data_source_identifier`: the unique ID of the data source the question targets + - `data_source_name`: the display name of the corresponding data source + + #### Error responses + + | Code | Description | + |------|---------------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. @@ -304,6 +454,7 @@ paths: + operationId: getRelevantQuestions parameters: [] requestBody: @@ -331,6 +482,18 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. "500": content: application/json: @@ -351,6 +514,40 @@ paths: Version: 10.7.0.cl or later + **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). + + Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. + + Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. + + #### Usage guidelines + + The request accepts the following parameters: + + - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag + - `worksheetIds`: list of data source identifiers to scope the decomposition + - `answerIds`: list of Answer GUIDs whose data guides the response + - `liveboardIds`: list of Liveboard GUIDs whose data guides the response + - `conversationId`: an existing conversation session ID for context continuity + - `content`: supplementary text or CSV data to improve response quality + - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) + + If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: + - `query`: the generated analytical sub-question + - `worksheetId`: the unique ID of the data source the question targets + - `worksheetName`: the display name of the corresponding data source + + #### Error responses + + | Code | Description | + |------|---------------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | + + > ###### Note: + > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. + > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. + > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. @@ -383,6 +580,18 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. "500": content: application/json: @@ -397,21 +606,48 @@ paths: - application/json /api/rest/2.0/ai/agent/{conversation_identifier}/converse: post: - description: "\nVersion: 10.15.0.cl or later\n\n\nThis API allows users to initiate\ - \ or continue an agent (Spotter) conversation by submitting one or more natural\ - \ language messages. \nTo use this API, the user must have access to the relevant\ - \ conversational session (via conversation_identifier) and submit at least\ - \ one message.\n\n\n#### Usage guidelines\n\nTo initiate or continue a conversation,\ - \ the request must include:\n- `conversation_identifier`: a unique session\ - \ ID for continuity and message tracking\n- `messages`: an array of one or\ - \ more text messages, each with a value and type\n\nThe API returns a array\ - \ of object with a type, message, and metadata.\n- `type`: Type of the message\ - \ — text, answer, or error.\n- `message`: Main content of the response.\n\ - - `metadata`: Additional info depending on the message type.\n\n> ###### Note:\n\ - > * This endpoint is currently in Beta. Breaking changes may be introduced\ - \ before the endpoint is made Generally Available.\n> * This endpoint requires\ - \ Spotter - please contact ThoughtSpot support to enable Spotter on your cluster.\n\ - \n\n\n\n" + description: |2+ + + Version: 10.15.0.cl or later + + + **Deprecated** — Use `sendAgentConversationMessage` instead. + + Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. + + Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. + A conversation must first be created using the `createAgentConversation` API. + + #### Usage guidelines + + The request must include: + + - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking + - `messages`: an array of one or more text messages to send to the agent + + The API returns an array of response objects, each containing: + + - `type`: the kind of response — `text`, `answer`, or `error` + - `message`: the main content of the response + - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) + + #### Error responses + + | Code | Description | + |------|----------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | + + > ###### Note: + > + > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. + > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + + + + + operationId: sendAgentMessage parameters: - description: Unique identifier for the conversation (used to track context) @@ -447,6 +683,18 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. "500": content: application/json: @@ -461,27 +709,52 @@ paths: - application/json /api/rest/2.0/ai/agent/converse/sse: post: - description: "\nVersion: 10.13.0.cl or later\n\n\nThis API allows users to initiate\ - \ or continue an agent (Spotter) conversation by submitting one or more natural\ - \ language messages. \nTo use this API, the user must have access to the relevant\ - \ conversational session (via conversation_identifier) and submit at least\ - \ one message.\n\n\n#### Usage guidelines\n\nTo initiate or continue a conversation,\ - \ the request must include:\n- `conversation_identifier`: a unique session\ - \ ID for continuity and message tracking\n- `messages`: an array of one or\ - \ more text messages, each with a value and type\n\nAdditionally, user can\ - \ specify what tool can be included `conversation_settings` parameter, which\ - \ supports:\n- `enable_contextual_change_analysis` (default: false)\n- `enable_natural_language_answer_generation`\ - \ (default: true)\n- `enable_reasoning` (default: false)\n\nIf the request\ - \ is valid, the API returns a stream of messages in real time, including:\n\ - - `ack`: confirms receipt of the request\n- `text / text-chunk`: content chunks,\ - \ optionally formatted (e.g., markdown)\n- `answer`: the final structured\ - \ response with metadata and analytics\n- `error`: if a failure occurs\n-\ - \ `notification`: notification messages for operation being performed\n\n\ - > ###### Note:\n> * This endpoint is currently in Beta. Breaking changes may\ - \ be introduced before the endpoint is made Generally Available.\n> * This\ - \ endpoint requires Spotter - please contact ThoughtSpot support to enable\ - \ Spotter on your cluster.\n> * The streaming protocol uses Server-Sent Events\ - \ (SSE)\n\n\n\n\n" + description: |2+ + + Version: 10.13.0.cl or later + + + **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. + + Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. + + Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. + + #### Usage guidelines + + The request must include: + + - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking + - `messages`: an array of one or more text messages to send to the agent + + If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{"type": "...", ...}]` — a JSON array of event objects. Event types include: + + - `ack`: confirms receipt of the request (`node_id`) + - `conv_title`: conversation title (`title`, `conv_id`) + - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) + - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) + - `text`: full text block with same structure as `text-chunk` + - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) + - `error`: if a failure occurs + + #### Error responses + + | Code | Description | + |------|----------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | + + > ###### Note: + > + > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. + > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. + > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + > - The streaming protocol uses Server-Sent Events (SSE). + + + + + operationId: sendAgentMessageStreaming parameters: [] requestBody: @@ -509,6 +782,18 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. "500": content: application/json: @@ -528,15 +813,30 @@ paths: Version: 10.4.0.cl or later - Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. + Sends a follow-up message to an existing conversation within the context of a data model. - Requires at least view access to the metadata object specified in the request. + Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines - The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. + The request must include: + - `conversation_identifier`: the unique session ID returned by `createConversation` + - `metadata_identifier`: the unique ID of the data source used for the conversation + - `message`: a natural language string with the follow-up question + + If the request is successful, the API returns an array of response messages, each containing: + - `session_identifier`: the unique ID of the generated response + - `generation_number`: the generation number of the response + - `message_type`: the type of the response (e.g., `TSAnswer`) + - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) + - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response - If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. + #### Error responses + + | Code | Description | + |------|-----------------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. @@ -585,6 +885,18 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. "500": content: application/json: @@ -606,27 +918,39 @@ paths: This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. + Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. + #### Usage guidelines To set NL instructions for a data-model, the request must include: + - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. - The API returns a response object with: - - `success`: Boolean indicating whether the operation was successful + #### Instructions scope + + - **GLOBAL**: instructions that apply to all users querying this data model - #### Instructions Scope + If the request is successful, the API returns: - - **GLOBAL**: Instructions that apply globally for that data-model across the system + - `success`: a boolean indicating whether the operation completed successfully + + #### Error responses + + | Code | Description | + |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: - > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. - > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. - > * Available from version 10.15.0.cl and later. - > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. - > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + > + > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. + > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. + > - Available from version 10.15.0.cl and later. + > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. @@ -659,6 +983,18 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. "500": content: application/json: @@ -678,9 +1014,29 @@ paths: Version: 10.4.0.cl or later - Processes a natural language query and returns an AI-generated response based on a specified data model. + Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. + + Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. + + #### Usage guidelines + + The request must include: + - `query`: a natural language question (e.g., "What were total sales last quarter?") + - `metadata_identifier`: the unique ID of the data source to query against + + If the request is successful, the API returns a response message containing: + - `session_identifier`: the unique ID of the generated response + - `generation_number`: the generation number of the response + - `message_type`: the type of the response (e.g., `TSAnswer`) + - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) + - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response + + #### Error responses - Requires at least view access to the metadata object specified in the request. + | Code | Description | + |------|-----------------------------------------------------------------------------------------------------------------------------------------| + | 401 | Unauthorized — authentication token is missing, expired, or invalid. | + | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. @@ -717,6 +1073,18 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Operation failed + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. "500": content: application/json: @@ -1352,22 +1720,319 @@ paths: x-content-type: application/json x-accepts: - application/json - /api/rest/2.0/connection-configurations/search: + /api/rest/2.0/collections/create: post: description: |2+ - Version: 10.12.0.cl or later + Version: 26.4.0.cl or later - Gets connection configuration objects. + Creates a new collection in ThoughtSpot. - Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. - If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + #### Supported operations - #### Usage guidelines - * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. - * To fetch details of a configuration object, specify the configuration object name or GUID. + The API endpoint lets you perform the following operations: + + * Create a new collection + * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection + * Create nested collections by adding sub-collections + + + + + + operationId: createCollection + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateCollectionRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Collection' + description: Collection created successfully + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Collections + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/collections/delete: + post: + description: |2+ + + Version: 26.4.0.cl or later + + + Deletes one or more collections from ThoughtSpot. + + #### Delete options + + * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. + * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. + + #### Response + + The response includes: + * **metadata_deleted**: List of metadata objects that were successfully deleted + * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + + + + + + operationId: deleteCollection + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteCollectionRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CollectionDeleteResponse' + description: Collections deleted successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Resource not found. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Collections + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/collections/search: + post: + description: |2+ + + Version: 26.4.0.cl or later + + + Gets a list of collections available in ThoughtSpot. + + To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. + + #### Search options + + * **name_pattern**: Use '%' as a wildcard character to match collection names + * **collection_identifiers**: Search for specific collections by their GUIDs or names + * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response + + **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + + + + + + operationId: searchCollections + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchCollectionsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CollectionSearchResponse' + description: Successfully retrieved list of collections + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Collections + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/collections/{collection_identifier}/update: + post: + description: |2+ + + Version: 26.4.0.cl or later + + + Updates an existing collection in ThoughtSpot. + + #### Supported operations + + This API endpoint lets you perform the following operations: + + * Update collection name and description + * Change visibility settings + * Add metadata objects to the collection (operation: ADD) + * Remove metadata objects from the collection (operation: REMOVE) + * Replace all metadata objects in the collection (operation: REPLACE) + + #### Operation types + + * **ADD**: Adds the specified metadata objects to the existing collection without removing current items + * **REMOVE**: Removes only the specified metadata objects from the collection + * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + + + + + + operationId: updateCollection + parameters: + - description: |- + Unique GUID of the collection. Note: Collection names cannot be used as + identifiers since duplicate names are allowed. + explode: false + in: path + name: collection_identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCollectionRequest' + required: true + responses: + "204": + description: Collection updated successfully. No content returned. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Resource not found. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Collections + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/connection-configurations/search: + post: + description: |2+ + + Version: 10.12.0.cl or later + + + Gets connection configuration objects. + + Requires `DATAMANAGEMENT` (**Can manage data**) and edit permissions to the connection object, or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. + + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. + + #### Usage guidelines + * To get a list of all configurations available in the ThoughtSpot system, send the API request with only the connection name or GUID in the request body. + * To fetch details of a configuration object, specify the configuration object name or GUID. @@ -1637,18 +2302,26 @@ paths: \ attributes for a SnowFlake connection:\n ```\n {\n \"configuration\"\ :{\n \"accountName\":\"thoughtspot_partner\",\n \"user\":\"\ tsadmin\",\n \"password\":\"TestConn123\",\n \"role\":\"sysadmin\"\ - ,\n \"warehouse\":\"MEDIUM_WH\"\n },\n \"externalDatabases\"\ - :[\n\n ]\n }\n ```\n2. Set `validate` to `false`.\n\n#### Create a connection\ - \ with tables\n\nTo create a connection with tables:\n\n1. Pass these parameters\ - \ in your API request.\n * Name of the connection.\n * Type of the data warehouse\ - \ to connect to.\n * A JSON map of configuration attributes, database details,\ - \ and table properties in `data_warehouse_config` as shown in the following\ - \ example:\n ```\n {\n \"configuration\":{\n \"accountName\"\ - :\"thoughtspot_partner\",\n \"user\":\"tsadmin\",\n \"password\"\ - :\"TestConn123\",\n \"role\":\"sysadmin\",\n \"warehouse\":\"\ - MEDIUM_WH\"\n },\n \"externalDatabases\":[\n {\n \ - \ \"name\":\"AllDatatypes\",\n \"isAutoCreated\":false,\n \ - \ \"schemas\":[\n {\n \"name\":\"alldatatypes\"\ + ,\n \"warehouse\":\"MEDIUM_WH\"\n },\n \"authenticationType\"\ + : \"SERVICE_ACCOUNT\",\n \"externalDatabases\":[\n\n ]\n }\n ```\n\ + 2. Set `validate` to `false`.\n\n**NOTE:** If the `authentication_type` is\ + \ anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType\ + \ property in the payload. If you do not specify authenticationType, the API\ + \ will default to SERVICE_ACCOUNT as the authentication type.\n\n#### Create\ + \ a connection with tables\n\nIf [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac)\ + \ is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can\ + \ create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can\ + \ manage data models**) privilege is required.\n\nTo create a connection with\ + \ tables:\n\n1. Pass these parameters in your API request.\n * Name of the\ + \ connection.\n * Type of the data warehouse to connect to.\n * A JSON map\ + \ of configuration attributes, database details, and table properties in `data_warehouse_config`\ + \ as shown in the following example:\n ```\n {\n \"configuration\":{\n\ + \ \"accountName\":\"thoughtspot_partner\",\n \"user\":\"tsadmin\"\ + ,\n \"password\":\"TestConn123\",\n \"role\":\"sysadmin\",\n\ + \ \"warehouse\":\"MEDIUM_WH\"\n },\n \"authenticationType\"\ + : \"SERVICE_ACCOUNT\",\n \"externalDatabases\":[\n {\n \ + \ \"name\":\"AllDatatypes\",\n \"isAutoCreated\":false,\n \ + \ \"schemas\":[\n {\n \"name\":\"alldatatypes\"\ ,\n \"tables\":[\n {\n \ \ \"name\":\"allDatatypes\",\n \"type\":\"TABLE\"\ ,\n \"description\":\"\",\n \"\ @@ -1670,7 +2343,10 @@ paths: \ \"dbName\":\"AllDatatypes\"\n \ \ }\n ]\n }\n ]\n\ \ }\n ]\n }\n ]\n }\n ```\n2. Set `validate`\ - \ to `true`.\n\n\n\n\n\n" + \ to `true`.\n\n**NOTE:** If the `authentication_type` is anything other than\ + \ SERVICE_ACCOUNT, you must explicitly provide the authenticationType property\ + \ in the payload. If you do not specify authenticationType, the API will default\ + \ to SERVICE_ACCOUNT as the authentication type.\n\n\n\n\n\n" operationId: createConnection parameters: [] requestBody: @@ -4337,23 +5013,145 @@ paths: x-content-type: application/json x-accepts: - application/json - /api/rest/2.0/logs/fetch: + /api/rest/2.0/jobs/history/communication-channels/search: post: - description: "\n Version: 9.0.0.cl or later\n\n\nFetches security audit logs.\ - \ \n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\n\ - If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac)\ - \ is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control)\ - \ privileges are required.\n\n\n#### Usage guidelines\n\nBy default, the API\ - \ retrieves logs for the last 24 hours. You can set a custom duration in EPOCH\ - \ time. Make sure the log duration specified in your API request doesn’t exceed\ - \ 24 hours. If you must fetch logs for a longer time range, modify the duration\ - \ and make multiple sequential API requests.\n\nUpon successful execution,\ - \ the API returns logs with the following information:\n* timestamp of the\ - \ event\n* event ID\n* event type\n* name and GUID of the user\n* IP address\ - \ of ThoughtSpot instance\n\nFor more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs).\n\ - \n\n\n\n\n" - operationId: fetchLogs - parameters: [] + description: |2+ + + Version: 26.4.0.cl or later + + + Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + + **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: + + - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. + - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. + - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. + - Records older than the configured retention period are not returned. + + + + + + operationId: searchChannelHistory + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SearchChannelHistoryRequest' + required: true + responses: + "200": + content: + application/json: + examples: + example_1: + description: Search webhook channel history by channel identifier + and event + value: + jobs: + - id: n.6170538a-a4d4-4712-91bf-39b353db2b72 + status: SUCCESS + creation_time_in_millis: 1771599720674 + event: + type: LIVEBOARD_SCHEDULE + id: 2bb2ff83-b8d9-4d2b-8913-b2589bb6831b + name: schedule-identifier + run_id: 90c4f1b0-08c9-4a6c-8e61-49cffd9f1550 + recipients: + - type: USER + id: d211f619-8b72-45d3-92a7-69dde41159c7 + name: admin-user + email: admin@example.com + detail: "" + try_count: 1 + - id: n.5c5bbedb-c425-48c0-8b54-a17267b08e7c + status: SUCCESS + creation_time_in_millis: 1771599600508 + event: + type: LIVEBOARD_SCHEDULE + id: 2bb2ff83-b8d9-4d2b-8913-b2589bb6831b + name: schedule-identifier + run_id: b9834966-fe85-4fa9-8a10-9889c01d4826 + recipients: + - type: USER + id: d211f619-8b72-45d3-92a7-69dde41159c7 + name: admin-user + email: admin@example.com + detail: "" + try_count: 1 + example_2: + description: Search webhook channel history by job ID + value: + jobs: + - id: n.5c5bbedb-c425-48c0-8b54-a17267b08e7c + status: SUCCESS + creation_time_in_millis: 1771599600508 + event: + type: LIVEBOARD_SCHEDULE + id: 2bb2ff83-b8d9-4d2b-8913-b2589bb6831b + name: schedule-identifier + run_id: b9834966-fe85-4fa9-8a10-9889c01d4826 + recipients: + - type: USER + id: d211f619-8b72-45d3-92a7-69dde41159c7 + name: admin-user + email: admin@example.com + detail: "" + try_count: 1 + schema: + $ref: '#/components/schemas/SearchChannelHistoryResponse' + description: Channel status logs retrieved successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Jobs + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/logs/fetch: + post: + description: "\n Version: 9.0.0.cl or later\n\n\nFetches security audit logs.\ + \ \n\nRequires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege.\n\ + If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac)\ + \ is enabled on your instance, the [Admin Control](https://developers.thoughtspot.com/docs/rbac#_admin_control)\ + \ privileges are required.\n\n\n#### Usage guidelines\n\nBy default, the API\ + \ retrieves logs for the last 24 hours. You can set a custom duration in EPOCH\ + \ time. Make sure the log duration specified in your API request doesn’t exceed\ + \ 24 hours. If you must fetch logs for a longer time range, modify the duration\ + \ and make multiple sequential API requests.\n\nUpon successful execution,\ + \ the API returns logs with the following information:\n* timestamp of the\ + \ event\n* event ID\n* event type\n* name and GUID of the user\n* IP address\ + \ of ThoughtSpot instance\n\nFor more information see [Audit logs Documentation](https://developers.thoughtspot.com/docs/audit-logs).\n\ + \n\n\n\n\n" + operationId: fetchLogs + parameters: [] requestBody: content: application/json: @@ -5091,8 +5889,11 @@ paths: - application/json /api/rest/2.0/metadata/parameterize: post: + deprecated: true description: "\nParameterize fields in metadata objects. \n Version: 10.9.0.cl\ - \ or later\n\n\nAllows parameterizing fields in metadata objects in ThoughtSpot.\n\ + \ or later\n\n\n**Note:** This API endpoint is deprecated and will be removed\ + \ from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields)\ + \ instead.\n\nAllows parameterizing fields in metadata objects in ThoughtSpot.\n\ \nRequires appropriate permissions to modify the metadata object.\n\nThe API\ \ endpoint allows parameterizing the following types of metadata objects:\n\ * Logical Tables\n* Connections\n* Connection Configs\n\nFor a Logical Table\ @@ -5143,6 +5944,63 @@ paths: x-content-type: application/json x-accepts: - application/json + /api/rest/2.0/metadata/parameterize-fields: + post: + description: "\nParameterize multiple fields of metadata objects. For example\ + \ [schemaName, databaseName] for LOGICAL_TABLE. \n Version: 26.4.0.cl or\ + \ later\n\n\nAllows parameterizing multiple fields of metadata objects in\ + \ ThoughtSpot. For example, you can parameterize [schemaName, databaseName]\ + \ for LOGICAL_TABLE.\n\nRequires appropriate permissions to modify the metadata\ + \ object.\n\nThe API endpoint allows parameterizing the following types of\ + \ metadata objects:\n* Logical Tables\n* Connections\n* Connection Configs\n\ + \nFor a Logical Table, the field type must be `ATTRIBUTE` and field names\ + \ can include:\n* databaseName\n* schemaName\n* tableName\n\nFor a Connection\ + \ or Connection Config, the field type is always `CONNECTION_PROPERTY`. In\ + \ this case, field_names specifies the exact properties of the Connection\ + \ or Connection Config that need to be parameterized.\n\nFor Connection Config,\ + \ supported field names include:\n* impersonate_user\n\nYou can parameterize\ + \ multiple fields at once by providing an array of field names.\n\n\n\n\n\n" + operationId: parameterizeMetadataFields + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterizeMetadataFieldsRequest' + required: true + responses: + "204": + description: Parameterize successful. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Metadata + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json /api/rest/2.0/metadata/search: post: description: |2+ @@ -7645,6 +8503,69 @@ paths: x-content-type: application/json x-accepts: - application/json + /api/rest/2.0/system/communication-channels/validate: + post: + description: |2+ + + Version: 26.4.0.cl or later + + + Validates a communication channel configuration to ensure it is properly set up and can receive events. + - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). + - Use `channel_identifier` to provide the unique identifier or name for the communication channel. + - Use `event_type` to specify the event type to validate for this channel. + + Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + + + + + + operationId: validateCommunicationChannel + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ValidateCommunicationChannelRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CommunicationChannelValidateResponse' + description: communication channel configuration validated successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - System + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json /api/rest/2.0/tags/assign: post: description: |2+ @@ -8726,10 +9647,13 @@ paths: - application/json /api/rest/2.0/template/variables/{identifier}/delete: post: - description: "\nDelete a variable \n Version: 10.14.0.cl or later\n\n\nAllows\ - \ deleting a variable from ThoughtSpot.\n\nRequires ADMINISTRATION role and\ - \ TENANT scope.\nThe CAN_MANAGE_VARIABLES permission allows you to manage\ - \ Formula Variables in the current organization scope.\n\nThe API endpoint\ + deprecated: true + description: "\nDelete a variable \n Version: 10.14.0.cl or later\n\n\n**Note:**\ + \ This API endpoint is deprecated and will be removed from ThoughtSpot in\ + \ a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete)\ + \ instead.\n\nAllows deleting a variable from ThoughtSpot.\n\nRequires ADMINISTRATION\ + \ role and TENANT scope.\nThe CAN_MANAGE_VARIABLES permission allows you to\ + \ manage Formula Variables in the current organization scope.\n\nThe API endpoint\ \ requires:\n* The variable identifier (ID or name)\n\nThe operation will\ \ fail if:\n* The user lacks required permissions\n* The variable doesn't\ \ exist\n* The variable is being used by other objects \n\n\n\n\n" @@ -8775,35 +9699,27 @@ paths: - ThoughtSpotRest x-accepts: - application/json - /api/rest/2.0/template/variables/search: + /api/rest/2.0/template/variables/delete: post: - description: "\nSearch variables \n Version: 10.14.0.cl or later\n\n\nAllows\ - \ searching for variables in ThoughtSpot.\n\nRequires ADMINISTRATION role.\n\ - The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables\ - \ in the current organization scope.\n\nThe API endpoint supports searching\ - \ variables by:\n* Variable identifier (ID or name)\n* Variable type\n* Name\ - \ pattern (case-insensitive, supports % for wildcard)\n\nThe search results\ - \ can be formatted in three ways:\n* METADATA - Returns only variable metadata\ - \ (default)\n* METADATA_AND_VALUES - Returns variable metadata and values\n\ - \nThe values can be filtered by scope:\n* org_identifier\n* principal_identifier\n\ - * model_identifier\n\n\n\n\n\n" - operationId: searchVariables + description: "\nDelete variable(s) \n Version: 26.4.0.cl or later\n\n\nAllows\ + \ deleting multiple variables from ThoughtSpot.\n\nRequires ADMINISTRATION\ + \ role and TENANT scope.\nThe CAN_MANAGE_VARIABLES permission allows you to\ + \ manage Formula Variables in the current organization scope.\n\nThe API endpoint\ + \ requires:\n* The variable identifiers (IDs or names)\n\nThe operation will\ + \ fail if:\n* The user lacks required permissions\n* Any of the variables\ + \ don't exist\n* Any of the variables are being used by other objects\n\n\n\ + \n\n\n" + operationId: deleteVariables parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/SearchVariablesRequest' + $ref: '#/components/schemas/DeleteVariablesRequest' required: true responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/Variable' - type: array - description: List of variables is successful. + "204": + description: Deletion of variable(s) is successful. "400": content: application/json: @@ -8834,16 +9750,26 @@ paths: x-content-type: application/json x-accepts: - application/json - /api/rest/2.0/template/variables/{identifier}/update: + /api/rest/2.0/template/variables/{identifier}/update-values: post: - description: "\nUpdate a variable's name \n Version: 10.14.0.cl or later\n\n\ - \nAllows updating a variable's name in ThoughtSpot.\n\nRequires ADMINISTRATION\ - \ role and TENANT scope.\nThe CAN_MANAGE_VARIABLES permission allows you to\ + description: "\nUpdate values for a variable \n Version: 26.4.0.cl or later\n\ + \n\nAllows updating values for a specific variable in ThoughtSpot.\n\nRequires\ + \ ADMINISTRATION role.\nThe CAN_MANAGE_VARIABLES permission allows you to\ \ manage Formula Variables in the current organization scope.\n\nThe API endpoint\ - \ allows updating:\n* The variable name\n\n\n\n\n" - operationId: updateVariable + \ allows:\n* Adding new values to the variable\n* Replacing existing values\n\ + * Deleting values from the variable\n* Resetting all values\n\nWhen updating\ + \ variable values, you need to specify:\n* The variable identifier (ID or\ + \ name)\n* The values to add/replace/remove\n* The operation to perform (ADD,\ + \ REPLACE, REMOVE, RESET)\n\nBehaviour based on operation type:\n* ADD - Adds\ + \ values to the variable if this is a list type variable, else same as replace.\n\ + * REPLACE - Replaces all values of a given set of constraints with the current\ + \ set of values.\n* REMOVE - Removes any values which match the set of conditions\ + \ of the variables if this is a list type variable, else clears value.\n*\ + \ RESET - Removes all constraints for the given variable, scope is ignored\n\ + \n\n\n\n\n" + operationId: putVariableValues parameters: - - description: Unique id or name of the variable to update. + - description: Unique ID or name of the variable explode: false in: path name: identifier @@ -8855,11 +9781,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateVariableRequest' + $ref: '#/components/schemas/PutVariableValuesRequest' required: true responses: "204": - description: Variable name updated successfully. + description: Variable values updated successfully. "400": content: application/json: @@ -8890,33 +9816,35 @@ paths: x-content-type: application/json x-accepts: - application/json - /api/rest/2.0/template/variables/update-values: + /api/rest/2.0/template/variables/search: post: - description: "\nUpdate values for multiple variables \n Version: 10.14.0.cl\ - \ or later\n\n\nAllows updating values for multiple variables in ThoughtSpot.\n\ - \nRequires ADMINISTRATION role.\nThe CAN_MANAGE_VARIABLES permission allows\ - \ you to manage Formula Variables in the current organization scope.\n\nThe\ - \ API endpoint allows:\n* Adding new values to variables\n* Replacing existing\ - \ values\n* Deleting values from variables\n\nWhen updating variable values,\ - \ you need to specify:\n* The variable identifiers\n* The values to add/replace/remove\ - \ for each variable\n* The operation to perform (ADD, REPLACE, REMOVE, RESET)\n\ - \nBehaviour based on operation type:\n* ADD - Adds values to the variable\ - \ if this is a list type variable, else same as replace.\n* REPLACE - Replaces\ - \ all values of a given set of constraints with the current set of values.\n\ - * REMOVE - Removes any values which match the set of conditions of the variables\ - \ if this is a list type variable, else clears value.\n* RESET - Removes all\ - \ constrains for a given variable, scope is ignored\n\n\n\n\n\n" - operationId: updateVariableValues + description: "\nSearch variables \n Version: 10.14.0.cl or later\n\n\nAllows\ + \ searching for variables in ThoughtSpot.\n\nRequires ADMINISTRATION role.\n\ + The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables\ + \ in the current organization scope.\n\nThe API endpoint supports searching\ + \ variables by:\n* Variable identifier (ID or name)\n* Variable type\n* Name\ + \ pattern (case-insensitive, supports % for wildcard)\n\nThe search results\ + \ can be formatted in three ways:\n* METADATA - Returns only variable metadata\ + \ (default)\n* METADATA_AND_VALUES - Returns variable metadata and values\n\ + \nThe values can be filtered by scope:\n* org_identifier\n* principal_identifier\n\ + * model_identifier\n\n\n\n\n\n" + operationId: searchVariables parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/UpdateVariableValuesRequest' + $ref: '#/components/schemas/SearchVariablesRequest' required: true responses: - "204": - description: Variable values updated successfully. + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Variable' + type: array + description: List of variables is successful. "400": content: application/json: @@ -8947,17 +9875,133 @@ paths: x-content-type: application/json x-accepts: - application/json - /api/rest/2.0/vcs/git/branches/commit: + /api/rest/2.0/template/variables/{identifier}/update: post: - description: |2+ - - Version: 9.2.0.cl or later - - - Commits TML files of metadata objects to the Git branch configured on your instance. - - Requires at least edit access to objects used in the commit operation. - + description: "\nUpdate a variable's name \n Version: 10.14.0.cl or later\n\n\ + \nAllows updating a variable's name in ThoughtSpot.\n\nRequires ADMINISTRATION\ + \ role and TENANT scope.\nThe CAN_MANAGE_VARIABLES permission allows you to\ + \ manage Formula Variables in the current organization scope.\n\nThe API endpoint\ + \ allows updating:\n* The variable name\n\n\n\n\n" + operationId: updateVariable + parameters: + - description: Unique id or name of the variable to update. + explode: false + in: path + name: identifier + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateVariableRequest' + required: true + responses: + "204": + description: Variable name updated successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Variable + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/template/variables/update-values: + post: + deprecated: true + description: "\nUpdate values for multiple variables \n Version: 10.14.0.cl\ + \ or later\n\n\n**Note:** This API endpoint is deprecated and will be removed\ + \ from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values)\ + \ instead.\n\nAllows updating values for multiple variables in ThoughtSpot.\n\ + \nRequires ADMINISTRATION role.\nThe CAN_MANAGE_VARIABLES permission allows\ + \ you to manage Formula Variables in the current organization scope.\n\nThe\ + \ API endpoint allows:\n* Adding new values to variables\n* Replacing existing\ + \ values\n* Deleting values from variables\n\nWhen updating variable values,\ + \ you need to specify:\n* The variable identifiers\n* The values to add/replace/remove\ + \ for each variable\n* The operation to perform (ADD, REPLACE, REMOVE, RESET)\n\ + \nBehaviour based on operation type:\n* ADD - Adds values to the variable\ + \ if this is a list type variable, else same as replace.\n* REPLACE - Replaces\ + \ all values of a given set of constraints with the current set of values.\n\ + * REMOVE - Removes any values which match the set of conditions of the variables\ + \ if this is a list type variable, else clears value.\n* RESET - Removes all\ + \ constrains for a given variable, scope is ignored\n\n\n\n\n\n" + operationId: updateVariableValues + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateVariableValuesRequest' + required: true + responses: + "204": + description: Variable values updated successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Invalid request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized access. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Forbidden access. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unexpected error + tags: + - Variable + - ThoughtSpotRest + x-content-type: application/json + x-accepts: + - application/json + /api/rest/2.0/vcs/git/branches/commit: + post: + description: |2+ + + Version: 9.2.0.cl or later + + + Commits TML files of metadata objects to the Git branch configured on your instance. + + Requires at least edit access to objects used in the commit operation. + Before using this endpoint to push your commits: * Enable Git integration on your instance. @@ -14394,6 +15438,7 @@ components: - TABLE_MAPPING - CONNECTION_PROPERTY_PER_PRINCIPAL - FORMULA_VARIABLE + - USER_PROPERTY nullable: true type: string name_pattern: @@ -14403,7 +15448,7 @@ components: type: string type: object ValueScopeInput: - description: Input for variable scope in search + description: Input for filtering variable values by scope in search operations example: principal_identifier: principal_identifier model_identifier: model_identifier @@ -14415,7 +15460,9 @@ components: nullable: true type: string principal_type: - description: Principal type + description: "Type of principal to filter by. Use USER to filter values\ + \ assigned to specific users, or USER_GROUP to filter values assigned\ + \ to groups." enum: - USER - USER_GROUP @@ -14426,7 +15473,8 @@ components: nullable: true type: string model_identifier: - description: Model Identifier + description: Unique ID or name of the model to filter by. Applicable only + for FORMULA_VARIABLE type. nullable: true type: string type: object @@ -14470,6 +15518,7 @@ components: - TABLE_MAPPING - CONNECTION_PROPERTY_PER_PRINCIPAL - FORMULA_VARIABLE + - USER_PROPERTY nullable: true type: string sensitive: @@ -14512,7 +15561,9 @@ components: description: The unique name of the org type: string principal_type: - description: Principal type + description: "Type of principal to which this value applies. Use USER to\ + \ assign the value to a specific user, or USER_GROUP to assign it to a\ + \ group." enum: - USER - USER_GROUP @@ -14750,7 +15801,12 @@ components: has_more: true record_offset: 0 webhooks: - - creation_time_in_millis: 0.8008282 + - additional_headers: + - value: value + key: key + - value: value + key: key + creation_time_in_millis: 0.8008282 org: name: name id: id @@ -14795,7 +15851,12 @@ components: BASIC_AUTH: password: password username: username - - creation_time_in_millis: 0.8008282 + - additional_headers: + - value: value + key: key + - value: value + key: key + creation_time_in_millis: 0.8008282 org: name: name id: id @@ -14854,6 +15915,11 @@ components: type: object WebhookResponse: example: + additional_headers: + - value: value + key: key + - value: value + key: key creation_time_in_millis: 0.8008282 org: name: name @@ -14930,6 +15996,13 @@ components: $ref: '#/components/schemas/WebhookAuthentication' signature_verification: $ref: '#/components/schemas/WebhookSignatureVerification' + additional_headers: + description: "Additional headers as an array of key-value pairs. \n Version:\ + \ 26.4.0.cl or later\n" + items: + $ref: '#/components/schemas/WebhookKeyValuePair' + nullable: true + type: array creation_time_in_millis: description: Creation time of the webhook configuration in milliseconds. format: float @@ -15071,6 +16144,22 @@ components: - secret - type type: object + WebhookKeyValuePair: + description: Key-value pair for additional webhook headers. + example: + value: value + key: key + properties: + key: + description: Header name. + type: string + value: + description: Header value. + type: string + required: + - key + - value + type: object WebhookUser: example: name: name @@ -15131,56 +16220,426 @@ components: region: region path_prefix: path_prefix properties: - bucket_name: - description: Name of the S3 bucket where webhook payloads are stored. - type: string - region: - description: AWS region where the S3 bucket is located. + bucket_name: + description: Name of the S3 bucket where webhook payloads are stored. + type: string + region: + description: AWS region where the S3 bucket is located. + type: string + role_arn: + description: ARN of the IAM role used for S3 access. + type: string + external_id: + description: External ID for secure cross-account role assumption. + nullable: true + type: string + path_prefix: + description: Path prefix for organizing objects within the bucket. + nullable: true + type: string + required: + - bucket_name + - region + - role_arn + type: object + WebhookPagination: + example: + total_count: 1 + record_size: 6 + has_more: true + record_offset: 0 + properties: + record_offset: + description: The starting record number from where the records are included. + format: int32 + type: integer + record_size: + description: The number of records included in the response. + format: int32 + type: integer + total_count: + description: Total number of webhook configurations available. + format: int32 + type: integer + has_more: + description: Indicates whether more records are available beyond the current + response. + type: boolean + required: + - has_more + - record_offset + - record_size + - total_count + type: object + CollectionSearchResponse: + description: Response object for search collections operation. + example: + collections: + - author_name: author_name + metadata: + - identifiers: + - identifier: identifier + name: name + - identifier: identifier + name: name + type: type + - identifiers: + - identifier: identifier + name: name + - identifier: identifier + name: name + type: type + updated_at: updated_at + org: + identifier: identifier + name: name + name: name + description: description + created_at: created_at + id: id + author_id: author_id + - author_name: author_name + metadata: + - identifiers: + - identifier: identifier + name: name + - identifier: identifier + name: name + type: type + - identifiers: + - identifier: identifier + name: name + - identifier: identifier + name: name + type: type + updated_at: updated_at + org: + identifier: identifier + name: name + name: name + description: description + created_at: created_at + id: id + author_id: author_id + count: 1 + record_size: 6 + is_last_batch: true + record_offset: 0 + properties: + collections: + description: List of collections matching the search criteria. + items: + $ref: '#/components/schemas/Collection' + type: array + record_offset: + description: The starting record number from where the records are included. + format: int32 + nullable: true + type: integer + record_size: + description: The number of records returned. + format: int32 + nullable: true + type: integer + is_last_batch: + description: Indicates if this is the last batch of results. + nullable: true + type: boolean + count: + description: Total count of records returned. + format: int32 + nullable: true + type: integer + required: + - collections + type: object + Collection: + description: Response object for a collection. + example: + author_name: author_name + metadata: + - identifiers: + - identifier: identifier + name: name + - identifier: identifier + name: name + type: type + - identifiers: + - identifier: identifier + name: name + - identifier: identifier + name: name + type: type + updated_at: updated_at + org: + identifier: identifier + name: name + name: name + description: description + created_at: created_at + id: id + author_id: author_id + properties: + id: + description: Unique identifier of the collection. + type: string + name: + description: Name of the collection. + type: string + description: + description: Description of the collection. + nullable: true + type: string + metadata: + description: Metadata objects in the collection. + items: + $ref: '#/components/schemas/CollectionMetadataItem' + nullable: true + type: array + created_at: + description: Creation timestamp in milliseconds. + nullable: true + type: string + updated_at: + description: Last updated timestamp in milliseconds. + nullable: true + type: string + author_name: + description: Name of the author who created the collection. + nullable: true + type: string + author_id: + description: Unique identifier of the author. + nullable: true + type: string + org: + $ref: '#/components/schemas/CollectionEntityIdentifier' + required: + - id + - name + type: object + CollectionMetadataItem: + description: Metadata item in a collection response. + example: + identifiers: + - identifier: identifier + name: name + - identifier: identifier + name: name + type: type + properties: + type: + description: Type of the metadata object. + nullable: true + type: string + identifiers: + description: List of identifiers for this metadata type. + items: + $ref: '#/components/schemas/CollectionEntityIdentifier' + nullable: true + type: array + type: object + CollectionEntityIdentifier: + description: Entity identifier with name. + example: + identifier: identifier + name: name + properties: + identifier: + description: Unique identifier of the entity. + nullable: true + type: string + name: + description: Name of the entity. + nullable: true + type: string + type: object + ChannelHistoryEventInput: + description: Event specification for channel history search. + example: + identifier: identifier + type: LIVEBOARD_SCHEDULE + properties: + type: + description: Type of the event. + enum: + - LIVEBOARD_SCHEDULE + type: string + identifier: + description: Unique ID or name of the event. + nullable: true + type: string + required: + - type + type: object + SearchChannelHistoryResponse: + description: Response wrapper for channel delivery history. + example: + jobs: + - creation_time_in_millis: 0.8008282 + recipients: + - name: name + id: id + type: USER + email: email + - name: name + id: id + type: USER + email: email + try_count: 6 + id: id + detail: detail + event: + run_id: run_id + name: name + id: id + type: LIVEBOARD_SCHEDULE + status: PENDING + - creation_time_in_millis: 0.8008282 + recipients: + - name: name + id: id + type: USER + email: email + - name: name + id: id + type: USER + email: email + try_count: 6 + id: id + detail: detail + event: + run_id: run_id + name: name + id: id + type: LIVEBOARD_SCHEDULE + status: PENDING + properties: + jobs: + description: List of job execution records. + items: + $ref: '#/components/schemas/ChannelHistoryJob' + type: array + required: + - jobs + type: object + ChannelHistoryJob: + description: A single job execution record for a channel. + example: + creation_time_in_millis: 0.8008282 + recipients: + - name: name + id: id + type: USER + email: email + - name: name + id: id + type: USER + email: email + try_count: 6 + id: id + detail: detail + event: + run_id: run_id + name: name + id: id + type: LIVEBOARD_SCHEDULE + status: PENDING + properties: + id: + description: Unique identifier for this job. + type: string + status: + description: Delivery status of this job. + enum: + - PENDING + - RETRY + - SUCCESS + - FAILED + type: string + creation_time_in_millis: + description: Timestamp when this job was created (epoch milliseconds). + format: float + type: number + event: + $ref: '#/components/schemas/ChannelHistoryEventInfo' + recipients: + description: "The users, groups or external recipients for this job." + items: + $ref: '#/components/schemas/JobRecipient' + nullable: true + type: array + detail: + description: Additional delivery details such as HTTP response code or error + message. + nullable: true + type: string + try_count: + description: Number of attempts made. 1 indicates first attempt. + format: int32 + nullable: true + type: integer + required: + - creation_time_in_millis + - id + - status + type: object + ChannelHistoryEventInfo: + description: Event metadata for the triggering event associated with a job. + example: + run_id: run_id + name: name + id: id + type: LIVEBOARD_SCHEDULE + properties: + type: + description: Type of the event. + enum: + - LIVEBOARD_SCHEDULE type: string - role_arn: - description: ARN of the IAM role used for S3 access. + id: + description: Unique ID of the event. type: string - external_id: - description: External ID for secure cross-account role assumption. + name: + description: Name of the event. nullable: true type: string - path_prefix: - description: Path prefix for organizing objects within the bucket. + run_id: + description: Unique run ID for this event execution. nullable: true type: string required: - - bucket_name - - region - - role_arn + - id + - type type: object - WebhookPagination: + JobRecipient: + description: "A recipient (user, group, or external) for a job execution." example: - total_count: 1 - record_size: 6 - has_more: true - record_offset: 0 + name: name + id: id + type: USER + email: email properties: - record_offset: - description: The starting record number from where the records are included. - format: int32 - type: integer - record_size: - description: The number of records included in the response. - format: int32 - type: integer - total_count: - description: Total number of webhook configurations available. - format: int32 - type: integer - has_more: - description: Indicates whether more records are available beyond the current - response. - type: boolean + type: + description: Type of the recipient. + enum: + - USER + - EXTERNAL + type: string + id: + description: Unique ID of the recipient. + nullable: true + type: string + name: + description: Name of the recipient. + nullable: true + type: string + email: + description: Email of the recipient. + nullable: true + type: string required: - - has_more - - record_offset - - record_size - - total_count + - type type: object GenericInfo: example: @@ -16141,6 +17600,133 @@ components: nullable: true type: array type: object + CommunicationChannelValidateResponse: + description: Response containing validation results for communication channel + configuration. + example: + channel_name: channel_name + event_type: LIVEBOARD_SCHEDULE + job_id: job_id + result_code: SUCCESS + details: + - error_message: error_message + validation_step: HTTP_CONNECTION_CHECK + aws_s3_info: + object_key: object_key + file_name: file_name + bucket_name: bucket_name + http_status: 0 + status: SUCCESS + - error_message: error_message + validation_step: HTTP_CONNECTION_CHECK + aws_s3_info: + object_key: object_key + file_name: file_name + bucket_name: bucket_name + http_status: 0 + status: SUCCESS + channel_type: WEBHOOK + channel_id: channel_id + properties: + channel_type: + description: Type of communication channel that was validated. + enum: + - WEBHOOK + type: string + channel_id: + description: "ID of the communication channel (e.g., webhook_id)." + type: string + channel_name: + description: "Name of the communication channel (e.g., webhook name)." + nullable: true + type: string + event_type: + description: Event type that was validated. + enum: + - LIVEBOARD_SCHEDULE + type: string + job_id: + description: Unique Job Id of the validation. + type: string + result_code: + description: Overall result of the validation. + enum: + - SUCCESS + - FAILED + - PARTIAL_SUCCESS + type: string + details: + description: Detailed results of various validation sub-steps. + items: + $ref: '#/components/schemas/ChannelValidationDetail' + nullable: true + type: array + required: + - channel_id + - channel_type + - event_type + - job_id + - result_code + type: object + ChannelValidationDetail: + description: Validation detail result for a sub-step. + example: + error_message: error_message + validation_step: HTTP_CONNECTION_CHECK + aws_s3_info: + object_key: object_key + file_name: file_name + bucket_name: bucket_name + http_status: 0 + status: SUCCESS + properties: + validation_step: + description: The validation step that was performed. + enum: + - HTTP_CONNECTION_CHECK + - STORAGE_FILE_UPLOAD_CHECK + type: string + status: + description: Status of this validation step. + enum: + - SUCCESS + - FAILED + type: string + http_status: + description: HTTP status code returned by the channel (if applicable). + format: int32 + nullable: true + type: integer + error_message: + description: Error message from the channel or validation process. + nullable: true + type: string + aws_s3_info: + $ref: '#/components/schemas/ChannelValidationAwsS3Info' + required: + - status + - validation_step + type: object + ChannelValidationAwsS3Info: + description: AWS S3 storage information returned from a validation step. + example: + object_key: object_key + file_name: file_name + bucket_name: bucket_name + properties: + bucket_name: + description: Name of the S3 bucket. + nullable: true + type: string + file_name: + description: Name of the uploaded file. + nullable: true + type: string + object_key: + description: Key of the object in S3 storage. + nullable: true + type: string + type: object TagMetadataTypeInput: example: identifier: identifier @@ -16334,7 +17920,7 @@ components: nullable: true type: boolean include_obj_id: - default: false + default: true description: Boolean flag to export Object ID of the object. This flag will work only after the Object ID feature has been enabled. Please contact support to enable the feature. @@ -18378,16 +19964,66 @@ components: - variable_values type: object VariableUpdateScopeInput: - description: Input for variable value update in batch operations + description: Input for defining the scope of variable value assignments in batch + update operations + example: + principal_identifier: principal_identifier + model_identifier: model_identifier + org_identifier: org_identifier + principal_type: USER + priority: 0 + properties: + org_identifier: + description: The unique name of the org + type: string + principal_type: + description: "Type of principal to which the variable value applies. Use\ + \ USER to assign values to a specific user, or USER_GROUP to assign values\ + \ to a group." + enum: + - USER + - USER_GROUP + nullable: true + type: string + principal_identifier: + description: Unique ID or name of the principal + nullable: true + type: string + model_identifier: + description: Unique ID or name of the model. Required for FORMULA_VARIABLE + type to scope the variable value to a specific worksheet. + nullable: true + type: string + priority: + description: "The priority level for this scope assignment, used for conflict\ + \ resolution when multiple values match. Higher priority values (larger\ + \ numbers) take precedence." + format: int32 + nullable: true + type: integer + required: + - org_identifier + type: object + VariablePutAssignmentInput: + description: Input for variable value put operations example: principal_identifier: principal_identifier model_identifier: model_identifier org_identifier: org_identifier + assigned_values: + - assigned_values + - assigned_values principal_type: USER priority: 0 properties: + assigned_values: + description: Values of the variable + items: + type: string + type: array org_identifier: description: The unique name of the org + nullable: true type: string principal_type: description: Principal type @@ -18410,7 +20046,7 @@ components: nullable: true type: integer required: - - org_identifier + - assigned_values type: object CreateEmailCustomizationResponse: example: @@ -18564,6 +20200,10 @@ components: \ or later\n" nullable: true type: boolean + hide_logo_url: + description: "Whether to hide logo \n Version: 26.4.0.cl or later\n" + nullable: true + type: boolean type: object ExternalTableInput: properties: @@ -18728,6 +20368,22 @@ components: - region - role_arn type: object + WebhookKeyValuePairInput: + description: Key-value pair input for additional webhook headers. + example: + value: value + key: key + properties: + key: + description: Header name. + type: string + value: + description: Header value. + type: string + required: + - key + - value + type: object WebhookDeleteResponse: example: failed_webhooks: @@ -18738,7 +20394,12 @@ components: id: id error: error deleted_webhooks: - - creation_time_in_millis: 0.8008282 + - additional_headers: + - value: value + key: key + - value: value + key: key + creation_time_in_millis: 0.8008282 org: name: name id: id @@ -18783,7 +20444,12 @@ components: BASIC_AUTH: password: password username: username - - creation_time_in_millis: 0.8008282 + - additional_headers: + - value: value + key: key + - value: value + key: key + creation_time_in_millis: 0.8008282 org: name: name id: id @@ -18842,38 +20508,130 @@ components: deleted_webhooks: description: List of successfully deleted webhooks. items: - $ref: '#/components/schemas/WebhookResponse' + $ref: '#/components/schemas/WebhookResponse' + type: array + failed_webhooks: + description: List of webhooks that failed to delete with error details. + items: + $ref: '#/components/schemas/WebhookDeleteFailure' + type: array + required: + - deleted_count + - deleted_webhooks + - failed_count + - failed_webhooks + type: object + WebhookDeleteFailure: + example: + name: name + id: id + error: error + properties: + id: + description: Unique identifier of the webhook that failed to delete. + type: string + name: + description: Name of the webhook that failed to delete. + type: string + error: + description: Error message describing why the deletion failed. + type: string + required: + - error + - id + - name + type: object + CollectionMetadataInput: + description: Input type for metadata to be added to a collection. + example: + identifiers: + - identifiers + - identifiers + type: LIVEBOARD + properties: + type: + description: Type of metadata object. + enum: + - LIVEBOARD + - ANSWER + - LOGICAL_TABLE + - COLLECTION + type: string + identifiers: + description: List of unique IDs or names of metadata objects. + items: + type: string + type: array + required: + - identifiers + - type + type: object + CollectionDeleteResponse: + description: Response object for delete collection operation. + example: + metadata_skipped: + - identifiers: + - name: name + id: id + - name: name + id: id + type: type + - identifiers: + - name: name + id: id + - name: name + id: id + type: type + metadata_deleted: + - identifiers: + - name: name + id: id + - name: name + id: id + type: type + - identifiers: + - name: name + id: id + - name: name + id: id + type: type + properties: + metadata_deleted: + description: List of metadata objects that were successfully deleted. + items: + $ref: '#/components/schemas/CollectionDeleteTypeIdentifiers' + nullable: true type: array - failed_webhooks: - description: List of webhooks that failed to delete with error details. + metadata_skipped: + description: |- + List of metadata objects that were skipped during deletion. + Objects may be skipped due to lack of permissions, dependencies, or other constraints. items: - $ref: '#/components/schemas/WebhookDeleteFailure' + $ref: '#/components/schemas/CollectionDeleteTypeIdentifiers' + nullable: true type: array - required: - - deleted_count - - deleted_webhooks - - failed_count - - failed_webhooks type: object - WebhookDeleteFailure: + CollectionDeleteTypeIdentifiers: + description: Group of metadata objects identified by type. example: - name: name - id: id - error: error + identifiers: + - name: name + id: id + - name: name + id: id + type: type properties: - id: - description: Unique identifier of the webhook that failed to delete. - type: string - name: - description: Name of the webhook that failed to delete. - type: string - error: - description: Error message describing why the deletion failed. + type: + description: "Type of the metadata object (e.g., Collection, Worksheet,\ + \ Table)." + nullable: true type: string - required: - - error - - id - - name + identifiers: + description: List of metadata identifiers belonging to the given type. + items: + $ref: '#/components/schemas/GenericInfo' + nullable: true + type: array type: object Runtime_Filter: description: List of runtime parameters need to set during the session. @@ -19472,6 +21230,156 @@ components: required: - token type: object + CreateCollectionRequest: + example: + metadata: + - identifiers: + - identifiers + - identifiers + type: LIVEBOARD + - identifiers: + - identifiers + - identifiers + type: LIVEBOARD + name: name + description: description + properties: + name: + description: Name of the collection. + type: string + description: + description: Description of the collection. + type: string + metadata: + description: Metadata objects to add to the collection. + items: + $ref: '#/components/schemas/CollectionMetadataInput' + type: array + required: + - name + type: object + DeleteCollectionRequest: + example: + dry_run: false + collection_identifiers: + - collection_identifiers + - collection_identifiers + delete_children: false + properties: + collection_identifiers: + description: |- + Unique GUIDs of collections to delete. Note: Collection names cannot be + used as identifiers since duplicate names are allowed. + items: + type: string + type: array + delete_children: + default: false + description: Flag to delete child objects of the collection that the user + has access to. + nullable: true + type: boolean + dry_run: + default: false + description: |- + Preview deletion without actually deleting. When set to true, returns + what would be deleted without performing the actual deletion. + nullable: true + type: boolean + required: + - collection_identifiers + type: object + SearchCollectionsRequest: + example: + created_by_user_identifiers: + - created_by_user_identifiers + - created_by_user_identifiers + name_pattern: name_pattern + record_size: 6 + include_metadata: false + collection_identifiers: + - collection_identifiers + - collection_identifiers + sort_options: "" + record_offset: 0 + properties: + name_pattern: + description: |- + A pattern to match case-insensitive name of the Collection object. + Use '%' for wildcard match. + type: string + record_offset: + default: 0 + description: The starting record number from where the records should be + included. + format: int32 + type: integer + record_size: + default: 10 + description: |- + The number of records that should be included. + -1 implies no pagination. + format: int32 + type: integer + collection_identifiers: + description: |- + Unique GUIDs of collections to search. Note: Collection names cannot be + used as identifiers since duplicate names are allowed. + items: + type: string + type: array + created_by_user_identifiers: + description: |- + Filter collections by author. Provide unique IDs or names of users + who created the collections. + items: + type: string + type: array + include_metadata: + default: false + description: Include collection metadata items in the response. + nullable: true + type: boolean + sort_options: + allOf: + - $ref: '#/components/schemas/SortOptions' + description: Sort options. + type: object + UpdateCollectionRequest: + example: + metadata: + - identifiers: + - identifiers + - identifiers + type: LIVEBOARD + - identifiers: + - identifiers + - identifiers + type: LIVEBOARD + name: name + description: description + operation: REPLACE + properties: + name: + description: Name of the collection. + type: string + description: + description: Description of the collection. + type: string + metadata: + description: "Metadata objects to add, remove, or replace in the collection." + items: + $ref: '#/components/schemas/CollectionMetadataInput' + type: array + operation: + default: REPLACE + description: Type of update operation. Default operation type is REPLACE. + enum: + - ADD + - REMOVE + - REPLACE + type: string + type: object ConnectionConfigurationSearchRequest: example: policy_type: NO_POLICY @@ -21126,6 +23034,58 @@ components: - REPLACE type: string type: object + SearchChannelHistoryRequest: + example: + channel_status: PENDING + channel_identifiers: + - channel_identifiers + - channel_identifiers + job_ids: + - job_ids + - job_ids + start_epoch_time_in_millis: 0.8008282 + channel_type: WEBHOOK + events: + - identifier: identifier + type: LIVEBOARD_SCHEDULE + - identifier: identifier + type: LIVEBOARD_SCHEDULE + properties: + channel_type: + description: Type of communication channel to search history for. + enum: + - WEBHOOK + type: string + job_ids: + description: List of job execution record IDs to retrieve. + items: + type: string + type: array + channel_identifiers: + description: List of channel IDs or names to filter by. + items: + type: string + type: array + channel_status: + description: Filter by channel delivery status. + enum: + - PENDING + - RETRY + - SUCCESS + - FAILED + type: string + events: + description: Filter by events that triggered the channel. + items: + $ref: '#/components/schemas/ChannelHistoryEventInput' + type: array + start_epoch_time_in_millis: + description: Filter records created on or after this time (epoch milliseconds). + format: float + type: number + required: + - channel_type + type: object FetchLogsRequest: example: log_type: SECURITY_AUDIT @@ -21602,6 +23562,48 @@ components: - metadata_identifier - variable_identifier type: object + ParameterizeMetadataFieldsRequest: + example: + metadata_identifier: metadata_identifier + metadata_type: LOGICAL_TABLE + field_names: + - field_names + - field_names + variable_identifier: variable_identifier + field_type: ATTRIBUTE + properties: + metadata_type: + description: Type of metadata object to parameterize. + enum: + - LOGICAL_TABLE + - CONNECTION + - CONNECTION_CONFIG + type: string + metadata_identifier: + description: Unique ID or name of the metadata object to parameterize. + type: string + field_type: + description: Type of field in the metadata to parameterize. + enum: + - ATTRIBUTE + - CONNECTION_PROPERTY + type: string + field_names: + description: "JSON array of field names to parameterize. Example: [schemaName,\ + \ databaseName, tableName]" + items: + type: string + type: array + variable_identifier: + description: Unique ID or name of the variable to use for parameterization + of these fields. + type: string + required: + - field_names + - field_type + - metadata_identifier + - variable_identifier + type: object SearchMetadataRequest: example: metadata: @@ -24476,6 +26478,30 @@ components: required: - configuration type: object + ValidateCommunicationChannelRequest: + example: + event_type: LIVEBOARD_SCHEDULE + channel_identifier: channel_identifier + channel_type: WEBHOOK + properties: + channel_type: + description: "Type of communication channel to validate (e.g., WEBHOOK)." + enum: + - WEBHOOK + type: string + channel_identifier: + description: Unique identifier or name for the communication channel. + type: string + event_type: + description: Event type to validate for this channel. + enum: + - LIVEBOARD_SCHEDULE + type: string + required: + - channel_identifier + - channel_type + - event_type + type: object AssignTagRequest: example: metadata: @@ -25292,6 +27318,57 @@ components: - name - type type: object + DeleteVariablesRequest: + example: + identifiers: + - identifiers + - identifiers + properties: + identifiers: + description: Unique id(s) or name(s) of the variable(s) to delete + items: + type: string + type: array + required: + - identifiers + type: object + PutVariableValuesRequest: + example: + variable_assignment: + - principal_identifier: principal_identifier + model_identifier: model_identifier + org_identifier: org_identifier + assigned_values: + - assigned_values + - assigned_values + principal_type: USER + priority: 0 + - principal_identifier: principal_identifier + model_identifier: model_identifier + org_identifier: org_identifier + assigned_values: + - assigned_values + - assigned_values + principal_type: USER + priority: 0 + operation: ADD + properties: + operation: + description: Operation to perform + enum: + - ADD + - REMOVE + - REPLACE + - RESET + type: string + variable_assignment: + description: Variable assignments + items: + $ref: '#/components/schemas/VariablePutAssignmentInput' + type: array + required: + - variable_assignment + type: object SearchVariablesRequest: example: response_content: METADATA @@ -25379,12 +27456,17 @@ components: priority: 0 properties: variable_assignment: - description: Variables and values to update + description: "Array of variable assignment objects specifying the variable\ + \ identifier, values to assign, and the operation type (ADD, REMOVE, REPLACE,\ + \ or RESET) to perform on each variable." items: $ref: '#/components/schemas/VariableUpdateAssignmentInput' type: array variable_value_scope: - description: Variables and values to update + description: "Array of scope objects defining where the variable values\ + \ apply, including organization context, optional principal constraints\ + \ (user or group), model reference for formula variables, and priority\ + \ for conflict resolution." items: $ref: '#/components/schemas/VariableUpdateScopeInput' type: array @@ -25685,6 +27767,11 @@ components: CreateWebhookConfigurationRequest: example: url_params: "{}" + additional_headers: + - value: value + key: key + - value: value + key: key signature_verification: "" name: name description: description @@ -25730,6 +27817,13 @@ components: : \"my-webhook-files\", \"region\": \"us-west-2\", \"role_arn\": \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\"\ , \"external_id\": \"ts-webhook-a1b2c3d4-7890\", \"path_prefix\": \"thoughtspot-webhooks/\"\ }}} \n Version: 26.3.0.cl or later\n" + additional_headers: + description: "Additional headers as an array of key-value pairs.\nExample:\ + \ [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] \n Version:\ + \ 26.4.0.cl or later\n" + items: + $ref: '#/components/schemas/WebhookKeyValuePairInput' + type: array required: - events - name @@ -25789,6 +27883,11 @@ components: UpdateWebhookConfigurationRequest: example: url_params: "{}" + additional_headers: + - value: value + key: key + - value: value + key: key signature_verification: "" name: name description: description @@ -25834,6 +27933,13 @@ components: : \"my-webhook-files\", \"region\": \"us-west-2\", \"role_arn\": \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\"\ , \"external_id\": \"ts-webhook-a1b2c3d4-7890\", \"path_prefix\": \"thoughtspot-webhooks/\"\ }}} \n Version: 26.3.0.cl or later\n" + additional_headers: + description: "Additional headers as an array of key-value pairs.\nExample:\ + \ [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] \n Version:\ + \ 26.4.0.cl or later\n" + items: + $ref: '#/components/schemas/WebhookKeyValuePairInput' + type: array type: object dbtConnection_request: properties: @@ -26010,6 +28116,11 @@ x-roles: tags: - 9.12.0.cl description: Roles for version 9.12.0.cl +- name: 26.4.0.cl + id: 26.4.0.cl + tags: + - 26.4.0.cl + description: Roles for version 26.4.0.cl - name: 10.12.0.cl id: 10.12.0.cl tags: diff --git a/sdks/java/build.gradle b/sdks/java/build.gradle index e0105779b..e9809c9a0 100644 --- a/sdks/java/build.gradle +++ b/sdks/java/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'com.thoughtspot' -version = '2.22.0' +version = '2.23.0' buildscript { repositories { diff --git a/sdks/java/build.sbt b/sdks/java/build.sbt index d48524658..e46a88f47 100644 --- a/sdks/java/build.sbt +++ b/sdks/java/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "com.thoughtspot", name := "rest-api-sdk", - version := "2.22.0", + version := "2.23.0", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), diff --git a/sdks/java/docs/AiApi.md b/sdks/java/docs/AiApi.md index 34c815362..143391723 100644 --- a/sdks/java/docs/AiApi.md +++ b/sdks/java/docs/AiApi.md @@ -23,7 +23,7 @@ All URIs are relative to *CLUSTER_URL* - Version: 10.13.0.cl or later + Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user's queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"<worksheet-id>\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Parameters @@ -50,6 +50,8 @@ All URIs are relative to *CLUSTER_URL* | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -58,7 +60,7 @@ All URIs are relative to *CLUSTER_URL* - Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Parameters @@ -85,6 +87,8 @@ All URIs are relative to *CLUSTER_URL* | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -93,7 +97,7 @@ All URIs are relative to *CLUSTER_URL* - Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model's confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model's confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. ### Parameters @@ -120,6 +124,8 @@ All URIs are relative to *CLUSTER_URL* | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -128,7 +134,7 @@ All URIs are relative to *CLUSTER_URL* - Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. ### Parameters @@ -155,6 +161,8 @@ All URIs are relative to *CLUSTER_URL* | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -163,7 +171,7 @@ All URIs are relative to *CLUSTER_URL* - Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user's original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Parameters @@ -190,6 +198,8 @@ All URIs are relative to *CLUSTER_URL* | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -198,7 +208,7 @@ All URIs are relative to *CLUSTER_URL* - Version: 10.7.0.cl or later + Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. ### Parameters @@ -225,6 +235,8 @@ All URIs are relative to *CLUSTER_URL* | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -233,7 +245,7 @@ All URIs are relative to *CLUSTER_URL* - Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Parameters @@ -261,6 +273,8 @@ All URIs are relative to *CLUSTER_URL* | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -269,7 +283,7 @@ All URIs are relative to *CLUSTER_URL* - Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). ### Parameters @@ -296,6 +310,8 @@ All URIs are relative to *CLUSTER_URL* | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -304,7 +320,7 @@ All URIs are relative to *CLUSTER_URL* - Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Parameters @@ -332,6 +348,8 @@ All URIs are relative to *CLUSTER_URL* | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -340,7 +358,7 @@ All URIs are relative to *CLUSTER_URL* - Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. ### Parameters @@ -367,6 +385,8 @@ All URIs are relative to *CLUSTER_URL* | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -375,7 +395,7 @@ All URIs are relative to *CLUSTER_URL* - Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Parameters @@ -402,5 +422,7 @@ All URIs are relative to *CLUSTER_URL* | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | diff --git a/sdks/java/docs/ChannelHistoryEventInfo.md b/sdks/java/docs/ChannelHistoryEventInfo.md new file mode 100644 index 000000000..fa27d9263 --- /dev/null +++ b/sdks/java/docs/ChannelHistoryEventInfo.md @@ -0,0 +1,29 @@ + + +# ChannelHistoryEventInfo + +Event metadata for the triggering event associated with a job. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of the event. | | +|**id** | **String** | Unique ID of the event. | | +|**name** | **String** | Name of the event. | [optional] | +|**runId** | **String** | Unique run ID for this event execution. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ChannelHistoryEventInput.md b/sdks/java/docs/ChannelHistoryEventInput.md new file mode 100644 index 000000000..3d7044a0f --- /dev/null +++ b/sdks/java/docs/ChannelHistoryEventInput.md @@ -0,0 +1,27 @@ + + +# ChannelHistoryEventInput + +Event specification for channel history search. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of the event. | | +|**identifier** | **String** | Unique ID or name of the event. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ChannelHistoryJob.md b/sdks/java/docs/ChannelHistoryJob.md new file mode 100644 index 000000000..94497bb59 --- /dev/null +++ b/sdks/java/docs/ChannelHistoryJob.md @@ -0,0 +1,35 @@ + + +# ChannelHistoryJob + +A single job execution record for a channel. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier for this job. | | +|**status** | [**StatusEnum**](#StatusEnum) | Delivery status of this job. | | +|**creationTimeInMillis** | **Float** | Timestamp when this job was created (epoch milliseconds). | | +|**event** | [**ChannelHistoryEventInfo**](ChannelHistoryEventInfo.md) | | [optional] | +|**recipients** | [**List<JobRecipient>**](JobRecipient.md) | The users, groups or external recipients for this job. | [optional] | +|**detail** | **String** | Additional delivery details such as HTTP response code or error message. | [optional] | +|**tryCount** | **Integer** | Number of attempts made. 1 indicates first attempt. | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| PENDING | "PENDING" | +| RETRY | "RETRY" | +| SUCCESS | "SUCCESS" | +| FAILED | "FAILED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ChannelValidationAwsS3Info.md b/sdks/java/docs/ChannelValidationAwsS3Info.md new file mode 100644 index 000000000..602a23de9 --- /dev/null +++ b/sdks/java/docs/ChannelValidationAwsS3Info.md @@ -0,0 +1,20 @@ + + +# ChannelValidationAwsS3Info + +AWS S3 storage information returned from a validation step. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bucketName** | **String** | Name of the S3 bucket. | [optional] | +|**fileName** | **String** | Name of the uploaded file. | [optional] | +|**objectKey** | **String** | Key of the object in S3 storage. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ChannelValidationDetail.md b/sdks/java/docs/ChannelValidationDetail.md new file mode 100644 index 000000000..e04917f0e --- /dev/null +++ b/sdks/java/docs/ChannelValidationDetail.md @@ -0,0 +1,40 @@ + + +# ChannelValidationDetail + +Validation detail result for a sub-step. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**validationStep** | [**ValidationStepEnum**](#ValidationStepEnum) | The validation step that was performed. | | +|**status** | [**StatusEnum**](#StatusEnum) | Status of this validation step. | | +|**httpStatus** | **Integer** | HTTP status code returned by the channel (if applicable). | [optional] | +|**errorMessage** | **String** | Error message from the channel or validation process. | [optional] | +|**awsS3Info** | [**ChannelValidationAwsS3Info**](ChannelValidationAwsS3Info.md) | | [optional] | + + + +## Enum: ValidationStepEnum + +| Name | Value | +|---- | -----| +| HTTP_CONNECTION_CHECK | "HTTP_CONNECTION_CHECK" | +| STORAGE_FILE_UPLOAD_CHECK | "STORAGE_FILE_UPLOAD_CHECK" | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| SUCCESS | "SUCCESS" | +| FAILED | "FAILED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/Collection.md b/sdks/java/docs/Collection.md new file mode 100644 index 000000000..f08e52742 --- /dev/null +++ b/sdks/java/docs/Collection.md @@ -0,0 +1,26 @@ + + +# Collection + +Response object for a collection. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier of the collection. | | +|**name** | **String** | Name of the collection. | | +|**description** | **String** | Description of the collection. | [optional] | +|**metadata** | [**List<CollectionMetadataItem>**](CollectionMetadataItem.md) | Metadata objects in the collection. | [optional] | +|**createdAt** | **String** | Creation timestamp in milliseconds. | [optional] | +|**updatedAt** | **String** | Last updated timestamp in milliseconds. | [optional] | +|**authorName** | **String** | Name of the author who created the collection. | [optional] | +|**authorId** | **String** | Unique identifier of the author. | [optional] | +|**org** | [**CollectionEntityIdentifier**](CollectionEntityIdentifier.md) | | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CollectionDeleteResponse.md b/sdks/java/docs/CollectionDeleteResponse.md new file mode 100644 index 000000000..1bd5cdba5 --- /dev/null +++ b/sdks/java/docs/CollectionDeleteResponse.md @@ -0,0 +1,19 @@ + + +# CollectionDeleteResponse + +Response object for delete collection operation. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataDeleted** | [**List<CollectionDeleteTypeIdentifiers>**](CollectionDeleteTypeIdentifiers.md) | List of metadata objects that were successfully deleted. | [optional] | +|**metadataSkipped** | [**List<CollectionDeleteTypeIdentifiers>**](CollectionDeleteTypeIdentifiers.md) | List of metadata objects that were skipped during deletion. Objects may be skipped due to lack of permissions, dependencies, or other constraints. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CollectionDeleteTypeIdentifiers.md b/sdks/java/docs/CollectionDeleteTypeIdentifiers.md new file mode 100644 index 000000000..f7a9e81d9 --- /dev/null +++ b/sdks/java/docs/CollectionDeleteTypeIdentifiers.md @@ -0,0 +1,19 @@ + + +# CollectionDeleteTypeIdentifiers + +Group of metadata objects identified by type. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | Type of the metadata object (e.g., Collection, Worksheet, Table). | [optional] | +|**identifiers** | [**List<GenericInfo>**](GenericInfo.md) | List of metadata identifiers belonging to the given type. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CollectionEntityIdentifier.md b/sdks/java/docs/CollectionEntityIdentifier.md new file mode 100644 index 000000000..5c1355e61 --- /dev/null +++ b/sdks/java/docs/CollectionEntityIdentifier.md @@ -0,0 +1,19 @@ + + +# CollectionEntityIdentifier + +Entity identifier with name. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifier** | **String** | Unique identifier of the entity. | [optional] | +|**name** | **String** | Name of the entity. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CollectionMetadataInput.md b/sdks/java/docs/CollectionMetadataInput.md new file mode 100644 index 000000000..a8333de04 --- /dev/null +++ b/sdks/java/docs/CollectionMetadataInput.md @@ -0,0 +1,30 @@ + + +# CollectionMetadataInput + +Input type for metadata to be added to a collection. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of metadata object. | | +|**identifiers** | **List<String>** | List of unique IDs or names of metadata objects. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD | "LIVEBOARD" | +| ANSWER | "ANSWER" | +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| COLLECTION | "COLLECTION" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CollectionMetadataItem.md b/sdks/java/docs/CollectionMetadataItem.md new file mode 100644 index 000000000..d083e1459 --- /dev/null +++ b/sdks/java/docs/CollectionMetadataItem.md @@ -0,0 +1,19 @@ + + +# CollectionMetadataItem + +Metadata item in a collection response. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | Type of the metadata object. | [optional] | +|**identifiers** | [**List<CollectionEntityIdentifier>**](CollectionEntityIdentifier.md) | List of identifiers for this metadata type. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CollectionSearchResponse.md b/sdks/java/docs/CollectionSearchResponse.md new file mode 100644 index 000000000..a07eabba3 --- /dev/null +++ b/sdks/java/docs/CollectionSearchResponse.md @@ -0,0 +1,22 @@ + + +# CollectionSearchResponse + +Response object for search collections operation. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**collections** | [**List<Collection>**](Collection.md) | List of collections matching the search criteria. | | +|**recordOffset** | **Integer** | The starting record number from where the records are included. | [optional] | +|**recordSize** | **Integer** | The number of records returned. | [optional] | +|**isLastBatch** | **Boolean** | Indicates if this is the last batch of results. | [optional] | +|**count** | **Integer** | Total count of records returned. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CollectionsApi.md b/sdks/java/docs/CollectionsApi.md new file mode 100644 index 000000000..07c6619d1 --- /dev/null +++ b/sdks/java/docs/CollectionsApi.md @@ -0,0 +1,159 @@ +# CollectionsApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**createCollection**](CollectionsApi.md#createCollection) | **POST** /api/rest/2.0/collections/create | +| [**deleteCollection**](CollectionsApi.md#deleteCollection) | **POST** /api/rest/2.0/collections/delete | +| [**searchCollections**](CollectionsApi.md#searchCollections) | **POST** /api/rest/2.0/collections/search | +| [**updateCollection**](CollectionsApi.md#updateCollection) | **POST** /api/rest/2.0/collections/{collection_identifier}/update | + + + +# **createCollection** +> Collection createCollection(createCollectionRequest) + + + + Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createCollectionRequest** | [**CreateCollectionRequest**](CreateCollectionRequest.md) + +### Return type + +[**Collection**](Collection.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Collection created successfully | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **deleteCollection** +> CollectionDeleteResponse deleteCollection(deleteCollectionRequest) + + + + Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteCollectionRequest** | [**DeleteCollectionRequest**](DeleteCollectionRequest.md) + +### Return type + +[**CollectionDeleteResponse**](CollectionDeleteResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Collections deleted successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **404** | Resource not found. | - | +| **500** | Unexpected error | - | + + +# **searchCollections** +> CollectionSearchResponse searchCollections(searchCollectionsRequest) + + + + Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use '%' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchCollectionsRequest** | [**SearchCollectionsRequest**](SearchCollectionsRequest.md) + +### Return type + +[**CollectionSearchResponse**](CollectionSearchResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully retrieved list of collections | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **updateCollection** +> updateCollection(collectionIdentifier, updateCollectionRequest) + + + + Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **collectionIdentifier** | **String** +| **updateCollectionRequest** | [**UpdateCollectionRequest**](UpdateCollectionRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Collection updated successfully. No content returned. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **404** | Resource not found. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/CommunicationChannelValidateResponse.md b/sdks/java/docs/CommunicationChannelValidateResponse.md new file mode 100644 index 000000000..aff309088 --- /dev/null +++ b/sdks/java/docs/CommunicationChannelValidateResponse.md @@ -0,0 +1,50 @@ + + +# CommunicationChannelValidateResponse + +Response containing validation results for communication channel configuration. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**channelType** | [**ChannelTypeEnum**](#ChannelTypeEnum) | Type of communication channel that was validated. | | +|**channelId** | **String** | ID of the communication channel (e.g., webhook_id). | | +|**channelName** | **String** | Name of the communication channel (e.g., webhook name). | [optional] | +|**eventType** | [**EventTypeEnum**](#EventTypeEnum) | Event type that was validated. | | +|**jobId** | **String** | Unique Job Id of the validation. | | +|**resultCode** | [**ResultCodeEnum**](#ResultCodeEnum) | Overall result of the validation. | | +|**details** | [**List<ChannelValidationDetail>**](ChannelValidationDetail.md) | Detailed results of various validation sub-steps. | [optional] | + + + +## Enum: ChannelTypeEnum + +| Name | Value | +|---- | -----| +| WEBHOOK | "WEBHOOK" | + + + +## Enum: EventTypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + + +## Enum: ResultCodeEnum + +| Name | Value | +|---- | -----| +| SUCCESS | "SUCCESS" | +| FAILED | "FAILED" | +| PARTIAL_SUCCESS | "PARTIAL_SUCCESS" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ConnectionsApi.md b/sdks/java/docs/ConnectionsApi.md index 59bda4d50..9111efd4e 100644 --- a/sdks/java/docs/ConnectionsApi.md +++ b/sdks/java/docs/ConnectionsApi.md @@ -21,7 +21,7 @@ All URIs are relative to *CLUSTER_URL* - Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. ### Parameters diff --git a/sdks/java/docs/CreateCollectionRequest.md b/sdks/java/docs/CreateCollectionRequest.md new file mode 100644 index 000000000..452f83352 --- /dev/null +++ b/sdks/java/docs/CreateCollectionRequest.md @@ -0,0 +1,19 @@ + + +# CreateCollectionRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the collection. | | +|**description** | **String** | Description of the collection. | [optional] | +|**metadata** | [**List<CollectionMetadataInput>**](CollectionMetadataInput.md) | Metadata objects to add to the collection. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/CreateWebhookConfigurationRequest.md b/sdks/java/docs/CreateWebhookConfigurationRequest.md index 565651240..41e7327ce 100644 --- a/sdks/java/docs/CreateWebhookConfigurationRequest.md +++ b/sdks/java/docs/CreateWebhookConfigurationRequest.md @@ -15,6 +15,7 @@ |**authentication** | [**WebhookAuthenticationInput**](WebhookAuthenticationInput.md) | Authorization configuration for the webhook. | [optional] | |**signatureVerification** | [**WebhookSignatureVerificationInput**](WebhookSignatureVerificationInput.md) | Configuration for webhook signature verification. | [optional] | |**storageDestination** | [**StorageDestinationInput**](StorageDestinationInput.md) | Configuration for storage destination. Example: {\"storage_type\": \"AWS_S3\", \"storage_config\": {\"aws_s3_config\": {\"bucket_name\": \"my-webhook-files\", \"region\": \"us-west-2\", \"role_arn\": \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\", \"external_id\": \"ts-webhook-a1b2c3d4-7890\", \"path_prefix\": \"thoughtspot-webhooks/\"}}} Version: 26.3.0.cl or later | [optional] | +|**additionalHeaders** | [**List<WebhookKeyValuePairInput>**](WebhookKeyValuePairInput.md) | Additional headers as an array of key-value pairs. Example: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: 26.4.0.cl or later | [optional] | diff --git a/sdks/java/docs/DeleteCollectionRequest.md b/sdks/java/docs/DeleteCollectionRequest.md new file mode 100644 index 000000000..98dbcd5f8 --- /dev/null +++ b/sdks/java/docs/DeleteCollectionRequest.md @@ -0,0 +1,19 @@ + + +# DeleteCollectionRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**collectionIdentifiers** | **List<String>** | Unique GUIDs of collections to delete. Note: Collection names cannot be used as identifiers since duplicate names are allowed. | | +|**deleteChildren** | **Boolean** | Flag to delete child objects of the collection that the user has access to. | [optional] | +|**dryRun** | **Boolean** | Preview deletion without actually deleting. When set to true, returns what would be deleted without performing the actual deletion. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/DeleteVariablesRequest.md b/sdks/java/docs/DeleteVariablesRequest.md new file mode 100644 index 000000000..2db48ede4 --- /dev/null +++ b/sdks/java/docs/DeleteVariablesRequest.md @@ -0,0 +1,17 @@ + + +# DeleteVariablesRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifiers** | **List<String>** | Unique id(s) or name(s) of the variable(s) to delete | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/JobRecipient.md b/sdks/java/docs/JobRecipient.md new file mode 100644 index 000000000..0528c7af9 --- /dev/null +++ b/sdks/java/docs/JobRecipient.md @@ -0,0 +1,30 @@ + + +# JobRecipient + +A recipient (user, group, or external) for a job execution. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Type of the recipient. | | +|**id** | **String** | Unique ID of the recipient. | [optional] | +|**name** | **String** | Name of the recipient. | [optional] | +|**email** | **String** | Email of the recipient. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| USER | "USER" | +| EXTERNAL | "EXTERNAL" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/JobsApi.md b/sdks/java/docs/JobsApi.md new file mode 100644 index 000000000..d4655ed7a --- /dev/null +++ b/sdks/java/docs/JobsApi.md @@ -0,0 +1,45 @@ +# JobsApi + +All URIs are relative to *CLUSTER_URL* + +| Method | HTTP request | +|------------- | ------------- | +| [**searchChannelHistory**](JobsApi.md#searchChannelHistory) | **POST** /api/rest/2.0/jobs/history/communication-channels/search | + + + +# **searchChannelHistory** +> SearchChannelHistoryResponse searchChannelHistory(searchChannelHistoryRequest) + + + + Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchChannelHistoryRequest** | [**SearchChannelHistoryRequest**](SearchChannelHistoryRequest.md) + +### Return type + +[**SearchChannelHistoryResponse**](SearchChannelHistoryResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Channel status logs retrieved successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/MetadataApi.md b/sdks/java/docs/MetadataApi.md index 1b147bf2f..4b126031e 100644 --- a/sdks/java/docs/MetadataApi.md +++ b/sdks/java/docs/MetadataApi.md @@ -15,6 +15,7 @@ All URIs are relative to *CLUSTER_URL* | [**importMetadataTML**](MetadataApi.md#importMetadataTML) | **POST** /api/rest/2.0/metadata/tml/import | | [**importMetadataTMLAsync**](MetadataApi.md#importMetadataTMLAsync) | **POST** /api/rest/2.0/metadata/tml/async/import | | [**parameterizeMetadata**](MetadataApi.md#parameterizeMetadata) | **POST** /api/rest/2.0/metadata/parameterize | +| [**parameterizeMetadataFields**](MetadataApi.md#parameterizeMetadataFields) | **POST** /api/rest/2.0/metadata/parameterize-fields | | [**searchMetadata**](MetadataApi.md#searchMetadata) | **POST** /api/rest/2.0/metadata/search | | [**unparameterizeMetadata**](MetadataApi.md#unparameterizeMetadata) | **POST** /api/rest/2.0/metadata/unparameterize | | [**updateMetadataHeader**](MetadataApi.md#updateMetadataHeader) | **POST** /api/rest/2.0/metadata/headers/update | @@ -388,7 +389,7 @@ null (empty response body) - Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user ### Parameters @@ -418,6 +419,42 @@ null (empty response body) | **403** | Forbidden access. | - | | **500** | Unexpected error | - | + +# **parameterizeMetadataFields** +> parameterizeMetadataFields(parameterizeMetadataFieldsRequest) + + + + Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **parameterizeMetadataFieldsRequest** | [**ParameterizeMetadataFieldsRequest**](ParameterizeMetadataFieldsRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Parameterize successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + # **searchMetadata** > List<MetadataSearchResponse> searchMetadata(searchMetadataRequest) diff --git a/sdks/java/docs/ParameterizeMetadataFieldsRequest.md b/sdks/java/docs/ParameterizeMetadataFieldsRequest.md new file mode 100644 index 000000000..58929cd14 --- /dev/null +++ b/sdks/java/docs/ParameterizeMetadataFieldsRequest.md @@ -0,0 +1,40 @@ + + +# ParameterizeMetadataFieldsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadataType** | [**MetadataTypeEnum**](#MetadataTypeEnum) | Type of metadata object to parameterize. | [optional] | +|**metadataIdentifier** | **String** | Unique ID or name of the metadata object to parameterize. | | +|**fieldType** | [**FieldTypeEnum**](#FieldTypeEnum) | Type of field in the metadata to parameterize. | | +|**fieldNames** | **List<String>** | JSON array of field names to parameterize. Example: [schemaName, databaseName, tableName] | | +|**variableIdentifier** | **String** | Unique ID or name of the variable to use for parameterization of these fields. | | + + + +## Enum: MetadataTypeEnum + +| Name | Value | +|---- | -----| +| LOGICAL_TABLE | "LOGICAL_TABLE" | +| CONNECTION | "CONNECTION" | +| CONNECTION_CONFIG | "CONNECTION_CONFIG" | + + + +## Enum: FieldTypeEnum + +| Name | Value | +|---- | -----| +| ATTRIBUTE | "ATTRIBUTE" | +| CONNECTION_PROPERTY | "CONNECTION_PROPERTY" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/PutVariableValuesRequest.md b/sdks/java/docs/PutVariableValuesRequest.md new file mode 100644 index 000000000..54fe19689 --- /dev/null +++ b/sdks/java/docs/PutVariableValuesRequest.md @@ -0,0 +1,29 @@ + + +# PutVariableValuesRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**operation** | [**OperationEnum**](#OperationEnum) | Operation to perform | [optional] | +|**variableAssignment** | [**List<VariablePutAssignmentInput>**](VariablePutAssignmentInput.md) | Variable assignments | | + + + +## Enum: OperationEnum + +| Name | Value | +|---- | -----| +| ADD | "ADD" | +| REMOVE | "REMOVE" | +| REPLACE | "REPLACE" | +| RESET | "RESET" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchChannelHistoryRequest.md b/sdks/java/docs/SearchChannelHistoryRequest.md new file mode 100644 index 000000000..b29800ca9 --- /dev/null +++ b/sdks/java/docs/SearchChannelHistoryRequest.md @@ -0,0 +1,41 @@ + + +# SearchChannelHistoryRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**channelType** | [**ChannelTypeEnum**](#ChannelTypeEnum) | Type of communication channel to search history for. | | +|**jobIds** | **List<String>** | List of job execution record IDs to retrieve. | [optional] | +|**channelIdentifiers** | **List<String>** | List of channel IDs or names to filter by. | [optional] | +|**channelStatus** | [**ChannelStatusEnum**](#ChannelStatusEnum) | Filter by channel delivery status. | [optional] | +|**events** | [**List<ChannelHistoryEventInput>**](ChannelHistoryEventInput.md) | Filter by events that triggered the channel. | [optional] | +|**startEpochTimeInMillis** | **Float** | Filter records created on or after this time (epoch milliseconds). | [optional] | + + + +## Enum: ChannelTypeEnum + +| Name | Value | +|---- | -----| +| WEBHOOK | "WEBHOOK" | + + + +## Enum: ChannelStatusEnum + +| Name | Value | +|---- | -----| +| PENDING | "PENDING" | +| RETRY | "RETRY" | +| SUCCESS | "SUCCESS" | +| FAILED | "FAILED" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchChannelHistoryResponse.md b/sdks/java/docs/SearchChannelHistoryResponse.md new file mode 100644 index 000000000..0de44f5d7 --- /dev/null +++ b/sdks/java/docs/SearchChannelHistoryResponse.md @@ -0,0 +1,18 @@ + + +# SearchChannelHistoryResponse + +Response wrapper for channel delivery history. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**jobs** | [**List<ChannelHistoryJob>**](ChannelHistoryJob.md) | List of job execution records. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SearchCollectionsRequest.md b/sdks/java/docs/SearchCollectionsRequest.md new file mode 100644 index 000000000..f9e5f5ead --- /dev/null +++ b/sdks/java/docs/SearchCollectionsRequest.md @@ -0,0 +1,23 @@ + + +# SearchCollectionsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**namePattern** | **String** | A pattern to match case-insensitive name of the Collection object. Use '%' for wildcard match. | [optional] | +|**recordOffset** | **Integer** | The starting record number from where the records should be included. | [optional] | +|**recordSize** | **Integer** | The number of records that should be included. -1 implies no pagination. | [optional] | +|**collectionIdentifiers** | **List<String>** | Unique GUIDs of collections to search. Note: Collection names cannot be used as identifiers since duplicate names are allowed. | [optional] | +|**createdByUserIdentifiers** | **List<String>** | Filter collections by author. Provide unique IDs or names of users who created the collections. | [optional] | +|**includeMetadata** | **Boolean** | Include collection metadata items in the response. | [optional] | +|**sortOptions** | [**SortOptions**](SortOptions.md) | Sort options. | [optional] | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/SystemApi.md b/sdks/java/docs/SystemApi.md index 964293200..ab77934a8 100644 --- a/sdks/java/docs/SystemApi.md +++ b/sdks/java/docs/SystemApi.md @@ -12,6 +12,7 @@ All URIs are relative to *CLUSTER_URL* | [**searchCommunicationChannelPreferences**](SystemApi.md#searchCommunicationChannelPreferences) | **POST** /api/rest/2.0/system/preferences/communication-channels/search | | [**searchSecuritySettings**](SystemApi.md#searchSecuritySettings) | **POST** /api/rest/2.0/system/security-settings/search | | [**updateSystemConfig**](SystemApi.md#updateSystemConfig) | **POST** /api/rest/2.0/system/config-update | +| [**validateCommunicationChannel**](SystemApi.md#validateCommunicationChannel) | **POST** /api/rest/2.0/system/communication-channels/validate | @@ -293,3 +294,39 @@ null (empty response body) | **403** | Forbidden access. | - | | **500** | Unexpected error | - | + +# **validateCommunicationChannel** +> CommunicationChannelValidateResponse validateCommunicationChannel(validateCommunicationChannelRequest) + + + + Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **validateCommunicationChannelRequest** | [**ValidateCommunicationChannelRequest**](ValidateCommunicationChannelRequest.md) + +### Return type + +[**CommunicationChannelValidateResponse**](CommunicationChannelValidateResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | communication channel configuration validated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + diff --git a/sdks/java/docs/TemplatePropertiesInputCreate.md b/sdks/java/docs/TemplatePropertiesInputCreate.md index 09248bad8..a55b11333 100644 --- a/sdks/java/docs/TemplatePropertiesInputCreate.md +++ b/sdks/java/docs/TemplatePropertiesInputCreate.md @@ -35,6 +35,7 @@ Email customization configuration properties |**companyWebsiteUrl** | **String** | Company website URL (HTTP/HTTPS only) | [optional] | |**contactSupportUrl** | **String** | Contact support url (HTTP/HTTPS only). Version: 26.2.0.cl or later | [optional] | |**hideContactSupportUrl** | **Boolean** | Whether to hide contact support url. Version: 26.2.0.cl or later | [optional] | +|**hideLogoUrl** | **Boolean** | Whether to hide logo Version: 26.4.0.cl or later | [optional] | ## Implemented Interfaces diff --git a/sdks/java/docs/ThoughtSpotRestApi.md b/sdks/java/docs/ThoughtSpotRestApi.md index 39e924f12..6b52f2e0f 100644 --- a/sdks/java/docs/ThoughtSpotRestApi.md +++ b/sdks/java/docs/ThoughtSpotRestApi.md @@ -16,6 +16,7 @@ All URIs are relative to *CLUSTER_URL* | [**copyObject**](ThoughtSpotRestApi.md#copyObject) | **POST** /api/rest/2.0/metadata/copyobject | | [**createAgentConversation**](ThoughtSpotRestApi.md#createAgentConversation) | **POST** /api/rest/2.0/ai/agent/conversation/create | | [**createCalendar**](ThoughtSpotRestApi.md#createCalendar) | **POST** /api/rest/2.0/calendars/create | +| [**createCollection**](ThoughtSpotRestApi.md#createCollection) | **POST** /api/rest/2.0/collections/create | | [**createConfig**](ThoughtSpotRestApi.md#createConfig) | **POST** /api/rest/2.0/vcs/git/config/create | | [**createConnection**](ThoughtSpotRestApi.md#createConnection) | **POST** /api/rest/2.0/connection/create | | [**createConnectionConfiguration**](ThoughtSpotRestApi.md#createConnectionConfiguration) | **POST** /api/rest/2.0/connection-configurations/create | @@ -36,6 +37,7 @@ All URIs are relative to *CLUSTER_URL* | [**dbtSearch**](ThoughtSpotRestApi.md#dbtSearch) | **POST** /api/rest/2.0/dbt/search | | [**deactivateUser**](ThoughtSpotRestApi.md#deactivateUser) | **POST** /api/rest/2.0/users/deactivate | | [**deleteCalendar**](ThoughtSpotRestApi.md#deleteCalendar) | **POST** /api/rest/2.0/calendars/{calendar_identifier}/delete | +| [**deleteCollection**](ThoughtSpotRestApi.md#deleteCollection) | **POST** /api/rest/2.0/collections/delete | | [**deleteConfig**](ThoughtSpotRestApi.md#deleteConfig) | **POST** /api/rest/2.0/vcs/git/config/delete | | [**deleteConnection**](ThoughtSpotRestApi.md#deleteConnection) | **POST** /api/rest/2.0/connection/delete | | [**deleteConnectionConfiguration**](ThoughtSpotRestApi.md#deleteConnectionConfiguration) | **POST** /api/rest/2.0/connection-configurations/delete | @@ -52,6 +54,7 @@ All URIs are relative to *CLUSTER_URL* | [**deleteUser**](ThoughtSpotRestApi.md#deleteUser) | **POST** /api/rest/2.0/users/{user_identifier}/delete | | [**deleteUserGroup**](ThoughtSpotRestApi.md#deleteUserGroup) | **POST** /api/rest/2.0/groups/{group_identifier}/delete | | [**deleteVariable**](ThoughtSpotRestApi.md#deleteVariable) | **POST** /api/rest/2.0/template/variables/{identifier}/delete | +| [**deleteVariables**](ThoughtSpotRestApi.md#deleteVariables) | **POST** /api/rest/2.0/template/variables/delete | | [**deleteWebhookConfigurations**](ThoughtSpotRestApi.md#deleteWebhookConfigurations) | **POST** /api/rest/2.0/webhooks/delete | | [**deployCommit**](ThoughtSpotRestApi.md#deployCommit) | **POST** /api/rest/2.0/vcs/git/commits/deploy | | [**downloadConnectionMetadataChanges**](ThoughtSpotRestApi.md#downloadConnectionMetadataChanges) | **POST** /api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier} | @@ -91,13 +94,17 @@ All URIs are relative to *CLUSTER_URL* | [**logout**](ThoughtSpotRestApi.md#logout) | **POST** /api/rest/2.0/auth/session/logout | | [**manageObjectPrivilege**](ThoughtSpotRestApi.md#manageObjectPrivilege) | **POST** /api/rest/2.0/security/metadata/manage-object-privilege | | [**parameterizeMetadata**](ThoughtSpotRestApi.md#parameterizeMetadata) | **POST** /api/rest/2.0/metadata/parameterize | +| [**parameterizeMetadataFields**](ThoughtSpotRestApi.md#parameterizeMetadataFields) | **POST** /api/rest/2.0/metadata/parameterize-fields | | [**publishMetadata**](ThoughtSpotRestApi.md#publishMetadata) | **POST** /api/rest/2.0/security/metadata/publish | +| [**putVariableValues**](ThoughtSpotRestApi.md#putVariableValues) | **POST** /api/rest/2.0/template/variables/{identifier}/update-values | | [**queryGetDecomposedQuery**](ThoughtSpotRestApi.md#queryGetDecomposedQuery) | **POST** /api/rest/2.0/ai/analytical-questions | | [**resetUserPassword**](ThoughtSpotRestApi.md#resetUserPassword) | **POST** /api/rest/2.0/users/reset-password | | [**revertCommit**](ThoughtSpotRestApi.md#revertCommit) | **POST** /api/rest/2.0/vcs/git/commits/{commit_id}/revert | | [**revokeRefreshTokens**](ThoughtSpotRestApi.md#revokeRefreshTokens) | **POST** /api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens | | [**revokeToken**](ThoughtSpotRestApi.md#revokeToken) | **POST** /api/rest/2.0/auth/token/revoke | | [**searchCalendars**](ThoughtSpotRestApi.md#searchCalendars) | **POST** /api/rest/2.0/calendars/search | +| [**searchChannelHistory**](ThoughtSpotRestApi.md#searchChannelHistory) | **POST** /api/rest/2.0/jobs/history/communication-channels/search | +| [**searchCollections**](ThoughtSpotRestApi.md#searchCollections) | **POST** /api/rest/2.0/collections/search | | [**searchCommits**](ThoughtSpotRestApi.md#searchCommits) | **POST** /api/rest/2.0/vcs/git/commits/search | | [**searchCommunicationChannelPreferences**](ThoughtSpotRestApi.md#searchCommunicationChannelPreferences) | **POST** /api/rest/2.0/system/preferences/communication-channels/search | | [**searchConfig**](ThoughtSpotRestApi.md#searchConfig) | **POST** /api/rest/2.0/vcs/git/config/search | @@ -125,6 +132,7 @@ All URIs are relative to *CLUSTER_URL* | [**unparameterizeMetadata**](ThoughtSpotRestApi.md#unparameterizeMetadata) | **POST** /api/rest/2.0/metadata/unparameterize | | [**unpublishMetadata**](ThoughtSpotRestApi.md#unpublishMetadata) | **POST** /api/rest/2.0/security/metadata/unpublish | | [**updateCalendar**](ThoughtSpotRestApi.md#updateCalendar) | **POST** /api/rest/2.0/calendars/{calendar_identifier}/update | +| [**updateCollection**](ThoughtSpotRestApi.md#updateCollection) | **POST** /api/rest/2.0/collections/{collection_identifier}/update | | [**updateColumnSecurityRules**](ThoughtSpotRestApi.md#updateColumnSecurityRules) | **POST** /api/rest/2.0/security/column/rules/update | | [**updateConfig**](ThoughtSpotRestApi.md#updateConfig) | **POST** /api/rest/2.0/vcs/git/config/update | | [**updateConnection**](ThoughtSpotRestApi.md#updateConnection) | **POST** /api/rest/2.0/connection/update | @@ -145,6 +153,7 @@ All URIs are relative to *CLUSTER_URL* | [**updateVariable**](ThoughtSpotRestApi.md#updateVariable) | **POST** /api/rest/2.0/template/variables/{identifier}/update | | [**updateVariableValues**](ThoughtSpotRestApi.md#updateVariableValues) | **POST** /api/rest/2.0/template/variables/update-values | | [**updateWebhookConfiguration**](ThoughtSpotRestApi.md#updateWebhookConfiguration) | **POST** /api/rest/2.0/webhooks/{webhook_identifier}/update | +| [**validateCommunicationChannel**](ThoughtSpotRestApi.md#validateCommunicationChannel) | **POST** /api/rest/2.0/system/communication-channels/validate | | [**validateEmailCustomization**](ThoughtSpotRestApi.md#validateEmailCustomization) | **POST** /api/rest/2.0/customization/email/validate | | [**validateMerge**](ThoughtSpotRestApi.md#validateMerge) | **POST** /api/rest/2.0/vcs/git/branches/validate | | [**validateToken**](ThoughtSpotRestApi.md#validateToken) | **POST** /api/rest/2.0/auth/token/validate | @@ -517,7 +526,7 @@ null (empty response body) - Version: 10.13.0.cl or later + Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user's queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"<worksheet-id>\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Parameters @@ -544,6 +553,8 @@ null (empty response body) | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -582,6 +593,42 @@ null (empty response body) | **403** | Forbidden access. | - | | **500** | Unexpected error | - | + +# **createCollection** +> Collection createCollection(createCollectionRequest) + + + + Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **createCollectionRequest** | [**CreateCollectionRequest**](CreateCollectionRequest.md) + +### Return type + +[**Collection**](Collection.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Collection created successfully | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + # **createConfig** > RepoConfigObject createConfig(createConfigRequest) @@ -624,7 +671,7 @@ null (empty response body) - Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. ### Parameters @@ -696,7 +743,7 @@ null (empty response body) - Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Parameters @@ -723,6 +770,8 @@ null (empty response body) | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -1311,6 +1360,43 @@ null (empty response body) | **403** | Forbidden access. | - | | **500** | Unexpected error | - | + +# **deleteCollection** +> CollectionDeleteResponse deleteCollection(deleteCollectionRequest) + + + + Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteCollectionRequest** | [**DeleteCollectionRequest**](DeleteCollectionRequest.md) + +### Return type + +[**CollectionDeleteResponse**](CollectionDeleteResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Collections deleted successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **404** | Resource not found. | - | +| **500** | Unexpected error | - | + # **deleteConfig** > deleteConfig(deleteConfigRequest) @@ -1856,7 +1942,7 @@ null (empty response body) - Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn't exist * The variable is being used by other objects + Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn't exist * The variable is being used by other objects ### Parameters @@ -1886,6 +1972,42 @@ null (empty response body) | **403** | Forbidden access. | - | | **500** | Unexpected error | - | + +# **deleteVariables** +> deleteVariables(deleteVariablesRequest) + + + + Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don't exist * Any of the variables are being used by other objects + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteVariablesRequest** | [**DeleteVariablesRequest**](DeleteVariablesRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Deletion of variable(s) is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + # **deleteWebhookConfigurations** > WebhookDeleteResponse deleteWebhookConfigurations(deleteWebhookConfigurationsRequest) @@ -2714,7 +2836,7 @@ No authorization required - Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model's confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model's confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. ### Parameters @@ -2741,6 +2863,8 @@ No authorization required | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -2785,7 +2909,7 @@ No authorization required - Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. ### Parameters @@ -2812,6 +2936,8 @@ No authorization required | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -2856,7 +2982,7 @@ No authorization required - Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user's original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Parameters @@ -2883,6 +3009,8 @@ No authorization required | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -3239,7 +3367,7 @@ null (empty response body) - Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user ### Parameters @@ -3269,6 +3397,42 @@ null (empty response body) | **403** | Forbidden access. | - | | **500** | Unexpected error | - | + +# **parameterizeMetadataFields** +> parameterizeMetadataFields(parameterizeMetadataFieldsRequest) + + + + Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **parameterizeMetadataFieldsRequest** | [**ParameterizeMetadataFieldsRequest**](ParameterizeMetadataFieldsRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Parameterize successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + # **publishMetadata** > publishMetadata(publishMetadataRequest) @@ -3305,13 +3469,50 @@ null (empty response body) | **403** | Forbidden access. | - | | **500** | Unexpected error | - | + +# **putVariableValues** +> putVariableValues(identifier, putVariableValuesRequest) + + + + Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **identifier** | **String** +| **putVariableValuesRequest** | [**PutVariableValuesRequest**](PutVariableValuesRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Variable values updated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + # **queryGetDecomposedQuery** > EurekaDecomposeQueryResponse queryGetDecomposedQuery(queryGetDecomposedQueryRequest) - Version: 10.7.0.cl or later + Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. ### Parameters @@ -3338,6 +3539,8 @@ null (empty response body) | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -3524,6 +3727,78 @@ null (empty response body) | **403** | Forbidden access. | - | | **500** | Unexpected error | - | + +# **searchChannelHistory** +> SearchChannelHistoryResponse searchChannelHistory(searchChannelHistoryRequest) + + + + Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchChannelHistoryRequest** | [**SearchChannelHistoryRequest**](SearchChannelHistoryRequest.md) + +### Return type + +[**SearchChannelHistoryResponse**](SearchChannelHistoryResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Channel status logs retrieved successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **searchCollections** +> CollectionSearchResponse searchCollections(searchCollectionsRequest) + + + + Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use '%' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **searchCollectionsRequest** | [**SearchCollectionsRequest**](SearchCollectionsRequest.md) + +### Return type + +[**CollectionSearchResponse**](CollectionSearchResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully retrieved list of collections | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + # **searchCommits** > List<CommitHistoryResponse> searchCommits(searchCommitsRequest) @@ -4141,7 +4416,7 @@ null (empty response body) - Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Parameters @@ -4169,6 +4444,8 @@ null (empty response body) | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -4177,7 +4454,7 @@ null (empty response body) - Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). ### Parameters @@ -4204,6 +4481,8 @@ null (empty response body) | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -4212,7 +4491,7 @@ null (empty response body) - Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Parameters @@ -4240,6 +4519,8 @@ null (empty response body) | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -4248,7 +4529,7 @@ null (empty response body) - Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. ### Parameters @@ -4275,6 +4556,8 @@ null (empty response body) | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -4319,7 +4602,7 @@ null (empty response body) - Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Parameters @@ -4346,6 +4629,8 @@ null (empty response body) | **200** | Common successful response | - | | **201** | Common error response | - | | **400** | Operation failed | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | | **500** | Operation failed | - | @@ -4493,6 +4778,44 @@ null (empty response body) | **403** | Forbidden access. | - | | **500** | Unexpected error | - | + +# **updateCollection** +> updateCollection(collectionIdentifier, updateCollectionRequest) + + + + Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **collectionIdentifier** | **String** +| **updateCollectionRequest** | [**UpdateCollectionRequest**](UpdateCollectionRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Collection updated successfully. No content returned. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **404** | Resource not found. | - | +| **500** | Unexpected error | - | + # **updateColumnSecurityRules** > updateColumnSecurityRules(updateColumnSecurityRulesRequest) @@ -5167,7 +5490,7 @@ null (empty response body) - Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored ### Parameters @@ -5234,6 +5557,42 @@ null (empty response body) | **403** | Forbidden access. | - | | **500** | Unexpected error | - | + +# **validateCommunicationChannel** +> CommunicationChannelValidateResponse validateCommunicationChannel(validateCommunicationChannelRequest) + + + + Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **validateCommunicationChannelRequest** | [**ValidateCommunicationChannelRequest**](ValidateCommunicationChannelRequest.md) + +### Return type + +[**CommunicationChannelValidateResponse**](CommunicationChannelValidateResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | communication channel configuration validated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + # **validateEmailCustomization** > validateEmailCustomization() diff --git a/sdks/java/docs/UpdateCollectionRequest.md b/sdks/java/docs/UpdateCollectionRequest.md new file mode 100644 index 000000000..b1d6187f6 --- /dev/null +++ b/sdks/java/docs/UpdateCollectionRequest.md @@ -0,0 +1,30 @@ + + +# UpdateCollectionRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the collection. | [optional] | +|**description** | **String** | Description of the collection. | [optional] | +|**metadata** | [**List<CollectionMetadataInput>**](CollectionMetadataInput.md) | Metadata objects to add, remove, or replace in the collection. | [optional] | +|**operation** | [**OperationEnum**](#OperationEnum) | Type of update operation. Default operation type is REPLACE. | [optional] | + + + +## Enum: OperationEnum + +| Name | Value | +|---- | -----| +| ADD | "ADD" | +| REMOVE | "REMOVE" | +| REPLACE | "REPLACE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/UpdateVariableValuesRequest.md b/sdks/java/docs/UpdateVariableValuesRequest.md index 4177b4b49..3d31ca8dc 100644 --- a/sdks/java/docs/UpdateVariableValuesRequest.md +++ b/sdks/java/docs/UpdateVariableValuesRequest.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**variableAssignment** | [**List<VariableUpdateAssignmentInput>**](VariableUpdateAssignmentInput.md) | Variables and values to update | | -|**variableValueScope** | [**List<VariableUpdateScopeInput>**](VariableUpdateScopeInput.md) | Variables and values to update | | +|**variableAssignment** | [**List<VariableUpdateAssignmentInput>**](VariableUpdateAssignmentInput.md) | Array of variable assignment objects specifying the variable identifier, values to assign, and the operation type (ADD, REMOVE, REPLACE, or RESET) to perform on each variable. | | +|**variableValueScope** | [**List<VariableUpdateScopeInput>**](VariableUpdateScopeInput.md) | Array of scope objects defining where the variable values apply, including organization context, optional principal constraints (user or group), model reference for formula variables, and priority for conflict resolution. | | ## Implemented Interfaces diff --git a/sdks/java/docs/UpdateWebhookConfigurationRequest.md b/sdks/java/docs/UpdateWebhookConfigurationRequest.md index 879928292..bd860ec7e 100644 --- a/sdks/java/docs/UpdateWebhookConfigurationRequest.md +++ b/sdks/java/docs/UpdateWebhookConfigurationRequest.md @@ -15,6 +15,7 @@ |**authentication** | [**WebhookAuthenticationInput**](WebhookAuthenticationInput.md) | Authorization configuration for the webhook. | [optional] | |**signatureVerification** | [**WebhookSignatureVerificationInput**](WebhookSignatureVerificationInput.md) | Configuration for webhook signature verification. | [optional] | |**storageDestination** | [**StorageDestinationInput**](StorageDestinationInput.md) | Configuration for storage destination. Example: {\"storage_type\": \"AWS_S3\", \"storage_config\": {\"aws_s3_config\": {\"bucket_name\": \"my-webhook-files\", \"region\": \"us-west-2\", \"role_arn\": \"arn:aws:iam::123456789012:role/ThoughtSpotDeliveryRole\", \"external_id\": \"ts-webhook-a1b2c3d4-7890\", \"path_prefix\": \"thoughtspot-webhooks/\"}}} Version: 26.3.0.cl or later | [optional] | +|**additionalHeaders** | [**List<WebhookKeyValuePairInput>**](WebhookKeyValuePairInput.md) | Additional headers as an array of key-value pairs. Example: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: 26.4.0.cl or later | [optional] | diff --git a/sdks/java/docs/ValidateCommunicationChannelRequest.md b/sdks/java/docs/ValidateCommunicationChannelRequest.md new file mode 100644 index 000000000..f8714d772 --- /dev/null +++ b/sdks/java/docs/ValidateCommunicationChannelRequest.md @@ -0,0 +1,35 @@ + + +# ValidateCommunicationChannelRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**channelType** | [**ChannelTypeEnum**](#ChannelTypeEnum) | Type of communication channel to validate (e.g., WEBHOOK). | | +|**channelIdentifier** | **String** | Unique identifier or name for the communication channel. | | +|**eventType** | [**EventTypeEnum**](#EventTypeEnum) | Event type to validate for this channel. | | + + + +## Enum: ChannelTypeEnum + +| Name | Value | +|---- | -----| +| WEBHOOK | "WEBHOOK" | + + + +## Enum: EventTypeEnum + +| Name | Value | +|---- | -----| +| LIVEBOARD_SCHEDULE | "LIVEBOARD_SCHEDULE" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/ValueScopeInput.md b/sdks/java/docs/ValueScopeInput.md index b3ad4c7ce..10e2a8a94 100644 --- a/sdks/java/docs/ValueScopeInput.md +++ b/sdks/java/docs/ValueScopeInput.md @@ -2,16 +2,16 @@ # ValueScopeInput -Input for variable scope in search +Input for filtering variable values by scope in search operations ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**orgIdentifier** | **String** | The unique name of the org | [optional] | -|**principalType** | [**PrincipalTypeEnum**](#PrincipalTypeEnum) | Principal type | [optional] | +|**principalType** | [**PrincipalTypeEnum**](#PrincipalTypeEnum) | Type of principal to filter by. Use USER to filter values assigned to specific users, or USER_GROUP to filter values assigned to groups. | [optional] | |**principalIdentifier** | **String** | Unique ID or name of the principal | [optional] | -|**modelIdentifier** | **String** | Model Identifier | [optional] | +|**modelIdentifier** | **String** | Unique ID or name of the model to filter by. Applicable only for FORMULA_VARIABLE type. | [optional] | diff --git a/sdks/java/docs/Variable.md b/sdks/java/docs/Variable.md index 0f845111a..7c53f0865 100644 --- a/sdks/java/docs/Variable.md +++ b/sdks/java/docs/Variable.md @@ -24,6 +24,7 @@ Variable object | TABLE_MAPPING | "TABLE_MAPPING" | | CONNECTION_PROPERTY_PER_PRINCIPAL | "CONNECTION_PROPERTY_PER_PRINCIPAL" | | FORMULA_VARIABLE | "FORMULA_VARIABLE" | +| USER_PROPERTY | "USER_PROPERTY" | ## Implemented Interfaces diff --git a/sdks/java/docs/VariableApi.md b/sdks/java/docs/VariableApi.md index fea8fa740..75667e3b4 100644 --- a/sdks/java/docs/VariableApi.md +++ b/sdks/java/docs/VariableApi.md @@ -6,6 +6,8 @@ All URIs are relative to *CLUSTER_URL* |------------- | ------------- | | [**createVariable**](VariableApi.md#createVariable) | **POST** /api/rest/2.0/template/variables/create | | [**deleteVariable**](VariableApi.md#deleteVariable) | **POST** /api/rest/2.0/template/variables/{identifier}/delete | +| [**deleteVariables**](VariableApi.md#deleteVariables) | **POST** /api/rest/2.0/template/variables/delete | +| [**putVariableValues**](VariableApi.md#putVariableValues) | **POST** /api/rest/2.0/template/variables/{identifier}/update-values | | [**searchVariables**](VariableApi.md#searchVariables) | **POST** /api/rest/2.0/template/variables/search | | [**updateVariable**](VariableApi.md#updateVariable) | **POST** /api/rest/2.0/template/variables/{identifier}/update | | [**updateVariableValues**](VariableApi.md#updateVariableValues) | **POST** /api/rest/2.0/template/variables/update-values | @@ -53,7 +55,7 @@ All URIs are relative to *CLUSTER_URL* - Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn't exist * The variable is being used by other objects + Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn't exist * The variable is being used by other objects ### Parameters @@ -83,6 +85,79 @@ null (empty response body) | **403** | Forbidden access. | - | | **500** | Unexpected error | - | + +# **deleteVariables** +> deleteVariables(deleteVariablesRequest) + + + + Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don't exist * Any of the variables are being used by other objects + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **deleteVariablesRequest** | [**DeleteVariablesRequest**](DeleteVariablesRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Deletion of variable(s) is successful. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + + +# **putVariableValues** +> putVariableValues(identifier, putVariableValuesRequest) + + + + Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + +### Parameters + +| Name | Type | +|------------- | ------------- | +| **identifier** | **String** +| **putVariableValuesRequest** | [**PutVariableValuesRequest**](PutVariableValuesRequest.md) + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Variable values updated successfully. | - | +| **400** | Invalid request. | - | +| **401** | Unauthorized access. | - | +| **403** | Forbidden access. | - | +| **500** | Unexpected error | - | + # **searchVariables** > List<Variable> searchVariables(searchVariablesRequest) @@ -162,7 +237,7 @@ null (empty response body) - Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored ### Parameters diff --git a/sdks/java/docs/VariableDetailInput.md b/sdks/java/docs/VariableDetailInput.md index c6d2d0fb0..e2825e97d 100644 --- a/sdks/java/docs/VariableDetailInput.md +++ b/sdks/java/docs/VariableDetailInput.md @@ -22,6 +22,7 @@ Input for variable details in search | TABLE_MAPPING | "TABLE_MAPPING" | | CONNECTION_PROPERTY_PER_PRINCIPAL | "CONNECTION_PROPERTY_PER_PRINCIPAL" | | FORMULA_VARIABLE | "FORMULA_VARIABLE" | +| USER_PROPERTY | "USER_PROPERTY" | ## Implemented Interfaces diff --git a/sdks/java/docs/VariablePutAssignmentInput.md b/sdks/java/docs/VariablePutAssignmentInput.md new file mode 100644 index 000000000..0f174601f --- /dev/null +++ b/sdks/java/docs/VariablePutAssignmentInput.md @@ -0,0 +1,32 @@ + + +# VariablePutAssignmentInput + +Input for variable value put operations + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**assignedValues** | **List<String>** | Values of the variable | | +|**orgIdentifier** | **String** | The unique name of the org | [optional] | +|**principalType** | [**PrincipalTypeEnum**](#PrincipalTypeEnum) | Principal type | [optional] | +|**principalIdentifier** | **String** | Unique ID or name of the principal | [optional] | +|**modelIdentifier** | **String** | Unique ID of the model | [optional] | +|**priority** | **Integer** | Priority level | [optional] | + + + +## Enum: PrincipalTypeEnum + +| Name | Value | +|---- | -----| +| USER | "USER" | +| USER_GROUP | "USER_GROUP" | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/VariableUpdateScopeInput.md b/sdks/java/docs/VariableUpdateScopeInput.md index a1e2a1d7a..79ebe6efd 100644 --- a/sdks/java/docs/VariableUpdateScopeInput.md +++ b/sdks/java/docs/VariableUpdateScopeInput.md @@ -2,17 +2,17 @@ # VariableUpdateScopeInput -Input for variable value update in batch operations +Input for defining the scope of variable value assignments in batch update operations ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**orgIdentifier** | **String** | The unique name of the org | | -|**principalType** | [**PrincipalTypeEnum**](#PrincipalTypeEnum) | Principal type | [optional] | +|**principalType** | [**PrincipalTypeEnum**](#PrincipalTypeEnum) | Type of principal to which the variable value applies. Use USER to assign values to a specific user, or USER_GROUP to assign values to a group. | [optional] | |**principalIdentifier** | **String** | Unique ID or name of the principal | [optional] | -|**modelIdentifier** | **String** | Unique ID of the model | [optional] | -|**priority** | **Integer** | Priority level | [optional] | +|**modelIdentifier** | **String** | Unique ID or name of the model. Required for FORMULA_VARIABLE type to scope the variable value to a specific worksheet. | [optional] | +|**priority** | **Integer** | The priority level for this scope assignment, used for conflict resolution when multiple values match. Higher priority values (larger numbers) take precedence. | [optional] | diff --git a/sdks/java/docs/VariableValue.md b/sdks/java/docs/VariableValue.md index 8cc454eb1..521e15cc0 100644 --- a/sdks/java/docs/VariableValue.md +++ b/sdks/java/docs/VariableValue.md @@ -10,7 +10,7 @@ |**value** | **String** | The value of the variable | [optional] | |**valueList** | **List<String>** | The value of the variable if it is a list type | [optional] | |**orgIdentifier** | **String** | The unique name of the org | | -|**principalType** | [**PrincipalTypeEnum**](#PrincipalTypeEnum) | Principal type | [optional] | +|**principalType** | [**PrincipalTypeEnum**](#PrincipalTypeEnum) | Type of principal to which this value applies. Use USER to assign the value to a specific user, or USER_GROUP to assign it to a group. | [optional] | |**principalIdentifier** | **String** | Unique ID or name of the principal | [optional] | |**modelIdentifier** | **String** | Unique ID of the model Version: 26.3.0.cl or later | [optional] | |**priority** | **Integer** | The priority assigned to this value. If there are 2 matching values, the one with the higher priority will be picked. | [optional] | diff --git a/sdks/java/docs/WebhookKeyValuePair.md b/sdks/java/docs/WebhookKeyValuePair.md new file mode 100644 index 000000000..f1377db02 --- /dev/null +++ b/sdks/java/docs/WebhookKeyValuePair.md @@ -0,0 +1,19 @@ + + +# WebhookKeyValuePair + +Key-value pair for additional webhook headers. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**key** | **String** | Header name. | | +|**value** | **String** | Header value. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookKeyValuePairInput.md b/sdks/java/docs/WebhookKeyValuePairInput.md new file mode 100644 index 000000000..1764c3c37 --- /dev/null +++ b/sdks/java/docs/WebhookKeyValuePairInput.md @@ -0,0 +1,19 @@ + + +# WebhookKeyValuePairInput + +Key-value pair input for additional webhook headers. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**key** | **String** | Header name. | | +|**value** | **String** | Header value. | | + + +## Implemented Interfaces + +* Serializable + + diff --git a/sdks/java/docs/WebhookResponse.md b/sdks/java/docs/WebhookResponse.md index cbc8f7591..82e9cf6d3 100644 --- a/sdks/java/docs/WebhookResponse.md +++ b/sdks/java/docs/WebhookResponse.md @@ -16,6 +16,7 @@ |**events** | [**List<EventsEnum>**](#List<EventsEnum>) | List of events this webhook subscribes to. | | |**authentication** | [**WebhookAuthentication**](WebhookAuthentication.md) | | [optional] | |**signatureVerification** | [**WebhookSignatureVerification**](WebhookSignatureVerification.md) | | [optional] | +|**additionalHeaders** | [**List<WebhookKeyValuePair>**](WebhookKeyValuePair.md) | Additional headers as an array of key-value pairs. Version: 26.4.0.cl or later | [optional] | |**creationTimeInMillis** | **Float** | Creation time of the webhook configuration in milliseconds. | | |**modificationTimeInMillis** | **Float** | Last modified time of the webhook configuration in milliseconds. | | |**createdBy** | [**WebhookUser**](WebhookUser.md) | | [optional] | diff --git a/sdks/java/pom.xml b/sdks/java/pom.xml index 472e7cbd0..050f470b4 100644 --- a/sdks/java/pom.xml +++ b/sdks/java/pom.xml @@ -4,7 +4,7 @@ com.thoughtspot rest-api-sdk - 2.22.0 + 2.23.0 jar rest-api-sdk @@ -351,7 +351,7 @@ 4.12.0 2.10.1 3.17.0 - 0.2.10 + 0.2.6 1.3.5 2.0.2 5.10.3 diff --git a/sdks/java/src/main/java/com/thoughtspot/client/ApiClient.java b/sdks/java/src/main/java/com/thoughtspot/client/ApiClient.java index e2643724b..8482d7394 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/ApiClient.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/ApiClient.java @@ -182,7 +182,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("ThoughtSpot-Client/java/2.22.0"); + setUserAgent("ThoughtSpot-Client/java/2.23.0"); authentications = new HashMap(); } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/Configuration.java b/sdks/java/src/main/java/com/thoughtspot/client/Configuration.java index 7b1da538a..247055d3a 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/Configuration.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/Configuration.java @@ -8,7 +8,7 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class Configuration { - public static final String VERSION = "2.22.0"; + public static final String VERSION = "2.23.0"; private static volatile ApiClient defaultApiClient = new ApiClient(); diff --git a/sdks/java/src/main/java/com/thoughtspot/client/JSON.java b/sdks/java/src/main/java/com/thoughtspot/client/JSON.java index 6772d61ab..5ce39152a 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/JSON.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/JSON.java @@ -156,11 +156,44 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.ChangeUserPasswordRequest .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ChannelHistoryEventInfo + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ChannelHistoryEventInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ChannelHistoryJob.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ChannelValidationAwsS3Info + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ChannelValidationDetail + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.ClusterNonEmbedAccess.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.ClusterNonEmbedAccessInput .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.Collection.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CollectionDeleteResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CollectionDeleteTypeIdentifiers + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CollectionEntityIdentifier + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CollectionMetadataInput + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CollectionMetadataItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CollectionSearchResponse + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.Column.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( @@ -199,6 +232,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.CommunicationChannelPreferencesResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CommunicationChannelValidateResponse + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.ConfigureCommunicationChannelPreferencesRequest .CustomTypeAdapterFactory()); @@ -230,6 +266,9 @@ private static Class getClassByDiscriminator( .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.CreateCalendarRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.CreateCollectionRequest + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.CreateConfigRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( @@ -307,6 +346,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.DefaultActionConfigSearchInput .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DeleteCollectionRequest + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.DeleteConfigRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( @@ -323,6 +365,8 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.DeleteOrgEmailCustomizationRequest .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.DeleteVariablesRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.DeleteWebhookConfigurationsRequest .CustomTypeAdapterFactory()); @@ -501,6 +545,8 @@ private static Class getClassByDiscriminator( new com.thoughtspot.client.model.JWTUserOptions.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.JWTUserOptionsFull.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.JobRecipient.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.LBContextInput.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( @@ -575,6 +621,9 @@ private static Class getClassByDiscriminator( new com.thoughtspot.client.model.OrgType.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.ParameterValues.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ParameterizeMetadataFieldsRequest + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.ParameterizeMetadataRequest .CustomTypeAdapterFactory()); @@ -617,6 +666,9 @@ private static Class getClassByDiscriminator( .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.PublishMetadataRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.PutVariableValuesRequest + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.QueryGetDecomposedQueryRequest .CustomTypeAdapterFactory()); @@ -718,6 +770,15 @@ private static Class getClassByDiscriminator( new com.thoughtspot.client.model.ScriptSrcUrlsInput.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.SearchCalendarsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchChannelHistoryRequest + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchChannelHistoryResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.SearchCollectionsRequest + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.SearchCommitsRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( @@ -865,6 +926,9 @@ private static Class getClassByDiscriminator( .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.UpdateCalendarRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.UpdateCollectionRequest + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.UpdateColumnSecurityRulesRequest .CustomTypeAdapterFactory()); @@ -930,6 +994,9 @@ private static Class getClassByDiscriminator( new com.thoughtspot.client.model.UserParameterOptions.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.UserPrincipal.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.ValidateCommunicationChannelRequest + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.ValidateMergeRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( @@ -940,6 +1007,9 @@ private static Class getClassByDiscriminator( new com.thoughtspot.client.model.Variable.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.VariableDetailInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.VariablePutAssignmentInput + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.VariableUpdateAssignmentInput .CustomTypeAdapterFactory()); @@ -972,6 +1042,11 @@ private static Class getClassByDiscriminator( new com.thoughtspot.client.model.WebhookDeleteFailure.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.WebhookDeleteResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookKeyValuePair.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.thoughtspot.client.model.WebhookKeyValuePairInput + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.thoughtspot.client.model.WebhookOrg.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/AiApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/AiApi.java index b37a4c76b..62496f195 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/AiApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/AiApi.java @@ -111,6 +111,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -186,7 +188,49 @@ private okhttp3.Call createAgentConversationValidateBeforeCall( } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided + * context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include the + * `metadata_context` parameter to define the conversation context. The context type + * can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific + * data source. Provide `data_source_identifier` in `data_source_context` + * for a single data source, or `data_source_identifiers` for multi-data-source + * context. The deprecated `guid` field is accepted for backwards compatibility. - + * `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the + * most relevant datasets for the user's queries. > **Note for callers on versions + * 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the + * `guid` field instead of the above. Example: `{ \"type\": + * \"data_source\", \"data_source_context\": { \"guid\": + * \"<worksheet-id>\" } }`. The `conversation_settings` parameter + * controls which Spotter capabilities are enabled for the conversation: - + * `enable_contextual_change_analysis` (default: `true`, **deprecated from + * 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect + * on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` + * (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; + * setting this to `false` has no effect on versions >= 26.2.0.cl - + * `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — + * always enabled in Spotter 3; setting this to `false` has no effect on versions + * >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available + * from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation + * history If the request is successful, the response includes a unique + * `conversation_identifier` that must be passed to + * `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` + * to send messages within this conversation. The response also includes + * `conversation_id` with the same value for backwards compatibility; use + * `conversation_identifier` for new integrations. #### Example request + * ```json { \"metadata_context\": { \"type\": + * \"DATA_SOURCE\", \"data_source_context\": { + * \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, + * \"conversation_settings\": {} } ``` #### Error responses | Code | + * Description | | ---- | + * --------------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > > - This + * endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version + * 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to + * enable Spotter on your cluster. * * @param createAgentConversationRequest (required) * @return AgentConversation @@ -199,6 +243,8 @@ private okhttp3.Call createAgentConversationValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -210,7 +256,49 @@ public AgentConversation createAgentConversation( } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided + * context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include the + * `metadata_context` parameter to define the conversation context. The context type + * can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific + * data source. Provide `data_source_identifier` in `data_source_context` + * for a single data source, or `data_source_identifiers` for multi-data-source + * context. The deprecated `guid` field is accepted for backwards compatibility. - + * `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the + * most relevant datasets for the user's queries. > **Note for callers on versions + * 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the + * `guid` field instead of the above. Example: `{ \"type\": + * \"data_source\", \"data_source_context\": { \"guid\": + * \"<worksheet-id>\" } }`. The `conversation_settings` parameter + * controls which Spotter capabilities are enabled for the conversation: - + * `enable_contextual_change_analysis` (default: `true`, **deprecated from + * 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect + * on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` + * (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; + * setting this to `false` has no effect on versions >= 26.2.0.cl - + * `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — + * always enabled in Spotter 3; setting this to `false` has no effect on versions + * >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available + * from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation + * history If the request is successful, the response includes a unique + * `conversation_identifier` that must be passed to + * `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` + * to send messages within this conversation. The response also includes + * `conversation_id` with the same value for backwards compatibility; use + * `conversation_identifier` for new integrations. #### Example request + * ```json { \"metadata_context\": { \"type\": + * \"DATA_SOURCE\", \"data_source_context\": { + * \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, + * \"conversation_settings\": {} } ``` #### Error responses | Code | + * Description | | ---- | + * --------------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > > - This + * endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version + * 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to + * enable Spotter on your cluster. * * @param createAgentConversationRequest (required) * @return ApiResponse<AgentConversation> @@ -223,6 +311,8 @@ public AgentConversation createAgentConversation( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -235,7 +325,49 @@ public ApiResponse createAgentConversationWithHttpInfo( } /** - * (asynchronously) Version: 10.13.0.cl or later + * (asynchronously) Version: 26.2.0.cl or later Creates a new Spotter agent conversation based + * on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through + * 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the + * metadata object specified in the request. #### Usage guidelines The request must include the + * `metadata_context` parameter to define the conversation context. The context type + * can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific + * data source. Provide `data_source_identifier` in `data_source_context` + * for a single data source, or `data_source_identifiers` for multi-data-source + * context. The deprecated `guid` field is accepted for backwards compatibility. - + * `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the + * most relevant datasets for the user's queries. > **Note for callers on versions + * 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the + * `guid` field instead of the above. Example: `{ \"type\": + * \"data_source\", \"data_source_context\": { \"guid\": + * \"<worksheet-id>\" } }`. The `conversation_settings` parameter + * controls which Spotter capabilities are enabled for the conversation: - + * `enable_contextual_change_analysis` (default: `true`, **deprecated from + * 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect + * on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` + * (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; + * setting this to `false` has no effect on versions >= 26.2.0.cl - + * `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — + * always enabled in Spotter 3; setting this to `false` has no effect on versions + * >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available + * from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation + * history If the request is successful, the response includes a unique + * `conversation_identifier` that must be passed to + * `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` + * to send messages within this conversation. The response also includes + * `conversation_id` with the same value for backwards compatibility; use + * `conversation_identifier` for new integrations. #### Example request + * ```json { \"metadata_context\": { \"type\": + * \"DATA_SOURCE\", \"data_source_context\": { + * \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, + * \"conversation_settings\": {} } ``` #### Error responses | Code | + * Description | | ---- | + * --------------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > > - This + * endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version + * 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to + * enable Spotter on your cluster. * * @param createAgentConversationRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -249,6 +381,8 @@ public ApiResponse createAgentConversationWithHttpInfo( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -278,6 +412,8 @@ public okhttp3.Call createAgentConversationAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -351,13 +487,18 @@ private okhttp3.Call createConversationValidateBeforeCall( } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation - * based on a specific data model. Requires at least view access to the metadata object - * specified in the request. #### Usage guidelines This API requires the - * `metadata_identifier` parameter to define the context for the conversation. You can - * also specify the tokens to initiate the conversation as shown in this example: - * `\"tokens\": \"[tea],[sales],[type]\"` If the API request is - * successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model + * for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and + * at least view access to the metadata object specified in the request. #### Usage guidelines + * The request must include: - `metadata_identifier`: the unique ID of the data source + * that provides context for the conversation Optionally, you can provide: - `tokens`: + * a token string to set initial context for the conversation (e.g., `\"[sales],[item + * type],[state]\"`) If the request is successful, ThoughtSpot returns a unique + * `conversation_identifier` that must be passed to `sendMessage` to + * continue the conversation. #### Error responses | Code | Description | |------|-------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot * support to enable Spotter on your cluster. @@ -373,6 +514,8 @@ private okhttp3.Call createConversationValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -384,13 +527,18 @@ public Conversation createConversation(CreateConversationRequest createConversat } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation - * based on a specific data model. Requires at least view access to the metadata object - * specified in the request. #### Usage guidelines This API requires the - * `metadata_identifier` parameter to define the context for the conversation. You can - * also specify the tokens to initiate the conversation as shown in this example: - * `\"tokens\": \"[tea],[sales],[type]\"` If the API request is - * successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model + * for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and + * at least view access to the metadata object specified in the request. #### Usage guidelines + * The request must include: - `metadata_identifier`: the unique ID of the data source + * that provides context for the conversation Optionally, you can provide: - `tokens`: + * a token string to set initial context for the conversation (e.g., `\"[sales],[item + * type],[state]\"`) If the request is successful, ThoughtSpot returns a unique + * `conversation_identifier` that must be passed to `sendMessage` to + * continue the conversation. #### Error responses | Code | Description | |------|-------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot * support to enable Spotter on your cluster. @@ -406,6 +554,8 @@ public Conversation createConversation(CreateConversationRequest createConversat * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -418,13 +568,19 @@ public ApiResponse createConversationWithHttpInfo( } /** - * (asynchronously) Version: 10.4.0.cl or later Creates a Conversation object to start an - * AI-driven conversation based on a specific data model. Requires at least view access to the - * metadata object specified in the request. #### Usage guidelines This API requires the - * `metadata_identifier` parameter to define the context for the conversation. You can - * also specify the tokens to initiate the conversation as shown in this example: - * `\"tokens\": \"[tea],[sales],[type]\"` If the API request is - * successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This + * (asynchronously) Version: 10.4.0.cl or later Creates a new conversation session tied to a + * specific data model for AI-driven natural language querying. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include: - + * `metadata_identifier`: the unique ID of the data source that provides context for + * the conversation Optionally, you can provide: - `tokens`: a token string to set + * initial context for the conversation (e.g., `\"[sales],[item + * type],[state]\"`) If the request is successful, ThoughtSpot returns a unique + * `conversation_identifier` that must be passed to `sendMessage` to + * continue the conversation. #### Error responses | Code | Description | |------|-------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot * support to enable Spotter on your cluster. @@ -441,6 +597,8 @@ public ApiResponse createConversationWithHttpInfo( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -469,6 +627,8 @@ public okhttp3.Call createConversationAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -544,19 +704,25 @@ private okhttp3.Call getDataSourceSuggestionsValidateBeforeCall( } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a - * user-submitted natural language query. To use this API, the user must have at least - * view-level access to the underlying metadata entities referenced in the response. #### Usage - * guidelines The request must include a `query` string via the request body. The - * returned results include metadata such as: - `confidence`: a float indicating the - * model's confidence in the relevance of each recommendation - `details`: - * includes `data_source_identifier`, `data_source_name`, and - * `description` of each recommended data source - `reasoning`: rationale - * provided by the LLM to explain why each data source was recommended If the API request is - * successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant - * reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may - * be introduced before it is made Generally Available. > * This endpoint requires Spotter — - * please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural + * language query, ranked by confidence with LLM-generated reasoning. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying + * metadata entities referenced in the response. #### Usage guidelines The request must include: + * - `query`: the natural language question to find relevant data sources for If the + * request is successful, the API returns a ranked list of suggested data sources, each + * containing: - `confidence`: a float score indicating the model's confidence in + * the relevance of the suggestion - `details`: metadata about the data source - + * `data_source_identifier`: the unique ID of the data source - + * `data_source_name`: the display name of the data source - `description`: + * a description of the data source - `reasoning`: LLM-generated rationale explaining + * why the data source was recommended #### Error responses | Code | Description | + * |------|--------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the underlying metadata entities. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally + * Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to + * enable Spotter on your cluster. * * @param getDataSourceSuggestionsRequest (required) * @return EurekaDataSourceSuggestionResponse @@ -569,6 +735,8 @@ private okhttp3.Call getDataSourceSuggestionsValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -580,19 +748,25 @@ public EurekaDataSourceSuggestionResponse getDataSourceSuggestions( } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a - * user-submitted natural language query. To use this API, the user must have at least - * view-level access to the underlying metadata entities referenced in the response. #### Usage - * guidelines The request must include a `query` string via the request body. The - * returned results include metadata such as: - `confidence`: a float indicating the - * model's confidence in the relevance of each recommendation - `details`: - * includes `data_source_identifier`, `data_source_name`, and - * `description` of each recommended data source - `reasoning`: rationale - * provided by the LLM to explain why each data source was recommended If the API request is - * successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant - * reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may - * be introduced before it is made Generally Available. > * This endpoint requires Spotter — - * please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural + * language query, ranked by confidence with LLM-generated reasoning. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying + * metadata entities referenced in the response. #### Usage guidelines The request must include: + * - `query`: the natural language question to find relevant data sources for If the + * request is successful, the API returns a ranked list of suggested data sources, each + * containing: - `confidence`: a float score indicating the model's confidence in + * the relevance of the suggestion - `details`: metadata about the data source - + * `data_source_identifier`: the unique ID of the data source - + * `data_source_name`: the display name of the data source - `description`: + * a description of the data source - `reasoning`: LLM-generated rationale explaining + * why the data source was recommended #### Error responses | Code | Description | + * |------|--------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the underlying metadata entities. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally + * Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to + * enable Spotter on your cluster. * * @param getDataSourceSuggestionsRequest (required) * @return ApiResponse<EurekaDataSourceSuggestionResponse> @@ -605,6 +779,8 @@ public EurekaDataSourceSuggestionResponse getDataSourceSuggestions( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -617,19 +793,25 @@ public ApiResponse getDataSourceSuggestionsW } /** - * (asynchronously) Version: 10.15.0.cl or later Provides relevant data source recommendations - * for a user-submitted natural language query. To use this API, the user must have at least - * view-level access to the underlying metadata entities referenced in the response. #### Usage - * guidelines The request must include a `query` string via the request body. The - * returned results include metadata such as: - `confidence`: a float indicating the - * model's confidence in the relevance of each recommendation - `details`: - * includes `data_source_identifier`, `data_source_name`, and - * `description` of each recommended data source - `reasoning`: rationale - * provided by the LLM to explain why each data source was recommended If the API request is - * successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant - * reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may - * be introduced before it is made Generally Available. > * This endpoint requires Spotter — - * please contact ThoughtSpot Support to enable Spotter on your cluster. + * (asynchronously) Version: 10.15.0.cl or later Suggests the most relevant data sources for a + * given natural language query, ranked by confidence with LLM-generated reasoning. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying + * metadata entities referenced in the response. #### Usage guidelines The request must include: + * - `query`: the natural language question to find relevant data sources for If the + * request is successful, the API returns a ranked list of suggested data sources, each + * containing: - `confidence`: a float score indicating the model's confidence in + * the relevance of the suggestion - `details`: metadata about the data source - + * `data_source_identifier`: the unique ID of the data source - + * `data_source_name`: the display name of the data source - `description`: + * a description of the data source - `reasoning`: LLM-generated rationale explaining + * why the data source was recommended #### Error responses | Code | Description | + * |------|--------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the underlying metadata entities. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally + * Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to + * enable Spotter on your cluster. * * @param getDataSourceSuggestionsRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -643,6 +825,8 @@ public ApiResponse getDataSourceSuggestionsW * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -672,6 +856,8 @@ public okhttp3.Call getDataSourceSuggestionsAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -745,23 +931,28 @@ private okhttp3.Call getNLInstructionsValidateBeforeCall( } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) - * instructions for a specific data-model. These instructions guide the AI system in - * understanding data context and generating more accurate responses when processing natural - * language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the - * request must include: - `data_source_identifier`: The unique ID of the data-model - * to retrieve NL instructions The API returns a response object with: - - * `nl_instructions_info`: An array of instruction objects, each containing: - - * `instructions`: Array of text instructions for natural language processing - - * `scope`: The scope of the instruction (`GLOBAL`). It can be extended to - * data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that - * apply globally across the system on the given data-model (currently only global instructions - * are supported) > ###### Note: > * To use this API, the user needs atleast view access - * on the data-model and they must use corresponding org related bearerToken where the - * data-model exists. > * This endpoint is currently in Beta. Breaking changes may be - * introduced before the endpoint is made Generally Available. > * Available from version - * 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot - * Support to enable Spotter on your cluster. > * Use this API to view currently configured + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured + * for a specific data model. These instructions guide the AI system in understanding data + * context and generating more accurate responses. Requires `CAN_USE_SPOTTER` + * privilege, at least view access on the data model, and a bearer token corresponding to the + * org where the data model exists. #### Usage guidelines The request must include: - + * `data_source_identifier`: the unique ID of the data model to retrieve instructions + * for If the request is successful, the API returns: - `nl_instructions_info`: an + * array of instruction objects, each containing: - `instructions`: the configured + * text instructions for AI processing - `scope`: the scope of the instruction — + * currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: + * Instructions that apply globally across the system on the given data-model (currently only + * global instructions are supported) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * view access on the data model, or the bearer token does not correspond to the org where the + * data model exists. | > ###### Note: > > - To use this API, the user needs at least + * view access on the data model, and must use the bearer token corresponding to the org where + * the data model exists. > - This endpoint is currently in Beta. Breaking changes may be + * introduced before the endpoint is made Generally Available. > - Available from version + * 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot + * Support to enable Spotter on your cluster. > - Use this API to review currently configured * instructions before modifying them with `setNLInstructions`. * * @param getNLInstructionsRequest (required) @@ -775,6 +966,8 @@ private okhttp3.Call getNLInstructionsValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -786,23 +979,28 @@ public EurekaGetNLInstructionsResponse getNLInstructions( } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) - * instructions for a specific data-model. These instructions guide the AI system in - * understanding data context and generating more accurate responses when processing natural - * language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the - * request must include: - `data_source_identifier`: The unique ID of the data-model - * to retrieve NL instructions The API returns a response object with: - - * `nl_instructions_info`: An array of instruction objects, each containing: - - * `instructions`: Array of text instructions for natural language processing - - * `scope`: The scope of the instruction (`GLOBAL`). It can be extended to - * data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that - * apply globally across the system on the given data-model (currently only global instructions - * are supported) > ###### Note: > * To use this API, the user needs atleast view access - * on the data-model and they must use corresponding org related bearerToken where the - * data-model exists. > * This endpoint is currently in Beta. Breaking changes may be - * introduced before the endpoint is made Generally Available. > * Available from version - * 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot - * Support to enable Spotter on your cluster. > * Use this API to view currently configured + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured + * for a specific data model. These instructions guide the AI system in understanding data + * context and generating more accurate responses. Requires `CAN_USE_SPOTTER` + * privilege, at least view access on the data model, and a bearer token corresponding to the + * org where the data model exists. #### Usage guidelines The request must include: - + * `data_source_identifier`: the unique ID of the data model to retrieve instructions + * for If the request is successful, the API returns: - `nl_instructions_info`: an + * array of instruction objects, each containing: - `instructions`: the configured + * text instructions for AI processing - `scope`: the scope of the instruction — + * currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: + * Instructions that apply globally across the system on the given data-model (currently only + * global instructions are supported) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * view access on the data model, or the bearer token does not correspond to the org where the + * data model exists. | > ###### Note: > > - To use this API, the user needs at least + * view access on the data model, and must use the bearer token corresponding to the org where + * the data model exists. > - This endpoint is currently in Beta. Breaking changes may be + * introduced before the endpoint is made Generally Available. > - Available from version + * 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot + * Support to enable Spotter on your cluster. > - Use this API to review currently configured * instructions before modifying them with `setNLInstructions`. * * @param getNLInstructionsRequest (required) @@ -816,6 +1014,8 @@ public EurekaGetNLInstructionsResponse getNLInstructions( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -828,23 +1028,29 @@ public ApiResponse getNLInstructionsWithHttpInf } /** - * (asynchronously) Version: 10.15.0.cl or later This API allows users to retrieve existing - * natural language (NL) instructions for a specific data-model. These instructions guide the AI - * system in understanding data context and generating more accurate responses when processing - * natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, - * the request must include: - `data_source_identifier`: The unique ID of the - * data-model to retrieve NL instructions The API returns a response object with: - - * `nl_instructions_info`: An array of instruction objects, each containing: - - * `instructions`: Array of text instructions for natural language processing - - * `scope`: The scope of the instruction (`GLOBAL`). It can be extended to - * data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that - * apply globally across the system on the given data-model (currently only global instructions - * are supported) > ###### Note: > * To use this API, the user needs atleast view access - * on the data-model and they must use corresponding org related bearerToken where the - * data-model exists. > * This endpoint is currently in Beta. Breaking changes may be - * introduced before the endpoint is made Generally Available. > * Available from version - * 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot - * Support to enable Spotter on your cluster. > * Use this API to view currently configured + * (asynchronously) Version: 10.15.0.cl or later Retrieves existing natural language (NL) + * instructions configured for a specific data model. These instructions guide the AI system in + * understanding data context and generating more accurate responses. Requires + * `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer + * token corresponding to the org where the data model exists. #### Usage guidelines The request + * must include: - `data_source_identifier`: the unique ID of the data model to + * retrieve instructions for If the request is successful, the API returns: - + * `nl_instructions_info`: an array of instruction objects, each containing: - + * `instructions`: the configured text instructions for AI processing - + * `scope`: the scope of the instruction — currently only `GLOBAL` is + * supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the + * system on the given data-model (currently only global instructions are supported) #### Error + * responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * view access on the data model, or the bearer token does not correspond to the org where the + * data model exists. | > ###### Note: > > - To use this API, the user needs at least + * view access on the data model, and must use the bearer token corresponding to the org where + * the data model exists. > - This endpoint is currently in Beta. Breaking changes may be + * introduced before the endpoint is made Generally Available. > - Available from version + * 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot + * Support to enable Spotter on your cluster. > - Use this API to review currently configured * instructions before modifying them with `setNLInstructions`. * * @param getNLInstructionsRequest (required) @@ -859,6 +1065,8 @@ public ApiResponse getNLInstructionsWithHttpInf * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -887,6 +1095,8 @@ public okhttp3.Call getNLInstructionsAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -960,26 +1170,33 @@ private okhttp3.Call getRelevantQuestionsValidateBeforeCall( } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical - * sub-questions using relevant contextual metadata. To use this API, the user must have at - * least view-level access to the referenced metadata objects. #### Usage guidelines To - * accurately generate relevant questions, the request must include at least one of the - * following metadata identifiers within `metadata_context` : - * `conversation_identifier`, `answer_identifiers`, - * `liveboard_identifiers`, or `data_source_identifiers`. You can further - * enhance the quality and precision of breakdown by providing additional `ai_context` - * such as: - `content`: User provided content like text data, csv data as a string - * message to provide context & potentially improve the quality of the response. - - * `instructions`: User specific text instructions sent to AI system for processing - * the query. Additional optional parameters include: - `limit_relevant_questions`: - * Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - - * `bypass_cache`: If set to true, forces fresh computation instead of returning - * cached results. If the API request is successful, ThoughtSpot returns a list of relevant - * analytical queries, each aligned with the user's original question. Each returned - * question includes the query string, along with the identifier and name of the corresponding - * data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes - * may be introduced before the endpoint is made Generally Available. > * This endpoint - * requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller + * analytical sub-questions, each mapped to a relevant data source. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request must include: - `query`: the + * natural language question to decompose into analytical sub-questions - + * `metadata_context`: at least one of the following context identifiers to guide + * question generation: - `conversation_identifier` — an existing conversation session + * ID - `answer_identifiers` — a list of Answer GUIDs - + * `liveboard_identifiers` — a list of Liveboard GUIDs - + * `data_source_identifiers` — a list of data source GUIDs Optional parameters for + * refining the output: - `ai_context`: additional context to improve response quality + * - `content` — supplementary text or CSV data as string input - + * `instructions` — custom text instructions for the AI system - + * `limit_relevant_questions`: maximum number of questions to return (default: + * `5`) - `bypass_cache`: if `true`, forces fresh computation + * instead of returning cached results If the request is successful, the API returns a list of + * relevant analytical questions, each containing: - `query`: the generated + * sub-question - `data_source_identifier`: the unique ID of the data source the + * question targets - `data_source_name`: the display name of the corresponding data + * source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param getRelevantQuestionsRequest (required) * @return EurekaGetRelevantQuestionsResponse @@ -992,6 +1209,8 @@ private okhttp3.Call getRelevantQuestionsValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -1003,26 +1222,33 @@ public EurekaGetRelevantQuestionsResponse getRelevantQuestions( } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical - * sub-questions using relevant contextual metadata. To use this API, the user must have at - * least view-level access to the referenced metadata objects. #### Usage guidelines To - * accurately generate relevant questions, the request must include at least one of the - * following metadata identifiers within `metadata_context` : - * `conversation_identifier`, `answer_identifiers`, - * `liveboard_identifiers`, or `data_source_identifiers`. You can further - * enhance the quality and precision of breakdown by providing additional `ai_context` - * such as: - `content`: User provided content like text data, csv data as a string - * message to provide context & potentially improve the quality of the response. - - * `instructions`: User specific text instructions sent to AI system for processing - * the query. Additional optional parameters include: - `limit_relevant_questions`: - * Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - - * `bypass_cache`: If set to true, forces fresh computation instead of returning - * cached results. If the API request is successful, ThoughtSpot returns a list of relevant - * analytical queries, each aligned with the user's original question. Each returned - * question includes the query string, along with the identifier and name of the corresponding - * data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes - * may be introduced before the endpoint is made Generally Available. > * This endpoint - * requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller + * analytical sub-questions, each mapped to a relevant data source. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request must include: - `query`: the + * natural language question to decompose into analytical sub-questions - + * `metadata_context`: at least one of the following context identifiers to guide + * question generation: - `conversation_identifier` — an existing conversation session + * ID - `answer_identifiers` — a list of Answer GUIDs - + * `liveboard_identifiers` — a list of Liveboard GUIDs - + * `data_source_identifiers` — a list of data source GUIDs Optional parameters for + * refining the output: - `ai_context`: additional context to improve response quality + * - `content` — supplementary text or CSV data as string input - + * `instructions` — custom text instructions for the AI system - + * `limit_relevant_questions`: maximum number of questions to return (default: + * `5`) - `bypass_cache`: if `true`, forces fresh computation + * instead of returning cached results If the request is successful, the API returns a list of + * relevant analytical questions, each containing: - `query`: the generated + * sub-question - `data_source_identifier`: the unique ID of the data source the + * question targets - `data_source_name`: the display name of the corresponding data + * source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param getRelevantQuestionsRequest (required) * @return ApiResponse<EurekaGetRelevantQuestionsResponse> @@ -1035,6 +1261,8 @@ public EurekaGetRelevantQuestionsResponse getRelevantQuestions( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -1047,26 +1275,33 @@ public ApiResponse getRelevantQuestionsWithH } /** - * (asynchronously) Version: 10.13.0.cl or later Breaks down a user-submitted query into a - * series of analytical sub-questions using relevant contextual metadata. To use this API, the - * user must have at least view-level access to the referenced metadata objects. #### Usage - * guidelines To accurately generate relevant questions, the request must include at least one - * of the following metadata identifiers within `metadata_context` : - * `conversation_identifier`, `answer_identifiers`, - * `liveboard_identifiers`, or `data_source_identifiers`. You can further - * enhance the quality and precision of breakdown by providing additional `ai_context` - * such as: - `content`: User provided content like text data, csv data as a string - * message to provide context & potentially improve the quality of the response. - - * `instructions`: User specific text instructions sent to AI system for processing - * the query. Additional optional parameters include: - `limit_relevant_questions`: - * Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - - * `bypass_cache`: If set to true, forces fresh computation instead of returning - * cached results. If the API request is successful, ThoughtSpot returns a list of relevant - * analytical queries, each aligned with the user's original question. Each returned - * question includes the query string, along with the identifier and name of the corresponding - * data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes - * may be introduced before the endpoint is made Generally Available. > * This endpoint - * requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * (asynchronously) Version: 10.13.0.cl or later Breaks down a natural language query into a + * series of smaller analytical sub-questions, each mapped to a relevant data source. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request must include: - `query`: the + * natural language question to decompose into analytical sub-questions - + * `metadata_context`: at least one of the following context identifiers to guide + * question generation: - `conversation_identifier` — an existing conversation session + * ID - `answer_identifiers` — a list of Answer GUIDs - + * `liveboard_identifiers` — a list of Liveboard GUIDs - + * `data_source_identifiers` — a list of data source GUIDs Optional parameters for + * refining the output: - `ai_context`: additional context to improve response quality + * - `content` — supplementary text or CSV data as string input - + * `instructions` — custom text instructions for the AI system - + * `limit_relevant_questions`: maximum number of questions to return (default: + * `5`) - `bypass_cache`: if `true`, forces fresh computation + * instead of returning cached results If the request is successful, the API returns a list of + * relevant analytical questions, each containing: - `query`: the generated + * sub-question - `data_source_identifier`: the unique ID of the data source the + * question targets - `data_source_name`: the display name of the corresponding data + * source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param getRelevantQuestionsRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -1080,6 +1315,8 @@ public ApiResponse getRelevantQuestionsWithH * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -1108,6 +1345,8 @@ public okhttp3.Call getRelevantQuestionsAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * * @@ -1187,7 +1426,32 @@ private okhttp3.Call queryGetDecomposedQueryValidateBeforeCall( } /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead + * (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question + * into smaller, actionable analytical sub-questions, each mapped to a relevant data source for + * independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level + * access to the referenced metadata objects. #### Usage guidelines The request accepts the + * following parameters: - `nlsRequest`: contains the user `query` to + * decompose, along with optional `instructions` and `bypassCache` flag - + * `worksheetIds`: list of data source identifiers to scope the decomposition - + * `answerIds`: list of Answer GUIDs whose data guides the response - + * `liveboardIds`: list of Liveboard GUIDs whose data guides the response - + * `conversationId`: an existing conversation session ID for context continuity - + * `content`: supplementary text or CSV data to improve response quality - + * `maxDecomposedQueries`: maximum number of sub-questions to return (default: + * `5`) If the request is successful, the API returns a + * `decomposedQueryResponse` containing a list of `decomposedQueries`, each + * with: - `query`: the generated analytical sub-question - `worksheetId`: + * the unique ID of the data source the question targets - `worksheetName`: the + * display name of the corresponding data source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new + * integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > * This endpoint requires Spotter — + * please contact ThoughtSpot support to enable Spotter on your cluster. * * @param queryGetDecomposedQueryRequest (required) * @return EurekaDecomposeQueryResponse @@ -1200,6 +1464,8 @@ private okhttp3.Call queryGetDecomposedQueryValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * * @@ -1214,7 +1480,32 @@ public EurekaDecomposeQueryResponse queryGetDecomposedQuery( } /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead + * (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question + * into smaller, actionable analytical sub-questions, each mapped to a relevant data source for + * independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level + * access to the referenced metadata objects. #### Usage guidelines The request accepts the + * following parameters: - `nlsRequest`: contains the user `query` to + * decompose, along with optional `instructions` and `bypassCache` flag - + * `worksheetIds`: list of data source identifiers to scope the decomposition - + * `answerIds`: list of Answer GUIDs whose data guides the response - + * `liveboardIds`: list of Liveboard GUIDs whose data guides the response - + * `conversationId`: an existing conversation session ID for context continuity - + * `content`: supplementary text or CSV data to improve response quality - + * `maxDecomposedQueries`: maximum number of sub-questions to return (default: + * `5`) If the request is successful, the API returns a + * `decomposedQueryResponse` containing a list of `decomposedQueries`, each + * with: - `query`: the generated analytical sub-question - `worksheetId`: + * the unique ID of the data source the question targets - `worksheetName`: the + * display name of the corresponding data source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new + * integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > * This endpoint requires Spotter — + * please contact ThoughtSpot support to enable Spotter on your cluster. * * @param queryGetDecomposedQueryRequest (required) * @return ApiResponse<EurekaDecomposeQueryResponse> @@ -1227,6 +1518,8 @@ public EurekaDecomposeQueryResponse queryGetDecomposedQuery( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * * @@ -1242,7 +1535,32 @@ public ApiResponse queryGetDecomposedQueryWithHttp } /** - * (asynchronously) Version: 10.7.0.cl or later + * (asynchronously) Version: 10.7.0.cl or later **Deprecated** — Use + * `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical + * or goal-oriented natural language question into smaller, actionable analytical sub-questions, + * each mapped to a relevant data source for independent execution. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request accepts the following parameters: - + * `nlsRequest`: contains the user `query` to decompose, along with optional + * `instructions` and `bypassCache` flag - `worksheetIds`: list of + * data source identifiers to scope the decomposition - `answerIds`: list of Answer + * GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs + * whose data guides the response - `conversationId`: an existing conversation session + * ID for context continuity - `content`: supplementary text or CSV data to improve + * response quality - `maxDecomposedQueries`: maximum number of sub-questions to + * return (default: `5`) If the request is successful, the API returns a + * `decomposedQueryResponse` containing a list of `decomposedQueries`, each + * with: - `query`: the generated analytical sub-question - `worksheetId`: + * the unique ID of the data source the question targets - `worksheetName`: the + * display name of the corresponding data source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new + * integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > * This endpoint requires Spotter — + * please contact ThoughtSpot support to enable Spotter on your cluster. * * @param queryGetDecomposedQueryRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -1256,6 +1574,8 @@ public ApiResponse queryGetDecomposedQueryWithHttp * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * * @@ -1290,6 +1610,8 @@ public okhttp3.Call queryGetDecomposedQueryAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -1378,19 +1700,28 @@ private okhttp3.Call sendAgentMessageValidateBeforeCall( } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) - * conversation by submitting one or more natural language messages. To use this API, the user - * must have access to the relevant conversational session (via conversation_identifier) and - * submit at least one message. #### Usage guidelines To initiate or continue a conversation, - * the request must include: - `conversation_identifier`: a unique session ID for - * continuity and message tracking - `messages`: an array of one or more text - * messages, each with a value and type The API returns a array of object with a type, message, - * and metadata. - `type`: Type of the message — text, answer, or error. - - * `message`: Main content of the response. - `metadata`: Additional info - * depending on the message type. > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` + * instead. Send natural language messages to an existing Spotter agent conversation and returns + * the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and + * access to the metadata object associated with the conversation. The user must have access to + * the conversation session referenced by `conversation_identifier`. A conversation + * must first be created using the `createAgentConversation` API. #### Usage + * guidelines The request must include: - `conversation_identifier`: the unique + * session ID returned by `createAgentConversation`, used for context continuity and + * message tracking - `messages`: an array of one or more text messages to send to the + * agent The API returns an array of response objects, each containing: - `type`: the + * kind of response — `text`, `answer`, or `error` - + * `message`: the main content of the response - `metadata`: additional + * information depending on the message type (e.g., answer metadata includes analytics and + * visualization details) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + * > - This endpoint is currently in Beta. Breaking changes may be introduced before the + * endpoint is made Generally Available. > - This endpoint requires Spotter - please contact + * ThoughtSpot support to enable Spotter on your cluster. * * @param conversationIdentifier Unique identifier for the conversation (used to track context) * (required) @@ -1405,6 +1736,8 @@ private okhttp3.Call sendAgentMessageValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -1417,19 +1750,28 @@ public Object sendAgentMessage( } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) - * conversation by submitting one or more natural language messages. To use this API, the user - * must have access to the relevant conversational session (via conversation_identifier) and - * submit at least one message. #### Usage guidelines To initiate or continue a conversation, - * the request must include: - `conversation_identifier`: a unique session ID for - * continuity and message tracking - `messages`: an array of one or more text - * messages, each with a value and type The API returns a array of object with a type, message, - * and metadata. - `type`: Type of the message — text, answer, or error. - - * `message`: Main content of the response. - `metadata`: Additional info - * depending on the message type. > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` + * instead. Send natural language messages to an existing Spotter agent conversation and returns + * the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and + * access to the metadata object associated with the conversation. The user must have access to + * the conversation session referenced by `conversation_identifier`. A conversation + * must first be created using the `createAgentConversation` API. #### Usage + * guidelines The request must include: - `conversation_identifier`: the unique + * session ID returned by `createAgentConversation`, used for context continuity and + * message tracking - `messages`: an array of one or more text messages to send to the + * agent The API returns an array of response objects, each containing: - `type`: the + * kind of response — `text`, `answer`, or `error` - + * `message`: the main content of the response - `metadata`: additional + * information depending on the message type (e.g., answer metadata includes analytics and + * visualization details) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + * > - This endpoint is currently in Beta. Breaking changes may be introduced before the + * endpoint is made Generally Available. > - This endpoint requires Spotter - please contact + * ThoughtSpot support to enable Spotter on your cluster. * * @param conversationIdentifier Unique identifier for the conversation (used to track context) * (required) @@ -1444,6 +1786,8 @@ public Object sendAgentMessage( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -1458,19 +1802,29 @@ public ApiResponse sendAgentMessageWithHttpInfo( } /** - * (asynchronously) Version: 10.15.0.cl or later This API allows users to initiate or continue - * an agent (Spotter) conversation by submitting one or more natural language messages. To use - * this API, the user must have access to the relevant conversational session (via - * conversation_identifier) and submit at least one message. #### Usage guidelines To initiate - * or continue a conversation, the request must include: - `conversation_identifier`: - * a unique session ID for continuity and message tracking - `messages`: an array of - * one or more text messages, each with a value and type The API returns a array of object with - * a type, message, and metadata. - `type`: Type of the message — text, answer, or - * error. - `message`: Main content of the response. - `metadata`: - * Additional info depending on the message type. > ###### Note: > * This endpoint is - * currently in Beta. Breaking changes may be introduced before the endpoint is made Generally - * Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to - * enable Spotter on your cluster. + * (asynchronously) Version: 10.15.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessage` instead. Send natural language messages to an + * existing Spotter agent conversation and returns the complete response synchronously. Requires + * `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the + * conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent The API + * returns an array of response objects, each containing: - `type`: the kind of + * response — `text`, `answer`, or `error` - `message`: + * the main content of the response - `metadata`: additional information depending on + * the message type (e.g., answer metadata includes analytics and visualization details) #### + * Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + * > - This endpoint is currently in Beta. Breaking changes may be introduced before the + * endpoint is made Generally Available. > - This endpoint requires Spotter - please contact + * ThoughtSpot support to enable Spotter on your cluster. * * @param conversationIdentifier Unique identifier for the conversation (used to track context) * (required) @@ -1486,6 +1840,8 @@ public ApiResponse sendAgentMessageWithHttpInfo( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -1516,6 +1872,8 @@ public okhttp3.Call sendAgentMessageAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -1591,25 +1949,40 @@ private okhttp3.Call sendAgentMessageStreamingValidateBeforeCall( } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) - * conversation by submitting one or more natural language messages. To use this API, the user - * must have access to the relevant conversational session (via conversation_identifier) and - * submit at least one message. #### Usage guidelines To initiate or continue a conversation, - * the request must include: - `conversation_identifier`: a unique session ID for - * continuity and message tracking - `messages`: an array of one or more text - * messages, each with a value and type Additionally, user can specify what tool can be included - * `conversation_settings` parameter, which supports: - - * `enable_contextual_change_analysis` (default: false) - - * `enable_natural_language_answer_generation` (default: true) - - * `enable_reasoning` (default: false) If the request is valid, the API returns a - * stream of messages in real time, including: - `ack`: confirms receipt of the - * request - `text / text-chunk`: content chunks, optionally formatted (e.g., - * markdown) - `answer`: the final structured response with metadata and analytics - - * `error`: if a failure occurs - `notification`: notification messages for - * operation being performed > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessageStreaming` instead. Sends one or more natural language + * messages to an existing Spotter agent conversation and returns the response as a real-time + * Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the + * metadata object associated with the conversation. The user must have access to the + * conversation session referenced by `conversation_identifier`. A conversation must + * first be created using the `createAgentConversation` API. #### Usage guidelines The + * request must include: - `conversation_identifier`: the unique session ID returned + * by `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new + * integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - This endpoint requires Spotter - + * please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). * * @param sendAgentMessageStreamingRequest (required) * @return SendAgentMessageResponse @@ -1622,6 +1995,8 @@ private okhttp3.Call sendAgentMessageStreamingValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -1633,25 +2008,40 @@ public SendAgentMessageResponse sendAgentMessageStreaming( } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) - * conversation by submitting one or more natural language messages. To use this API, the user - * must have access to the relevant conversational session (via conversation_identifier) and - * submit at least one message. #### Usage guidelines To initiate or continue a conversation, - * the request must include: - `conversation_identifier`: a unique session ID for - * continuity and message tracking - `messages`: an array of one or more text - * messages, each with a value and type Additionally, user can specify what tool can be included - * `conversation_settings` parameter, which supports: - - * `enable_contextual_change_analysis` (default: false) - - * `enable_natural_language_answer_generation` (default: true) - - * `enable_reasoning` (default: false) If the request is valid, the API returns a - * stream of messages in real time, including: - `ack`: confirms receipt of the - * request - `text / text-chunk`: content chunks, optionally formatted (e.g., - * markdown) - `answer`: the final structured response with metadata and analytics - - * `error`: if a failure occurs - `notification`: notification messages for - * operation being performed > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessageStreaming` instead. Sends one or more natural language + * messages to an existing Spotter agent conversation and returns the response as a real-time + * Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the + * metadata object associated with the conversation. The user must have access to the + * conversation session referenced by `conversation_identifier`. A conversation must + * first be created using the `createAgentConversation` API. #### Usage guidelines The + * request must include: - `conversation_identifier`: the unique session ID returned + * by `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new + * integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - This endpoint requires Spotter - + * please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). * * @param sendAgentMessageStreamingRequest (required) * @return ApiResponse<SendAgentMessageResponse> @@ -1664,6 +2054,8 @@ public SendAgentMessageResponse sendAgentMessageStreaming( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -1676,25 +2068,40 @@ public ApiResponse sendAgentMessageStreamingWithHttpIn } /** - * (asynchronously) Version: 10.13.0.cl or later This API allows users to initiate or continue - * an agent (Spotter) conversation by submitting one or more natural language messages. To use - * this API, the user must have access to the relevant conversational session (via - * conversation_identifier) and submit at least one message. #### Usage guidelines To initiate - * or continue a conversation, the request must include: - `conversation_identifier`: - * a unique session ID for continuity and message tracking - `messages`: an array of - * one or more text messages, each with a value and type Additionally, user can specify what - * tool can be included `conversation_settings` parameter, which supports: - - * `enable_contextual_change_analysis` (default: false) - - * `enable_natural_language_answer_generation` (default: true) - - * `enable_reasoning` (default: false) If the request is valid, the API returns a - * stream of messages in real time, including: - `ack`: confirms receipt of the - * request - `text / text-chunk`: content chunks, optionally formatted (e.g., - * markdown) - `answer`: the final structured response with metadata and analytics - - * `error`: if a failure occurs - `notification`: notification messages for - * operation being performed > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * (asynchronously) Version: 10.13.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessageStreaming` instead. Sends one or more natural language + * messages to an existing Spotter agent conversation and returns the response as a real-time + * Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the + * metadata object associated with the conversation. The user must have access to the + * conversation session referenced by `conversation_identifier`. A conversation must + * first be created using the `createAgentConversation` API. #### Usage guidelines The + * request must include: - `conversation_identifier`: the unique session ID returned + * by `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new + * integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - This endpoint requires Spotter - + * please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). * * @param sendAgentMessageStreamingRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -1708,6 +2115,8 @@ public ApiResponse sendAgentMessageStreamingWithHttpIn * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -1738,6 +2147,8 @@ public okhttp3.Call sendAgentMessageStreamingAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -1826,16 +2237,28 @@ private okhttp3.Call sendMessageValidateBeforeCall( } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation - * within the context of the metadata model. Requires at least view access to the metadata - * object specified in the request. #### Usage guidelines The API requires you to specify the - * `conversation_identifier` in the request path, and a - * `metadata_identifier` and `message` string in the request body. If the - * API request is successful, ThoughtSpot returns the session ID, tokens used in the - * conversation, and visualization type. > ###### Note: > * This endpoint is currently in - * Beta. Breaking changes may be introduced before the endpoint is made Generally Available. - * > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter - * on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the + * context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view + * access to the metadata object specified in the request. A conversation must first be created + * using the `createConversation` API. #### Usage guidelines The request must include: + * - `conversation_identifier`: the unique session ID returned by + * `createConversation` - `metadata_identifier`: the unique ID of the data + * source used for the conversation - `message`: a natural language string with the + * follow-up question If the request is successful, the API returns an array of response + * messages, each containing: - `session_identifier`: the unique ID of the generated + * response - `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param conversationIdentifier Unique identifier of the conversation. (required) * @param sendMessageRequest (required) @@ -1849,6 +2272,8 @@ private okhttp3.Call sendMessageValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -1861,16 +2286,28 @@ public List sendMessage( } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation - * within the context of the metadata model. Requires at least view access to the metadata - * object specified in the request. #### Usage guidelines The API requires you to specify the - * `conversation_identifier` in the request path, and a - * `metadata_identifier` and `message` string in the request body. If the - * API request is successful, ThoughtSpot returns the session ID, tokens used in the - * conversation, and visualization type. > ###### Note: > * This endpoint is currently in - * Beta. Breaking changes may be introduced before the endpoint is made Generally Available. - * > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter - * on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the + * context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view + * access to the metadata object specified in the request. A conversation must first be created + * using the `createConversation` API. #### Usage guidelines The request must include: + * - `conversation_identifier`: the unique session ID returned by + * `createConversation` - `metadata_identifier`: the unique ID of the data + * source used for the conversation - `message`: a natural language string with the + * follow-up question If the request is successful, the API returns an array of response + * messages, each containing: - `session_identifier`: the unique ID of the generated + * response - `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param conversationIdentifier Unique identifier of the conversation. (required) * @param sendMessageRequest (required) @@ -1884,6 +2321,8 @@ public List sendMessage( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -1897,16 +2336,28 @@ public ApiResponse> sendMessageWithHttpInfo( } /** - * (asynchronously) Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing - * conversation within the context of the metadata model. Requires at least view access to the - * metadata object specified in the request. #### Usage guidelines The API requires you to - * specify the `conversation_identifier` in the request path, and a - * `metadata_identifier` and `message` string in the request body. If the - * API request is successful, ThoughtSpot returns the session ID, tokens used in the - * conversation, and visualization type. > ###### Note: > * This endpoint is currently in - * Beta. Breaking changes may be introduced before the endpoint is made Generally Available. - * > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter - * on your cluster. + * (asynchronously) Version: 10.4.0.cl or later Sends a follow-up message to an existing + * conversation within the context of a data model. Requires `CAN_USE_SPOTTER` + * privilege and at least view access to the metadata object specified in the request. A + * conversation must first be created using the `createConversation` API. #### Usage + * guidelines The request must include: - `conversation_identifier`: the unique + * session ID returned by `createConversation` - `metadata_identifier`: the + * unique ID of the data source used for the conversation - `message`: a natural + * language string with the follow-up question If the request is successful, the API returns an + * array of response messages, each containing: - `session_identifier`: the unique ID + * of the generated response - `generation_number`: the generation number of the + * response - `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param conversationIdentifier Unique identifier of the conversation. (required) * @param sendMessageRequest (required) @@ -1921,6 +2372,8 @@ public ApiResponse> sendMessageWithHttpInfo( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -1951,6 +2404,8 @@ public okhttp3.Call sendMessageAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -2027,22 +2482,30 @@ private okhttp3.Call setNLInstructionsValidateBeforeCall( * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions * for a specific data-model to improve AI-generated answers and query processing. These * instructions help guide the AI system to better understand the data context and provide more - * accurate responses. #### Usage guidelines To set NL instructions for a data-model, the - * request must include: - `data_source_identifier`: The unique ID of the data-model - * for which to set NL instructions - `nl_instructions_info`: An array of instruction - * objects, each containing: - `instructions`: Array of text instructions for the LLM - * - `scope`: The scope of the instruction (`GLOBAL`). Currently only - * `GLOBAL` is supported. It can be extended to data-model-user scope in future. The - * API returns a response object with: - `success`: Boolean indicating whether the - * operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply - * globally for that data-model across the system > ###### Note: > * To use this API, the - * user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must - * use corresponding org related bearerToken where the data-model exists. > * This endpoint - * is currently in Beta. Breaking changes may be introduced before the endpoint is made - * Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint - * requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - * * Instructions help improve the accuracy and relevance of AI-generated responses for the - * specified data-model. + * accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or + * `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to + * the org where the data model exists. #### Usage guidelines To set NL instructions for a + * data-model, the request must include: - `data_source_identifier`: The unique ID of + * the data-model for which to set NL instructions - `nl_instructions_info`: An array + * of instruction objects, each containing: - `instructions`: Array of text + * instructions for the LLM - `scope`: The scope of the instruction + * (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to + * data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that + * apply to all users querying this data model If the request is successful, the API returns: - + * `success`: a boolean indicating whether the operation completed successfully #### + * Error responses | Code | Description | + * |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token + * does not correspond to the org where the data model exists. | > ###### Note: > > - + * To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` + * on the data model, and must use the bearer token corresponding to the org where the data + * model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and + * later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable + * Spotter on your cluster. > - Instructions help improve the accuracy and relevance of + * AI-generated responses for the specified data-model. * * @param setNLInstructionsRequest (required) * @return EurekaSetNLInstructionsResponse @@ -2055,6 +2518,8 @@ private okhttp3.Call setNLInstructionsValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -2069,22 +2534,30 @@ public EurekaSetNLInstructionsResponse setNLInstructions( * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions * for a specific data-model to improve AI-generated answers and query processing. These * instructions help guide the AI system to better understand the data context and provide more - * accurate responses. #### Usage guidelines To set NL instructions for a data-model, the - * request must include: - `data_source_identifier`: The unique ID of the data-model - * for which to set NL instructions - `nl_instructions_info`: An array of instruction - * objects, each containing: - `instructions`: Array of text instructions for the LLM - * - `scope`: The scope of the instruction (`GLOBAL`). Currently only - * `GLOBAL` is supported. It can be extended to data-model-user scope in future. The - * API returns a response object with: - `success`: Boolean indicating whether the - * operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply - * globally for that data-model across the system > ###### Note: > * To use this API, the - * user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must - * use corresponding org related bearerToken where the data-model exists. > * This endpoint - * is currently in Beta. Breaking changes may be introduced before the endpoint is made - * Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint - * requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - * * Instructions help improve the accuracy and relevance of AI-generated responses for the - * specified data-model. + * accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or + * `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to + * the org where the data model exists. #### Usage guidelines To set NL instructions for a + * data-model, the request must include: - `data_source_identifier`: The unique ID of + * the data-model for which to set NL instructions - `nl_instructions_info`: An array + * of instruction objects, each containing: - `instructions`: Array of text + * instructions for the LLM - `scope`: The scope of the instruction + * (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to + * data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that + * apply to all users querying this data model If the request is successful, the API returns: - + * `success`: a boolean indicating whether the operation completed successfully #### + * Error responses | Code | Description | + * |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token + * does not correspond to the org where the data model exists. | > ###### Note: > > - + * To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` + * on the data model, and must use the bearer token corresponding to the org where the data + * model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and + * later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable + * Spotter on your cluster. > - Instructions help improve the accuracy and relevance of + * AI-generated responses for the specified data-model. * * @param setNLInstructionsRequest (required) * @return ApiResponse<EurekaSetNLInstructionsResponse> @@ -2097,6 +2570,8 @@ public EurekaSetNLInstructionsResponse setNLInstructions( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -2112,22 +2587,31 @@ public ApiResponse setNLInstructionsWithHttpInf * (asynchronously) Version: 10.15.0.cl or later This API allows users to set natural language * (NL) instructions for a specific data-model to improve AI-generated answers and query * processing. These instructions help guide the AI system to better understand the data context - * and provide more accurate responses. #### Usage guidelines To set NL instructions for a - * data-model, the request must include: - `data_source_identifier`: The unique ID of - * the data-model for which to set NL instructions - `nl_instructions_info`: An array - * of instruction objects, each containing: - `instructions`: Array of text - * instructions for the LLM - `scope`: The scope of the instruction - * (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to - * data-model-user scope in future. The API returns a response object with: - - * `success`: Boolean indicating whether the operation was successful #### - * Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across - * the system > ###### Note: > * To use this API, the user needs either edit access or - * SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related - * bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking - * changes may be introduced before the endpoint is made Generally Available. > * Available - * from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact - * ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the - * accuracy and relevance of AI-generated responses for the specified data-model. + * and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token + * corresponding to the org where the data model exists. #### Usage guidelines To set NL + * instructions for a data-model, the request must include: - + * `data_source_identifier`: The unique ID of the data-model for which to set NL + * instructions - `nl_instructions_info`: An array of instruction objects, each + * containing: - `instructions`: Array of text instructions for the LLM - + * `scope`: The scope of the instruction (`GLOBAL`). Currently only + * `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### + * Instructions scope - **GLOBAL**: instructions that apply to all users querying this data + * model If the request is successful, the API returns: - `success`: a boolean + * indicating whether the operation completed successfully #### Error responses | Code | + * Description | + * |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token + * does not correspond to the org where the data model exists. | > ###### Note: > > - + * To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` + * on the data model, and must use the bearer token corresponding to the org where the data + * model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and + * later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable + * Spotter on your cluster. > - Instructions help improve the accuracy and relevance of + * AI-generated responses for the specified data-model. * * @param setNLInstructionsRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -2141,6 +2625,8 @@ public ApiResponse setNLInstructionsWithHttpInf * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -2169,6 +2655,8 @@ public okhttp3.Call setNLInstructionsAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -2242,12 +2730,27 @@ private okhttp3.Call singleAnswerValidateBeforeCall( } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated - * response based on a specified data model. Requires at least view access to the metadata - * object specified in the request. > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model + * and returns a single AI-generated answer without requiring a conversation session. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include: - + * `query`: a natural language question (e.g., \"What were total sales last + * quarter?\") - `metadata_identifier`: the unique ID of the data source to query + * against If the request is successful, the API returns a response message containing: - + * `session_identifier`: the unique ID of the generated response - + * `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param singleAnswerRequest (required) * @return ResponseMessage @@ -2260,6 +2763,8 @@ private okhttp3.Call singleAnswerValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -2270,12 +2775,27 @@ public ResponseMessage singleAnswer(SingleAnswerRequest singleAnswerRequest) } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated - * response based on a specified data model. Requires at least view access to the metadata - * object specified in the request. > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model + * and returns a single AI-generated answer without requiring a conversation session. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include: - + * `query`: a natural language question (e.g., \"What were total sales last + * quarter?\") - `metadata_identifier`: the unique ID of the data source to query + * against If the request is successful, the API returns a response message containing: - + * `session_identifier`: the unique ID of the generated response - + * `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param singleAnswerRequest (required) * @return ApiResponse<ResponseMessage> @@ -2288,6 +2808,8 @@ public ResponseMessage singleAnswer(SingleAnswerRequest singleAnswerRequest) * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -2299,12 +2821,27 @@ public ApiResponse singleAnswerWithHttpInfo( } /** - * (asynchronously) Version: 10.4.0.cl or later Processes a natural language query and returns - * an AI-generated response based on a specified data model. Requires at least view access to - * the metadata object specified in the request. > ###### Note: > * This endpoint is - * currently in Beta. Breaking changes may be introduced before the endpoint is made Generally - * Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to - * enable Spotter on your cluster. + * (asynchronously) Version: 10.4.0.cl or later Processes a natural language query against a + * specified data model and returns a single AI-generated answer without requiring a + * conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access + * to the metadata object specified in the request. #### Usage guidelines The request must + * include: - `query`: a natural language question (e.g., \"What were total sales + * last quarter?\") - `metadata_identifier`: the unique ID of the data source to + * query against If the request is successful, the API returns a response message containing: - + * `session_identifier`: the unique ID of the generated response - + * `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param singleAnswerRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -2318,6 +2855,8 @@ public ApiResponse singleAnswerWithHttpInfo( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/CollectionsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/CollectionsApi.java new file mode 100644 index 000000000..a4ed256ae --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/CollectionsApi.java @@ -0,0 +1,876 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.Collection; +import com.thoughtspot.client.model.CollectionDeleteResponse; +import com.thoughtspot.client.model.CollectionSearchResponse; +import com.thoughtspot.client.model.CreateCollectionRequest; +import com.thoughtspot.client.model.DeleteCollectionRequest; +import com.thoughtspot.client.model.SearchCollectionsRequest; +import com.thoughtspot.client.model.UpdateCollectionRequest; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CollectionsApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public CollectionsApi() { + this(Configuration.getDefaultApiClient()); + } + + public CollectionsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public CollectionsApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createCollection + * + * @param createCollectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collection created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCollectionCall( + CreateCollectionRequest createCollectionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createCollectionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/collections/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createCollectionValidateBeforeCall( + CreateCollectionRequest createCollectionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createCollectionRequest' is set + if (createCollectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'createCollectionRequest' when calling" + + " createCollection(Async)"); + } + + return createCollectionCall(createCollectionRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to + * organize and group related metadata objects such as Liveboards, Answers, worksheets, and + * other data objects. You can also create nested collections (sub-collections) to build a + * hierarchical structure. #### Supported operations The API endpoint lets you perform the + * following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, + * Logical Tables) to the collection * Create nested collections by adding sub-collections + * + * @param createCollectionRequest (required) + * @return Collection + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collection created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Collection createCollection(CreateCollectionRequest createCollectionRequest) + throws ApiException { + ApiResponse localVarResp = + createCollectionWithHttpInfo(createCollectionRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to + * organize and group related metadata objects such as Liveboards, Answers, worksheets, and + * other data objects. You can also create nested collections (sub-collections) to build a + * hierarchical structure. #### Supported operations The API endpoint lets you perform the + * following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, + * Logical Tables) to the collection * Create nested collections by adding sub-collections + * + * @param createCollectionRequest (required) + * @return ApiResponse<Collection> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collection created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createCollectionWithHttpInfo( + CreateCollectionRequest createCollectionRequest) throws ApiException { + okhttp3.Call localVarCall = + createCollectionValidateBeforeCall(createCollectionRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. + * Collections allow you to organize and group related metadata objects such as Liveboards, + * Answers, worksheets, and other data objects. You can also create nested collections + * (sub-collections) to build a hierarchical structure. #### Supported operations The API + * endpoint lets you perform the following operations: * Create a new collection * Add metadata + * objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections + * by adding sub-collections + * + * @param createCollectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collection created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCollectionAsync( + CreateCollectionRequest createCollectionRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createCollectionValidateBeforeCall(createCollectionRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteCollection + * + * @param deleteCollectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collections deleted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCollectionCall( + DeleteCollectionRequest deleteCollectionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteCollectionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/collections/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteCollectionValidateBeforeCall( + DeleteCollectionRequest deleteCollectionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteCollectionRequest' is set + if (deleteCollectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteCollectionRequest' when calling" + + " deleteCollection(Async)"); + } + + return deleteCollectionCall(deleteCollectionRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete + * options * **delete_children**: When set to `true`, deletes the child objects + * (metadata items) within the collection that the user has access to. Objects that the user + * does not have permission to delete will be skipped. * **dry_run**: When set to + * `true`, performs a preview of the deletion operation without actually deleting + * anything. The response shows what would be deleted, allowing you to review before committing + * the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata + * objects that were successfully deleted * **metadata_skipped**: List of metadata objects that + * were skipped due to lack of permissions or other constraints + * + * @param deleteCollectionRequest (required) + * @return CollectionDeleteResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collections deleted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public CollectionDeleteResponse deleteCollection( + DeleteCollectionRequest deleteCollectionRequest) throws ApiException { + ApiResponse localVarResp = + deleteCollectionWithHttpInfo(deleteCollectionRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete + * options * **delete_children**: When set to `true`, deletes the child objects + * (metadata items) within the collection that the user has access to. Objects that the user + * does not have permission to delete will be skipped. * **dry_run**: When set to + * `true`, performs a preview of the deletion operation without actually deleting + * anything. The response shows what would be deleted, allowing you to review before committing + * the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata + * objects that were successfully deleted * **metadata_skipped**: List of metadata objects that + * were skipped due to lack of permissions or other constraints + * + * @param deleteCollectionRequest (required) + * @return ApiResponse<CollectionDeleteResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collections deleted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public ApiResponse deleteCollectionWithHttpInfo( + DeleteCollectionRequest deleteCollectionRequest) throws ApiException { + okhttp3.Call localVarCall = + deleteCollectionValidateBeforeCall(deleteCollectionRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Deletes one or more collections from + * ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes + * the child objects (metadata items) within the collection that the user has access to. Objects + * that the user does not have permission to delete will be skipped. * **dry_run**: When set to + * `true`, performs a preview of the deletion operation without actually deleting + * anything. The response shows what would be deleted, allowing you to review before committing + * the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata + * objects that were successfully deleted * **metadata_skipped**: List of metadata objects that + * were skipped due to lack of permissions or other constraints + * + * @param deleteCollectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collections deleted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteCollectionAsync( + DeleteCollectionRequest deleteCollectionRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteCollectionValidateBeforeCall(deleteCollectionRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchCollections + * + * @param searchCollectionsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved list of collections -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCollectionsCall( + SearchCollectionsRequest searchCollectionsRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchCollectionsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/collections/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchCollectionsValidateBeforeCall( + SearchCollectionsRequest searchCollectionsRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchCollectionsRequest' is set + if (searchCollectionsRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchCollectionsRequest' when calling" + + " searchCollections(Async)"); + } + + return searchCollectionsCall(searchCollectionsRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get + * details of a specific collection, specify the collection GUID or name. You can also filter + * the API response based on the collection name pattern, author, and other criteria. #### + * Search options * **name_pattern**: Use '%' as a wildcard character to match + * collection names * **collection_identifiers**: Search for specific collections by their GUIDs + * or names * **include_metadata**: When set to `true`, includes the metadata objects + * within each collection in the response **NOTE**: If the API returns an empty list, consider + * increasing the value of the `record_size` parameter. To search across all available + * collections, set `record_size` to `-1`. + * + * @param searchCollectionsRequest (required) + * @return CollectionSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved list of collections -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CollectionSearchResponse searchCollections( + SearchCollectionsRequest searchCollectionsRequest) throws ApiException { + ApiResponse localVarResp = + searchCollectionsWithHttpInfo(searchCollectionsRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get + * details of a specific collection, specify the collection GUID or name. You can also filter + * the API response based on the collection name pattern, author, and other criteria. #### + * Search options * **name_pattern**: Use '%' as a wildcard character to match + * collection names * **collection_identifiers**: Search for specific collections by their GUIDs + * or names * **include_metadata**: When set to `true`, includes the metadata objects + * within each collection in the response **NOTE**: If the API returns an empty list, consider + * increasing the value of the `record_size` parameter. To search across all available + * collections, set `record_size` to `-1`. + * + * @param searchCollectionsRequest (required) + * @return ApiResponse<CollectionSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved list of collections -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchCollectionsWithHttpInfo( + SearchCollectionsRequest searchCollectionsRequest) throws ApiException { + okhttp3.Call localVarCall = + searchCollectionsValidateBeforeCall(searchCollectionsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Gets a list of collections available in + * ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. + * You can also filter the API response based on the collection name pattern, author, and other + * criteria. #### Search options * **name_pattern**: Use '%' as a wildcard character to + * match collection names * **collection_identifiers**: Search for specific collections by their + * GUIDs or names * **include_metadata**: When set to `true`, includes the metadata + * objects within each collection in the response **NOTE**: If the API returns an empty list, + * consider increasing the value of the `record_size` parameter. To search across all + * available collections, set `record_size` to `-1`. + * + * @param searchCollectionsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Successfully retrieved list of collections -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchCollectionsAsync( + SearchCollectionsRequest searchCollectionsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchCollectionsValidateBeforeCall(searchCollectionsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateCollection + * + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be + * used as identifiers since duplicate names are allowed. (required) + * @param updateCollectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Collection updated successfully. No content returned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCollectionCall( + String collectionIdentifier, + UpdateCollectionRequest updateCollectionRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateCollectionRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/collections/{collection_identifier}/update" + .replace( + "{" + "collection_identifier" + "}", + localVarApiClient.escapeString(collectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateCollectionValidateBeforeCall( + String collectionIdentifier, + UpdateCollectionRequest updateCollectionRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'collectionIdentifier' is set + if (collectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'collectionIdentifier' when calling" + + " updateCollection(Async)"); + } + + // verify the required parameter 'updateCollectionRequest' is set + if (updateCollectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateCollectionRequest' when calling" + + " updateCollection(Async)"); + } + + return updateCollectionCall(collectionIdentifier, updateCollectionRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported + * operations This API endpoint lets you perform the following operations: * Update collection + * name and description * Change visibility settings * Add metadata objects to the collection + * (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace + * all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: + * Adds the specified metadata objects to the existing collection without removing current items + * * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: + * Replaces all existing metadata objects with the specified items (default behavior) + * + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be + * used as identifiers since duplicate names are allowed. (required) + * @param updateCollectionRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Collection updated successfully. No content returned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public void updateCollection( + String collectionIdentifier, UpdateCollectionRequest updateCollectionRequest) + throws ApiException { + updateCollectionWithHttpInfo(collectionIdentifier, updateCollectionRequest); + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported + * operations This API endpoint lets you perform the following operations: * Update collection + * name and description * Change visibility settings * Add metadata objects to the collection + * (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace + * all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: + * Adds the specified metadata objects to the existing collection without removing current items + * * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: + * Replaces all existing metadata objects with the specified items (default behavior) + * + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be + * used as identifiers since duplicate names are allowed. (required) + * @param updateCollectionRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Collection updated successfully. No content returned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public ApiResponse updateCollectionWithHttpInfo( + String collectionIdentifier, UpdateCollectionRequest updateCollectionRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateCollectionValidateBeforeCall( + collectionIdentifier, updateCollectionRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. + * #### Supported operations This API endpoint lets you perform the following operations: * + * Update collection name and description * Change visibility settings * Add metadata objects to + * the collection (operation: ADD) * Remove metadata objects from the collection (operation: + * REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation + * types * **ADD**: Adds the specified metadata objects to the existing collection without + * removing current items * **REMOVE**: Removes only the specified metadata objects from the + * collection * **REPLACE**: Replaces all existing metadata objects with the specified items + * (default behavior) + * + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be + * used as identifiers since duplicate names are allowed. (required) + * @param updateCollectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Collection updated successfully. No content returned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCollectionAsync( + String collectionIdentifier, + UpdateCollectionRequest updateCollectionRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateCollectionValidateBeforeCall( + collectionIdentifier, updateCollectionRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionsApi.java index c58b610d0..d8e6424bd 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionsApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/ConnectionsApi.java @@ -189,15 +189,23 @@ private okhttp3.Call createConnectionValidateBeforeCall( * \"accountName\":\"thoughtspot_partner\", * \"user\":\"tsadmin\", \"password\":\"TestConn123\", * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", * \"externalDatabases\":[ ] } ``` 2. Set `validate` to - * `false`. #### Create a connection with tables To create a connection with tables: - * 1. Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes, database details, and - * table properties in `data_warehouse_config` as shown in the following example: - * ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. #### Create a connection with tables If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. To create a connection with tables: 1. Pass these parameters in your API request. * + * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of + * configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: ``` { + * \"configuration\":{ \"accountName\":\"thoughtspot_partner\", * \"user\":\"tsadmin\", \"password\":\"TestConn123\", * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", * \"isAutoCreated\":false, \"schemas\":[ { * \"name\":\"alldatatypes\", \"tables\":[ { @@ -214,7 +222,10 @@ private okhttp3.Call createConnectionValidateBeforeCall( * \"isImported\":false, \"tableName\":\"allDatatypes\", * \"schemaName\":\"alldatatypes\", * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set - * `validate` to `true`. + * `validate` to `true`. **NOTE:** If the `authentication_type` is + * anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType + * property in the payload. If you do not specify authenticationType, the API will default to + * SERVICE_ACCOUNT as the authentication type. * * @param createConnectionRequest (required) * @return CreateConnectionResponse @@ -252,15 +263,23 @@ public CreateConnectionResponse createConnection( * \"accountName\":\"thoughtspot_partner\", * \"user\":\"tsadmin\", \"password\":\"TestConn123\", * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", * \"externalDatabases\":[ ] } ``` 2. Set `validate` to - * `false`. #### Create a connection with tables To create a connection with tables: - * 1. Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes, database details, and - * table properties in `data_warehouse_config` as shown in the following example: - * ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. #### Create a connection with tables If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. To create a connection with tables: 1. Pass these parameters in your API request. * + * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of + * configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: ``` { + * \"configuration\":{ \"accountName\":\"thoughtspot_partner\", * \"user\":\"tsadmin\", \"password\":\"TestConn123\", * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", * \"isAutoCreated\":false, \"schemas\":[ { * \"name\":\"alldatatypes\", \"tables\":[ { @@ -277,7 +296,10 @@ public CreateConnectionResponse createConnection( * \"isImported\":false, \"tableName\":\"allDatatypes\", * \"schemaName\":\"alldatatypes\", * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set - * `validate` to `true`. + * `validate` to `true`. **NOTE:** If the `authentication_type` is + * anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType + * property in the payload. If you do not specify authenticationType, the API will default to + * SERVICE_ACCOUNT as the authentication type. * * @param createConnectionRequest (required) * @return ApiResponse<CreateConnectionResponse> @@ -316,15 +338,23 @@ public ApiResponse createConnectionWithHttpInfo( * \"accountName\":\"thoughtspot_partner\", * \"user\":\"tsadmin\", \"password\":\"TestConn123\", * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", * \"externalDatabases\":[ ] } ``` 2. Set `validate` to - * `false`. #### Create a connection with tables To create a connection with tables: - * 1. Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes, database details, and - * table properties in `data_warehouse_config` as shown in the following example: - * ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. #### Create a connection with tables If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. To create a connection with tables: 1. Pass these parameters in your API request. * + * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of + * configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: ``` { + * \"configuration\":{ \"accountName\":\"thoughtspot_partner\", * \"user\":\"tsadmin\", \"password\":\"TestConn123\", * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", * \"isAutoCreated\":false, \"schemas\":[ { * \"name\":\"alldatatypes\", \"tables\":[ { @@ -341,7 +371,10 @@ public ApiResponse createConnectionWithHttpInfo( * \"isImported\":false, \"tableName\":\"allDatatypes\", * \"schemaName\":\"alldatatypes\", * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set - * `validate` to `true`. + * `validate` to `true`. **NOTE:** If the `authentication_type` is + * anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType + * property in the payload. If you do not specify authenticationType, the API will default to + * SERVICE_ACCOUNT as the authentication type. * * @param createConnectionRequest (required) * @param _callback The callback to be executed when the API call finishes diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/JobsApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/JobsApi.java new file mode 100644 index 000000000..3103dca75 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/JobsApi.java @@ -0,0 +1,292 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.google.gson.reflect.TypeToken; +import com.thoughtspot.client.ApiCallback; +import com.thoughtspot.client.ApiClient; +import com.thoughtspot.client.ApiClientConfiguration; +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.ApiResponse; +import com.thoughtspot.client.Configuration; +import com.thoughtspot.client.Pair; +import com.thoughtspot.client.model.SearchChannelHistoryRequest; +import com.thoughtspot.client.model.SearchChannelHistoryResponse; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class JobsApi { + private ApiClient localVarApiClient; + private ApiClientConfiguration localVarApiClientConfiguration; + private int localHostIndex; + private String localCustomBaseUrl; + + public JobsApi() { + this(Configuration.getDefaultApiClient()); + } + + public JobsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public JobsApi(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + this.localVarApiClient = new ApiClient(apiClientConfiguration); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClientConfiguration getApiClientConfiguration() { + return localVarApiClientConfiguration; + } + + public void applyApiClientConfiguration(ApiClientConfiguration apiClientConfiguration) { + this.localVarApiClientConfiguration = apiClientConfiguration; + if (localVarApiClient != null) { + localVarApiClient.applyApiClientConfiguration(apiClientConfiguration); + } else { + localVarApiClient = new ApiClient(apiClientConfiguration); + } + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for searchChannelHistory + * + * @param searchChannelHistoryRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Channel status logs retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchChannelHistoryCall( + SearchChannelHistoryRequest searchChannelHistoryRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = searchChannelHistoryRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/jobs/history/communication-channels/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchChannelHistoryValidateBeforeCall( + SearchChannelHistoryRequest searchChannelHistoryRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'searchChannelHistoryRequest' is set + if (searchChannelHistoryRequest == null) { + throw new ApiException( + "Missing the required parameter 'searchChannelHistoryRequest' when calling" + + " searchChannelHistory(Async)"); + } + + return searchChannelHistoryCall(searchChannelHistoryRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as + * webhooks. Returns channel-level delivery status for each job execution record. Use this to + * monitor channel health and delivery success rates across events. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the + * following constraints apply: - `job_ids`, `channel_identifiers`, and + * `events` each accept at most one element. - When `job_ids` is provided, + * it is used as the sole lookup key and other filter fields are ignored. - When + * `job_ids` is not provided, `channel_identifiers` and `events` + * are both required. Each must contain exactly one element, and the event object must include + * the `identifier` field. - Records older than the configured retention period are + * not returned. + * + * @param searchChannelHistoryRequest (required) + * @return SearchChannelHistoryResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Channel status logs retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public SearchChannelHistoryResponse searchChannelHistory( + SearchChannelHistoryRequest searchChannelHistoryRequest) throws ApiException { + ApiResponse localVarResp = + searchChannelHistoryWithHttpInfo(searchChannelHistoryRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as + * webhooks. Returns channel-level delivery status for each job execution record. Use this to + * monitor channel health and delivery success rates across events. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the + * following constraints apply: - `job_ids`, `channel_identifiers`, and + * `events` each accept at most one element. - When `job_ids` is provided, + * it is used as the sole lookup key and other filter fields are ignored. - When + * `job_ids` is not provided, `channel_identifiers` and `events` + * are both required. Each must contain exactly one element, and the event object must include + * the `identifier` field. - Records older than the configured retention period are + * not returned. + * + * @param searchChannelHistoryRequest (required) + * @return ApiResponse<SearchChannelHistoryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Channel status logs retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse searchChannelHistoryWithHttpInfo( + SearchChannelHistoryRequest searchChannelHistoryRequest) throws ApiException { + okhttp3.Call localVarCall = + searchChannelHistoryValidateBeforeCall(searchChannelHistoryRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Searches delivery history for communication + * channels such as webhooks. Returns channel-level delivery status for each job execution + * record. Use this to monitor channel health and delivery success rates across events. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the + * following constraints apply: - `job_ids`, `channel_identifiers`, and + * `events` each accept at most one element. - When `job_ids` is provided, + * it is used as the sole lookup key and other filter fields are ignored. - When + * `job_ids` is not provided, `channel_identifiers` and `events` + * are both required. Each must contain exactly one element, and the event object must include + * the `identifier` field. - Records older than the configured retention period are + * not returned. + * + * @param searchChannelHistoryRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Channel status logs retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call searchChannelHistoryAsync( + SearchChannelHistoryRequest searchChannelHistoryRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + searchChannelHistoryValidateBeforeCall(searchChannelHistoryRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/MetadataApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/MetadataApi.java index d95488176..a5cc208d0 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/MetadataApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/MetadataApi.java @@ -25,6 +25,7 @@ import com.thoughtspot.client.model.ImportMetadataTMLAsyncRequest; import com.thoughtspot.client.model.ImportMetadataTMLRequest; import com.thoughtspot.client.model.MetadataSearchResponse; +import com.thoughtspot.client.model.ParameterizeMetadataFieldsRequest; import com.thoughtspot.client.model.ParameterizeMetadataRequest; import com.thoughtspot.client.model.ResponseCopyObject; import com.thoughtspot.client.model.ResponseWorksheetToModelConversion; @@ -2296,7 +2297,10 @@ public okhttp3.Call importMetadataTMLAsyncAsync( * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public okhttp3.Call parameterizeMetadataCall( ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) throws ApiException { @@ -2352,6 +2356,7 @@ public okhttp3.Call parameterizeMetadataCall( _callback); } + @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call parameterizeMetadataValidateBeforeCall( ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) @@ -2367,15 +2372,17 @@ private okhttp3.Call parameterizeMetadataValidateBeforeCall( } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing - * fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the - * metadata object. The API endpoint allows parameterizing the following types of metadata - * objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field - * type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName - * * tableName For a Connection or Connection Config, the field type is always - * `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the - * Connection or Connection Config that needs to be parameterized. For Connection Config, the - * only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API + * endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) + * instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows parameterizing + * the following types of metadata objects: * Logical Tables * Connections * Connection Configs + * For a Logical Table the field type must be `ATTRIBUTE` and field name can be one + * of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field + * type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact + * property of the Connection or Connection Config that needs to be parameterized. For + * Connection Config, the only supported field name is: * impersonate_user * * @param parameterizeMetadataRequest (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -2390,22 +2397,27 @@ private okhttp3.Call parameterizeMetadataValidateBeforeCall( * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public void parameterizeMetadata(ParameterizeMetadataRequest parameterizeMetadataRequest) throws ApiException { parameterizeMetadataWithHttpInfo(parameterizeMetadataRequest); } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing - * fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the - * metadata object. The API endpoint allows parameterizing the following types of metadata - * objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field - * type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName - * * tableName For a Connection or Connection Config, the field type is always - * `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the - * Connection or Connection Config that needs to be parameterized. For Connection Config, the - * only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API + * endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) + * instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows parameterizing + * the following types of metadata objects: * Logical Tables * Connections * Connection Configs + * For a Logical Table the field type must be `ATTRIBUTE` and field name can be one + * of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field + * type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact + * property of the Connection or Connection Config that needs to be parameterized. For + * Connection Config, the only supported field name is: * impersonate_user * * @param parameterizeMetadataRequest (required) * @return ApiResponse<Void> @@ -2421,7 +2433,10 @@ public void parameterizeMetadata(ParameterizeMetadataRequest parameterizeMetadat * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public ApiResponse parameterizeMetadataWithHttpInfo( ParameterizeMetadataRequest parameterizeMetadataRequest) throws ApiException { okhttp3.Call localVarCall = @@ -2430,15 +2445,18 @@ public ApiResponse parameterizeMetadataWithHttpInfo( } /** - * (asynchronously) Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows - * parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to - * modify the metadata object. The API endpoint allows parameterizing the following types of - * metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the - * field type must be `ATTRIBUTE` and field name can be one of: * databaseName * - * schemaName * tableName For a Connection or Connection Config, the field type is always - * `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the - * Connection or Connection Config that needs to be parameterized. For Connection Config, the - * only supported field name is: * impersonate_user + * (asynchronously) Parameterize fields in metadata objects. Version: 10.9.0.cl or later + * **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future + * release. Use [POST + * /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) + * instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows parameterizing + * the following types of metadata objects: * Logical Tables * Connections * Connection Configs + * For a Logical Table the field type must be `ATTRIBUTE` and field name can be one + * of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field + * type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact + * property of the Connection or Connection Config that needs to be parameterized. For + * Connection Config, the only supported field name is: * impersonate_user * * @param parameterizeMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -2455,7 +2473,10 @@ public ApiResponse parameterizeMetadataWithHttpInfo( * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public okhttp3.Call parameterizeMetadataAsync( ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) @@ -2466,6 +2487,208 @@ public okhttp3.Call parameterizeMetadataAsync( localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } + /** + * Build call for parameterizeMetadataFields + * + * @param parameterizeMetadataFieldsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call parameterizeMetadataFieldsCall( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = parameterizeMetadataFieldsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/metadata/parameterize-fields"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call parameterizeMetadataFieldsValidateBeforeCall( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'parameterizeMetadataFieldsRequest' is set + if (parameterizeMetadataFieldsRequest == null) { + throw new ApiException( + "Missing the required parameter 'parameterizeMetadataFieldsRequest' when" + + " calling parameterizeMetadataFields(Async)"); + } + + return parameterizeMetadataFieldsCall(parameterizeMetadataFieldsRequest, _callback); + } + + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for + * LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata + * objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for + * LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API + * endpoint allows parameterizing the following types of metadata objects: * Logical Tables * + * Connections * Connection Configs For a Logical Table, the field type must be + * `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName + * For a Connection or Connection Config, the field type is always + * `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of + * the Connection or Connection Config that need to be parameterized. For Connection Config, + * supported field names include: * impersonate_user You can parameterize multiple fields at + * once by providing an array of field names. + * + * @param parameterizeMetadataFieldsRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void parameterizeMetadataFields( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest) + throws ApiException { + parameterizeMetadataFieldsWithHttpInfo(parameterizeMetadataFieldsRequest); + } + + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for + * LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata + * objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for + * LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API + * endpoint allows parameterizing the following types of metadata objects: * Logical Tables * + * Connections * Connection Configs For a Logical Table, the field type must be + * `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName + * For a Connection or Connection Config, the field type is always + * `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of + * the Connection or Connection Config that need to be parameterized. For Connection Config, + * supported field names include: * impersonate_user You can parameterize multiple fields at + * once by providing an array of field names. + * + * @param parameterizeMetadataFieldsRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse parameterizeMetadataFieldsWithHttpInfo( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest) + throws ApiException { + okhttp3.Call localVarCall = + parameterizeMetadataFieldsValidateBeforeCall( + parameterizeMetadataFieldsRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Parameterize multiple fields of metadata objects. For example [schemaName, + * databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple + * fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, + * databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata + * object. The API endpoint allows parameterizing the following types of metadata objects: * + * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be + * `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName + * For a Connection or Connection Config, the field type is always + * `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of + * the Connection or Connection Config that need to be parameterized. For Connection Config, + * supported field names include: * impersonate_user You can parameterize multiple fields at + * once by providing an array of field names. + * + * @param parameterizeMetadataFieldsRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call parameterizeMetadataFieldsAsync( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + parameterizeMetadataFieldsValidateBeforeCall( + parameterizeMetadataFieldsRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for searchMetadata * diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/SystemApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/SystemApi.java index e6684d5d8..51d77fbb4 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/SystemApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/SystemApi.java @@ -13,6 +13,7 @@ import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; import com.thoughtspot.client.model.CommunicationChannelPreferencesResponse; +import com.thoughtspot.client.model.CommunicationChannelValidateResponse; import com.thoughtspot.client.model.ConfigureCommunicationChannelPreferencesRequest; import com.thoughtspot.client.model.ConfigureSecuritySettingsRequest; import com.thoughtspot.client.model.SearchCommunicationChannelPreferencesRequest; @@ -22,6 +23,7 @@ import com.thoughtspot.client.model.SystemInfo; import com.thoughtspot.client.model.SystemOverrideInfo; import com.thoughtspot.client.model.UpdateSystemConfigRequest; +import com.thoughtspot.client.model.ValidateCommunicationChannelRequest; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; @@ -1562,4 +1564,205 @@ public okhttp3.Call updateSystemConfigAsync( localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } + /** + * Build call for validateCommunicationChannel + * + * @param validateCommunicationChannelRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 communication channel configuration validated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateCommunicationChannelCall( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = validateCommunicationChannelRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/communication-channels/validate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call validateCommunicationChannelValidateBeforeCall( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'validateCommunicationChannelRequest' is set + if (validateCommunicationChannelRequest == null) { + throw new ApiException( + "Missing the required parameter 'validateCommunicationChannelRequest' when" + + " calling validateCommunicationChannel(Async)"); + } + + return validateCommunicationChannelCall(validateCommunicationChannelRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is + * properly set up and can receive events. - Use `channel_type` to specify the type of + * communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to + * provide the unique identifier or name for the communication channel. - Use + * `event_type` to specify the event type to validate for this channel. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. For webhook channels, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param validateCommunicationChannelRequest (required) + * @return CommunicationChannelValidateResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 communication channel configuration validated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CommunicationChannelValidateResponse validateCommunicationChannel( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest) + throws ApiException { + ApiResponse localVarResp = + validateCommunicationChannelWithHttpInfo(validateCommunicationChannelRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is + * properly set up and can receive events. - Use `channel_type` to specify the type of + * communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to + * provide the unique identifier or name for the communication channel. - Use + * `event_type` to specify the event type to validate for this channel. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. For webhook channels, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param validateCommunicationChannelRequest (required) + * @return ApiResponse<CommunicationChannelValidateResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 communication channel configuration validated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse + validateCommunicationChannelWithHttpInfo( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest) + throws ApiException { + okhttp3.Call localVarCall = + validateCommunicationChannelValidateBeforeCall( + validateCommunicationChannelRequest, null); + Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Validates a communication channel configuration + * to ensure it is properly set up and can receive events. - Use `channel_type` to + * specify the type of communication channel to validate (e.g., WEBHOOK). - Use + * `channel_identifier` to provide the unique identifier or name for the communication + * channel. - Use `event_type` to specify the event type to validate for this channel. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. For webhook channels, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param validateCommunicationChannelRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 communication channel configuration validated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateCommunicationChannelAsync( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + validateCommunicationChannelValidateBeforeCall( + validateCommunicationChannelRequest, _callback); + Type localVarReturnType = + new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } } diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/ThoughtSpotRestApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/ThoughtSpotRestApi.java index 31b7f375a..177642a1c 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/ThoughtSpotRestApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/ThoughtSpotRestApi.java @@ -20,11 +20,15 @@ import com.thoughtspot.client.model.AssignTagRequest; import com.thoughtspot.client.model.CalendarResponse; import com.thoughtspot.client.model.ChangeUserPasswordRequest; +import com.thoughtspot.client.model.Collection; +import com.thoughtspot.client.model.CollectionDeleteResponse; +import com.thoughtspot.client.model.CollectionSearchResponse; import com.thoughtspot.client.model.ColumnSecurityRuleResponse; import com.thoughtspot.client.model.CommitBranchRequest; import com.thoughtspot.client.model.CommitHistoryResponse; import com.thoughtspot.client.model.CommitResponse; import com.thoughtspot.client.model.CommunicationChannelPreferencesResponse; +import com.thoughtspot.client.model.CommunicationChannelValidateResponse; import com.thoughtspot.client.model.ConfigureCommunicationChannelPreferencesRequest; import com.thoughtspot.client.model.ConfigureSecuritySettingsRequest; import com.thoughtspot.client.model.ConnectionConfigurationResponse; @@ -34,6 +38,7 @@ import com.thoughtspot.client.model.CopyObjectRequest; import com.thoughtspot.client.model.CreateAgentConversationRequest; import com.thoughtspot.client.model.CreateCalendarRequest; +import com.thoughtspot.client.model.CreateCollectionRequest; import com.thoughtspot.client.model.CreateConfigRequest; import com.thoughtspot.client.model.CreateConnectionConfigurationRequest; import com.thoughtspot.client.model.CreateConnectionRequest; @@ -52,11 +57,13 @@ import com.thoughtspot.client.model.CreateWebhookConfigurationRequest; import com.thoughtspot.client.model.DbtSearchResponse; import com.thoughtspot.client.model.DeactivateUserRequest; +import com.thoughtspot.client.model.DeleteCollectionRequest; import com.thoughtspot.client.model.DeleteConfigRequest; import com.thoughtspot.client.model.DeleteConnectionConfigurationRequest; import com.thoughtspot.client.model.DeleteConnectionRequest; import com.thoughtspot.client.model.DeleteMetadataRequest; import com.thoughtspot.client.model.DeleteOrgEmailCustomizationRequest; +import com.thoughtspot.client.model.DeleteVariablesRequest; import com.thoughtspot.client.model.DeleteWebhookConfigurationsRequest; import com.thoughtspot.client.model.DeployCommitRequest; import com.thoughtspot.client.model.DeployResponse; @@ -104,10 +111,12 @@ import com.thoughtspot.client.model.MetadataSearchResponse; import com.thoughtspot.client.model.ObjectPrivilegesOfMetadataResponse; import com.thoughtspot.client.model.OrgResponse; +import com.thoughtspot.client.model.ParameterizeMetadataFieldsRequest; import com.thoughtspot.client.model.ParameterizeMetadataRequest; import com.thoughtspot.client.model.PermissionOfMetadataResponse; import com.thoughtspot.client.model.PermissionOfPrincipalsResponse; import com.thoughtspot.client.model.PublishMetadataRequest; +import com.thoughtspot.client.model.PutVariableValuesRequest; import com.thoughtspot.client.model.QueryGetDecomposedQueryRequest; import com.thoughtspot.client.model.RepoConfigObject; import com.thoughtspot.client.model.ResetUserPasswordRequest; @@ -124,6 +133,9 @@ import com.thoughtspot.client.model.RevokeTokenRequest; import com.thoughtspot.client.model.RoleResponse; import com.thoughtspot.client.model.SearchCalendarsRequest; +import com.thoughtspot.client.model.SearchChannelHistoryRequest; +import com.thoughtspot.client.model.SearchChannelHistoryResponse; +import com.thoughtspot.client.model.SearchCollectionsRequest; import com.thoughtspot.client.model.SearchCommitsRequest; import com.thoughtspot.client.model.SearchCommunicationChannelPreferencesRequest; import com.thoughtspot.client.model.SearchConfigRequest; @@ -163,6 +175,7 @@ import com.thoughtspot.client.model.UnparameterizeMetadataRequest; import com.thoughtspot.client.model.UnpublishMetadataRequest; import com.thoughtspot.client.model.UpdateCalendarRequest; +import com.thoughtspot.client.model.UpdateCollectionRequest; import com.thoughtspot.client.model.UpdateColumnSecurityRulesRequest; import com.thoughtspot.client.model.UpdateConfigRequest; import com.thoughtspot.client.model.UpdateConnectionConfigurationRequest; @@ -184,6 +197,7 @@ import com.thoughtspot.client.model.UpdateWebhookConfigurationRequest; import com.thoughtspot.client.model.User; import com.thoughtspot.client.model.UserGroupResponse; +import com.thoughtspot.client.model.ValidateCommunicationChannelRequest; import com.thoughtspot.client.model.ValidateMergeRequest; import com.thoughtspot.client.model.ValidateTokenRequest; import com.thoughtspot.client.model.Variable; @@ -2186,6 +2200,8 @@ public okhttp3.Call copyObjectAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -2261,7 +2277,49 @@ private okhttp3.Call createAgentConversationValidateBeforeCall( } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided + * context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include the + * `metadata_context` parameter to define the conversation context. The context type + * can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific + * data source. Provide `data_source_identifier` in `data_source_context` + * for a single data source, or `data_source_identifiers` for multi-data-source + * context. The deprecated `guid` field is accepted for backwards compatibility. - + * `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the + * most relevant datasets for the user's queries. > **Note for callers on versions + * 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the + * `guid` field instead of the above. Example: `{ \"type\": + * \"data_source\", \"data_source_context\": { \"guid\": + * \"<worksheet-id>\" } }`. The `conversation_settings` parameter + * controls which Spotter capabilities are enabled for the conversation: - + * `enable_contextual_change_analysis` (default: `true`, **deprecated from + * 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect + * on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` + * (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; + * setting this to `false` has no effect on versions >= 26.2.0.cl - + * `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — + * always enabled in Spotter 3; setting this to `false` has no effect on versions + * >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available + * from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation + * history If the request is successful, the response includes a unique + * `conversation_identifier` that must be passed to + * `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` + * to send messages within this conversation. The response also includes + * `conversation_id` with the same value for backwards compatibility; use + * `conversation_identifier` for new integrations. #### Example request + * ```json { \"metadata_context\": { \"type\": + * \"DATA_SOURCE\", \"data_source_context\": { + * \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, + * \"conversation_settings\": {} } ``` #### Error responses | Code | + * Description | | ---- | + * --------------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > > - This + * endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version + * 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to + * enable Spotter on your cluster. * * @param createAgentConversationRequest (required) * @return AgentConversation @@ -2274,6 +2332,8 @@ private okhttp3.Call createAgentConversationValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -2285,7 +2345,49 @@ public AgentConversation createAgentConversation( } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided + * context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include the + * `metadata_context` parameter to define the conversation context. The context type + * can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific + * data source. Provide `data_source_identifier` in `data_source_context` + * for a single data source, or `data_source_identifiers` for multi-data-source + * context. The deprecated `guid` field is accepted for backwards compatibility. - + * `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the + * most relevant datasets for the user's queries. > **Note for callers on versions + * 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the + * `guid` field instead of the above. Example: `{ \"type\": + * \"data_source\", \"data_source_context\": { \"guid\": + * \"<worksheet-id>\" } }`. The `conversation_settings` parameter + * controls which Spotter capabilities are enabled for the conversation: - + * `enable_contextual_change_analysis` (default: `true`, **deprecated from + * 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect + * on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` + * (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; + * setting this to `false` has no effect on versions >= 26.2.0.cl - + * `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — + * always enabled in Spotter 3; setting this to `false` has no effect on versions + * >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available + * from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation + * history If the request is successful, the response includes a unique + * `conversation_identifier` that must be passed to + * `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` + * to send messages within this conversation. The response also includes + * `conversation_id` with the same value for backwards compatibility; use + * `conversation_identifier` for new integrations. #### Example request + * ```json { \"metadata_context\": { \"type\": + * \"DATA_SOURCE\", \"data_source_context\": { + * \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, + * \"conversation_settings\": {} } ``` #### Error responses | Code | + * Description | | ---- | + * --------------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > > - This + * endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version + * 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to + * enable Spotter on your cluster. * * @param createAgentConversationRequest (required) * @return ApiResponse<AgentConversation> @@ -2298,6 +2400,8 @@ public AgentConversation createAgentConversation( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -2310,7 +2414,49 @@ public ApiResponse createAgentConversationWithHttpInfo( } /** - * (asynchronously) Version: 10.13.0.cl or later + * (asynchronously) Version: 26.2.0.cl or later Creates a new Spotter agent conversation based + * on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through + * 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the + * metadata object specified in the request. #### Usage guidelines The request must include the + * `metadata_context` parameter to define the conversation context. The context type + * can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific + * data source. Provide `data_source_identifier` in `data_source_context` + * for a single data source, or `data_source_identifiers` for multi-data-source + * context. The deprecated `guid` field is accepted for backwards compatibility. - + * `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the + * most relevant datasets for the user's queries. > **Note for callers on versions + * 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the + * `guid` field instead of the above. Example: `{ \"type\": + * \"data_source\", \"data_source_context\": { \"guid\": + * \"<worksheet-id>\" } }`. The `conversation_settings` parameter + * controls which Spotter capabilities are enabled for the conversation: - + * `enable_contextual_change_analysis` (default: `true`, **deprecated from + * 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect + * on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` + * (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; + * setting this to `false` has no effect on versions >= 26.2.0.cl - + * `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — + * always enabled in Spotter 3; setting this to `false` has no effect on versions + * >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available + * from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation + * history If the request is successful, the response includes a unique + * `conversation_identifier` that must be passed to + * `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` + * to send messages within this conversation. The response also includes + * `conversation_id` with the same value for backwards compatibility; use + * `conversation_identifier` for new integrations. #### Example request + * ```json { \"metadata_context\": { \"type\": + * \"DATA_SOURCE\", \"data_source_context\": { + * \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, + * \"conversation_settings\": {} } ``` #### Error responses | Code | + * Description | | ---- | + * --------------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > > - This + * endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version + * 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to + * enable Spotter on your cluster. * * @param createAgentConversationRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -2324,6 +2470,8 @@ public ApiResponse createAgentConversationWithHttpInfo( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -2656,6 +2804,190 @@ public okhttp3.Call createCalendarAsync( localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for createCollection + * + * @param createCollectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collection created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCollectionCall( + CreateCollectionRequest createCollectionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createCollectionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/collections/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createCollectionValidateBeforeCall( + CreateCollectionRequest createCollectionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'createCollectionRequest' is set + if (createCollectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'createCollectionRequest' when calling" + + " createCollection(Async)"); + } + + return createCollectionCall(createCollectionRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to + * organize and group related metadata objects such as Liveboards, Answers, worksheets, and + * other data objects. You can also create nested collections (sub-collections) to build a + * hierarchical structure. #### Supported operations The API endpoint lets you perform the + * following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, + * Logical Tables) to the collection * Create nested collections by adding sub-collections + * + * @param createCollectionRequest (required) + * @return Collection + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collection created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public Collection createCollection(CreateCollectionRequest createCollectionRequest) + throws ApiException { + ApiResponse localVarResp = + createCollectionWithHttpInfo(createCollectionRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to + * organize and group related metadata objects such as Liveboards, Answers, worksheets, and + * other data objects. You can also create nested collections (sub-collections) to build a + * hierarchical structure. #### Supported operations The API endpoint lets you perform the + * following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, + * Logical Tables) to the collection * Create nested collections by adding sub-collections + * + * @param createCollectionRequest (required) + * @return ApiResponse<Collection> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collection created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse createCollectionWithHttpInfo( + CreateCollectionRequest createCollectionRequest) throws ApiException { + okhttp3.Call localVarCall = + createCollectionValidateBeforeCall(createCollectionRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. + * Collections allow you to organize and group related metadata objects such as Liveboards, + * Answers, worksheets, and other data objects. You can also create nested collections + * (sub-collections) to build a hierarchical structure. #### Supported operations The API + * endpoint lets you perform the following operations: * Create a new collection * Add metadata + * objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections + * by adding sub-collections + * + * @param createCollectionRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Collection created successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call createCollectionAsync( + CreateCollectionRequest createCollectionRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + createCollectionValidateBeforeCall(createCollectionRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for createConfig * @@ -2967,15 +3299,23 @@ private okhttp3.Call createConnectionValidateBeforeCall( * \"accountName\":\"thoughtspot_partner\", * \"user\":\"tsadmin\", \"password\":\"TestConn123\", * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", * \"externalDatabases\":[ ] } ``` 2. Set `validate` to - * `false`. #### Create a connection with tables To create a connection with tables: - * 1. Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes, database details, and - * table properties in `data_warehouse_config` as shown in the following example: - * ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. #### Create a connection with tables If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. To create a connection with tables: 1. Pass these parameters in your API request. * + * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of + * configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: ``` { + * \"configuration\":{ \"accountName\":\"thoughtspot_partner\", * \"user\":\"tsadmin\", \"password\":\"TestConn123\", * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", * \"isAutoCreated\":false, \"schemas\":[ { * \"name\":\"alldatatypes\", \"tables\":[ { @@ -2992,7 +3332,10 @@ private okhttp3.Call createConnectionValidateBeforeCall( * \"isImported\":false, \"tableName\":\"allDatatypes\", * \"schemaName\":\"alldatatypes\", * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set - * `validate` to `true`. + * `validate` to `true`. **NOTE:** If the `authentication_type` is + * anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType + * property in the payload. If you do not specify authenticationType, the API will default to + * SERVICE_ACCOUNT as the authentication type. * * @param createConnectionRequest (required) * @return CreateConnectionResponse @@ -3030,15 +3373,23 @@ public CreateConnectionResponse createConnection( * \"accountName\":\"thoughtspot_partner\", * \"user\":\"tsadmin\", \"password\":\"TestConn123\", * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", * \"externalDatabases\":[ ] } ``` 2. Set `validate` to - * `false`. #### Create a connection with tables To create a connection with tables: - * 1. Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes, database details, and - * table properties in `data_warehouse_config` as shown in the following example: - * ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. #### Create a connection with tables If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. To create a connection with tables: 1. Pass these parameters in your API request. * + * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of + * configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: ``` { + * \"configuration\":{ \"accountName\":\"thoughtspot_partner\", * \"user\":\"tsadmin\", \"password\":\"TestConn123\", * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", * \"isAutoCreated\":false, \"schemas\":[ { * \"name\":\"alldatatypes\", \"tables\":[ { @@ -3055,7 +3406,10 @@ public CreateConnectionResponse createConnection( * \"isImported\":false, \"tableName\":\"allDatatypes\", * \"schemaName\":\"alldatatypes\", * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set - * `validate` to `true`. + * `validate` to `true`. **NOTE:** If the `authentication_type` is + * anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType + * property in the payload. If you do not specify authenticationType, the API will default to + * SERVICE_ACCOUNT as the authentication type. * * @param createConnectionRequest (required) * @return ApiResponse<CreateConnectionResponse> @@ -3094,15 +3448,23 @@ public ApiResponse createConnectionWithHttpInfo( * \"accountName\":\"thoughtspot_partner\", * \"user\":\"tsadmin\", \"password\":\"TestConn123\", * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", * \"externalDatabases\":[ ] } ``` 2. Set `validate` to - * `false`. #### Create a connection with tables To create a connection with tables: - * 1. Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes, database details, and - * table properties in `data_warehouse_config` as shown in the following example: - * ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. #### Create a connection with tables If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. To create a connection with tables: 1. Pass these parameters in your API request. * + * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of + * configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: ``` { + * \"configuration\":{ \"accountName\":\"thoughtspot_partner\", * \"user\":\"tsadmin\", \"password\":\"TestConn123\", * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", * \"isAutoCreated\":false, \"schemas\":[ { * \"name\":\"alldatatypes\", \"tables\":[ { @@ -3119,7 +3481,10 @@ public ApiResponse createConnectionWithHttpInfo( * \"isImported\":false, \"tableName\":\"allDatatypes\", * \"schemaName\":\"alldatatypes\", * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set - * `validate` to `true`. + * `validate` to `true`. **NOTE:** If the `authentication_type` is + * anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType + * property in the payload. If you do not specify authenticationType, the API will default to + * SERVICE_ACCOUNT as the authentication type. * * @param createConnectionRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -3387,6 +3752,8 @@ public okhttp3.Call createConnectionConfigurationAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -3460,13 +3827,18 @@ private okhttp3.Call createConversationValidateBeforeCall( } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation - * based on a specific data model. Requires at least view access to the metadata object - * specified in the request. #### Usage guidelines This API requires the - * `metadata_identifier` parameter to define the context for the conversation. You can - * also specify the tokens to initiate the conversation as shown in this example: - * `\"tokens\": \"[tea],[sales],[type]\"` If the API request is - * successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model + * for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and + * at least view access to the metadata object specified in the request. #### Usage guidelines + * The request must include: - `metadata_identifier`: the unique ID of the data source + * that provides context for the conversation Optionally, you can provide: - `tokens`: + * a token string to set initial context for the conversation (e.g., `\"[sales],[item + * type],[state]\"`) If the request is successful, ThoughtSpot returns a unique + * `conversation_identifier` that must be passed to `sendMessage` to + * continue the conversation. #### Error responses | Code | Description | |------|-------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot * support to enable Spotter on your cluster. @@ -3482,6 +3854,8 @@ private okhttp3.Call createConversationValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -3493,13 +3867,18 @@ public Conversation createConversation(CreateConversationRequest createConversat } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation - * based on a specific data model. Requires at least view access to the metadata object - * specified in the request. #### Usage guidelines This API requires the - * `metadata_identifier` parameter to define the context for the conversation. You can - * also specify the tokens to initiate the conversation as shown in this example: - * `\"tokens\": \"[tea],[sales],[type]\"` If the API request is - * successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model + * for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and + * at least view access to the metadata object specified in the request. #### Usage guidelines + * The request must include: - `metadata_identifier`: the unique ID of the data source + * that provides context for the conversation Optionally, you can provide: - `tokens`: + * a token string to set initial context for the conversation (e.g., `\"[sales],[item + * type],[state]\"`) If the request is successful, ThoughtSpot returns a unique + * `conversation_identifier` that must be passed to `sendMessage` to + * continue the conversation. #### Error responses | Code | Description | |------|-------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot * support to enable Spotter on your cluster. @@ -3515,6 +3894,8 @@ public Conversation createConversation(CreateConversationRequest createConversat * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -3527,13 +3908,19 @@ public ApiResponse createConversationWithHttpInfo( } /** - * (asynchronously) Version: 10.4.0.cl or later Creates a Conversation object to start an - * AI-driven conversation based on a specific data model. Requires at least view access to the - * metadata object specified in the request. #### Usage guidelines This API requires the - * `metadata_identifier` parameter to define the context for the conversation. You can - * also specify the tokens to initiate the conversation as shown in this example: - * `\"tokens\": \"[tea],[sales],[type]\"` If the API request is - * successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This + * (asynchronously) Version: 10.4.0.cl or later Creates a new conversation session tied to a + * specific data model for AI-driven natural language querying. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include: - + * `metadata_identifier`: the unique ID of the data source that provides context for + * the conversation Optionally, you can provide: - `tokens`: a token string to set + * initial context for the conversation (e.g., `\"[sales],[item + * type],[state]\"`) If the request is successful, ThoughtSpot returns a unique + * `conversation_identifier` that must be passed to `sendMessage` to + * continue the conversation. #### Error responses | Code | Description | |------|-------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot * support to enable Spotter on your cluster. @@ -3550,6 +3937,8 @@ public ApiResponse createConversationWithHttpInfo( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -7017,9 +7406,9 @@ public okhttp3.Call deleteCalendarAsync( return localVarCall; } /** - * Build call for deleteConfig + * Build call for deleteCollection * - * @param deleteConfigRequest (required) + * @param deleteCollectionRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -7027,15 +7416,16 @@ public okhttp3.Call deleteCalendarAsync( * * * - * + * * * * + * * *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
200 Collections deleted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
*/ - public okhttp3.Call deleteConfigCall( - DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) + public okhttp3.Call deleteCollectionCall( + DeleteCollectionRequest deleteCollectionRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers @@ -7050,10 +7440,10 @@ public okhttp3.Call deleteConfigCall( basePath = null; } - Object localVarPostBody = deleteConfigRequest; + Object localVarPostBody = deleteCollectionRequest; // create path and map variables - String localVarPath = "/api/rest/2.0/vcs/git/config/delete"; + String localVarPath = "/api/rest/2.0/collections/delete"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7090,81 +7480,100 @@ public okhttp3.Call deleteConfigCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteConfigValidateBeforeCall( - DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) + private okhttp3.Call deleteCollectionValidateBeforeCall( + DeleteCollectionRequest deleteCollectionRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'deleteConfigRequest' is set - if (deleteConfigRequest == null) { + // verify the required parameter 'deleteCollectionRequest' is set + if (deleteCollectionRequest == null) { throw new ApiException( - "Missing the required parameter 'deleteConfigRequest' when calling" - + " deleteConfig(Async)"); + "Missing the required parameter 'deleteCollectionRequest' when calling" + + " deleteCollection(Async)"); } - return deleteConfigCall(deleteConfigRequest, _callback); + return deleteCollectionCall(deleteCollectionRequest, _callback); } /** - * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot - * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete + * options * **delete_children**: When set to `true`, deletes the child objects + * (metadata items) within the collection that the user has access to. Objects that the user + * does not have permission to delete will be skipped. * **dry_run**: When set to + * `true`, performs a preview of the deletion operation without actually deleting + * anything. The response shows what would be deleted, allowing you to review before committing + * the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata + * objects that were successfully deleted * **metadata_skipped**: List of metadata objects that + * were skipped due to lack of permissions or other constraints * - * @param deleteConfigRequest (required) + * @param deleteCollectionRequest (required) + * @return CollectionDeleteResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * + * * *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
200 Collections deleted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
*/ - public void deleteConfig(DeleteConfigRequest deleteConfigRequest) throws ApiException { - deleteConfigWithHttpInfo(deleteConfigRequest); + public CollectionDeleteResponse deleteCollection( + DeleteCollectionRequest deleteCollectionRequest) throws ApiException { + ApiResponse localVarResp = + deleteCollectionWithHttpInfo(deleteCollectionRequest); + return localVarResp.getData(); } /** - * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot - * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up - * version control**) privilege. + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete + * options * **delete_children**: When set to `true`, deletes the child objects + * (metadata items) within the collection that the user has access to. Objects that the user + * does not have permission to delete will be skipped. * **dry_run**: When set to + * `true`, performs a preview of the deletion operation without actually deleting + * anything. The response shows what would be deleted, allowing you to review before committing + * the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata + * objects that were successfully deleted * **metadata_skipped**: List of metadata objects that + * were skipped due to lack of permissions or other constraints * - * @param deleteConfigRequest (required) - * @return ApiResponse<Void> + * @param deleteCollectionRequest (required) + * @return ApiResponse<CollectionDeleteResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * + * * *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
200 Collections deleted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
*/ - public ApiResponse deleteConfigWithHttpInfo(DeleteConfigRequest deleteConfigRequest) - throws ApiException { - okhttp3.Call localVarCall = deleteConfigValidateBeforeCall(deleteConfigRequest, null); - return localVarApiClient.execute(localVarCall); + public ApiResponse deleteCollectionWithHttpInfo( + DeleteCollectionRequest deleteCollectionRequest) throws ApiException { + okhttp3.Call localVarCall = + deleteCollectionValidateBeforeCall(deleteCollectionRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.2.0.cl or later Deletes Git repository configuration from your - * ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your - * instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) - * privilege. + * (asynchronously) Version: 26.4.0.cl or later Deletes one or more collections from + * ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes + * the child objects (metadata items) within the collection that the user has access to. Objects + * that the user does not have permission to delete will be skipped. * **dry_run**: When set to + * `true`, performs a preview of the deletion operation without actually deleting + * anything. The response shows what would be deleted, allowing you to review before committing + * the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata + * objects that were successfully deleted * **metadata_skipped**: List of metadata objects that + * were skipped due to lack of permissions or other constraints * - * @param deleteConfigRequest (required) + * @param deleteCollectionRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -7173,25 +7582,29 @@ public ApiResponse deleteConfigWithHttpInfo(DeleteConfigRequest deleteConf * * * - * + * * * * + * * *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
200 Collections deleted successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
*/ - public okhttp3.Call deleteConfigAsync( - DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) + public okhttp3.Call deleteCollectionAsync( + DeleteCollectionRequest deleteCollectionRequest, + final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteConfigValidateBeforeCall(deleteConfigRequest, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + okhttp3.Call localVarCall = + deleteCollectionValidateBeforeCall(deleteCollectionRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for deleteConnection + * Build call for deleteConfig * - * @param deleteConnectionRequest (required) + * @param deleteConfigRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -7199,18 +7612,15 @@ public okhttp3.Call deleteConfigAsync( * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * - * @deprecated */ - @Deprecated - public okhttp3.Call deleteConnectionCall( - DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) + public okhttp3.Call deleteConfigCall( + DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers @@ -7225,10 +7635,10 @@ public okhttp3.Call deleteConnectionCall( basePath = null; } - Object localVarPostBody = deleteConnectionRequest; + Object localVarPostBody = deleteConfigRequest; // create path and map variables - String localVarPath = "/api/rest/2.0/connection/delete"; + String localVarPath = "/api/rest/2.0/vcs/git/config/delete"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7264,23 +7674,198 @@ public okhttp3.Call deleteConnectionCall( _callback); } - @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call deleteConnectionValidateBeforeCall( - DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) + private okhttp3.Call deleteConfigValidateBeforeCall( + DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'deleteConnectionRequest' is set - if (deleteConnectionRequest == null) { + // verify the required parameter 'deleteConfigRequest' is set + if (deleteConfigRequest == null) { throw new ApiException( - "Missing the required parameter 'deleteConnectionRequest' when calling" - + " deleteConnection(Async)"); + "Missing the required parameter 'deleteConfigRequest' when calling" + + " deleteConfig(Async)"); } - return deleteConnectionCall(deleteConnectionRequest, _callback); + return deleteConfigCall(deleteConfigRequest, _callback); } /** - * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot + * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. + * + * @param deleteConfigRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteConfig(DeleteConfigRequest deleteConfigRequest) throws ApiException { + deleteConfigWithHttpInfo(deleteConfigRequest); + } + + /** + * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot + * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up + * version control**) privilege. + * + * @param deleteConfigRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteConfigWithHttpInfo(DeleteConfigRequest deleteConfigRequest) + throws ApiException { + okhttp3.Call localVarCall = deleteConfigValidateBeforeCall(deleteConfigRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Deletes Git repository configuration from your + * ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your + * instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) + * privilege. + * + * @param deleteConfigRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Successfully deleted local repository configuration -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteConfigAsync( + DeleteConfigRequest deleteConfigRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = deleteConfigValidateBeforeCall(deleteConfigRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteConnection + * + * @param deleteConnectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Connection successfully deleted. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call deleteConnectionCall( + DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteConnectionRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/connection/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteConnectionValidateBeforeCall( + DeleteConnectionRequest deleteConnectionRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteConnectionRequest' is set + if (deleteConnectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteConnectionRequest' when calling" + + " deleteConnection(Async)"); + } + + return deleteConnectionCall(deleteConnectionRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later **Important**: This endpoint is deprecated and will be removed * from ThoughtSpot in September 2025. ThoughtSpot strongly recommends using the [Delete * Connection V2](#/http/api-endpoints/connections/delete-connection-v2) endpoint to delete your * connection objects. #### Usage guidelines Deletes a connection object. Requires @@ -9720,7 +10305,10 @@ public okhttp3.Call deleteUserGroupAsync( * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public okhttp3.Call deleteVariableCall(String identifier, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -9779,6 +10367,7 @@ public okhttp3.Call deleteVariableCall(String identifier, final ApiCallback _cal _callback); } + @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call deleteVariableValidateBeforeCall( String identifier, final ApiCallback _callback) throws ApiException { @@ -9793,11 +10382,14 @@ private okhttp3.Call deleteVariableValidateBeforeCall( } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. - * Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you - * to manage Formula Variables in the current organization scope. The API endpoint requires: * - * The variable identifier (ID or name) The operation will fail if: * The user lacks required - * permissions * The variable doesn't exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and + * will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. + * Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. + * The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifier (ID or name) The + * operation will fail if: * The user lacks required permissions * The variable doesn't + * exist * The variable is being used by other objects * * @param identifier Unique id or name of the variable (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -9812,17 +10404,23 @@ private okhttp3.Call deleteVariableValidateBeforeCall( * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public void deleteVariable(String identifier) throws ApiException { deleteVariableWithHttpInfo(identifier); } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. - * Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you - * to manage Formula Variables in the current organization scope. The API endpoint requires: * - * The variable identifier (ID or name) The operation will fail if: * The user lacks required - * permissions * The variable doesn't exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and + * will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. + * Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. + * The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifier (ID or name) The + * operation will fail if: * The user lacks required permissions * The variable doesn't + * exist * The variable is being used by other objects * * @param identifier Unique id or name of the variable (required) * @return ApiResponse<Void> @@ -9838,19 +10436,24 @@ public void deleteVariable(String identifier) throws ApiException { * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public ApiResponse deleteVariableWithHttpInfo(String identifier) throws ApiException { okhttp3.Call localVarCall = deleteVariableValidateBeforeCall(identifier, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Delete a variable Version: 10.14.0.cl or later Allows deleting a variable - * from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES - * permission allows you to manage Formula Variables in the current organization scope. The API - * endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The - * user lacks required permissions * The variable doesn't exist * The variable is being used - * by other objects + * (asynchronously) Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint + * is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. + * Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. + * The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifier (ID or name) The + * operation will fail if: * The user lacks required permissions * The variable doesn't + * exist * The variable is being used by other objects * * @param identifier Unique id or name of the variable (required) * @param _callback The callback to be executed when the API call finishes @@ -9867,7 +10470,10 @@ public ApiResponse deleteVariableWithHttpInfo(String identifier) throws Ap * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public okhttp3.Call deleteVariableAsync(String identifier, final ApiCallback _callback) throws ApiException { @@ -9876,9 +10482,9 @@ public okhttp3.Call deleteVariableAsync(String identifier, final ApiCallback * Response Details * Status Code Description Response Headers - * 200 Webhook configurations deleted successfully - + * 204 Deletion of variable(s) is successful. - * 400 Invalid request. - * 401 Unauthorized access. - * 403 Forbidden access. - * 500 Unexpected error - * */ - public okhttp3.Call deleteWebhookConfigurationsCall( - DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest, - final ApiCallback _callback) + public okhttp3.Call deleteVariablesCall( + DeleteVariablesRequest deleteVariablesRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers @@ -9910,10 +10515,10 @@ public okhttp3.Call deleteWebhookConfigurationsCall( basePath = null; } - Object localVarPostBody = deleteWebhookConfigurationsRequest; + Object localVarPostBody = deleteVariablesRequest; // create path and map variables - String localVarPath = "/api/rest/2.0/webhooks/delete"; + String localVarPath = "/api/rest/2.0/template/variables/delete"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -9950,95 +10555,271 @@ public okhttp3.Call deleteWebhookConfigurationsCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteWebhookConfigurationsValidateBeforeCall( - DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest, - final ApiCallback _callback) + private okhttp3.Call deleteVariablesValidateBeforeCall( + DeleteVariablesRequest deleteVariablesRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'deleteWebhookConfigurationsRequest' is set - if (deleteWebhookConfigurationsRequest == null) { + // verify the required parameter 'deleteVariablesRequest' is set + if (deleteVariablesRequest == null) { throw new ApiException( - "Missing the required parameter 'deleteWebhookConfigurationsRequest' when" - + " calling deleteWebhookConfigurations(Async)"); + "Missing the required parameter 'deleteVariablesRequest' when calling" + + " deleteVariables(Async)"); } - return deleteWebhookConfigurationsCall(deleteWebhookConfigurationsRequest, _callback); + return deleteVariablesCall(deleteVariablesRequest, _callback); } /** - * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or - * name. Returns status of each deletion operation, including successfully deleted webhooks and - * any failures with error details. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) - * privilege are also authorized to perform this action. + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * + * The user lacks required permissions * Any of the variables don't exist * Any of the + * variables are being used by other objects * - * @param deleteWebhookConfigurationsRequest (required) - * @return WebhookDeleteResponse + * @param deleteVariablesRequest (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
204 Deletion of variable(s) is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public WebhookDeleteResponse deleteWebhookConfigurations( - DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest) - throws ApiException { - ApiResponse localVarResp = - deleteWebhookConfigurationsWithHttpInfo(deleteWebhookConfigurationsRequest); - return localVarResp.getData(); + public void deleteVariables(DeleteVariablesRequest deleteVariablesRequest) throws ApiException { + deleteVariablesWithHttpInfo(deleteVariablesRequest); } /** - * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or - * name. Returns status of each deletion operation, including successfully deleted webhooks and - * any failures with error details. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If - * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled - * on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) - * privilege are also authorized to perform this action. + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * + * The user lacks required permissions * Any of the variables don't exist * Any of the + * variables are being used by other objects * - * @param deleteWebhookConfigurationsRequest (required) - * @return ApiResponse<WebhookDeleteResponse> + * @param deleteVariablesRequest (required) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
204 Deletion of variable(s) is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse deleteWebhookConfigurationsWithHttpInfo( - DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest) - throws ApiException { - okhttp3.Call localVarCall = - deleteWebhookConfigurationsValidateBeforeCall( - deleteWebhookConfigurationsRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse deleteVariablesWithHttpInfo( + DeleteVariablesRequest deleteVariablesRequest) throws ApiException { + okhttp3.Call localVarCall = deleteVariablesValidateBeforeCall(deleteVariablesRequest, null); + return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.14.0.cl or later Deletes one or more webhook configurations by - * their unique id or name. Returns status of each deletion operation, including successfully - * deleted webhooks and any failures with error details. Requires `ADMINISTRATION` - * (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) - * privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with - * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to - * perform this action. + * (asynchronously) Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple + * variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The + * CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The + * operation will fail if: * The user lacks required permissions * Any of the variables + * don't exist * Any of the variables are being used by other objects + * + * @param deleteVariablesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deletion of variable(s) is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteVariablesAsync( + DeleteVariablesRequest deleteVariablesRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteVariablesValidateBeforeCall(deleteVariablesRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteWebhookConfigurations + * + * @param deleteWebhookConfigurationsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteWebhookConfigurationsCall( + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteWebhookConfigurationsRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/webhooks/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteWebhookConfigurationsValidateBeforeCall( + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteWebhookConfigurationsRequest' is set + if (deleteWebhookConfigurationsRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteWebhookConfigurationsRequest' when" + + " calling deleteWebhookConfigurations(Async)"); + } + + return deleteWebhookConfigurationsCall(deleteWebhookConfigurationsRequest, _callback); + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or + * name. Returns status of each deletion operation, including successfully deleted webhooks and + * any failures with error details. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) + * privilege are also authorized to perform this action. + * + * @param deleteWebhookConfigurationsRequest (required) + * @return WebhookDeleteResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public WebhookDeleteResponse deleteWebhookConfigurations( + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest) + throws ApiException { + ApiResponse localVarResp = + deleteWebhookConfigurationsWithHttpInfo(deleteWebhookConfigurationsRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or + * name. Returns status of each deletion operation, including successfully deleted webhooks and + * any failures with error details. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If + * [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled + * on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) + * privilege are also authorized to perform this action. + * + * @param deleteWebhookConfigurationsRequest (required) + * @return ApiResponse<WebhookDeleteResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Webhook configurations deleted successfully -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteWebhookConfigurationsWithHttpInfo( + DeleteWebhookConfigurationsRequest deleteWebhookConfigurationsRequest) + throws ApiException { + okhttp3.Call localVarCall = + deleteWebhookConfigurationsValidateBeforeCall( + deleteWebhookConfigurationsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.14.0.cl or later Deletes one or more webhook configurations by + * their unique id or name. Returns status of each deletion operation, including successfully + * deleted webhooks and any failures with error details. Requires `ADMINISTRATION` + * (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) + * privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. * * @param deleteWebhookConfigurationsRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -14803,6 +15584,8 @@ public okhttp3.Call getCustomAccessTokenAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -14878,19 +15661,25 @@ private okhttp3.Call getDataSourceSuggestionsValidateBeforeCall( } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a - * user-submitted natural language query. To use this API, the user must have at least - * view-level access to the underlying metadata entities referenced in the response. #### Usage - * guidelines The request must include a `query` string via the request body. The - * returned results include metadata such as: - `confidence`: a float indicating the - * model's confidence in the relevance of each recommendation - `details`: - * includes `data_source_identifier`, `data_source_name`, and - * `description` of each recommended data source - `reasoning`: rationale - * provided by the LLM to explain why each data source was recommended If the API request is - * successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant - * reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may - * be introduced before it is made Generally Available. > * This endpoint requires Spotter — - * please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural + * language query, ranked by confidence with LLM-generated reasoning. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying + * metadata entities referenced in the response. #### Usage guidelines The request must include: + * - `query`: the natural language question to find relevant data sources for If the + * request is successful, the API returns a ranked list of suggested data sources, each + * containing: - `confidence`: a float score indicating the model's confidence in + * the relevance of the suggestion - `details`: metadata about the data source - + * `data_source_identifier`: the unique ID of the data source - + * `data_source_name`: the display name of the data source - `description`: + * a description of the data source - `reasoning`: LLM-generated rationale explaining + * why the data source was recommended #### Error responses | Code | Description | + * |------|--------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the underlying metadata entities. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally + * Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to + * enable Spotter on your cluster. * * @param getDataSourceSuggestionsRequest (required) * @return EurekaDataSourceSuggestionResponse @@ -14903,6 +15692,8 @@ private okhttp3.Call getDataSourceSuggestionsValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -14914,19 +15705,25 @@ public EurekaDataSourceSuggestionResponse getDataSourceSuggestions( } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a - * user-submitted natural language query. To use this API, the user must have at least - * view-level access to the underlying metadata entities referenced in the response. #### Usage - * guidelines The request must include a `query` string via the request body. The - * returned results include metadata such as: - `confidence`: a float indicating the - * model's confidence in the relevance of each recommendation - `details`: - * includes `data_source_identifier`, `data_source_name`, and - * `description` of each recommended data source - `reasoning`: rationale - * provided by the LLM to explain why each data source was recommended If the API request is - * successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant - * reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may - * be introduced before it is made Generally Available. > * This endpoint requires Spotter — - * please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural + * language query, ranked by confidence with LLM-generated reasoning. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying + * metadata entities referenced in the response. #### Usage guidelines The request must include: + * - `query`: the natural language question to find relevant data sources for If the + * request is successful, the API returns a ranked list of suggested data sources, each + * containing: - `confidence`: a float score indicating the model's confidence in + * the relevance of the suggestion - `details`: metadata about the data source - + * `data_source_identifier`: the unique ID of the data source - + * `data_source_name`: the display name of the data source - `description`: + * a description of the data source - `reasoning`: LLM-generated rationale explaining + * why the data source was recommended #### Error responses | Code | Description | + * |------|--------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the underlying metadata entities. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally + * Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to + * enable Spotter on your cluster. * * @param getDataSourceSuggestionsRequest (required) * @return ApiResponse<EurekaDataSourceSuggestionResponse> @@ -14939,6 +15736,8 @@ public EurekaDataSourceSuggestionResponse getDataSourceSuggestions( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -14951,19 +15750,25 @@ public ApiResponse getDataSourceSuggestionsW } /** - * (asynchronously) Version: 10.15.0.cl or later Provides relevant data source recommendations - * for a user-submitted natural language query. To use this API, the user must have at least - * view-level access to the underlying metadata entities referenced in the response. #### Usage - * guidelines The request must include a `query` string via the request body. The - * returned results include metadata such as: - `confidence`: a float indicating the - * model's confidence in the relevance of each recommendation - `details`: - * includes `data_source_identifier`, `data_source_name`, and - * `description` of each recommended data source - `reasoning`: rationale - * provided by the LLM to explain why each data source was recommended If the API request is - * successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant - * reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may - * be introduced before it is made Generally Available. > * This endpoint requires Spotter — - * please contact ThoughtSpot Support to enable Spotter on your cluster. + * (asynchronously) Version: 10.15.0.cl or later Suggests the most relevant data sources for a + * given natural language query, ranked by confidence with LLM-generated reasoning. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying + * metadata entities referenced in the response. #### Usage guidelines The request must include: + * - `query`: the natural language question to find relevant data sources for If the + * request is successful, the API returns a ranked list of suggested data sources, each + * containing: - `confidence`: a float score indicating the model's confidence in + * the relevance of the suggestion - `details`: metadata about the data source - + * `data_source_identifier`: the unique ID of the data source - + * `data_source_name`: the display name of the data source - `description`: + * a description of the data source - `reasoning`: LLM-generated rationale explaining + * why the data source was recommended #### Error responses | Code | Description | + * |------|--------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the underlying metadata entities. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally + * Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to + * enable Spotter on your cluster. * * @param getDataSourceSuggestionsRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -14977,6 +15782,8 @@ public ApiResponse getDataSourceSuggestionsW * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -15259,6 +16066,8 @@ public okhttp3.Call getFullAccessTokenAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -15332,23 +16141,28 @@ private okhttp3.Call getNLInstructionsValidateBeforeCall( } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) - * instructions for a specific data-model. These instructions guide the AI system in - * understanding data context and generating more accurate responses when processing natural - * language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the - * request must include: - `data_source_identifier`: The unique ID of the data-model - * to retrieve NL instructions The API returns a response object with: - - * `nl_instructions_info`: An array of instruction objects, each containing: - - * `instructions`: Array of text instructions for natural language processing - - * `scope`: The scope of the instruction (`GLOBAL`). It can be extended to - * data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that - * apply globally across the system on the given data-model (currently only global instructions - * are supported) > ###### Note: > * To use this API, the user needs atleast view access - * on the data-model and they must use corresponding org related bearerToken where the - * data-model exists. > * This endpoint is currently in Beta. Breaking changes may be - * introduced before the endpoint is made Generally Available. > * Available from version - * 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot - * Support to enable Spotter on your cluster. > * Use this API to view currently configured + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured + * for a specific data model. These instructions guide the AI system in understanding data + * context and generating more accurate responses. Requires `CAN_USE_SPOTTER` + * privilege, at least view access on the data model, and a bearer token corresponding to the + * org where the data model exists. #### Usage guidelines The request must include: - + * `data_source_identifier`: the unique ID of the data model to retrieve instructions + * for If the request is successful, the API returns: - `nl_instructions_info`: an + * array of instruction objects, each containing: - `instructions`: the configured + * text instructions for AI processing - `scope`: the scope of the instruction — + * currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: + * Instructions that apply globally across the system on the given data-model (currently only + * global instructions are supported) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * view access on the data model, or the bearer token does not correspond to the org where the + * data model exists. | > ###### Note: > > - To use this API, the user needs at least + * view access on the data model, and must use the bearer token corresponding to the org where + * the data model exists. > - This endpoint is currently in Beta. Breaking changes may be + * introduced before the endpoint is made Generally Available. > - Available from version + * 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot + * Support to enable Spotter on your cluster. > - Use this API to review currently configured * instructions before modifying them with `setNLInstructions`. * * @param getNLInstructionsRequest (required) @@ -15362,6 +16176,8 @@ private okhttp3.Call getNLInstructionsValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -15373,23 +16189,28 @@ public EurekaGetNLInstructionsResponse getNLInstructions( } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) - * instructions for a specific data-model. These instructions guide the AI system in - * understanding data context and generating more accurate responses when processing natural - * language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the - * request must include: - `data_source_identifier`: The unique ID of the data-model - * to retrieve NL instructions The API returns a response object with: - - * `nl_instructions_info`: An array of instruction objects, each containing: - - * `instructions`: Array of text instructions for natural language processing - - * `scope`: The scope of the instruction (`GLOBAL`). It can be extended to - * data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that - * apply globally across the system on the given data-model (currently only global instructions - * are supported) > ###### Note: > * To use this API, the user needs atleast view access - * on the data-model and they must use corresponding org related bearerToken where the - * data-model exists. > * This endpoint is currently in Beta. Breaking changes may be - * introduced before the endpoint is made Generally Available. > * Available from version - * 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot - * Support to enable Spotter on your cluster. > * Use this API to view currently configured + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured + * for a specific data model. These instructions guide the AI system in understanding data + * context and generating more accurate responses. Requires `CAN_USE_SPOTTER` + * privilege, at least view access on the data model, and a bearer token corresponding to the + * org where the data model exists. #### Usage guidelines The request must include: - + * `data_source_identifier`: the unique ID of the data model to retrieve instructions + * for If the request is successful, the API returns: - `nl_instructions_info`: an + * array of instruction objects, each containing: - `instructions`: the configured + * text instructions for AI processing - `scope`: the scope of the instruction — + * currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: + * Instructions that apply globally across the system on the given data-model (currently only + * global instructions are supported) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * view access on the data model, or the bearer token does not correspond to the org where the + * data model exists. | > ###### Note: > > - To use this API, the user needs at least + * view access on the data model, and must use the bearer token corresponding to the org where + * the data model exists. > - This endpoint is currently in Beta. Breaking changes may be + * introduced before the endpoint is made Generally Available. > - Available from version + * 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot + * Support to enable Spotter on your cluster. > - Use this API to review currently configured * instructions before modifying them with `setNLInstructions`. * * @param getNLInstructionsRequest (required) @@ -15403,6 +16224,8 @@ public EurekaGetNLInstructionsResponse getNLInstructions( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -15415,23 +16238,29 @@ public ApiResponse getNLInstructionsWithHttpInf } /** - * (asynchronously) Version: 10.15.0.cl or later This API allows users to retrieve existing - * natural language (NL) instructions for a specific data-model. These instructions guide the AI - * system in understanding data context and generating more accurate responses when processing - * natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, - * the request must include: - `data_source_identifier`: The unique ID of the - * data-model to retrieve NL instructions The API returns a response object with: - - * `nl_instructions_info`: An array of instruction objects, each containing: - - * `instructions`: Array of text instructions for natural language processing - - * `scope`: The scope of the instruction (`GLOBAL`). It can be extended to - * data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that - * apply globally across the system on the given data-model (currently only global instructions - * are supported) > ###### Note: > * To use this API, the user needs atleast view access - * on the data-model and they must use corresponding org related bearerToken where the - * data-model exists. > * This endpoint is currently in Beta. Breaking changes may be - * introduced before the endpoint is made Generally Available. > * Available from version - * 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot - * Support to enable Spotter on your cluster. > * Use this API to view currently configured + * (asynchronously) Version: 10.15.0.cl or later Retrieves existing natural language (NL) + * instructions configured for a specific data model. These instructions guide the AI system in + * understanding data context and generating more accurate responses. Requires + * `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer + * token corresponding to the org where the data model exists. #### Usage guidelines The request + * must include: - `data_source_identifier`: the unique ID of the data model to + * retrieve instructions for If the request is successful, the API returns: - + * `nl_instructions_info`: an array of instruction objects, each containing: - + * `instructions`: the configured text instructions for AI processing - + * `scope`: the scope of the instruction — currently only `GLOBAL` is + * supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the + * system on the given data-model (currently only global instructions are supported) #### Error + * responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * view access on the data model, or the bearer token does not correspond to the org where the + * data model exists. | > ###### Note: > > - To use this API, the user needs at least + * view access on the data model, and must use the bearer token corresponding to the org where + * the data model exists. > - This endpoint is currently in Beta. Breaking changes may be + * introduced before the endpoint is made Generally Available. > - Available from version + * 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot + * Support to enable Spotter on your cluster. > - Use this API to review currently configured * instructions before modifying them with `setNLInstructions`. * * @param getNLInstructionsRequest (required) @@ -15446,6 +16275,8 @@ public ApiResponse getNLInstructionsWithHttpInf * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -15732,6 +16563,8 @@ public okhttp3.Call getObjectAccessTokenAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -15805,26 +16638,33 @@ private okhttp3.Call getRelevantQuestionsValidateBeforeCall( } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical - * sub-questions using relevant contextual metadata. To use this API, the user must have at - * least view-level access to the referenced metadata objects. #### Usage guidelines To - * accurately generate relevant questions, the request must include at least one of the - * following metadata identifiers within `metadata_context` : - * `conversation_identifier`, `answer_identifiers`, - * `liveboard_identifiers`, or `data_source_identifiers`. You can further - * enhance the quality and precision of breakdown by providing additional `ai_context` - * such as: - `content`: User provided content like text data, csv data as a string - * message to provide context & potentially improve the quality of the response. - - * `instructions`: User specific text instructions sent to AI system for processing - * the query. Additional optional parameters include: - `limit_relevant_questions`: - * Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - - * `bypass_cache`: If set to true, forces fresh computation instead of returning - * cached results. If the API request is successful, ThoughtSpot returns a list of relevant - * analytical queries, each aligned with the user's original question. Each returned - * question includes the query string, along with the identifier and name of the corresponding - * data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes - * may be introduced before the endpoint is made Generally Available. > * This endpoint - * requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller + * analytical sub-questions, each mapped to a relevant data source. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request must include: - `query`: the + * natural language question to decompose into analytical sub-questions - + * `metadata_context`: at least one of the following context identifiers to guide + * question generation: - `conversation_identifier` — an existing conversation session + * ID - `answer_identifiers` — a list of Answer GUIDs - + * `liveboard_identifiers` — a list of Liveboard GUIDs - + * `data_source_identifiers` — a list of data source GUIDs Optional parameters for + * refining the output: - `ai_context`: additional context to improve response quality + * - `content` — supplementary text or CSV data as string input - + * `instructions` — custom text instructions for the AI system - + * `limit_relevant_questions`: maximum number of questions to return (default: + * `5`) - `bypass_cache`: if `true`, forces fresh computation + * instead of returning cached results If the request is successful, the API returns a list of + * relevant analytical questions, each containing: - `query`: the generated + * sub-question - `data_source_identifier`: the unique ID of the data source the + * question targets - `data_source_name`: the display name of the corresponding data + * source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param getRelevantQuestionsRequest (required) * @return EurekaGetRelevantQuestionsResponse @@ -15837,6 +16677,8 @@ private okhttp3.Call getRelevantQuestionsValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -15848,26 +16690,33 @@ public EurekaGetRelevantQuestionsResponse getRelevantQuestions( } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical - * sub-questions using relevant contextual metadata. To use this API, the user must have at - * least view-level access to the referenced metadata objects. #### Usage guidelines To - * accurately generate relevant questions, the request must include at least one of the - * following metadata identifiers within `metadata_context` : - * `conversation_identifier`, `answer_identifiers`, - * `liveboard_identifiers`, or `data_source_identifiers`. You can further - * enhance the quality and precision of breakdown by providing additional `ai_context` - * such as: - `content`: User provided content like text data, csv data as a string - * message to provide context & potentially improve the quality of the response. - - * `instructions`: User specific text instructions sent to AI system for processing - * the query. Additional optional parameters include: - `limit_relevant_questions`: - * Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - - * `bypass_cache`: If set to true, forces fresh computation instead of returning - * cached results. If the API request is successful, ThoughtSpot returns a list of relevant - * analytical queries, each aligned with the user's original question. Each returned - * question includes the query string, along with the identifier and name of the corresponding - * data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes - * may be introduced before the endpoint is made Generally Available. > * This endpoint - * requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller + * analytical sub-questions, each mapped to a relevant data source. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request must include: - `query`: the + * natural language question to decompose into analytical sub-questions - + * `metadata_context`: at least one of the following context identifiers to guide + * question generation: - `conversation_identifier` — an existing conversation session + * ID - `answer_identifiers` — a list of Answer GUIDs - + * `liveboard_identifiers` — a list of Liveboard GUIDs - + * `data_source_identifiers` — a list of data source GUIDs Optional parameters for + * refining the output: - `ai_context`: additional context to improve response quality + * - `content` — supplementary text or CSV data as string input - + * `instructions` — custom text instructions for the AI system - + * `limit_relevant_questions`: maximum number of questions to return (default: + * `5`) - `bypass_cache`: if `true`, forces fresh computation + * instead of returning cached results If the request is successful, the API returns a list of + * relevant analytical questions, each containing: - `query`: the generated + * sub-question - `data_source_identifier`: the unique ID of the data source the + * question targets - `data_source_name`: the display name of the corresponding data + * source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param getRelevantQuestionsRequest (required) * @return ApiResponse<EurekaGetRelevantQuestionsResponse> @@ -15880,6 +16729,8 @@ public EurekaGetRelevantQuestionsResponse getRelevantQuestions( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -15892,26 +16743,33 @@ public ApiResponse getRelevantQuestionsWithH } /** - * (asynchronously) Version: 10.13.0.cl or later Breaks down a user-submitted query into a - * series of analytical sub-questions using relevant contextual metadata. To use this API, the - * user must have at least view-level access to the referenced metadata objects. #### Usage - * guidelines To accurately generate relevant questions, the request must include at least one - * of the following metadata identifiers within `metadata_context` : - * `conversation_identifier`, `answer_identifiers`, - * `liveboard_identifiers`, or `data_source_identifiers`. You can further - * enhance the quality and precision of breakdown by providing additional `ai_context` - * such as: - `content`: User provided content like text data, csv data as a string - * message to provide context & potentially improve the quality of the response. - - * `instructions`: User specific text instructions sent to AI system for processing - * the query. Additional optional parameters include: - `limit_relevant_questions`: - * Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - - * `bypass_cache`: If set to true, forces fresh computation instead of returning - * cached results. If the API request is successful, ThoughtSpot returns a list of relevant - * analytical queries, each aligned with the user's original question. Each returned - * question includes the query string, along with the identifier and name of the corresponding - * data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes - * may be introduced before the endpoint is made Generally Available. > * This endpoint - * requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * (asynchronously) Version: 10.13.0.cl or later Breaks down a natural language query into a + * series of smaller analytical sub-questions, each mapped to a relevant data source. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request must include: - `query`: the + * natural language question to decompose into analytical sub-questions - + * `metadata_context`: at least one of the following context identifiers to guide + * question generation: - `conversation_identifier` — an existing conversation session + * ID - `answer_identifiers` — a list of Answer GUIDs - + * `liveboard_identifiers` — a list of Liveboard GUIDs - + * `data_source_identifiers` — a list of data source GUIDs Optional parameters for + * refining the output: - `ai_context`: additional context to improve response quality + * - `content` — supplementary text or CSV data as string input - + * `instructions` — custom text instructions for the AI system - + * `limit_relevant_questions`: maximum number of questions to return (default: + * `5`) - `bypass_cache`: if `true`, forces fresh computation + * instead of returning cached results If the request is successful, the API returns a list of + * relevant analytical questions, each containing: - `query`: the generated + * sub-question - `data_source_identifier`: the unique ID of the data source the + * question targets - `data_source_name`: the display name of the corresponding data + * source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param getRelevantQuestionsRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -15925,6 +16783,8 @@ public ApiResponse getRelevantQuestionsWithH * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -17842,7 +18702,10 @@ public okhttp3.Call manageObjectPrivilegeAsync( * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public okhttp3.Call parameterizeMetadataCall( ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) throws ApiException { @@ -17898,6 +18761,7 @@ public okhttp3.Call parameterizeMetadataCall( _callback); } + @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call parameterizeMetadataValidateBeforeCall( ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) @@ -17913,15 +18777,17 @@ private okhttp3.Call parameterizeMetadataValidateBeforeCall( } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing - * fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the - * metadata object. The API endpoint allows parameterizing the following types of metadata - * objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field - * type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName - * * tableName For a Connection or Connection Config, the field type is always - * `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the - * Connection or Connection Config that needs to be parameterized. For Connection Config, the - * only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API + * endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) + * instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows parameterizing + * the following types of metadata objects: * Logical Tables * Connections * Connection Configs + * For a Logical Table the field type must be `ATTRIBUTE` and field name can be one + * of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field + * type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact + * property of the Connection or Connection Config that needs to be parameterized. For + * Connection Config, the only supported field name is: * impersonate_user * * @param parameterizeMetadataRequest (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -17936,22 +18802,27 @@ private okhttp3.Call parameterizeMetadataValidateBeforeCall( * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public void parameterizeMetadata(ParameterizeMetadataRequest parameterizeMetadataRequest) throws ApiException { parameterizeMetadataWithHttpInfo(parameterizeMetadataRequest); } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing - * fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the - * metadata object. The API endpoint allows parameterizing the following types of metadata - * objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field - * type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName - * * tableName For a Connection or Connection Config, the field type is always - * `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the - * Connection or Connection Config that needs to be parameterized. For Connection Config, the - * only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API + * endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) + * instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows parameterizing + * the following types of metadata objects: * Logical Tables * Connections * Connection Configs + * For a Logical Table the field type must be `ATTRIBUTE` and field name can be one + * of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field + * type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact + * property of the Connection or Connection Config that needs to be parameterized. For + * Connection Config, the only supported field name is: * impersonate_user * * @param parameterizeMetadataRequest (required) * @return ApiResponse<Void> @@ -17967,7 +18838,10 @@ public void parameterizeMetadata(ParameterizeMetadataRequest parameterizeMetadat * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public ApiResponse parameterizeMetadataWithHttpInfo( ParameterizeMetadataRequest parameterizeMetadataRequest) throws ApiException { okhttp3.Call localVarCall = @@ -17976,15 +18850,18 @@ public ApiResponse parameterizeMetadataWithHttpInfo( } /** - * (asynchronously) Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows - * parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to - * modify the metadata object. The API endpoint allows parameterizing the following types of - * metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the - * field type must be `ATTRIBUTE` and field name can be one of: * databaseName * - * schemaName * tableName For a Connection or Connection Config, the field type is always - * `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the - * Connection or Connection Config that needs to be parameterized. For Connection Config, the - * only supported field name is: * impersonate_user + * (asynchronously) Parameterize fields in metadata objects. Version: 10.9.0.cl or later + * **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future + * release. Use [POST + * /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) + * instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows parameterizing + * the following types of metadata objects: * Logical Tables * Connections * Connection Configs + * For a Logical Table the field type must be `ATTRIBUTE` and field name can be one + * of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field + * type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact + * property of the Connection or Connection Config that needs to be parameterized. For + * Connection Config, the only supported field name is: * impersonate_user * * @param parameterizeMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -18001,7 +18878,10 @@ public ApiResponse parameterizeMetadataWithHttpInfo( * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public okhttp3.Call parameterizeMetadataAsync( ParameterizeMetadataRequest parameterizeMetadataRequest, final ApiCallback _callback) @@ -18013,9 +18893,9 @@ public okhttp3.Call parameterizeMetadataAsync( return localVarCall; } /** - * Build call for publishMetadata + * Build call for parameterizeMetadataFields * - * @param publishMetadataRequest (required) + * @param parameterizeMetadataFieldsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -18023,15 +18903,16 @@ public okhttp3.Call parameterizeMetadataAsync( * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call publishMetadataCall( - PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) + public okhttp3.Call parameterizeMetadataFieldsCall( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest, + final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers @@ -18046,10 +18927,10 @@ public okhttp3.Call publishMetadataCall( basePath = null; } - Object localVarPostBody = publishMetadataRequest; + Object localVarPostBody = parameterizeMetadataFieldsRequest; // create path and map variables - String localVarPath = "/api/rest/2.0/security/metadata/publish"; + String localVarPath = "/api/rest/2.0/metadata/parameterize-fields"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -18086,52 +18967,69 @@ public okhttp3.Call publishMetadataCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call publishMetadataValidateBeforeCall( - PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) + private okhttp3.Call parameterizeMetadataFieldsValidateBeforeCall( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest, + final ApiCallback _callback) throws ApiException { - // verify the required parameter 'publishMetadataRequest' is set - if (publishMetadataRequest == null) { + // verify the required parameter 'parameterizeMetadataFieldsRequest' is set + if (parameterizeMetadataFieldsRequest == null) { throw new ApiException( - "Missing the required parameter 'publishMetadataRequest' when calling" - + " publishMetadata(Async)"); + "Missing the required parameter 'parameterizeMetadataFieldsRequest' when" + + " calling parameterizeMetadataFields(Async)"); } - return publishMetadataCall(publishMetadataRequest, _callback); + return parameterizeMetadataFieldsCall(parameterizeMetadataFieldsRequest, _callback); } /** - * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in - * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows - * publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables - * This API will essentially share the objects along with it's dependencies to the org - * admins of the orgs to which it is being published. + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for + * LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata + * objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for + * LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API + * endpoint allows parameterizing the following types of metadata objects: * Logical Tables * + * Connections * Connection Configs For a Logical Table, the field type must be + * `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName + * For a Connection or Connection Config, the field type is always + * `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of + * the Connection or Connection Config that need to be parameterized. For Connection Config, + * supported field names include: * impersonate_user You can parameterize multiple fields at + * once by providing an array of field names. * - * @param publishMetadataRequest (required) + * @param parameterizeMetadataFieldsRequest (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void publishMetadata(PublishMetadataRequest publishMetadataRequest) throws ApiException { - publishMetadataWithHttpInfo(publishMetadataRequest); + public void parameterizeMetadataFields( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest) + throws ApiException { + parameterizeMetadataFieldsWithHttpInfo(parameterizeMetadataFieldsRequest); } /** - * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in - * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows - * publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables - * This API will essentially share the objects along with it's dependencies to the org - * admins of the orgs to which it is being published. + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for + * LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata + * objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for + * LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API + * endpoint allows parameterizing the following types of metadata objects: * Logical Tables * + * Connections * Connection Configs For a Logical Table, the field type must be + * `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName + * For a Connection or Connection Config, the field type is always + * `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of + * the Connection or Connection Config that need to be parameterized. For Connection Config, + * supported field names include: * impersonate_user You can parameterize multiple fields at + * once by providing an array of field names. * - * @param publishMetadataRequest (required) + * @param parameterizeMetadataFieldsRequest (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -18139,27 +19037,37 @@ public void publishMetadata(PublishMetadataRequest publishMetadataRequest) throw * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse publishMetadataWithHttpInfo( - PublishMetadataRequest publishMetadataRequest) throws ApiException { - okhttp3.Call localVarCall = publishMetadataValidateBeforeCall(publishMetadataRequest, null); + public ApiResponse parameterizeMetadataFieldsWithHttpInfo( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest) + throws ApiException { + okhttp3.Call localVarCall = + parameterizeMetadataFieldsValidateBeforeCall( + parameterizeMetadataFieldsRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.9.0.cl or later Allows publishing metadata objects across - * organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint - * allows publishing the following types of metadata objects: * Liveboards * Answers * Logical - * Tables This API will essentially share the objects along with it's dependencies to the - * org admins of the orgs to which it is being published. + * (asynchronously) Parameterize multiple fields of metadata objects. For example [schemaName, + * databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple + * fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, + * databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata + * object. The API endpoint allows parameterizing the following types of metadata objects: * + * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be + * `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName + * For a Connection or Connection Config, the field type is always + * `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of + * the Connection or Connection Config that need to be parameterized. For Connection Config, + * supported field names include: * impersonate_user You can parameterize multiple fields at + * once by providing an array of field names. * - * @param publishMetadataRequest (required) + * @param parameterizeMetadataFieldsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -18168,26 +19076,28 @@ public ApiResponse publishMetadataWithHttpInfo( * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
204 Publishing metadata objects is successful. -
204 Parameterize successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call publishMetadataAsync( - PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) + public okhttp3.Call parameterizeMetadataFieldsAsync( + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - publishMetadataValidateBeforeCall(publishMetadataRequest, _callback); + parameterizeMetadataFieldsValidateBeforeCall( + parameterizeMetadataFieldsRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for queryGetDecomposedQuery + * Build call for publishMetadata * - * @param queryGetDecomposedQueryRequest (required) + * @param publishMetadataRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -18195,18 +19105,15 @@ public okhttp3.Call publishMetadataAsync( * * * - * - * - * - * + * + * + * + * + * *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * - * @deprecated */ - @Deprecated - public okhttp3.Call queryGetDecomposedQueryCall( - QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, - final ApiCallback _callback) + public okhttp3.Call publishMetadataCall( + PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers @@ -18221,10 +19128,10 @@ public okhttp3.Call queryGetDecomposedQueryCall( basePath = null; } - Object localVarPostBody = queryGetDecomposedQueryRequest; + Object localVarPostBody = publishMetadataRequest; // create path and map variables - String localVarPath = "/api/rest/2.0/ai/analytical-questions"; + String localVarPath = "/api/rest/2.0/security/metadata/publish"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -18260,81 +19167,81 @@ public okhttp3.Call queryGetDecomposedQueryCall( _callback); } - @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call queryGetDecomposedQueryValidateBeforeCall( - QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, - final ApiCallback _callback) + private okhttp3.Call publishMetadataValidateBeforeCall( + PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'queryGetDecomposedQueryRequest' is set - if (queryGetDecomposedQueryRequest == null) { + // verify the required parameter 'publishMetadataRequest' is set + if (publishMetadataRequest == null) { throw new ApiException( - "Missing the required parameter 'queryGetDecomposedQueryRequest' when calling" - + " queryGetDecomposedQuery(Async)"); + "Missing the required parameter 'publishMetadataRequest' when calling" + + " publishMetadata(Async)"); } - return queryGetDecomposedQueryCall(queryGetDecomposedQueryRequest, _callback); + return publishMetadataCall(publishMetadataRequest, _callback); } /** - * Version: 10.7.0.cl or later + * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows + * publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables + * This API will essentially share the objects along with it's dependencies to the org + * admins of the orgs to which it is being published. * - * @param queryGetDecomposedQueryRequest (required) - * @return EurekaDecomposeQueryResponse + * @param publishMetadataRequest (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * - * - * - * + * + * + * + * + * *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * - * @deprecated */ - @Deprecated - public EurekaDecomposeQueryResponse queryGetDecomposedQuery( - QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest) throws ApiException { - ApiResponse localVarResp = - queryGetDecomposedQueryWithHttpInfo(queryGetDecomposedQueryRequest); - return localVarResp.getData(); + public void publishMetadata(PublishMetadataRequest publishMetadataRequest) throws ApiException { + publishMetadataWithHttpInfo(publishMetadataRequest); } /** - * Version: 10.7.0.cl or later + * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows + * publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables + * This API will essentially share the objects along with it's dependencies to the org + * admins of the orgs to which it is being published. * - * @param queryGetDecomposedQueryRequest (required) - * @return ApiResponse<EurekaDecomposeQueryResponse> + * @param publishMetadataRequest (required) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * - * - * - * + * + * + * + * + * *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * - * @deprecated */ - @Deprecated - public ApiResponse queryGetDecomposedQueryWithHttpInfo( - QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest) throws ApiException { - okhttp3.Call localVarCall = - queryGetDecomposedQueryValidateBeforeCall(queryGetDecomposedQueryRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse publishMetadataWithHttpInfo( + PublishMetadataRequest publishMetadataRequest) throws ApiException { + okhttp3.Call localVarCall = publishMetadataValidateBeforeCall(publishMetadataRequest, null); + return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.7.0.cl or later + * (asynchronously) Version: 10.9.0.cl or later Allows publishing metadata objects across + * organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint + * allows publishing the following types of metadata objects: * Liveboards * Answers * Logical + * Tables This API will essentially share the objects along with it's dependencies to the + * org admins of the orgs to which it is being published. * - * @param queryGetDecomposedQueryRequest (required) + * @param publishMetadataRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -18343,31 +19250,27 @@ public ApiResponse queryGetDecomposedQueryWithHttp * * * - * - * - * - * + * + * + * + * + * *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
500 Operation failed -
204 Publishing metadata objects is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
- * - * @deprecated */ - @Deprecated - public okhttp3.Call queryGetDecomposedQueryAsync( - QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, - final ApiCallback _callback) + public okhttp3.Call publishMetadataAsync( + PublishMetadataRequest publishMetadataRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - queryGetDecomposedQueryValidateBeforeCall( - queryGetDecomposedQueryRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + publishMetadataValidateBeforeCall(publishMetadataRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for resetUserPassword + * Build call for putVariableValues * - * @param resetUserPasswordRequest (required) + * @param identifier Unique ID or name of the variable (required) + * @param putVariableValuesRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -18375,15 +19278,17 @@ public okhttp3.Call queryGetDecomposedQueryAsync( * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call resetUserPasswordCall( - ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) + public okhttp3.Call putVariableValuesCall( + String identifier, + PutVariableValuesRequest putVariableValuesRequest, + final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers @@ -18398,10 +19303,14 @@ public okhttp3.Call resetUserPasswordCall( basePath = null; } - Object localVarPostBody = resetUserPasswordRequest; + Object localVarPostBody = putVariableValuesRequest; // create path and map variables - String localVarPath = "/api/rest/2.0/users/reset-password"; + String localVarPath = + "/api/rest/2.0/template/variables/{identifier}/update-values" + .replace( + "{" + "identifier" + "}", + localVarApiClient.escapeString(identifier.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -18438,53 +19347,79 @@ public okhttp3.Call resetUserPasswordCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call resetUserPasswordValidateBeforeCall( - ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) + private okhttp3.Call putVariableValuesValidateBeforeCall( + String identifier, + PutVariableValuesRequest putVariableValuesRequest, + final ApiCallback _callback) throws ApiException { - // verify the required parameter 'resetUserPasswordRequest' is set - if (resetUserPasswordRequest == null) { + // verify the required parameter 'identifier' is set + if (identifier == null) { throw new ApiException( - "Missing the required parameter 'resetUserPasswordRequest' when calling" - + " resetUserPassword(Async)"); + "Missing the required parameter 'identifier' when calling" + + " putVariableValues(Async)"); } - return resetUserPasswordCall(resetUserPasswordRequest, _callback); + // verify the required parameter 'putVariableValuesRequest' is set + if (putVariableValuesRequest == null) { + throw new ApiException( + "Missing the required parameter 'putVariableValuesRequest' when calling" + + " putVariableValues(Async)"); + } + + return putVariableValuesCall(identifier, putVariableValuesRequest, _callback); } /** - * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset - * password on behalf of a user. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a + * specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting + * values from the variable * Resetting all values When updating variable values, you need to + * specify: * The variable identifier (ID or name) * The values to add/replace/remove * The + * operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - + * Adds values to the variable if this is a list type variable, else same as replace. * REPLACE + * - Replaces all values of a given set of constraints with the current set of values. * REMOVE + * - Removes any values which match the set of conditions of the variables if this is a list + * type variable, else clears value. * RESET - Removes all constraints for the given variable, + * scope is ignored * - * @param resetUserPasswordRequest (required) + * @param identifier Unique ID or name of the variable (required) + * @param putVariableValuesRequest (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void resetUserPassword(ResetUserPasswordRequest resetUserPasswordRequest) + public void putVariableValues( + String identifier, PutVariableValuesRequest putVariableValuesRequest) throws ApiException { - resetUserPasswordWithHttpInfo(resetUserPasswordRequest); + putVariableValuesWithHttpInfo(identifier, putVariableValuesRequest); } /** - * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset - * password on behalf of a user. Requires `ADMINISTRATION` (**Can administer - * ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a + * specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting + * values from the variable * Resetting all values When updating variable values, you need to + * specify: * The variable identifier (ID or name) * The values to add/replace/remove * The + * operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - + * Adds values to the variable if this is a list type variable, else same as replace. * REPLACE + * - Replaces all values of a given set of constraints with the current set of values. * REMOVE + * - Removes any values which match the set of conditions of the variables if this is a list + * type variable, else clears value. * RESET - Removes all constraints for the given variable, + * scope is ignored * - * @param resetUserPasswordRequest (required) + * @param identifier Unique ID or name of the variable (required) + * @param putVariableValuesRequest (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -18492,28 +19427,37 @@ public void resetUserPassword(ResetUserPasswordRequest resetUserPasswordRequest) * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse resetUserPasswordWithHttpInfo( - ResetUserPasswordRequest resetUserPasswordRequest) throws ApiException { + public ApiResponse putVariableValuesWithHttpInfo( + String identifier, PutVariableValuesRequest putVariableValuesRequest) + throws ApiException { okhttp3.Call localVarCall = - resetUserPasswordValidateBeforeCall(resetUserPasswordRequest, null); + putVariableValuesValidateBeforeCall(identifier, putVariableValuesRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.0.0.cl or later Resets the password of a user account. - * Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` - * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the - * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. - * - * @param resetUserPasswordRequest (required) + * (asynchronously) Update values for a variable Version: 26.4.0.cl or later Allows updating + * values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The + * CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint allows: * Adding new values to the variable * Replacing + * existing values * Deleting values from the variable * Resetting all values When updating + * variable values, you need to specify: * The variable identifier (ID or name) * The values to + * add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based + * on operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constraints for the given variable, scope is ignored + * + * @param identifier Unique ID or name of the variable (required) + * @param putVariableValuesRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -18522,27 +19466,29 @@ public ApiResponse resetUserPasswordWithHttpInfo( * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call resetUserPasswordAsync( - ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) + public okhttp3.Call putVariableValuesAsync( + String identifier, + PutVariableValuesRequest putVariableValuesRequest, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - resetUserPasswordValidateBeforeCall(resetUserPasswordRequest, _callback); + putVariableValuesValidateBeforeCall( + identifier, putVariableValuesRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for revertCommit + * Build call for queryGetDecomposedQuery * - * @param commitId Commit id to which the object should be reverted (required) - * @param revertCommitRequest (required) + * @param queryGetDecomposedQueryRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -18550,15 +19496,20 @@ public okhttp3.Call resetUserPasswordAsync( * * * - * - * + * + * + * * * - * + * *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
500 Operation failed -
+ * + * @deprecated */ - public okhttp3.Call revertCommitCall( - String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) + @Deprecated + public okhttp3.Call queryGetDecomposedQueryCall( + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, + final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers @@ -18573,13 +19524,446 @@ public okhttp3.Call revertCommitCall( basePath = null; } - Object localVarPostBody = revertCommitRequest; + Object localVarPostBody = queryGetDecomposedQueryRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/vcs/git/commits/{commit_id}/revert" - .replace( - "{" + "commit_id" + "}", + String localVarPath = "/api/rest/2.0/ai/analytical-questions"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @Deprecated + @SuppressWarnings("rawtypes") + private okhttp3.Call queryGetDecomposedQueryValidateBeforeCall( + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'queryGetDecomposedQueryRequest' is set + if (queryGetDecomposedQueryRequest == null) { + throw new ApiException( + "Missing the required parameter 'queryGetDecomposedQueryRequest' when calling" + + " queryGetDecomposedQuery(Async)"); + } + + return queryGetDecomposedQueryCall(queryGetDecomposedQueryRequest, _callback); + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead + * (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question + * into smaller, actionable analytical sub-questions, each mapped to a relevant data source for + * independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level + * access to the referenced metadata objects. #### Usage guidelines The request accepts the + * following parameters: - `nlsRequest`: contains the user `query` to + * decompose, along with optional `instructions` and `bypassCache` flag - + * `worksheetIds`: list of data source identifiers to scope the decomposition - + * `answerIds`: list of Answer GUIDs whose data guides the response - + * `liveboardIds`: list of Liveboard GUIDs whose data guides the response - + * `conversationId`: an existing conversation session ID for context continuity - + * `content`: supplementary text or CSV data to improve response quality - + * `maxDecomposedQueries`: maximum number of sub-questions to return (default: + * `5`) If the request is successful, the API returns a + * `decomposedQueryResponse` containing a list of `decomposedQueries`, each + * with: - `query`: the generated analytical sub-question - `worksheetId`: + * the unique ID of the data source the question targets - `worksheetName`: the + * display name of the corresponding data source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new + * integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > * This endpoint requires Spotter — + * please contact ThoughtSpot support to enable Spotter on your cluster. + * + * @param queryGetDecomposedQueryRequest (required) + * @return EurekaDecomposeQueryResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public EurekaDecomposeQueryResponse queryGetDecomposedQuery( + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest) throws ApiException { + ApiResponse localVarResp = + queryGetDecomposedQueryWithHttpInfo(queryGetDecomposedQueryRequest); + return localVarResp.getData(); + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead + * (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question + * into smaller, actionable analytical sub-questions, each mapped to a relevant data source for + * independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level + * access to the referenced metadata objects. #### Usage guidelines The request accepts the + * following parameters: - `nlsRequest`: contains the user `query` to + * decompose, along with optional `instructions` and `bypassCache` flag - + * `worksheetIds`: list of data source identifiers to scope the decomposition - + * `answerIds`: list of Answer GUIDs whose data guides the response - + * `liveboardIds`: list of Liveboard GUIDs whose data guides the response - + * `conversationId`: an existing conversation session ID for context continuity - + * `content`: supplementary text or CSV data to improve response quality - + * `maxDecomposedQueries`: maximum number of sub-questions to return (default: + * `5`) If the request is successful, the API returns a + * `decomposedQueryResponse` containing a list of `decomposedQueries`, each + * with: - `query`: the generated analytical sub-question - `worksheetId`: + * the unique ID of the data source the question targets - `worksheetName`: the + * display name of the corresponding data source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new + * integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > * This endpoint requires Spotter — + * please contact ThoughtSpot support to enable Spotter on your cluster. + * + * @param queryGetDecomposedQueryRequest (required) + * @return ApiResponse<EurekaDecomposeQueryResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse queryGetDecomposedQueryWithHttpInfo( + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest) throws ApiException { + okhttp3.Call localVarCall = + queryGetDecomposedQueryValidateBeforeCall(queryGetDecomposedQueryRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 10.7.0.cl or later **Deprecated** — Use + * `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical + * or goal-oriented natural language question into smaller, actionable analytical sub-questions, + * each mapped to a relevant data source for independent execution. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request accepts the following parameters: - + * `nlsRequest`: contains the user `query` to decompose, along with optional + * `instructions` and `bypassCache` flag - `worksheetIds`: list of + * data source identifiers to scope the decomposition - `answerIds`: list of Answer + * GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs + * whose data guides the response - `conversationId`: an existing conversation session + * ID for context continuity - `content`: supplementary text or CSV data to improve + * response quality - `maxDecomposedQueries`: maximum number of sub-questions to + * return (default: `5`) If the request is successful, the API returns a + * `decomposedQueryResponse` containing a list of `decomposedQueries`, each + * with: - `query`: the generated analytical sub-question - `worksheetId`: + * the unique ID of the data source the question targets - `worksheetName`: the + * display name of the corresponding data source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new + * integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > * This endpoint requires Spotter — + * please contact ThoughtSpot support to enable Spotter on your cluster. + * + * @param queryGetDecomposedQueryRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Common successful response -
201 Common error response -
400 Operation failed -
401 Unauthorized access. -
403 Forbidden access. -
500 Operation failed -
+ * + * @deprecated + */ + @Deprecated + public okhttp3.Call queryGetDecomposedQueryAsync( + QueryGetDecomposedQueryRequest queryGetDecomposedQueryRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + queryGetDecomposedQueryValidateBeforeCall( + queryGetDecomposedQueryRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for resetUserPassword + * + * @param resetUserPasswordRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call resetUserPasswordCall( + ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = resetUserPasswordRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/users/reset-password"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call resetUserPasswordValidateBeforeCall( + ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'resetUserPasswordRequest' is set + if (resetUserPasswordRequest == null) { + throw new ApiException( + "Missing the required parameter 'resetUserPasswordRequest' when calling" + + " resetUserPassword(Async)"); + } + + return resetUserPasswordCall(resetUserPasswordRequest, _callback); + } + + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset + * password on behalf of a user. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param resetUserPasswordRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void resetUserPassword(ResetUserPasswordRequest resetUserPasswordRequest) + throws ApiException { + resetUserPasswordWithHttpInfo(resetUserPasswordRequest); + } + + /** + * Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset + * password on behalf of a user. Requires `ADMINISTRATION` (**Can administer + * ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param resetUserPasswordRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse resetUserPasswordWithHttpInfo( + ResetUserPasswordRequest resetUserPasswordRequest) throws ApiException { + okhttp3.Call localVarCall = + resetUserPasswordValidateBeforeCall(resetUserPasswordRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 9.0.0.cl or later Resets the password of a user account. + * Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` + * (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + * + * @param resetUserPasswordRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 User password reset operation successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call resetUserPasswordAsync( + ResetUserPasswordRequest resetUserPasswordRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + resetUserPasswordValidateBeforeCall(resetUserPasswordRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for revertCommit + * + * @param commitId Commit id to which the object should be reverted (required) + * @param revertCommitRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call revertCommitCall( + String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = revertCommitRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/vcs/git/commits/{commit_id}/revert" + .replace( + "{" + "commit_id" + "}", localVarApiClient.escapeString(commitId.toString())); List localVarQueryParams = new ArrayList(); @@ -18617,101 +20001,556 @@ public okhttp3.Call revertCommitCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call revertCommitValidateBeforeCall( - String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) + private okhttp3.Call revertCommitValidateBeforeCall( + String commitId, RevertCommitRequest revertCommitRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'commitId' is set + if (commitId == null) { + throw new ApiException( + "Missing the required parameter 'commitId' when calling revertCommit(Async)"); + } + + // verify the required parameter 'revertCommitRequest' is set + if (revertCommitRequest == null) { + throw new ApiException( + "Missing the required parameter 'revertCommitRequest' when calling" + + " revertCommit(Async)"); + } + + return revertCommitCall(commitId, revertCommitRequest, _callback); + } + + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API + * request. Requires at least edit access to objects. In the API request, specify the + * `commit_id`. If the branch name is not specified in the request, the API will + * consider the default branch configured on your instance. By default, the API reverts all + * objects. If the revert operation fails for one of the objects provided in the commit, the API + * returns an error and does not revert any object. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param commitId Commit id to which the object should be reverted (required) + * @param revertCommitRequest (required) + * @return RevertResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public RevertResponse revertCommit(String commitId, RevertCommitRequest revertCommitRequest) + throws ApiException { + ApiResponse localVarResp = + revertCommitWithHttpInfo(commitId, revertCommitRequest); + return localVarResp.getData(); + } + + /** + * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API + * request. Requires at least edit access to objects. In the API request, specify the + * `commit_id`. If the branch name is not specified in the request, the API will + * consider the default branch configured on your instance. By default, the API reverts all + * objects. If the revert operation fails for one of the objects provided in the commit, the API + * returns an error and does not revert any object. For more information, see [Git integration + * documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param commitId Commit id to which the object should be reverted (required) + * @param revertCommitRequest (required) + * @return ApiResponse<RevertResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse revertCommitWithHttpInfo( + String commitId, RevertCommitRequest revertCommitRequest) throws ApiException { + okhttp3.Call localVarCall = + revertCommitValidateBeforeCall(commitId, revertCommitRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 9.2.0.cl or later Reverts TML objects to a previous commit + * specified in the API request. Requires at least edit access to objects. In the API request, + * specify the `commit_id`. If the branch name is not specified in the request, the + * API will consider the default branch configured on your instance. By default, the API reverts + * all objects. If the revert operation fails for one of the objects provided in the commit, the + * API returns an error and does not revert any object. For more information, see [Git + * integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * + * @param commitId Commit id to which the object should be reverted (required) + * @param revertCommitRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call revertCommitAsync( + String commitId, + RevertCommitRequest revertCommitRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + revertCommitValidateBeforeCall(commitId, revertCommitRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for revokeRefreshTokens + * + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to + * be revoked. All the users associated with the connection will have their refresh tokens + * revoked except the author. (required) + * @param revokeRefreshTokensRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token(s) successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
409 Conflict -
500 Unexpected error -
+ */ + public okhttp3.Call revokeRefreshTokensCall( + String connectionIdentifier, + RevokeRefreshTokensRequest revokeRefreshTokensRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = revokeRefreshTokensRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens" + .replace( + "{" + "connection_identifier" + "}", + localVarApiClient.escapeString(connectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call revokeRefreshTokensValidateBeforeCall( + String connectionIdentifier, + RevokeRefreshTokensRequest revokeRefreshTokensRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'connectionIdentifier' is set + if (connectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'connectionIdentifier' when calling" + + " revokeRefreshTokens(Async)"); + } + + // verify the required parameter 'revokeRefreshTokensRequest' is set + if (revokeRefreshTokensRequest == null) { + throw new ApiException( + "Missing the required parameter 'revokeRefreshTokensRequest' when calling" + + " revokeRefreshTokens(Async)"); + } + + return revokeRefreshTokensCall(connectionIdentifier, revokeRefreshTokensRequest, _callback); + } + + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require + * access to a data warehouse connection. When a token is revoked, the affected user's + * session for that connection is terminated, and they must re-authenticate to regain access. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, + * users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + * privilege can also make API requests to revoke tokens for connection users. #### Usage + * guidelines You can specify different combinations of identifiers to control which refresh + * tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the + * connection, except the connection author. - **connection_identifier** and + * **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If + * the name or ID of the connection author is included in the request, their token will also be + * revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh + * tokens for all users on the specified configurations, except the configuration author. - + * **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes + * refresh tokens for the specified users on the specified configurations. - + * **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified + * Orgs. Applicable only for published connections. - **connection_identifier**, + * **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users + * in the specified Orgs. Applicable only for published connections. **NOTE**: The + * `org_identifiers` parameter is only applicable for published connections. Using + * this parameter for unpublished connections will result in an error. Ensure that the + * connections are published before making the API request. + * + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to + * be revoked. All the users associated with the connection will have their refresh tokens + * revoked except the author. (required) + * @param revokeRefreshTokensRequest (required) + * @return RevokeRefreshTokensResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token(s) successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
409 Conflict -
500 Unexpected error -
+ */ + public RevokeRefreshTokensResponse revokeRefreshTokens( + String connectionIdentifier, RevokeRefreshTokensRequest revokeRefreshTokensRequest) + throws ApiException { + ApiResponse localVarResp = + revokeRefreshTokensWithHttpInfo(connectionIdentifier, revokeRefreshTokensRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require + * access to a data warehouse connection. When a token is revoked, the affected user's + * session for that connection is terminated, and they must re-authenticate to regain access. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, + * users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + * privilege can also make API requests to revoke tokens for connection users. #### Usage + * guidelines You can specify different combinations of identifiers to control which refresh + * tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the + * connection, except the connection author. - **connection_identifier** and + * **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If + * the name or ID of the connection author is included in the request, their token will also be + * revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh + * tokens for all users on the specified configurations, except the configuration author. - + * **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes + * refresh tokens for the specified users on the specified configurations. - + * **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified + * Orgs. Applicable only for published connections. - **connection_identifier**, + * **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users + * in the specified Orgs. Applicable only for published connections. **NOTE**: The + * `org_identifiers` parameter is only applicable for published connections. Using + * this parameter for unpublished connections will result in an error. Ensure that the + * connections are published before making the API request. + * + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to + * be revoked. All the users associated with the connection will have their refresh tokens + * revoked except the author. (required) + * @param revokeRefreshTokensRequest (required) + * @return ApiResponse<RevokeRefreshTokensResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token(s) successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
409 Conflict -
500 Unexpected error -
+ */ + public ApiResponse revokeRefreshTokensWithHttpInfo( + String connectionIdentifier, RevokeRefreshTokensRequest revokeRefreshTokensRequest) + throws ApiException { + okhttp3.Call localVarCall = + revokeRefreshTokensValidateBeforeCall( + connectionIdentifier, revokeRefreshTokensRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no + * longer require access to a data warehouse connection. When a token is revoked, the affected + * user's session for that connection is terminated, and they must re-authenticate to regain + * access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or + * `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, + * users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) + * privilege can also make API requests to revoke tokens for connection users. #### Usage + * guidelines You can specify different combinations of identifiers to control which refresh + * tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the + * connection, except the connection author. - **connection_identifier** and + * **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If + * the name or ID of the connection author is included in the request, their token will also be + * revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh + * tokens for all users on the specified configurations, except the configuration author. - + * **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes + * refresh tokens for the specified users on the specified configurations. - + * **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified + * Orgs. Applicable only for published connections. - **connection_identifier**, + * **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users + * in the specified Orgs. Applicable only for published connections. **NOTE**: The + * `org_identifiers` parameter is only applicable for published connections. Using + * this parameter for unpublished connections will result in an error. Ensure that the + * connections are published before making the API request. + * + * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to + * be revoked. All the users associated with the connection will have their refresh tokens + * revoked except the author. (required) + * @param revokeRefreshTokensRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Token(s) successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
409 Conflict -
500 Unexpected error -
+ */ + public okhttp3.Call revokeRefreshTokensAsync( + String connectionIdentifier, + RevokeRefreshTokensRequest revokeRefreshTokensRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + revokeRefreshTokensValidateBeforeCall( + connectionIdentifier, revokeRefreshTokensRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for revokeToken + * + * @param revokeTokenRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call revokeTokenCall( + RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = revokeTokenRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/auth/token/revoke"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call revokeTokenValidateBeforeCall( + RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'commitId' is set - if (commitId == null) { - throw new ApiException( - "Missing the required parameter 'commitId' when calling revertCommit(Async)"); - } - - // verify the required parameter 'revertCommitRequest' is set - if (revertCommitRequest == null) { + // verify the required parameter 'revokeTokenRequest' is set + if (revokeTokenRequest == null) { throw new ApiException( - "Missing the required parameter 'revertCommitRequest' when calling" - + " revertCommit(Async)"); + "Missing the required parameter 'revokeTokenRequest' when calling" + + " revokeToken(Async)"); } - return revertCommitCall(commitId, revertCommitRequest, _callback); + return revokeTokenCall(revokeTokenRequest, _callback); } /** - * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API - * request. Requires at least edit access to objects. In the API request, specify the - * `commit_id`. If the branch name is not specified in the request, the API will - * consider the default branch configured on your instance. By default, the API reverts all - * objects. If the revert operation fails for one of the objects provided in the commit, the API - * returns an error and does not revert any object. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. + * The token of your current session expires when you make a call to the + * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access + * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new + * token from ThoughtSpot. See [Get Full Access + * Token](#/http/api-endpoints/authentication/get-full-access-token). * - * @param commitId Commit id to which the object should be reverted (required) - * @param revertCommitRequest (required) - * @return RevertResponse + * @param revokeTokenRequest (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public RevertResponse revertCommit(String commitId, RevertCommitRequest revertCommitRequest) - throws ApiException { - ApiResponse localVarResp = - revertCommitWithHttpInfo(commitId, revertCommitRequest); - return localVarResp.getData(); + public void revokeToken(RevokeTokenRequest revokeTokenRequest) throws ApiException { + revokeTokenWithHttpInfo(revokeTokenRequest); } /** - * Version: 9.2.0.cl or later Reverts TML objects to a previous commit specified in the API - * request. Requires at least edit access to objects. In the API request, specify the - * `commit_id`. If the branch name is not specified in the request, the API will - * consider the default branch configured on your instance. By default, the API reverts all - * objects. If the revert operation fails for one of the objects provided in the commit, the API - * returns an error and does not revert any object. For more information, see [Git integration - * documentation](https://developers.thoughtspot.com/docs/git-integration). + * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. + * The token of your current session expires when you make a call to the + * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access + * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new + * token from ThoughtSpot. See [Get Full Access + * Token](#/http/api-endpoints/authentication/get-full-access-token). * - * @param commitId Commit id to which the object should be reverted (required) - * @param revertCommitRequest (required) - * @return ApiResponse<RevertResponse> + * @param revokeTokenRequest (required) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse revertCommitWithHttpInfo( - String commitId, RevertCommitRequest revertCommitRequest) throws ApiException { - okhttp3.Call localVarCall = - revertCommitValidateBeforeCall(commitId, revertCommitRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse revokeTokenWithHttpInfo(RevokeTokenRequest revokeTokenRequest) + throws ApiException { + okhttp3.Call localVarCall = revokeTokenValidateBeforeCall(revokeTokenRequest, null); + return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 9.2.0.cl or later Reverts TML objects to a previous commit - * specified in the API request. Requires at least edit access to objects. In the API request, - * specify the `commit_id`. If the branch name is not specified in the request, the - * API will consider the default branch configured on your instance. By default, the API reverts - * all objects. If the revert operation fails for one of the objects provided in the commit, the - * API returns an error and does not revert any object. For more information, see [Git - * integration documentation](https://developers.thoughtspot.com/docs/git-integration). + * (asynchronously) Version: 9.0.0.cl or later Revokes the authentication token issued for + * current user session. The token of your current session expires when you make a call to the + * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access + * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new + * token from ThoughtSpot. See [Get Full Access + * Token](#/http/api-endpoints/authentication/get-full-access-token). * - * @param commitId Commit id to which the object should be reverted (required) - * @param revertCommitRequest (required) + * @param revokeTokenRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -18720,32 +20559,25 @@ public ApiResponse revertCommitWithHttpInfo( * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
200 Reverted the object to the commit point specified -
204 Token successfully revoked. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call revertCommitAsync( - String commitId, - RevertCommitRequest revertCommitRequest, - final ApiCallback _callback) + public okhttp3.Call revokeTokenAsync( + RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = - revertCommitValidateBeforeCall(commitId, revertCommitRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = revokeTokenValidateBeforeCall(revokeTokenRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for revokeRefreshTokens + * Build call for searchCalendars * - * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to - * be revoked. All the users associated with the connection will have their refresh tokens - * revoked except the author. (required) - * @param revokeRefreshTokensRequest (required) + * @param searchCalendarsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -18753,19 +20585,15 @@ public okhttp3.Call revertCommitAsync( * * * - * + * * * * - * - * * *
Response Details
Status Code Description Response Headers
200 Token(s) successfully revoked. -
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
409 Conflict -
500 Unexpected error -
*/ - public okhttp3.Call revokeRefreshTokensCall( - String connectionIdentifier, - RevokeRefreshTokensRequest revokeRefreshTokensRequest, - final ApiCallback _callback) + public okhttp3.Call searchCalendarsCall( + SearchCalendarsRequest searchCalendarsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers @@ -18780,14 +20608,10 @@ public okhttp3.Call revokeRefreshTokensCall( basePath = null; } - Object localVarPostBody = revokeRefreshTokensRequest; + Object localVarPostBody = searchCalendarsRequest; // create path and map variables - String localVarPath = - "/api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens" - .replace( - "{" + "connection_identifier" + "}", - localVarApiClient.escapeString(connectionIdentifier.toString())); + String localVarPath = "/api/rest/2.0/calendars/search"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -18824,168 +20648,106 @@ public okhttp3.Call revokeRefreshTokensCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call revokeRefreshTokensValidateBeforeCall( - String connectionIdentifier, - RevokeRefreshTokensRequest revokeRefreshTokensRequest, - final ApiCallback _callback) + private okhttp3.Call searchCalendarsValidateBeforeCall( + SearchCalendarsRequest searchCalendarsRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'connectionIdentifier' is set - if (connectionIdentifier == null) { - throw new ApiException( - "Missing the required parameter 'connectionIdentifier' when calling" - + " revokeRefreshTokens(Async)"); - } - - // verify the required parameter 'revokeRefreshTokensRequest' is set - if (revokeRefreshTokensRequest == null) { + // verify the required parameter 'searchCalendarsRequest' is set + if (searchCalendarsRequest == null) { throw new ApiException( - "Missing the required parameter 'revokeRefreshTokensRequest' when calling" - + " revokeRefreshTokens(Async)"); + "Missing the required parameter 'searchCalendarsRequest' when calling" + + " searchCalendars(Async)"); } - return revokeRefreshTokensCall(connectionIdentifier, revokeRefreshTokensRequest, _callback); + return searchCalendarsCall(searchCalendarsRequest, _callback); } /** - * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require - * access to a data warehouse connection. When a token is revoked, the affected user's - * session for that connection is terminated, and they must re-authenticate to regain access. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or - * `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, - * users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - * privilege can also make API requests to revoke tokens for connection users. #### Usage - * guidelines You can specify different combinations of identifiers to control which refresh - * tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the - * connection, except the connection author. - **connection_identifier** and - * **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If - * the name or ID of the connection author is included in the request, their token will also be - * revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh - * tokens for all users on the specified configurations, except the configuration author. - - * **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes - * refresh tokens for the specified users on the specified configurations. - - * **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified - * Orgs. Applicable only for published connections. - **connection_identifier**, - * **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users - * in the specified Orgs. Applicable only for published connections. **NOTE**: The - * `org_identifiers` parameter is only applicable for published connections. Using - * this parameter for unpublished connections will result in an error. Ensure that the - * connections are published before making the API request. + * Version: 10.12.0.cl or later Gets a list of [custom + * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines By default, the API returns a list of custom + * calendars for all connection objects. To retrieve custom calendar details for a particular + * connection, specify the connection ID. You can also use other search parameters such as + * `name_pattern` and `sort_options` as search filters. The + * `name_pattern` parameter filters and returns only those objects that match the + * specified pattern. Use `%` as a wildcard for pattern matching. * - * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to - * be revoked. All the users associated with the connection will have their refresh tokens - * revoked except the author. (required) - * @param revokeRefreshTokensRequest (required) - * @return RevokeRefreshTokensResponse + * @param searchCalendarsRequest (required) + * @return List<CalendarResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * - * - * * *
Response Details
Status Code Description Response Headers
200 Token(s) successfully revoked. -
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
409 Conflict -
500 Unexpected error -
*/ - public RevokeRefreshTokensResponse revokeRefreshTokens( - String connectionIdentifier, RevokeRefreshTokensRequest revokeRefreshTokensRequest) + public List searchCalendars(SearchCalendarsRequest searchCalendarsRequest) throws ApiException { - ApiResponse localVarResp = - revokeRefreshTokensWithHttpInfo(connectionIdentifier, revokeRefreshTokensRequest); + ApiResponse> localVarResp = + searchCalendarsWithHttpInfo(searchCalendarsRequest); return localVarResp.getData(); } /** - * Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no longer require - * access to a data warehouse connection. When a token is revoked, the affected user's - * session for that connection is terminated, and they must re-authenticate to regain access. - * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or - * `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, - * users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - * privilege can also make API requests to revoke tokens for connection users. #### Usage - * guidelines You can specify different combinations of identifiers to control which refresh - * tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the - * connection, except the connection author. - **connection_identifier** and - * **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If - * the name or ID of the connection author is included in the request, their token will also be - * revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh - * tokens for all users on the specified configurations, except the configuration author. - - * **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes - * refresh tokens for the specified users on the specified configurations. - - * **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified - * Orgs. Applicable only for published connections. - **connection_identifier**, - * **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users - * in the specified Orgs. Applicable only for published connections. **NOTE**: The - * `org_identifiers` parameter is only applicable for published connections. Using - * this parameter for unpublished connections will result in an error. Ensure that the - * connections are published before making the API request. + * Version: 10.12.0.cl or later Gets a list of [custom + * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines By default, the API returns a list of custom + * calendars for all connection objects. To retrieve custom calendar details for a particular + * connection, specify the connection ID. You can also use other search parameters such as + * `name_pattern` and `sort_options` as search filters. The + * `name_pattern` parameter filters and returns only those objects that match the + * specified pattern. Use `%` as a wildcard for pattern matching. * - * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to - * be revoked. All the users associated with the connection will have their refresh tokens - * revoked except the author. (required) - * @param revokeRefreshTokensRequest (required) - * @return ApiResponse<RevokeRefreshTokensResponse> + * @param searchCalendarsRequest (required) + * @return ApiResponse<List<CalendarResponse>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * - * - * * *
Response Details
Status Code Description Response Headers
200 Token(s) successfully revoked. -
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
409 Conflict -
500 Unexpected error -
*/ - public ApiResponse revokeRefreshTokensWithHttpInfo( - String connectionIdentifier, RevokeRefreshTokensRequest revokeRefreshTokensRequest) - throws ApiException { - okhttp3.Call localVarCall = - revokeRefreshTokensValidateBeforeCall( - connectionIdentifier, revokeRefreshTokensRequest, null); - Type localVarReturnType = new TypeToken() {}.getType(); + public ApiResponse> searchCalendarsWithHttpInfo( + SearchCalendarsRequest searchCalendarsRequest) throws ApiException { + okhttp3.Call localVarCall = searchCalendarsValidateBeforeCall(searchCalendarsRequest, null); + Type localVarReturnType = new TypeToken>() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 26.2.0.cl or later Revokes OAuth refresh tokens for users who no - * longer require access to a data warehouse connection. When a token is revoked, the affected - * user's session for that connection is terminated, and they must re-authenticate to regain - * access. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or - * `DATAMANAGEMENT` (**Can manage data**) privileges. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on the ThoughtSpot instance, - * users with `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) - * privilege can also make API requests to revoke tokens for connection users. #### Usage - * guidelines You can specify different combinations of identifiers to control which refresh - * tokens are revoked. - **connection_identifier**: Revokes refresh tokens for all users of the - * connection, except the connection author. - **connection_identifier** and - * **user_identifiers**: Revokes refresh tokens only for the users specified in the request. If - * the name or ID of the connection author is included in the request, their token will also be - * revoked. - **connection_identifier** and **configuration_identifiers**: Revokes refresh - * tokens for all users on the specified configurations, except the configuration author. - - * **connection_identifier**, **configuration_identifiers**, and **user_identifiers**: Revokes - * refresh tokens for the specified users on the specified configurations. - - * **connection_identifier** and **org_identifiers**: Revokes refresh tokens for the specified - * Orgs. Applicable only for published connections. - **connection_identifier**, - * **org_identifiers**, and **user_identifiers**: Revokes refresh tokens for the specified users - * in the specified Orgs. Applicable only for published connections. **NOTE**: The - * `org_identifiers` parameter is only applicable for published connections. Using - * this parameter for unpublished connections will result in an error. Ensure that the - * connections are published before making the API request. + * (asynchronously) Version: 10.12.0.cl or later Gets a list of [custom + * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines By default, the API returns a list of custom + * calendars for all connection objects. To retrieve custom calendar details for a particular + * connection, specify the connection ID. You can also use other search parameters such as + * `name_pattern` and `sort_options` as search filters. The + * `name_pattern` parameter filters and returns only those objects that match the + * specified pattern. Use `%` as a wildcard for pattern matching. * - * @param connectionIdentifier Unique ID or name of the connection whose refresh tokens need to - * be revoked. All the users associated with the connection will have their refresh tokens - * revoked except the author. (required) - * @param revokeRefreshTokensRequest (required) + * @param searchCalendarsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -18994,32 +20756,28 @@ public ApiResponse revokeRefreshTokensWithHttpInfo( * * * - * + * * * * - * - * * *
Response Details
Status Code Description Response Headers
200 Token(s) successfully revoked. -
200 Custom calendar fetched successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Object not found -
409 Conflict -
500 Unexpected error -
*/ - public okhttp3.Call revokeRefreshTokensAsync( - String connectionIdentifier, - RevokeRefreshTokensRequest revokeRefreshTokensRequest, - final ApiCallback _callback) + public okhttp3.Call searchCalendarsAsync( + SearchCalendarsRequest searchCalendarsRequest, + final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = - revokeRefreshTokensValidateBeforeCall( - connectionIdentifier, revokeRefreshTokensRequest, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + searchCalendarsValidateBeforeCall(searchCalendarsRequest, _callback); + Type localVarReturnType = new TypeToken>() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for revokeToken + * Build call for searchChannelHistory * - * @param revokeTokenRequest (required) + * @param searchChannelHistoryRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -19027,15 +20785,15 @@ public okhttp3.Call revokeRefreshTokensAsync( * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
200 Channel status logs retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call revokeTokenCall( - RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) + public okhttp3.Call searchChannelHistoryCall( + SearchChannelHistoryRequest searchChannelHistoryRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers @@ -19050,10 +20808,10 @@ public okhttp3.Call revokeTokenCall( basePath = null; } - Object localVarPostBody = revokeTokenRequest; + Object localVarPostBody = searchChannelHistoryRequest; // create path and map variables - String localVarPath = "/api/rest/2.0/auth/token/revoke"; + String localVarPath = "/api/rest/2.0/jobs/history/communication-channels/search"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -19090,83 +20848,116 @@ public okhttp3.Call revokeTokenCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call revokeTokenValidateBeforeCall( - RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) + private okhttp3.Call searchChannelHistoryValidateBeforeCall( + SearchChannelHistoryRequest searchChannelHistoryRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'revokeTokenRequest' is set - if (revokeTokenRequest == null) { + // verify the required parameter 'searchChannelHistoryRequest' is set + if (searchChannelHistoryRequest == null) { throw new ApiException( - "Missing the required parameter 'revokeTokenRequest' when calling" - + " revokeToken(Async)"); + "Missing the required parameter 'searchChannelHistoryRequest' when calling" + + " searchChannelHistory(Async)"); } - return revokeTokenCall(revokeTokenRequest, _callback); + return searchChannelHistoryCall(searchChannelHistoryRequest, _callback); } /** - * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. - * The token of your current session expires when you make a call to the - * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access - * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new - * token from ThoughtSpot. See [Get Full Access - * Token](#/http/api-endpoints/authentication/get-full-access-token). + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as + * webhooks. Returns channel-level delivery status for each job execution record. Use this to + * monitor channel health and delivery success rates across events. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the + * following constraints apply: - `job_ids`, `channel_identifiers`, and + * `events` each accept at most one element. - When `job_ids` is provided, + * it is used as the sole lookup key and other filter fields are ignored. - When + * `job_ids` is not provided, `channel_identifiers` and `events` + * are both required. Each must contain exactly one element, and the event object must include + * the `identifier` field. - Records older than the configured retention period are + * not returned. * - * @param revokeTokenRequest (required) + * @param searchChannelHistoryRequest (required) + * @return SearchChannelHistoryResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
200 Channel status logs retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public void revokeToken(RevokeTokenRequest revokeTokenRequest) throws ApiException { - revokeTokenWithHttpInfo(revokeTokenRequest); + public SearchChannelHistoryResponse searchChannelHistory( + SearchChannelHistoryRequest searchChannelHistoryRequest) throws ApiException { + ApiResponse localVarResp = + searchChannelHistoryWithHttpInfo(searchChannelHistoryRequest); + return localVarResp.getData(); } /** - * Version: 9.0.0.cl or later Revokes the authentication token issued for current user session. - * The token of your current session expires when you make a call to the - * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access - * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new - * token from ThoughtSpot. See [Get Full Access - * Token](#/http/api-endpoints/authentication/get-full-access-token). + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as + * webhooks. Returns channel-level delivery status for each job execution record. Use this to + * monitor channel health and delivery success rates across events. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the + * following constraints apply: - `job_ids`, `channel_identifiers`, and + * `events` each accept at most one element. - When `job_ids` is provided, + * it is used as the sole lookup key and other filter fields are ignored. - When + * `job_ids` is not provided, `channel_identifiers` and `events` + * are both required. Each must contain exactly one element, and the event object must include + * the `identifier` field. - Records older than the configured retention period are + * not returned. * - * @param revokeTokenRequest (required) - * @return ApiResponse<Void> + * @param searchChannelHistoryRequest (required) + * @return ApiResponse<SearchChannelHistoryResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
200 Channel status logs retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse revokeTokenWithHttpInfo(RevokeTokenRequest revokeTokenRequest) - throws ApiException { - okhttp3.Call localVarCall = revokeTokenValidateBeforeCall(revokeTokenRequest, null); - return localVarApiClient.execute(localVarCall); + public ApiResponse searchChannelHistoryWithHttpInfo( + SearchChannelHistoryRequest searchChannelHistoryRequest) throws ApiException { + okhttp3.Call localVarCall = + searchChannelHistoryValidateBeforeCall(searchChannelHistoryRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 9.0.0.cl or later Revokes the authentication token issued for - * current user session. The token of your current session expires when you make a call to the - * `/api/rest/2.0/auth/token/revoke` endpoint. the users will not be able to access - * ThoughtSpot objects until a new token is obtained. To restart your session, request for a new - * token from ThoughtSpot. See [Get Full Access - * Token](#/http/api-endpoints/authentication/get-full-access-token). - * - * @param revokeTokenRequest (required) + * (asynchronously) Version: 26.4.0.cl or later Searches delivery history for communication + * channels such as webhooks. Returns channel-level delivery status for each job execution + * record. Use this to monitor channel health and delivery success rates across events. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the + * following constraints apply: - `job_ids`, `channel_identifiers`, and + * `events` each accept at most one element. - When `job_ids` is provided, + * it is used as the sole lookup key and other filter fields are ignored. - When + * `job_ids` is not provided, `channel_identifiers` and `events` + * are both required. Each must contain exactly one element, and the event object must include + * the `identifier` field. - Records older than the configured retention period are + * not returned. + * + * @param searchChannelHistoryRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -19175,25 +20966,28 @@ public ApiResponse revokeTokenWithHttpInfo(RevokeTokenRequest revokeTokenR * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
204 Token successfully revoked. -
200 Channel status logs retrieved successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call revokeTokenAsync( - RevokeTokenRequest revokeTokenRequest, final ApiCallback _callback) + public okhttp3.Call searchChannelHistoryAsync( + SearchChannelHistoryRequest searchChannelHistoryRequest, + final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = revokeTokenValidateBeforeCall(revokeTokenRequest, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + okhttp3.Call localVarCall = + searchChannelHistoryValidateBeforeCall(searchChannelHistoryRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for searchCalendars + * Build call for searchCollections * - * @param searchCalendarsRequest (required) + * @param searchCollectionsRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -19201,15 +20995,15 @@ public okhttp3.Call revokeTokenAsync( * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
200 Successfully retrieved list of collections -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchCalendarsCall( - SearchCalendarsRequest searchCalendarsRequest, final ApiCallback _callback) + public okhttp3.Call searchCollectionsCall( + SearchCollectionsRequest searchCollectionsRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers @@ -19224,10 +21018,10 @@ public okhttp3.Call searchCalendarsCall( basePath = null; } - Object localVarPostBody = searchCalendarsRequest; + Object localVarPostBody = searchCollectionsRequest; // create path and map variables - String localVarPath = "/api/rest/2.0/calendars/search"; + String localVarPath = "/api/rest/2.0/collections/search"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -19264,106 +21058,98 @@ public okhttp3.Call searchCalendarsCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call searchCalendarsValidateBeforeCall( - SearchCalendarsRequest searchCalendarsRequest, final ApiCallback _callback) + private okhttp3.Call searchCollectionsValidateBeforeCall( + SearchCollectionsRequest searchCollectionsRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'searchCalendarsRequest' is set - if (searchCalendarsRequest == null) { + // verify the required parameter 'searchCollectionsRequest' is set + if (searchCollectionsRequest == null) { throw new ApiException( - "Missing the required parameter 'searchCalendarsRequest' when calling" - + " searchCalendars(Async)"); + "Missing the required parameter 'searchCollectionsRequest' when calling" + + " searchCollections(Async)"); } - return searchCalendarsCall(searchCalendarsRequest, _callback); + return searchCollectionsCall(searchCollectionsRequest, _callback); } /** - * Version: 10.12.0.cl or later Gets a list of [custom - * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines By default, the API returns a list of custom - * calendars for all connection objects. To retrieve custom calendar details for a particular - * connection, specify the connection ID. You can also use other search parameters such as - * `name_pattern` and `sort_options` as search filters. The - * `name_pattern` parameter filters and returns only those objects that match the - * specified pattern. Use `%` as a wildcard for pattern matching. + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get + * details of a specific collection, specify the collection GUID or name. You can also filter + * the API response based on the collection name pattern, author, and other criteria. #### + * Search options * **name_pattern**: Use '%' as a wildcard character to match + * collection names * **collection_identifiers**: Search for specific collections by their GUIDs + * or names * **include_metadata**: When set to `true`, includes the metadata objects + * within each collection in the response **NOTE**: If the API returns an empty list, consider + * increasing the value of the `record_size` parameter. To search across all available + * collections, set `record_size` to `-1`. * - * @param searchCalendarsRequest (required) - * @return List<CalendarResponse> + * @param searchCollectionsRequest (required) + * @return CollectionSearchResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
200 Successfully retrieved list of collections -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public List searchCalendars(SearchCalendarsRequest searchCalendarsRequest) - throws ApiException { - ApiResponse> localVarResp = - searchCalendarsWithHttpInfo(searchCalendarsRequest); + public CollectionSearchResponse searchCollections( + SearchCollectionsRequest searchCollectionsRequest) throws ApiException { + ApiResponse localVarResp = + searchCollectionsWithHttpInfo(searchCollectionsRequest); return localVarResp.getData(); } /** - * Version: 10.12.0.cl or later Gets a list of [custom - * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines By default, the API returns a list of custom - * calendars for all connection objects. To retrieve custom calendar details for a particular - * connection, specify the connection ID. You can also use other search parameters such as - * `name_pattern` and `sort_options` as search filters. The - * `name_pattern` parameter filters and returns only those objects that match the - * specified pattern. Use `%` as a wildcard for pattern matching. + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get + * details of a specific collection, specify the collection GUID or name. You can also filter + * the API response based on the collection name pattern, author, and other criteria. #### + * Search options * **name_pattern**: Use '%' as a wildcard character to match + * collection names * **collection_identifiers**: Search for specific collections by their GUIDs + * or names * **include_metadata**: When set to `true`, includes the metadata objects + * within each collection in the response **NOTE**: If the API returns an empty list, consider + * increasing the value of the `record_size` parameter. To search across all available + * collections, set `record_size` to `-1`. * - * @param searchCalendarsRequest (required) - * @return ApiResponse<List<CalendarResponse>> + * @param searchCollectionsRequest (required) + * @return ApiResponse<CollectionSearchResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
200 Successfully retrieved list of collections -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public ApiResponse> searchCalendarsWithHttpInfo( - SearchCalendarsRequest searchCalendarsRequest) throws ApiException { - okhttp3.Call localVarCall = searchCalendarsValidateBeforeCall(searchCalendarsRequest, null); - Type localVarReturnType = new TypeToken>() {}.getType(); + public ApiResponse searchCollectionsWithHttpInfo( + SearchCollectionsRequest searchCollectionsRequest) throws ApiException { + okhttp3.Call localVarCall = + searchCollectionsValidateBeforeCall(searchCollectionsRequest, null); + Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * (asynchronously) Version: 10.12.0.cl or later Gets a list of [custom - * calendars](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines By default, the API returns a list of custom - * calendars for all connection objects. To retrieve custom calendar details for a particular - * connection, specify the connection ID. You can also use other search parameters such as - * `name_pattern` and `sort_options` as search filters. The - * `name_pattern` parameter filters and returns only those objects that match the - * specified pattern. Use `%` as a wildcard for pattern matching. + * (asynchronously) Version: 26.4.0.cl or later Gets a list of collections available in + * ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. + * You can also filter the API response based on the collection name pattern, author, and other + * criteria. #### Search options * **name_pattern**: Use '%' as a wildcard character to + * match collection names * **collection_identifiers**: Search for specific collections by their + * GUIDs or names * **include_metadata**: When set to `true`, includes the metadata + * objects within each collection in the response **NOTE**: If the API returns an empty list, + * consider increasing the value of the `record_size` parameter. To search across all + * available collections, set `record_size` to `-1`. * - * @param searchCalendarsRequest (required) + * @param searchCollectionsRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -19372,21 +21158,21 @@ public ApiResponse> searchCalendarsWithHttpInfo( * * * - * + * * * * * *
Response Details
Status Code Description Response Headers
200 Custom calendar fetched successfully. -
200 Successfully retrieved list of collections -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
*/ - public okhttp3.Call searchCalendarsAsync( - SearchCalendarsRequest searchCalendarsRequest, - final ApiCallback> _callback) + public okhttp3.Call searchCollectionsAsync( + SearchCollectionsRequest searchCollectionsRequest, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - searchCalendarsValidateBeforeCall(searchCalendarsRequest, _callback); - Type localVarReturnType = new TypeToken>() {}.getType(); + searchCollectionsValidateBeforeCall(searchCollectionsRequest, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -22830,6 +24616,8 @@ public okhttp3.Call searchWebhookConfigurationsAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -22918,19 +24706,28 @@ private okhttp3.Call sendAgentMessageValidateBeforeCall( } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) - * conversation by submitting one or more natural language messages. To use this API, the user - * must have access to the relevant conversational session (via conversation_identifier) and - * submit at least one message. #### Usage guidelines To initiate or continue a conversation, - * the request must include: - `conversation_identifier`: a unique session ID for - * continuity and message tracking - `messages`: an array of one or more text - * messages, each with a value and type The API returns a array of object with a type, message, - * and metadata. - `type`: Type of the message — text, answer, or error. - - * `message`: Main content of the response. - `metadata`: Additional info - * depending on the message type. > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` + * instead. Send natural language messages to an existing Spotter agent conversation and returns + * the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and + * access to the metadata object associated with the conversation. The user must have access to + * the conversation session referenced by `conversation_identifier`. A conversation + * must first be created using the `createAgentConversation` API. #### Usage + * guidelines The request must include: - `conversation_identifier`: the unique + * session ID returned by `createAgentConversation`, used for context continuity and + * message tracking - `messages`: an array of one or more text messages to send to the + * agent The API returns an array of response objects, each containing: - `type`: the + * kind of response — `text`, `answer`, or `error` - + * `message`: the main content of the response - `metadata`: additional + * information depending on the message type (e.g., answer metadata includes analytics and + * visualization details) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + * > - This endpoint is currently in Beta. Breaking changes may be introduced before the + * endpoint is made Generally Available. > - This endpoint requires Spotter - please contact + * ThoughtSpot support to enable Spotter on your cluster. * * @param conversationIdentifier Unique identifier for the conversation (used to track context) * (required) @@ -22945,6 +24742,8 @@ private okhttp3.Call sendAgentMessageValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -22957,19 +24756,28 @@ public Object sendAgentMessage( } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) - * conversation by submitting one or more natural language messages. To use this API, the user - * must have access to the relevant conversational session (via conversation_identifier) and - * submit at least one message. #### Usage guidelines To initiate or continue a conversation, - * the request must include: - `conversation_identifier`: a unique session ID for - * continuity and message tracking - `messages`: an array of one or more text - * messages, each with a value and type The API returns a array of object with a type, message, - * and metadata. - `type`: Type of the message — text, answer, or error. - - * `message`: Main content of the response. - `metadata`: Additional info - * depending on the message type. > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` + * instead. Send natural language messages to an existing Spotter agent conversation and returns + * the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and + * access to the metadata object associated with the conversation. The user must have access to + * the conversation session referenced by `conversation_identifier`. A conversation + * must first be created using the `createAgentConversation` API. #### Usage + * guidelines The request must include: - `conversation_identifier`: the unique + * session ID returned by `createAgentConversation`, used for context continuity and + * message tracking - `messages`: an array of one or more text messages to send to the + * agent The API returns an array of response objects, each containing: - `type`: the + * kind of response — `text`, `answer`, or `error` - + * `message`: the main content of the response - `metadata`: additional + * information depending on the message type (e.g., answer metadata includes analytics and + * visualization details) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + * > - This endpoint is currently in Beta. Breaking changes may be introduced before the + * endpoint is made Generally Available. > - This endpoint requires Spotter - please contact + * ThoughtSpot support to enable Spotter on your cluster. * * @param conversationIdentifier Unique identifier for the conversation (used to track context) * (required) @@ -22984,6 +24792,8 @@ public Object sendAgentMessage( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -22998,19 +24808,29 @@ public ApiResponse sendAgentMessageWithHttpInfo( } /** - * (asynchronously) Version: 10.15.0.cl or later This API allows users to initiate or continue - * an agent (Spotter) conversation by submitting one or more natural language messages. To use - * this API, the user must have access to the relevant conversational session (via - * conversation_identifier) and submit at least one message. #### Usage guidelines To initiate - * or continue a conversation, the request must include: - `conversation_identifier`: - * a unique session ID for continuity and message tracking - `messages`: an array of - * one or more text messages, each with a value and type The API returns a array of object with - * a type, message, and metadata. - `type`: Type of the message — text, answer, or - * error. - `message`: Main content of the response. - `metadata`: - * Additional info depending on the message type. > ###### Note: > * This endpoint is - * currently in Beta. Breaking changes may be introduced before the endpoint is made Generally - * Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to - * enable Spotter on your cluster. + * (asynchronously) Version: 10.15.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessage` instead. Send natural language messages to an + * existing Spotter agent conversation and returns the complete response synchronously. Requires + * `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the + * conversation. The user must have access to the conversation session referenced by + * `conversation_identifier`. A conversation must first be created using the + * `createAgentConversation` API. #### Usage guidelines The request must include: - + * `conversation_identifier`: the unique session ID returned by + * `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent The API + * returns an array of response objects, each containing: - `type`: the kind of + * response — `text`, `answer`, or `error` - `message`: + * the main content of the response - `metadata`: additional information depending on + * the message type (e.g., answer metadata includes analytics and visualization details) #### + * Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + * > - This endpoint is currently in Beta. Breaking changes may be introduced before the + * endpoint is made Generally Available. > - This endpoint requires Spotter - please contact + * ThoughtSpot support to enable Spotter on your cluster. * * @param conversationIdentifier Unique identifier for the conversation (used to track context) * (required) @@ -23026,6 +24846,8 @@ public ApiResponse sendAgentMessageWithHttpInfo( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -23056,6 +24878,8 @@ public okhttp3.Call sendAgentMessageAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -23131,25 +24955,40 @@ private okhttp3.Call sendAgentMessageStreamingValidateBeforeCall( } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) - * conversation by submitting one or more natural language messages. To use this API, the user - * must have access to the relevant conversational session (via conversation_identifier) and - * submit at least one message. #### Usage guidelines To initiate or continue a conversation, - * the request must include: - `conversation_identifier`: a unique session ID for - * continuity and message tracking - `messages`: an array of one or more text - * messages, each with a value and type Additionally, user can specify what tool can be included - * `conversation_settings` parameter, which supports: - - * `enable_contextual_change_analysis` (default: false) - - * `enable_natural_language_answer_generation` (default: true) - - * `enable_reasoning` (default: false) If the request is valid, the API returns a - * stream of messages in real time, including: - `ack`: confirms receipt of the - * request - `text / text-chunk`: content chunks, optionally formatted (e.g., - * markdown) - `answer`: the final structured response with metadata and analytics - - * `error`: if a failure occurs - `notification`: notification messages for - * operation being performed > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessageStreaming` instead. Sends one or more natural language + * messages to an existing Spotter agent conversation and returns the response as a real-time + * Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the + * metadata object associated with the conversation. The user must have access to the + * conversation session referenced by `conversation_identifier`. A conversation must + * first be created using the `createAgentConversation` API. #### Usage guidelines The + * request must include: - `conversation_identifier`: the unique session ID returned + * by `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new + * integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - This endpoint requires Spotter - + * please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). * * @param sendAgentMessageStreamingRequest (required) * @return SendAgentMessageResponse @@ -23162,6 +25001,8 @@ private okhttp3.Call sendAgentMessageStreamingValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -23173,25 +25014,40 @@ public SendAgentMessageResponse sendAgentMessageStreaming( } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) - * conversation by submitting one or more natural language messages. To use this API, the user - * must have access to the relevant conversational session (via conversation_identifier) and - * submit at least one message. #### Usage guidelines To initiate or continue a conversation, - * the request must include: - `conversation_identifier`: a unique session ID for - * continuity and message tracking - `messages`: an array of one or more text - * messages, each with a value and type Additionally, user can specify what tool can be included - * `conversation_settings` parameter, which supports: - - * `enable_contextual_change_analysis` (default: false) - - * `enable_natural_language_answer_generation` (default: true) - - * `enable_reasoning` (default: false) If the request is valid, the API returns a - * stream of messages in real time, including: - `ack`: confirms receipt of the - * request - `text / text-chunk`: content chunks, optionally formatted (e.g., - * markdown) - `answer`: the final structured response with metadata and analytics - - * `error`: if a failure occurs - `notification`: notification messages for - * operation being performed > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessageStreaming` instead. Sends one or more natural language + * messages to an existing Spotter agent conversation and returns the response as a real-time + * Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the + * metadata object associated with the conversation. The user must have access to the + * conversation session referenced by `conversation_identifier`. A conversation must + * first be created using the `createAgentConversation` API. #### Usage guidelines The + * request must include: - `conversation_identifier`: the unique session ID returned + * by `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new + * integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - This endpoint requires Spotter - + * please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). * * @param sendAgentMessageStreamingRequest (required) * @return ApiResponse<SendAgentMessageResponse> @@ -23204,6 +25060,8 @@ public SendAgentMessageResponse sendAgentMessageStreaming( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -23216,25 +25074,40 @@ public ApiResponse sendAgentMessageStreamingWithHttpIn } /** - * (asynchronously) Version: 10.13.0.cl or later This API allows users to initiate or continue - * an agent (Spotter) conversation by submitting one or more natural language messages. To use - * this API, the user must have access to the relevant conversational session (via - * conversation_identifier) and submit at least one message. #### Usage guidelines To initiate - * or continue a conversation, the request must include: - `conversation_identifier`: - * a unique session ID for continuity and message tracking - `messages`: an array of - * one or more text messages, each with a value and type Additionally, user can specify what - * tool can be included `conversation_settings` parameter, which supports: - - * `enable_contextual_change_analysis` (default: false) - - * `enable_natural_language_answer_generation` (default: true) - - * `enable_reasoning` (default: false) If the request is valid, the API returns a - * stream of messages in real time, including: - `ack`: confirms receipt of the - * request - `text / text-chunk`: content chunks, optionally formatted (e.g., - * markdown) - `answer`: the final structured response with metadata and analytics - - * `error`: if a failure occurs - `notification`: notification messages for - * operation being performed > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * (asynchronously) Version: 10.13.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessageStreaming` instead. Sends one or more natural language + * messages to an existing Spotter agent conversation and returns the response as a real-time + * Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the + * metadata object associated with the conversation. The user must have access to the + * conversation session referenced by `conversation_identifier`. A conversation must + * first be created using the `createAgentConversation` API. #### Usage guidelines The + * request must include: - `conversation_identifier`: the unique session ID returned + * by `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new + * integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - This endpoint requires Spotter - + * please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). * * @param sendAgentMessageStreamingRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -23248,6 +25121,8 @@ public ApiResponse sendAgentMessageStreamingWithHttpIn * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -23278,6 +25153,8 @@ public okhttp3.Call sendAgentMessageStreamingAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -23366,16 +25243,28 @@ private okhttp3.Call sendMessageValidateBeforeCall( } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation - * within the context of the metadata model. Requires at least view access to the metadata - * object specified in the request. #### Usage guidelines The API requires you to specify the - * `conversation_identifier` in the request path, and a - * `metadata_identifier` and `message` string in the request body. If the - * API request is successful, ThoughtSpot returns the session ID, tokens used in the - * conversation, and visualization type. > ###### Note: > * This endpoint is currently in - * Beta. Breaking changes may be introduced before the endpoint is made Generally Available. - * > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter - * on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the + * context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view + * access to the metadata object specified in the request. A conversation must first be created + * using the `createConversation` API. #### Usage guidelines The request must include: + * - `conversation_identifier`: the unique session ID returned by + * `createConversation` - `metadata_identifier`: the unique ID of the data + * source used for the conversation - `message`: a natural language string with the + * follow-up question If the request is successful, the API returns an array of response + * messages, each containing: - `session_identifier`: the unique ID of the generated + * response - `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param conversationIdentifier Unique identifier of the conversation. (required) * @param sendMessageRequest (required) @@ -23389,6 +25278,8 @@ private okhttp3.Call sendMessageValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -23401,16 +25292,28 @@ public List sendMessage( } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation - * within the context of the metadata model. Requires at least view access to the metadata - * object specified in the request. #### Usage guidelines The API requires you to specify the - * `conversation_identifier` in the request path, and a - * `metadata_identifier` and `message` string in the request body. If the - * API request is successful, ThoughtSpot returns the session ID, tokens used in the - * conversation, and visualization type. > ###### Note: > * This endpoint is currently in - * Beta. Breaking changes may be introduced before the endpoint is made Generally Available. - * > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter - * on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the + * context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view + * access to the metadata object specified in the request. A conversation must first be created + * using the `createConversation` API. #### Usage guidelines The request must include: + * - `conversation_identifier`: the unique session ID returned by + * `createConversation` - `metadata_identifier`: the unique ID of the data + * source used for the conversation - `message`: a natural language string with the + * follow-up question If the request is successful, the API returns an array of response + * messages, each containing: - `session_identifier`: the unique ID of the generated + * response - `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param conversationIdentifier Unique identifier of the conversation. (required) * @param sendMessageRequest (required) @@ -23424,6 +25327,8 @@ public List sendMessage( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -23437,16 +25342,28 @@ public ApiResponse> sendMessageWithHttpInfo( } /** - * (asynchronously) Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing - * conversation within the context of the metadata model. Requires at least view access to the - * metadata object specified in the request. #### Usage guidelines The API requires you to - * specify the `conversation_identifier` in the request path, and a - * `metadata_identifier` and `message` string in the request body. If the - * API request is successful, ThoughtSpot returns the session ID, tokens used in the - * conversation, and visualization type. > ###### Note: > * This endpoint is currently in - * Beta. Breaking changes may be introduced before the endpoint is made Generally Available. - * > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter - * on your cluster. + * (asynchronously) Version: 10.4.0.cl or later Sends a follow-up message to an existing + * conversation within the context of a data model. Requires `CAN_USE_SPOTTER` + * privilege and at least view access to the metadata object specified in the request. A + * conversation must first be created using the `createConversation` API. #### Usage + * guidelines The request must include: - `conversation_identifier`: the unique + * session ID returned by `createConversation` - `metadata_identifier`: the + * unique ID of the data source used for the conversation - `message`: a natural + * language string with the follow-up question If the request is successful, the API returns an + * array of response messages, each containing: - `session_identifier`: the unique ID + * of the generated response - `generation_number`: the generation number of the + * response - `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param conversationIdentifier Unique identifier of the conversation. (required) * @param sendMessageRequest (required) @@ -23461,6 +25378,8 @@ public ApiResponse> sendMessageWithHttpInfo( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -23491,6 +25410,8 @@ public okhttp3.Call sendMessageAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -23567,22 +25488,30 @@ private okhttp3.Call setNLInstructionsValidateBeforeCall( * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions * for a specific data-model to improve AI-generated answers and query processing. These * instructions help guide the AI system to better understand the data context and provide more - * accurate responses. #### Usage guidelines To set NL instructions for a data-model, the - * request must include: - `data_source_identifier`: The unique ID of the data-model - * for which to set NL instructions - `nl_instructions_info`: An array of instruction - * objects, each containing: - `instructions`: Array of text instructions for the LLM - * - `scope`: The scope of the instruction (`GLOBAL`). Currently only - * `GLOBAL` is supported. It can be extended to data-model-user scope in future. The - * API returns a response object with: - `success`: Boolean indicating whether the - * operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply - * globally for that data-model across the system > ###### Note: > * To use this API, the - * user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must - * use corresponding org related bearerToken where the data-model exists. > * This endpoint - * is currently in Beta. Breaking changes may be introduced before the endpoint is made - * Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint - * requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - * * Instructions help improve the accuracy and relevance of AI-generated responses for the - * specified data-model. + * accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or + * `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to + * the org where the data model exists. #### Usage guidelines To set NL instructions for a + * data-model, the request must include: - `data_source_identifier`: The unique ID of + * the data-model for which to set NL instructions - `nl_instructions_info`: An array + * of instruction objects, each containing: - `instructions`: Array of text + * instructions for the LLM - `scope`: The scope of the instruction + * (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to + * data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that + * apply to all users querying this data model If the request is successful, the API returns: - + * `success`: a boolean indicating whether the operation completed successfully #### + * Error responses | Code | Description | + * |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token + * does not correspond to the org where the data model exists. | > ###### Note: > > - + * To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` + * on the data model, and must use the bearer token corresponding to the org where the data + * model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and + * later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable + * Spotter on your cluster. > - Instructions help improve the accuracy and relevance of + * AI-generated responses for the specified data-model. * * @param setNLInstructionsRequest (required) * @return EurekaSetNLInstructionsResponse @@ -23595,6 +25524,8 @@ private okhttp3.Call setNLInstructionsValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -23609,22 +25540,30 @@ public EurekaSetNLInstructionsResponse setNLInstructions( * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions * for a specific data-model to improve AI-generated answers and query processing. These * instructions help guide the AI system to better understand the data context and provide more - * accurate responses. #### Usage guidelines To set NL instructions for a data-model, the - * request must include: - `data_source_identifier`: The unique ID of the data-model - * for which to set NL instructions - `nl_instructions_info`: An array of instruction - * objects, each containing: - `instructions`: Array of text instructions for the LLM - * - `scope`: The scope of the instruction (`GLOBAL`). Currently only - * `GLOBAL` is supported. It can be extended to data-model-user scope in future. The - * API returns a response object with: - `success`: Boolean indicating whether the - * operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply - * globally for that data-model across the system > ###### Note: > * To use this API, the - * user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must - * use corresponding org related bearerToken where the data-model exists. > * This endpoint - * is currently in Beta. Breaking changes may be introduced before the endpoint is made - * Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint - * requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - * * Instructions help improve the accuracy and relevance of AI-generated responses for the - * specified data-model. + * accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or + * `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to + * the org where the data model exists. #### Usage guidelines To set NL instructions for a + * data-model, the request must include: - `data_source_identifier`: The unique ID of + * the data-model for which to set NL instructions - `nl_instructions_info`: An array + * of instruction objects, each containing: - `instructions`: Array of text + * instructions for the LLM - `scope`: The scope of the instruction + * (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to + * data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that + * apply to all users querying this data model If the request is successful, the API returns: - + * `success`: a boolean indicating whether the operation completed successfully #### + * Error responses | Code | Description | + * |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token + * does not correspond to the org where the data model exists. | > ###### Note: > > - + * To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` + * on the data model, and must use the bearer token corresponding to the org where the data + * model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and + * later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable + * Spotter on your cluster. > - Instructions help improve the accuracy and relevance of + * AI-generated responses for the specified data-model. * * @param setNLInstructionsRequest (required) * @return ApiResponse<EurekaSetNLInstructionsResponse> @@ -23637,6 +25576,8 @@ public EurekaSetNLInstructionsResponse setNLInstructions( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -23652,22 +25593,31 @@ public ApiResponse setNLInstructionsWithHttpInf * (asynchronously) Version: 10.15.0.cl or later This API allows users to set natural language * (NL) instructions for a specific data-model to improve AI-generated answers and query * processing. These instructions help guide the AI system to better understand the data context - * and provide more accurate responses. #### Usage guidelines To set NL instructions for a - * data-model, the request must include: - `data_source_identifier`: The unique ID of - * the data-model for which to set NL instructions - `nl_instructions_info`: An array - * of instruction objects, each containing: - `instructions`: Array of text - * instructions for the LLM - `scope`: The scope of the instruction - * (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to - * data-model-user scope in future. The API returns a response object with: - - * `success`: Boolean indicating whether the operation was successful #### - * Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across - * the system > ###### Note: > * To use this API, the user needs either edit access or - * SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related - * bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking - * changes may be introduced before the endpoint is made Generally Available. > * Available - * from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact - * ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the - * accuracy and relevance of AI-generated responses for the specified data-model. + * and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token + * corresponding to the org where the data model exists. #### Usage guidelines To set NL + * instructions for a data-model, the request must include: - + * `data_source_identifier`: The unique ID of the data-model for which to set NL + * instructions - `nl_instructions_info`: An array of instruction objects, each + * containing: - `instructions`: Array of text instructions for the LLM - + * `scope`: The scope of the instruction (`GLOBAL`). Currently only + * `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### + * Instructions scope - **GLOBAL**: instructions that apply to all users querying this data + * model If the request is successful, the API returns: - `success`: a boolean + * indicating whether the operation completed successfully #### Error responses | Code | + * Description | + * |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token + * does not correspond to the org where the data model exists. | > ###### Note: > > - + * To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` + * on the data model, and must use the bearer token corresponding to the org where the data + * model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and + * later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable + * Spotter on your cluster. > - Instructions help improve the accuracy and relevance of + * AI-generated responses for the specified data-model. * * @param setNLInstructionsRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -23681,6 +25631,8 @@ public ApiResponse setNLInstructionsWithHttpInf * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -23908,6 +25860,8 @@ public okhttp3.Call shareMetadataAsync( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -23981,12 +25935,27 @@ private okhttp3.Call singleAnswerValidateBeforeCall( } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated - * response based on a specified data model. Requires at least view access to the metadata - * object specified in the request. > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model + * and returns a single AI-generated answer without requiring a conversation session. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include: - + * `query`: a natural language question (e.g., \"What were total sales last + * quarter?\") - `metadata_identifier`: the unique ID of the data source to query + * against If the request is successful, the API returns a response message containing: - + * `session_identifier`: the unique ID of the generated response - + * `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param singleAnswerRequest (required) * @return ResponseMessage @@ -23999,6 +25968,8 @@ private okhttp3.Call singleAnswerValidateBeforeCall( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -24009,12 +25980,27 @@ public ResponseMessage singleAnswer(SingleAnswerRequest singleAnswerRequest) } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated - * response based on a specified data model. Requires at least view access to the metadata - * object specified in the request. > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model + * and returns a single AI-generated answer without requiring a conversation session. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include: - + * `query`: a natural language question (e.g., \"What were total sales last + * quarter?\") - `metadata_identifier`: the unique ID of the data source to query + * against If the request is successful, the API returns a response message containing: - + * `session_identifier`: the unique ID of the generated response - + * `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param singleAnswerRequest (required) * @return ApiResponse<ResponseMessage> @@ -24027,6 +26013,8 @@ public ResponseMessage singleAnswer(SingleAnswerRequest singleAnswerRequest) * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -24038,12 +26026,27 @@ public ApiResponse singleAnswerWithHttpInfo( } /** - * (asynchronously) Version: 10.4.0.cl or later Processes a natural language query and returns - * an AI-generated response based on a specified data model. Requires at least view access to - * the metadata object specified in the request. > ###### Note: > * This endpoint is - * currently in Beta. Breaking changes may be introduced before the endpoint is made Generally - * Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to - * enable Spotter on your cluster. + * (asynchronously) Version: 10.4.0.cl or later Processes a natural language query against a + * specified data model and returns a single AI-generated answer without requiring a + * conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access + * to the metadata object specified in the request. #### Usage guidelines The request must + * include: - `query`: a natural language question (e.g., \"What were total sales + * last quarter?\") - `metadata_identifier`: the unique ID of the data source to + * query against If the request is successful, the API returns a response message containing: - + * `session_identifier`: the unique ID of the generated response - + * `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @param singleAnswerRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -24057,6 +26060,8 @@ public ApiResponse singleAnswerWithHttpInfo( * 200 Common successful response - * 201 Common error response - * 400 Operation failed - + * 401 Unauthorized access. - + * 403 Forbidden access. - * 500 Operation failed - * */ @@ -24740,66 +26745,305 @@ private okhttp3.Call updateCalendarValidateBeforeCall( * \"start_date\": \"08/01/2025\", \"end_date\": * \"07/31/2026\" } ``` * - * @param calendarIdentifier Unique Id or name of the calendar. (required) - * @param updateCalendarRequest (required) + * @param calendarIdentifier Unique Id or name of the calendar. (required) + * @param updateCalendarRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void updateCalendar( + String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest) + throws ApiException { + updateCalendarWithHttpInfo(calendarIdentifier, updateCalendarRequest); + } + + /** + * Version: 10.12.0.cl or later Updates the properties of a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can update the properties of a calendar + * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar + * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` + * Creates a calendar from the parameters defined in the API request. To update a custom + * calendar, specify the calendar ID as a path parameter in the request URL and the following + * parameters in the request body: * Connection ID and Table name * Database and schema name + * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` + * and `schema_name` attributes are required. However, the attribute requirements are + * conditional and vary based on the connector type and its metadata structure. For example, for + * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, + * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the + * `database_name` attribute is not. Similarly, connectors such as ClickHouse require + * you to specify the `database_name` and the schema specification in such cases is + * optional. The API allows you to modify the calendar type, month offset value, start and end + * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### + * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` + * { \"update_method\": \"FROM_EXISTING_TABLE\", + * \"table_reference\": { \"connection_identifier\": + * \"Connection1\", \"database_name\": \"db1\", + * \"table_name\": \"custom_calendar_2025\", \"schame_name\": + * \"schemaVar\" } } ``` Update a custom calendar with the attributes + * defined in the API request: ``` { \"update_method\": + * \"FROM_INPUT_PARAMS\", \"table_reference\": { + * \"connection_identifier\": \"Connection1\", \"database_name\": + * \"db1\", \"table_name\": \"custom_calendar_2025\", + * \"schame_name\": \"schemaVar\" }, \"month_offset\": + * \"August\", \"start_day_of_week\": \"Monday\", + * \"start_date\": \"08/01/2025\", \"end_date\": + * \"07/31/2026\" } ``` + * + * @param calendarIdentifier Unique Id or name of the calendar. (required) + * @param updateCalendarRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse updateCalendarWithHttpInfo( + String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest) + throws ApiException { + okhttp3.Call localVarCall = + updateCalendarValidateBeforeCall(calendarIdentifier, updateCalendarRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Version: 10.12.0.cl or later Updates the properties of a [custom + * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires + * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can + * administer ThoughtSpot**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot + * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) + * privilege is required. #### Usage guidelines You can update the properties of a calendar + * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar + * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` + * Creates a calendar from the parameters defined in the API request. To update a custom + * calendar, specify the calendar ID as a path parameter in the request URL and the following + * parameters in the request body: * Connection ID and Table name * Database and schema name + * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` + * and `schema_name` attributes are required. However, the attribute requirements are + * conditional and vary based on the connector type and its metadata structure. For example, for + * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, + * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the + * `database_name` attribute is not. Similarly, connectors such as ClickHouse require + * you to specify the `database_name` and the schema specification in such cases is + * optional. The API allows you to modify the calendar type, month offset value, start and end + * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### + * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` + * { \"update_method\": \"FROM_EXISTING_TABLE\", + * \"table_reference\": { \"connection_identifier\": + * \"Connection1\", \"database_name\": \"db1\", + * \"table_name\": \"custom_calendar_2025\", \"schame_name\": + * \"schemaVar\" } } ``` Update a custom calendar with the attributes + * defined in the API request: ``` { \"update_method\": + * \"FROM_INPUT_PARAMS\", \"table_reference\": { + * \"connection_identifier\": \"Connection1\", \"database_name\": + * \"db1\", \"table_name\": \"custom_calendar_2025\", + * \"schame_name\": \"schemaVar\" }, \"month_offset\": + * \"August\", \"start_day_of_week\": \"Monday\", + * \"start_date\": \"08/01/2025\", \"end_date\": + * \"07/31/2026\" } ``` + * + * @param calendarIdentifier Unique Id or name of the calendar. (required) + * @param updateCalendarRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCalendarAsync( + String calendarIdentifier, + UpdateCalendarRequest updateCalendarRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + updateCalendarValidateBeforeCall( + calendarIdentifier, updateCalendarRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for updateCollection + * + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be + * used as identifiers since duplicate names are allowed. (required) + * @param updateCollectionRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Collection updated successfully. No content returned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
+ */ + public okhttp3.Call updateCollectionCall( + String collectionIdentifier, + UpdateCollectionRequest updateCollectionRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateCollectionRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/collections/{collection_identifier}/update" + .replace( + "{" + "collection_identifier" + "}", + localVarApiClient.escapeString(collectionIdentifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateCollectionValidateBeforeCall( + String collectionIdentifier, + UpdateCollectionRequest updateCollectionRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'collectionIdentifier' is set + if (collectionIdentifier == null) { + throw new ApiException( + "Missing the required parameter 'collectionIdentifier' when calling" + + " updateCollection(Async)"); + } + + // verify the required parameter 'updateCollectionRequest' is set + if (updateCollectionRequest == null) { + throw new ApiException( + "Missing the required parameter 'updateCollectionRequest' when calling" + + " updateCollection(Async)"); + } + + return updateCollectionCall(collectionIdentifier, updateCollectionRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported + * operations This API endpoint lets you perform the following operations: * Update collection + * name and description * Change visibility settings * Add metadata objects to the collection + * (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace + * all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: + * Adds the specified metadata objects to the existing collection without removing current items + * * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: + * Replaces all existing metadata objects with the specified items (default behavior) + * + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be + * used as identifiers since duplicate names are allowed. (required) + * @param updateCollectionRequest (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * + * * *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
204 Collection updated successfully. No content returned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
*/ - public void updateCalendar( - String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest) + public void updateCollection( + String collectionIdentifier, UpdateCollectionRequest updateCollectionRequest) throws ApiException { - updateCalendarWithHttpInfo(calendarIdentifier, updateCalendarRequest); + updateCollectionWithHttpInfo(collectionIdentifier, updateCollectionRequest); } /** - * Version: 10.12.0.cl or later Updates the properties of a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can update the properties of a calendar - * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar - * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` - * Creates a calendar from the parameters defined in the API request. To update a custom - * calendar, specify the calendar ID as a path parameter in the request URL and the following - * parameters in the request body: * Connection ID and Table name * Database and schema name - * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` - * and `schema_name` attributes are required. However, the attribute requirements are - * conditional and vary based on the connector type and its metadata structure. For example, for - * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, - * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the - * `database_name` attribute is not. Similarly, connectors such as ClickHouse require - * you to specify the `database_name` and the schema specification in such cases is - * optional. The API allows you to modify the calendar type, month offset value, start and end - * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### - * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` - * { \"update_method\": \"FROM_EXISTING_TABLE\", - * \"table_reference\": { \"connection_identifier\": - * \"Connection1\", \"database_name\": \"db1\", - * \"table_name\": \"custom_calendar_2025\", \"schame_name\": - * \"schemaVar\" } } ``` Update a custom calendar with the attributes - * defined in the API request: ``` { \"update_method\": - * \"FROM_INPUT_PARAMS\", \"table_reference\": { - * \"connection_identifier\": \"Connection1\", \"database_name\": - * \"db1\", \"table_name\": \"custom_calendar_2025\", - * \"schame_name\": \"schemaVar\" }, \"month_offset\": - * \"August\", \"start_day_of_week\": \"Monday\", - * \"start_date\": \"08/01/2025\", \"end_date\": - * \"07/31/2026\" } ``` + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported + * operations This API endpoint lets you perform the following operations: * Update collection + * name and description * Change visibility settings * Add metadata objects to the collection + * (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace + * all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: + * Adds the specified metadata objects to the existing collection without removing current items + * * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: + * Replaces all existing metadata objects with the specified items (default behavior) * - * @param calendarIdentifier Unique Id or name of the calendar. (required) - * @param updateCalendarRequest (required) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be + * used as identifiers since duplicate names are allowed. (required) + * @param updateCollectionRequest (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -24807,60 +27051,37 @@ public void updateCalendar( * * * - * + * * * * + * * *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
204 Collection updated successfully. No content returned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
*/ - public ApiResponse updateCalendarWithHttpInfo( - String calendarIdentifier, UpdateCalendarRequest updateCalendarRequest) + public ApiResponse updateCollectionWithHttpInfo( + String collectionIdentifier, UpdateCollectionRequest updateCollectionRequest) throws ApiException { okhttp3.Call localVarCall = - updateCalendarValidateBeforeCall(calendarIdentifier, updateCalendarRequest, null); + updateCollectionValidateBeforeCall( + collectionIdentifier, updateCollectionRequest, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Version: 10.12.0.cl or later Updates the properties of a [custom - * calendar](https://docs.thoughtspot.com/cloud/latest/connections-cust-cal). Requires - * `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can - * administer ThoughtSpot**) privilege. If [Role-Based Access Control - * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your ThoughtSpot - * instance, the `CAN_MANAGE_CUSTOM_CALENDAR` (**Can manage custom calendars**) - * privilege is required. #### Usage guidelines You can update the properties of a calendar - * using one of the following methods: * `FROM_INPUT_PARAMS` to update the calendar - * properties with the values defined in the API request. * `FROM_EXISTING_TABLE` - * Creates a calendar from the parameters defined in the API request. To update a custom - * calendar, specify the calendar ID as a path parameter in the request URL and the following - * parameters in the request body: * Connection ID and Table name * Database and schema name - * attributes: For most Cloud Data Warehouse (CDW) connectors, both `database_name` - * and `schema_name` attributes are required. However, the attribute requirements are - * conditional and vary based on the connector type and its metadata structure. For example, for - * connectors such as Teradata, MySQL, SingleSore, Amazon Aurora MySQL, Amazon RDS MySQL, - * Oracle, and GCP_MYSQL, the `schema_name` is required, whereas the - * `database_name` attribute is not. Similarly, connectors such as ClickHouse require - * you to specify the `database_name` and the schema specification in such cases is - * optional. The API allows you to modify the calendar type, month offset value, start and end - * date, starting day of the week, and prefixes assigned to the year and quarter labels. #### - * Examples Update a custom calendar using an existing Table in ThoughtSpot: ``` - * { \"update_method\": \"FROM_EXISTING_TABLE\", - * \"table_reference\": { \"connection_identifier\": - * \"Connection1\", \"database_name\": \"db1\", - * \"table_name\": \"custom_calendar_2025\", \"schame_name\": - * \"schemaVar\" } } ``` Update a custom calendar with the attributes - * defined in the API request: ``` { \"update_method\": - * \"FROM_INPUT_PARAMS\", \"table_reference\": { - * \"connection_identifier\": \"Connection1\", \"database_name\": - * \"db1\", \"table_name\": \"custom_calendar_2025\", - * \"schame_name\": \"schemaVar\" }, \"month_offset\": - * \"August\", \"start_day_of_week\": \"Monday\", - * \"start_date\": \"08/01/2025\", \"end_date\": - * \"07/31/2026\" } ``` + * (asynchronously) Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. + * #### Supported operations This API endpoint lets you perform the following operations: * + * Update collection name and description * Change visibility settings * Add metadata objects to + * the collection (operation: ADD) * Remove metadata objects from the collection (operation: + * REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation + * types * **ADD**: Adds the specified metadata objects to the existing collection without + * removing current items * **REMOVE**: Removes only the specified metadata objects from the + * collection * **REPLACE**: Replaces all existing metadata objects with the specified items + * (default behavior) * - * @param calendarIdentifier Unique Id or name of the calendar. (required) - * @param updateCalendarRequest (required) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be + * used as identifiers since duplicate names are allowed. (required) + * @param updateCollectionRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -24869,22 +27090,23 @@ public ApiResponse updateCalendarWithHttpInfo( * * * - * + * * * * + * * *
Response Details
Status Code Description Response Headers
204 Custom calendar updated successfully. -
204 Collection updated successfully. No content returned. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
404 Resource not found. -
500 Unexpected error -
*/ - public okhttp3.Call updateCalendarAsync( - String calendarIdentifier, - UpdateCalendarRequest updateCalendarRequest, + public okhttp3.Call updateCollectionAsync( + String collectionIdentifier, + UpdateCollectionRequest updateCollectionRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - updateCalendarValidateBeforeCall( - calendarIdentifier, updateCalendarRequest, _callback); + updateCollectionValidateBeforeCall( + collectionIdentifier, updateCollectionRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } @@ -29200,7 +31422,10 @@ public okhttp3.Call updateVariableAsync( * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public okhttp3.Call updateVariableValuesCall( UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) throws ApiException { @@ -29256,6 +31481,7 @@ public okhttp3.Call updateVariableValuesCall( _callback); } + @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call updateVariableValuesValidateBeforeCall( UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) @@ -29271,17 +31497,20 @@ private okhttp3.Call updateVariableValuesValidateBeforeCall( } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for - * multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES - * permission allows you to manage Formula Variables in the current organization scope. The API - * endpoint allows: * Adding new values to variables * Replacing existing values * Deleting - * values from variables When updating variable values, you need to specify: * The variable - * identifiers * The values to add/replace/remove for each variable * The operation to perform - * (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the - * variable if this is a list type variable, else same as replace. * REPLACE - Replaces all - * values of a given set of constraints with the current set of values. * REMOVE - Removes any - * values which match the set of conditions of the variables if this is a list type variable, - * else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint + * is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) + * instead. Allows updating values for multiple variables in ThoughtSpot. Requires + * ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula + * Variables in the current organization scope. The API endpoint allows: * Adding new values to + * variables * Replacing existing values * Deleting values from variables When updating variable + * values, you need to specify: * The variable identifiers * The values to add/replace/remove + * for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on + * operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constrains for a given variable, scope is ignored * * @param updateVariableValuesRequest (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -29296,24 +31525,30 @@ private okhttp3.Call updateVariableValuesValidateBeforeCall( * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public void updateVariableValues(UpdateVariableValuesRequest updateVariableValuesRequest) throws ApiException { updateVariableValuesWithHttpInfo(updateVariableValuesRequest); } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for - * multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES - * permission allows you to manage Formula Variables in the current organization scope. The API - * endpoint allows: * Adding new values to variables * Replacing existing values * Deleting - * values from variables When updating variable values, you need to specify: * The variable - * identifiers * The values to add/replace/remove for each variable * The operation to perform - * (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the - * variable if this is a list type variable, else same as replace. * REPLACE - Replaces all - * values of a given set of constraints with the current set of values. * REMOVE - Removes any - * values which match the set of conditions of the variables if this is a list type variable, - * else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint + * is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) + * instead. Allows updating values for multiple variables in ThoughtSpot. Requires + * ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula + * Variables in the current organization scope. The API endpoint allows: * Adding new values to + * variables * Replacing existing values * Deleting values from variables When updating variable + * values, you need to specify: * The variable identifiers * The values to add/replace/remove + * for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on + * operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constrains for a given variable, scope is ignored * * @param updateVariableValuesRequest (required) * @return ApiResponse<Void> @@ -29329,7 +31564,10 @@ public void updateVariableValues(UpdateVariableValuesRequest updateVariableValue * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public ApiResponse updateVariableValuesWithHttpInfo( UpdateVariableValuesRequest updateVariableValuesRequest) throws ApiException { okhttp3.Call localVarCall = @@ -29338,18 +31576,21 @@ public ApiResponse updateVariableValuesWithHttpInfo( } /** - * (asynchronously) Update values for multiple variables Version: 10.14.0.cl or later Allows - * updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The - * CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current - * organization scope. The API endpoint allows: * Adding new values to variables * Replacing - * existing values * Deleting values from variables When updating variable values, you need to - * specify: * The variable identifiers * The values to add/replace/remove for each variable * - * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * - * ADD - Adds values to the variable if this is a list type variable, else same as replace. * - * REPLACE - Replaces all values of a given set of constraints with the current set of values. * - * REMOVE - Removes any values which match the set of conditions of the variables if this is a - * list type variable, else clears value. * RESET - Removes all constrains for a given variable, - * scope is ignored + * (asynchronously) Update values for multiple variables Version: 10.14.0.cl or later **Note:** + * This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use + * [POST + * /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) + * instead. Allows updating values for multiple variables in ThoughtSpot. Requires + * ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula + * Variables in the current organization scope. The API endpoint allows: * Adding new values to + * variables * Replacing existing values * Deleting values from variables When updating variable + * values, you need to specify: * The variable identifiers * The values to add/replace/remove + * for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on + * operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constrains for a given variable, scope is ignored * * @param updateVariableValuesRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -29366,7 +31607,10 @@ public ApiResponse updateVariableValuesWithHttpInfo( * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public okhttp3.Call updateVariableValuesAsync( UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) @@ -29584,6 +31828,207 @@ public okhttp3.Call updateWebhookConfigurationAsync( localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } + /** + * Build call for validateCommunicationChannel + * + * @param validateCommunicationChannelRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 communication channel configuration validated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateCommunicationChannelCall( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = validateCommunicationChannelRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/system/communication-channels/validate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call validateCommunicationChannelValidateBeforeCall( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'validateCommunicationChannelRequest' is set + if (validateCommunicationChannelRequest == null) { + throw new ApiException( + "Missing the required parameter 'validateCommunicationChannelRequest' when" + + " calling validateCommunicationChannel(Async)"); + } + + return validateCommunicationChannelCall(validateCommunicationChannelRequest, _callback); + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is + * properly set up and can receive events. - Use `channel_type` to specify the type of + * communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to + * provide the unique identifier or name for the communication channel. - Use + * `event_type` to specify the event type to validate for this channel. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. For webhook channels, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param validateCommunicationChannelRequest (required) + * @return CommunicationChannelValidateResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 communication channel configuration validated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public CommunicationChannelValidateResponse validateCommunicationChannel( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest) + throws ApiException { + ApiResponse localVarResp = + validateCommunicationChannelWithHttpInfo(validateCommunicationChannelRequest); + return localVarResp.getData(); + } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is + * properly set up and can receive events. - Use `channel_type` to specify the type of + * communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to + * provide the unique identifier or name for the communication channel. - Use + * `event_type` to specify the event type to validate for this channel. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. For webhook channels, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param validateCommunicationChannelRequest (required) + * @return ApiResponse<CommunicationChannelValidateResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 communication channel configuration validated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse + validateCommunicationChannelWithHttpInfo( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest) + throws ApiException { + okhttp3.Call localVarCall = + validateCommunicationChannelValidateBeforeCall( + validateCommunicationChannelRequest, null); + Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) Version: 26.4.0.cl or later Validates a communication channel configuration + * to ensure it is properly set up and can receive events. - Use `channel_type` to + * specify the type of communication channel to validate (e.g., WEBHOOK). - Use + * `channel_identifier` to provide the unique identifier or name for the communication + * channel. - Use `event_type` to specify the event type to validate for this channel. + * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` + * (**Has developer privilege**) privilege. For webhook channels, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @param validateCommunicationChannelRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 communication channel configuration validated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call validateCommunicationChannelAsync( + ValidateCommunicationChannelRequest validateCommunicationChannelRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + validateCommunicationChannelValidateBeforeCall( + validateCommunicationChannelRequest, _callback); + Type localVarReturnType = + new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for validateEmailCustomization * diff --git a/sdks/java/src/main/java/com/thoughtspot/client/api/VariableApi.java b/sdks/java/src/main/java/com/thoughtspot/client/api/VariableApi.java index 293dedc09..3f97e917b 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/api/VariableApi.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/api/VariableApi.java @@ -13,6 +13,8 @@ import com.thoughtspot.client.Configuration; import com.thoughtspot.client.Pair; import com.thoughtspot.client.model.CreateVariableRequest; +import com.thoughtspot.client.model.DeleteVariablesRequest; +import com.thoughtspot.client.model.PutVariableValuesRequest; import com.thoughtspot.client.model.SearchVariablesRequest; import com.thoughtspot.client.model.UpdateVariableRequest; import com.thoughtspot.client.model.UpdateVariableValuesRequest; @@ -298,7 +300,10 @@ public okhttp3.Call createVariableAsync( * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public okhttp3.Call deleteVariableCall(String identifier, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -357,6 +362,7 @@ public okhttp3.Call deleteVariableCall(String identifier, final ApiCallback _cal _callback); } + @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call deleteVariableValidateBeforeCall( String identifier, final ApiCallback _callback) throws ApiException { @@ -371,11 +377,14 @@ private okhttp3.Call deleteVariableValidateBeforeCall( } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. - * Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you - * to manage Formula Variables in the current organization scope. The API endpoint requires: * - * The variable identifier (ID or name) The operation will fail if: * The user lacks required - * permissions * The variable doesn't exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and + * will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. + * Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. + * The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifier (ID or name) The + * operation will fail if: * The user lacks required permissions * The variable doesn't + * exist * The variable is being used by other objects * * @param identifier Unique id or name of the variable (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -390,17 +399,23 @@ private okhttp3.Call deleteVariableValidateBeforeCall( * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public void deleteVariable(String identifier) throws ApiException { deleteVariableWithHttpInfo(identifier); } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. - * Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you - * to manage Formula Variables in the current organization scope. The API endpoint requires: * - * The variable identifier (ID or name) The operation will fail if: * The user lacks required - * permissions * The variable doesn't exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and + * will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. + * Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. + * The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifier (ID or name) The + * operation will fail if: * The user lacks required permissions * The variable doesn't + * exist * The variable is being used by other objects * * @param identifier Unique id or name of the variable (required) * @return ApiResponse<Void> @@ -416,19 +431,24 @@ public void deleteVariable(String identifier) throws ApiException { * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public ApiResponse deleteVariableWithHttpInfo(String identifier) throws ApiException { okhttp3.Call localVarCall = deleteVariableValidateBeforeCall(identifier, null); return localVarApiClient.execute(localVarCall); } /** - * (asynchronously) Delete a variable Version: 10.14.0.cl or later Allows deleting a variable - * from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES - * permission allows you to manage Formula Variables in the current organization scope. The API - * endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The - * user lacks required permissions * The variable doesn't exist * The variable is being used - * by other objects + * (asynchronously) Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint + * is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. + * Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. + * The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifier (ID or name) The + * operation will fail if: * The user lacks required permissions * The variable doesn't + * exist * The variable is being used by other objects * * @param identifier Unique id or name of the variable (required) * @param _callback The callback to be executed when the API call finishes @@ -445,7 +465,10 @@ public ApiResponse deleteVariableWithHttpInfo(String identifier) throws Ap * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public okhttp3.Call deleteVariableAsync(String identifier, final ApiCallback _callback) throws ApiException { @@ -453,6 +476,400 @@ public okhttp3.Call deleteVariableAsync(String identifier, final ApiCallback + * Response Details + * Status Code Description Response Headers + * 204 Deletion of variable(s) is successful. - + * 400 Invalid request. - + * 401 Unauthorized access. - + * 403 Forbidden access. - + * 500 Unexpected error - + * + */ + public okhttp3.Call deleteVariablesCall( + DeleteVariablesRequest deleteVariablesRequest, final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deleteVariablesRequest; + + // create path and map variables + String localVarPath = "/api/rest/2.0/template/variables/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteVariablesValidateBeforeCall( + DeleteVariablesRequest deleteVariablesRequest, final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'deleteVariablesRequest' is set + if (deleteVariablesRequest == null) { + throw new ApiException( + "Missing the required parameter 'deleteVariablesRequest' when calling" + + " deleteVariables(Async)"); + } + + return deleteVariablesCall(deleteVariablesRequest, _callback); + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * + * The user lacks required permissions * Any of the variables don't exist * Any of the + * variables are being used by other objects + * + * @param deleteVariablesRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deletion of variable(s) is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void deleteVariables(DeleteVariablesRequest deleteVariablesRequest) throws ApiException { + deleteVariablesWithHttpInfo(deleteVariablesRequest); + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * + * The user lacks required permissions * Any of the variables don't exist * Any of the + * variables are being used by other objects + * + * @param deleteVariablesRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deletion of variable(s) is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse deleteVariablesWithHttpInfo( + DeleteVariablesRequest deleteVariablesRequest) throws ApiException { + okhttp3.Call localVarCall = deleteVariablesValidateBeforeCall(deleteVariablesRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple + * variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The + * CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The + * operation will fail if: * The user lacks required permissions * Any of the variables + * don't exist * Any of the variables are being used by other objects + * + * @param deleteVariablesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Deletion of variable(s) is successful. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call deleteVariablesAsync( + DeleteVariablesRequest deleteVariablesRequest, final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteVariablesValidateBeforeCall(deleteVariablesRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for putVariableValues + * + * @param identifier Unique ID or name of the variable (required) + * @param putVariableValuesRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call putVariableValuesCall( + String identifier, + PutVariableValuesRequest putVariableValuesRequest, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = putVariableValuesRequest; + + // create path and map variables + String localVarPath = + "/api/rest/2.0/template/variables/{identifier}/update-values" + .replace( + "{" + "identifier" + "}", + localVarApiClient.escapeString(identifier.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {"bearerAuth"}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call putVariableValuesValidateBeforeCall( + String identifier, + PutVariableValuesRequest putVariableValuesRequest, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'identifier' is set + if (identifier == null) { + throw new ApiException( + "Missing the required parameter 'identifier' when calling" + + " putVariableValues(Async)"); + } + + // verify the required parameter 'putVariableValuesRequest' is set + if (putVariableValuesRequest == null) { + throw new ApiException( + "Missing the required parameter 'putVariableValuesRequest' when calling" + + " putVariableValues(Async)"); + } + + return putVariableValuesCall(identifier, putVariableValuesRequest, _callback); + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a + * specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting + * values from the variable * Resetting all values When updating variable values, you need to + * specify: * The variable identifier (ID or name) * The values to add/replace/remove * The + * operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - + * Adds values to the variable if this is a list type variable, else same as replace. * REPLACE + * - Replaces all values of a given set of constraints with the current set of values. * REMOVE + * - Removes any values which match the set of conditions of the variables if this is a list + * type variable, else clears value. * RESET - Removes all constraints for the given variable, + * scope is ignored + * + * @param identifier Unique ID or name of the variable (required) + * @param putVariableValuesRequest (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public void putVariableValues( + String identifier, PutVariableValuesRequest putVariableValuesRequest) + throws ApiException { + putVariableValuesWithHttpInfo(identifier, putVariableValuesRequest); + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a + * specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting + * values from the variable * Resetting all values When updating variable values, you need to + * specify: * The variable identifier (ID or name) * The values to add/replace/remove * The + * operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - + * Adds values to the variable if this is a list type variable, else same as replace. * REPLACE + * - Replaces all values of a given set of constraints with the current set of values. * REMOVE + * - Removes any values which match the set of conditions of the variables if this is a list + * type variable, else clears value. * RESET - Removes all constraints for the given variable, + * scope is ignored + * + * @param identifier Unique ID or name of the variable (required) + * @param putVariableValuesRequest (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public ApiResponse putVariableValuesWithHttpInfo( + String identifier, PutVariableValuesRequest putVariableValuesRequest) + throws ApiException { + okhttp3.Call localVarCall = + putVariableValuesValidateBeforeCall(identifier, putVariableValuesRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) Update values for a variable Version: 26.4.0.cl or later Allows updating + * values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The + * CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint allows: * Adding new values to the variable * Replacing + * existing values * Deleting values from the variable * Resetting all values When updating + * variable values, you need to specify: * The variable identifier (ID or name) * The values to + * add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based + * on operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constraints for the given variable, scope is ignored + * + * @param identifier Unique ID or name of the variable (required) + * @param putVariableValuesRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Variable values updated successfully. -
400 Invalid request. -
401 Unauthorized access. -
403 Forbidden access. -
500 Unexpected error -
+ */ + public okhttp3.Call putVariableValuesAsync( + String identifier, + PutVariableValuesRequest putVariableValuesRequest, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + putVariableValuesValidateBeforeCall( + identifier, putVariableValuesRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for searchVariables * @@ -850,7 +1267,10 @@ public okhttp3.Call updateVariableAsync( * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public okhttp3.Call updateVariableValuesCall( UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) throws ApiException { @@ -906,6 +1326,7 @@ public okhttp3.Call updateVariableValuesCall( _callback); } + @Deprecated @SuppressWarnings("rawtypes") private okhttp3.Call updateVariableValuesValidateBeforeCall( UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) @@ -921,17 +1342,20 @@ private okhttp3.Call updateVariableValuesValidateBeforeCall( } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for - * multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES - * permission allows you to manage Formula Variables in the current organization scope. The API - * endpoint allows: * Adding new values to variables * Replacing existing values * Deleting - * values from variables When updating variable values, you need to specify: * The variable - * identifiers * The values to add/replace/remove for each variable * The operation to perform - * (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the - * variable if this is a list type variable, else same as replace. * REPLACE - Replaces all - * values of a given set of constraints with the current set of values. * REMOVE - Removes any - * values which match the set of conditions of the variables if this is a list type variable, - * else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint + * is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) + * instead. Allows updating values for multiple variables in ThoughtSpot. Requires + * ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula + * Variables in the current organization scope. The API endpoint allows: * Adding new values to + * variables * Replacing existing values * Deleting values from variables When updating variable + * values, you need to specify: * The variable identifiers * The values to add/replace/remove + * for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on + * operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constrains for a given variable, scope is ignored * * @param updateVariableValuesRequest (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -946,24 +1370,30 @@ private okhttp3.Call updateVariableValuesValidateBeforeCall( * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public void updateVariableValues(UpdateVariableValuesRequest updateVariableValuesRequest) throws ApiException { updateVariableValuesWithHttpInfo(updateVariableValuesRequest); } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for - * multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES - * permission allows you to manage Formula Variables in the current organization scope. The API - * endpoint allows: * Adding new values to variables * Replacing existing values * Deleting - * values from variables When updating variable values, you need to specify: * The variable - * identifiers * The values to add/replace/remove for each variable * The operation to perform - * (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the - * variable if this is a list type variable, else same as replace. * REPLACE - Replaces all - * values of a given set of constraints with the current set of values. * REMOVE - Removes any - * values which match the set of conditions of the variables if this is a list type variable, - * else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint + * is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) + * instead. Allows updating values for multiple variables in ThoughtSpot. Requires + * ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula + * Variables in the current organization scope. The API endpoint allows: * Adding new values to + * variables * Replacing existing values * Deleting values from variables When updating variable + * values, you need to specify: * The variable identifiers * The values to add/replace/remove + * for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on + * operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constrains for a given variable, scope is ignored * * @param updateVariableValuesRequest (required) * @return ApiResponse<Void> @@ -979,7 +1409,10 @@ public void updateVariableValues(UpdateVariableValuesRequest updateVariableValue * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public ApiResponse updateVariableValuesWithHttpInfo( UpdateVariableValuesRequest updateVariableValuesRequest) throws ApiException { okhttp3.Call localVarCall = @@ -988,18 +1421,21 @@ public ApiResponse updateVariableValuesWithHttpInfo( } /** - * (asynchronously) Update values for multiple variables Version: 10.14.0.cl or later Allows - * updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The - * CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current - * organization scope. The API endpoint allows: * Adding new values to variables * Replacing - * existing values * Deleting values from variables When updating variable values, you need to - * specify: * The variable identifiers * The values to add/replace/remove for each variable * - * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * - * ADD - Adds values to the variable if this is a list type variable, else same as replace. * - * REPLACE - Replaces all values of a given set of constraints with the current set of values. * - * REMOVE - Removes any values which match the set of conditions of the variables if this is a - * list type variable, else clears value. * RESET - Removes all constrains for a given variable, - * scope is ignored + * (asynchronously) Update values for multiple variables Version: 10.14.0.cl or later **Note:** + * This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use + * [POST + * /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) + * instead. Allows updating values for multiple variables in ThoughtSpot. Requires + * ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula + * Variables in the current organization scope. The API endpoint allows: * Adding new values to + * variables * Replacing existing values * Deleting values from variables When updating variable + * values, you need to specify: * The variable identifiers * The values to add/replace/remove + * for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on + * operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constrains for a given variable, scope is ignored * * @param updateVariableValuesRequest (required) * @param _callback The callback to be executed when the API call finishes @@ -1016,7 +1452,10 @@ public ApiResponse updateVariableValuesWithHttpInfo( * 403 Forbidden access. - * 500 Unexpected error - * + * + * @deprecated */ + @Deprecated public okhttp3.Call updateVariableValuesAsync( UpdateVariableValuesRequest updateVariableValuesRequest, final ApiCallback _callback) diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryEventInfo.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryEventInfo.java new file mode 100644 index 000000000..5c9ade97f --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryEventInfo.java @@ -0,0 +1,481 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Event metadata for the triggering event associated with a job. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ChannelHistoryEventInfo implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of the event. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD_SCHEDULE("LIVEBOARD_SCHEDULE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_RUN_ID = "run_id"; + + @SerializedName(SERIALIZED_NAME_RUN_ID) + @javax.annotation.Nullable + private String runId; + + public ChannelHistoryEventInfo() {} + + public ChannelHistoryEventInfo type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the event. + * + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public ChannelHistoryEventInfo id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique ID of the event. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public ChannelHistoryEventInfo name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the event. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public ChannelHistoryEventInfo runId(@javax.annotation.Nullable String runId) { + this.runId = runId; + return this; + } + + /** + * Unique run ID for this event execution. + * + * @return runId + */ + @javax.annotation.Nullable + public String getRunId() { + return runId; + } + + public void setRunId(@javax.annotation.Nullable String runId) { + this.runId = runId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ChannelHistoryEventInfo instance itself + */ + public ChannelHistoryEventInfo putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChannelHistoryEventInfo channelHistoryEventInfo = (ChannelHistoryEventInfo) o; + return Objects.equals(this.type, channelHistoryEventInfo.type) + && Objects.equals(this.id, channelHistoryEventInfo.id) + && Objects.equals(this.name, channelHistoryEventInfo.name) + && Objects.equals(this.runId, channelHistoryEventInfo.runId) + && Objects.equals( + this.additionalProperties, channelHistoryEventInfo.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, name, runId, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChannelHistoryEventInfo {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" runId: ").append(toIndentedString(runId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("run_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("id"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ChannelHistoryEventInfo + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ChannelHistoryEventInfo.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ChannelHistoryEventInfo is not found" + + " in the empty JSON string", + ChannelHistoryEventInfo.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ChannelHistoryEventInfo.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("run_id") != null && !jsonObj.get("run_id").isJsonNull()) + && !jsonObj.get("run_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `run_id` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("run_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChannelHistoryEventInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChannelHistoryEventInfo' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ChannelHistoryEventInfo.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ChannelHistoryEventInfo value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ChannelHistoryEventInfo read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ChannelHistoryEventInfo instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ChannelHistoryEventInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChannelHistoryEventInfo + * @throws IOException if the JSON string is invalid with respect to ChannelHistoryEventInfo + */ + public static ChannelHistoryEventInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChannelHistoryEventInfo.class); + } + + /** + * Convert an instance of ChannelHistoryEventInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryEventInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryEventInput.java new file mode 100644 index 000000000..c0bc9c053 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryEventInput.java @@ -0,0 +1,409 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Event specification for channel history search. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ChannelHistoryEventInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of the event. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD_SCHEDULE("LIVEBOARD_SCHEDULE"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + public ChannelHistoryEventInput() {} + + public ChannelHistoryEventInput type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the event. + * + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public ChannelHistoryEventInput identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique ID or name of the event. + * + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ChannelHistoryEventInput instance itself + */ + public ChannelHistoryEventInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChannelHistoryEventInput channelHistoryEventInput = (ChannelHistoryEventInput) o; + return Objects.equals(this.type, channelHistoryEventInput.type) + && Objects.equals(this.identifier, channelHistoryEventInput.identifier) + && Objects.equals( + this.additionalProperties, channelHistoryEventInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifier, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChannelHistoryEventInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ChannelHistoryEventInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ChannelHistoryEventInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ChannelHistoryEventInput is not found" + + " in the empty JSON string", + ChannelHistoryEventInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ChannelHistoryEventInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) + && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChannelHistoryEventInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChannelHistoryEventInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ChannelHistoryEventInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ChannelHistoryEventInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ChannelHistoryEventInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ChannelHistoryEventInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ChannelHistoryEventInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChannelHistoryEventInput + * @throws IOException if the JSON string is invalid with respect to ChannelHistoryEventInput + */ + public static ChannelHistoryEventInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChannelHistoryEventInput.class); + } + + /** + * Convert an instance of ChannelHistoryEventInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryJob.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryJob.java new file mode 100644 index 000000000..5a860aad0 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelHistoryJob.java @@ -0,0 +1,607 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** A single job execution record for a channel. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ChannelHistoryJob implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + /** Delivery status of this job. */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + PENDING("PENDING"), + + RETRY("RETRY"), + + SUCCESS("SUCCESS"), + + FAILED("FAILED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private StatusEnum status; + + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) + @javax.annotation.Nonnull + private Float creationTimeInMillis; + + public static final String SERIALIZED_NAME_EVENT = "event"; + + @SerializedName(SERIALIZED_NAME_EVENT) + @javax.annotation.Nullable + private ChannelHistoryEventInfo event; + + public static final String SERIALIZED_NAME_RECIPIENTS = "recipients"; + + @SerializedName(SERIALIZED_NAME_RECIPIENTS) + @javax.annotation.Nullable + private List recipients; + + public static final String SERIALIZED_NAME_DETAIL = "detail"; + + @SerializedName(SERIALIZED_NAME_DETAIL) + @javax.annotation.Nullable + private String detail; + + public static final String SERIALIZED_NAME_TRY_COUNT = "try_count"; + + @SerializedName(SERIALIZED_NAME_TRY_COUNT) + @javax.annotation.Nullable + private Integer tryCount; + + public ChannelHistoryJob() {} + + public ChannelHistoryJob id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique identifier for this job. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public ChannelHistoryJob status(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + return this; + } + + /** + * Delivery status of this job. + * + * @return status + */ + @javax.annotation.Nonnull + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + } + + public ChannelHistoryJob creationTimeInMillis( + @javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + return this; + } + + /** + * Timestamp when this job was created (epoch milliseconds). + * + * @return creationTimeInMillis + */ + @javax.annotation.Nonnull + public Float getCreationTimeInMillis() { + return creationTimeInMillis; + } + + public void setCreationTimeInMillis(@javax.annotation.Nonnull Float creationTimeInMillis) { + this.creationTimeInMillis = creationTimeInMillis; + } + + public ChannelHistoryJob event(@javax.annotation.Nullable ChannelHistoryEventInfo event) { + this.event = event; + return this; + } + + /** + * Get event + * + * @return event + */ + @javax.annotation.Nullable + public ChannelHistoryEventInfo getEvent() { + return event; + } + + public void setEvent(@javax.annotation.Nullable ChannelHistoryEventInfo event) { + this.event = event; + } + + public ChannelHistoryJob recipients(@javax.annotation.Nullable List recipients) { + this.recipients = recipients; + return this; + } + + public ChannelHistoryJob addRecipientsItem(JobRecipient recipientsItem) { + if (this.recipients == null) { + this.recipients = new ArrayList<>(); + } + this.recipients.add(recipientsItem); + return this; + } + + /** + * The users, groups or external recipients for this job. + * + * @return recipients + */ + @javax.annotation.Nullable + public List getRecipients() { + return recipients; + } + + public void setRecipients(@javax.annotation.Nullable List recipients) { + this.recipients = recipients; + } + + public ChannelHistoryJob detail(@javax.annotation.Nullable String detail) { + this.detail = detail; + return this; + } + + /** + * Additional delivery details such as HTTP response code or error message. + * + * @return detail + */ + @javax.annotation.Nullable + public String getDetail() { + return detail; + } + + public void setDetail(@javax.annotation.Nullable String detail) { + this.detail = detail; + } + + public ChannelHistoryJob tryCount(@javax.annotation.Nullable Integer tryCount) { + this.tryCount = tryCount; + return this; + } + + /** + * Number of attempts made. 1 indicates first attempt. + * + * @return tryCount + */ + @javax.annotation.Nullable + public Integer getTryCount() { + return tryCount; + } + + public void setTryCount(@javax.annotation.Nullable Integer tryCount) { + this.tryCount = tryCount; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ChannelHistoryJob instance itself + */ + public ChannelHistoryJob putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChannelHistoryJob channelHistoryJob = (ChannelHistoryJob) o; + return Objects.equals(this.id, channelHistoryJob.id) + && Objects.equals(this.status, channelHistoryJob.status) + && Objects.equals(this.creationTimeInMillis, channelHistoryJob.creationTimeInMillis) + && Objects.equals(this.event, channelHistoryJob.event) + && Objects.equals(this.recipients, channelHistoryJob.recipients) + && Objects.equals(this.detail, channelHistoryJob.detail) + && Objects.equals(this.tryCount, channelHistoryJob.tryCount) + && Objects.equals( + this.additionalProperties, channelHistoryJob.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + status, + creationTimeInMillis, + event, + recipients, + detail, + tryCount, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChannelHistoryJob {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" creationTimeInMillis: ") + .append(toIndentedString(creationTimeInMillis)) + .append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append(" recipients: ").append(toIndentedString(recipients)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" tryCount: ").append(toIndentedString(tryCount)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("status"); + openapiFields.add("creation_time_in_millis"); + openapiFields.add("event"); + openapiFields.add("recipients"); + openapiFields.add("detail"); + openapiFields.add("try_count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("status"); + openapiRequiredFields.add("creation_time_in_millis"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ChannelHistoryJob + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ChannelHistoryJob.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ChannelHistoryJob is not found in the" + + " empty JSON string", + ChannelHistoryJob.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ChannelHistoryJob.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("status").toString())); + } + // validate the required field `status` + StatusEnum.validateJsonElement(jsonObj.get("status")); + // validate the optional field `event` + if (jsonObj.get("event") != null && !jsonObj.get("event").isJsonNull()) { + ChannelHistoryEventInfo.validateJsonElement(jsonObj.get("event")); + } + if (jsonObj.get("recipients") != null && !jsonObj.get("recipients").isJsonNull()) { + JsonArray jsonArrayrecipients = jsonObj.getAsJsonArray("recipients"); + if (jsonArrayrecipients != null) { + // ensure the json data is an array + if (!jsonObj.get("recipients").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `recipients` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("recipients").toString())); + } + + // validate the optional field `recipients` (array) + for (int i = 0; i < jsonArrayrecipients.size(); i++) { + JobRecipient.validateJsonElement(jsonArrayrecipients.get(i)); + } + ; + } + } + if ((jsonObj.get("detail") != null && !jsonObj.get("detail").isJsonNull()) + && !jsonObj.get("detail").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `detail` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("detail").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChannelHistoryJob.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChannelHistoryJob' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ChannelHistoryJob.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ChannelHistoryJob value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ChannelHistoryJob read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ChannelHistoryJob instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ChannelHistoryJob given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChannelHistoryJob + * @throws IOException if the JSON string is invalid with respect to ChannelHistoryJob + */ + public static ChannelHistoryJob fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChannelHistoryJob.class); + } + + /** + * Convert an instance of ChannelHistoryJob to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelValidationAwsS3Info.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelValidationAwsS3Info.java new file mode 100644 index 000000000..6a4024d2b --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelValidationAwsS3Info.java @@ -0,0 +1,383 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** AWS S3 storage information returned from a validation step. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ChannelValidationAwsS3Info implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_BUCKET_NAME = "bucket_name"; + + @SerializedName(SERIALIZED_NAME_BUCKET_NAME) + @javax.annotation.Nullable + private String bucketName; + + public static final String SERIALIZED_NAME_FILE_NAME = "file_name"; + + @SerializedName(SERIALIZED_NAME_FILE_NAME) + @javax.annotation.Nullable + private String fileName; + + public static final String SERIALIZED_NAME_OBJECT_KEY = "object_key"; + + @SerializedName(SERIALIZED_NAME_OBJECT_KEY) + @javax.annotation.Nullable + private String objectKey; + + public ChannelValidationAwsS3Info() {} + + public ChannelValidationAwsS3Info bucketName(@javax.annotation.Nullable String bucketName) { + this.bucketName = bucketName; + return this; + } + + /** + * Name of the S3 bucket. + * + * @return bucketName + */ + @javax.annotation.Nullable + public String getBucketName() { + return bucketName; + } + + public void setBucketName(@javax.annotation.Nullable String bucketName) { + this.bucketName = bucketName; + } + + public ChannelValidationAwsS3Info fileName(@javax.annotation.Nullable String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Name of the uploaded file. + * + * @return fileName + */ + @javax.annotation.Nullable + public String getFileName() { + return fileName; + } + + public void setFileName(@javax.annotation.Nullable String fileName) { + this.fileName = fileName; + } + + public ChannelValidationAwsS3Info objectKey(@javax.annotation.Nullable String objectKey) { + this.objectKey = objectKey; + return this; + } + + /** + * Key of the object in S3 storage. + * + * @return objectKey + */ + @javax.annotation.Nullable + public String getObjectKey() { + return objectKey; + } + + public void setObjectKey(@javax.annotation.Nullable String objectKey) { + this.objectKey = objectKey; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ChannelValidationAwsS3Info instance itself + */ + public ChannelValidationAwsS3Info putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChannelValidationAwsS3Info channelValidationAwsS3Info = (ChannelValidationAwsS3Info) o; + return Objects.equals(this.bucketName, channelValidationAwsS3Info.bucketName) + && Objects.equals(this.fileName, channelValidationAwsS3Info.fileName) + && Objects.equals(this.objectKey, channelValidationAwsS3Info.objectKey) + && Objects.equals( + this.additionalProperties, channelValidationAwsS3Info.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(bucketName, fileName, objectKey, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChannelValidationAwsS3Info {\n"); + sb.append(" bucketName: ").append(toIndentedString(bucketName)).append("\n"); + sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" objectKey: ").append(toIndentedString(objectKey)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("bucket_name"); + openapiFields.add("file_name"); + openapiFields.add("object_key"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ChannelValidationAwsS3Info + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ChannelValidationAwsS3Info.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ChannelValidationAwsS3Info is not" + + " found in the empty JSON string", + ChannelValidationAwsS3Info.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("bucket_name") != null && !jsonObj.get("bucket_name").isJsonNull()) + && !jsonObj.get("bucket_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `bucket_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("bucket_name").toString())); + } + if ((jsonObj.get("file_name") != null && !jsonObj.get("file_name").isJsonNull()) + && !jsonObj.get("file_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `file_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("file_name").toString())); + } + if ((jsonObj.get("object_key") != null && !jsonObj.get("object_key").isJsonNull()) + && !jsonObj.get("object_key").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `object_key` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("object_key").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChannelValidationAwsS3Info.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChannelValidationAwsS3Info' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ChannelValidationAwsS3Info.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ChannelValidationAwsS3Info value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ChannelValidationAwsS3Info read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ChannelValidationAwsS3Info instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ChannelValidationAwsS3Info given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChannelValidationAwsS3Info + * @throws IOException if the JSON string is invalid with respect to ChannelValidationAwsS3Info + */ + public static ChannelValidationAwsS3Info fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChannelValidationAwsS3Info.class); + } + + /** + * Convert an instance of ChannelValidationAwsS3Info to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelValidationDetail.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelValidationDetail.java new file mode 100644 index 000000000..5d9c5508e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ChannelValidationDetail.java @@ -0,0 +1,563 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Validation detail result for a sub-step. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ChannelValidationDetail implements Serializable { + private static final long serialVersionUID = 1L; + + /** The validation step that was performed. */ + @JsonAdapter(ValidationStepEnum.Adapter.class) + public enum ValidationStepEnum { + HTTP_CONNECTION_CHECK("HTTP_CONNECTION_CHECK"), + + STORAGE_FILE_UPLOAD_CHECK("STORAGE_FILE_UPLOAD_CHECK"); + + private String value; + + ValidationStepEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ValidationStepEnum fromValue(String value) { + for (ValidationStepEnum b : ValidationStepEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ValidationStepEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ValidationStepEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ValidationStepEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ValidationStepEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_VALIDATION_STEP = "validation_step"; + + @SerializedName(SERIALIZED_NAME_VALIDATION_STEP) + @javax.annotation.Nonnull + private ValidationStepEnum validationStep; + + /** Status of this validation step. */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + SUCCESS("SUCCESS"), + + FAILED("FAILED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nonnull + private StatusEnum status; + + public static final String SERIALIZED_NAME_HTTP_STATUS = "http_status"; + + @SerializedName(SERIALIZED_NAME_HTTP_STATUS) + @javax.annotation.Nullable + private Integer httpStatus; + + public static final String SERIALIZED_NAME_ERROR_MESSAGE = "error_message"; + + @SerializedName(SERIALIZED_NAME_ERROR_MESSAGE) + @javax.annotation.Nullable + private String errorMessage; + + public static final String SERIALIZED_NAME_AWS_S3_INFO = "aws_s3_info"; + + @SerializedName(SERIALIZED_NAME_AWS_S3_INFO) + @javax.annotation.Nullable + private ChannelValidationAwsS3Info awsS3Info; + + public ChannelValidationDetail() {} + + public ChannelValidationDetail validationStep( + @javax.annotation.Nonnull ValidationStepEnum validationStep) { + this.validationStep = validationStep; + return this; + } + + /** + * The validation step that was performed. + * + * @return validationStep + */ + @javax.annotation.Nonnull + public ValidationStepEnum getValidationStep() { + return validationStep; + } + + public void setValidationStep(@javax.annotation.Nonnull ValidationStepEnum validationStep) { + this.validationStep = validationStep; + } + + public ChannelValidationDetail status(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status of this validation step. + * + * @return status + */ + @javax.annotation.Nonnull + public StatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nonnull StatusEnum status) { + this.status = status; + } + + public ChannelValidationDetail httpStatus(@javax.annotation.Nullable Integer httpStatus) { + this.httpStatus = httpStatus; + return this; + } + + /** + * HTTP status code returned by the channel (if applicable). + * + * @return httpStatus + */ + @javax.annotation.Nullable + public Integer getHttpStatus() { + return httpStatus; + } + + public void setHttpStatus(@javax.annotation.Nullable Integer httpStatus) { + this.httpStatus = httpStatus; + } + + public ChannelValidationDetail errorMessage(@javax.annotation.Nullable String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Error message from the channel or validation process. + * + * @return errorMessage + */ + @javax.annotation.Nullable + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(@javax.annotation.Nullable String errorMessage) { + this.errorMessage = errorMessage; + } + + public ChannelValidationDetail awsS3Info( + @javax.annotation.Nullable ChannelValidationAwsS3Info awsS3Info) { + this.awsS3Info = awsS3Info; + return this; + } + + /** + * Get awsS3Info + * + * @return awsS3Info + */ + @javax.annotation.Nullable + public ChannelValidationAwsS3Info getAwsS3Info() { + return awsS3Info; + } + + public void setAwsS3Info(@javax.annotation.Nullable ChannelValidationAwsS3Info awsS3Info) { + this.awsS3Info = awsS3Info; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ChannelValidationDetail instance itself + */ + public ChannelValidationDetail putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChannelValidationDetail channelValidationDetail = (ChannelValidationDetail) o; + return Objects.equals(this.validationStep, channelValidationDetail.validationStep) + && Objects.equals(this.status, channelValidationDetail.status) + && Objects.equals(this.httpStatus, channelValidationDetail.httpStatus) + && Objects.equals(this.errorMessage, channelValidationDetail.errorMessage) + && Objects.equals(this.awsS3Info, channelValidationDetail.awsS3Info) + && Objects.equals( + this.additionalProperties, channelValidationDetail.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + validationStep, status, httpStatus, errorMessage, awsS3Info, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChannelValidationDetail {\n"); + sb.append(" validationStep: ").append(toIndentedString(validationStep)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" httpStatus: ").append(toIndentedString(httpStatus)).append("\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); + sb.append(" awsS3Info: ").append(toIndentedString(awsS3Info)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("validation_step"); + openapiFields.add("status"); + openapiFields.add("http_status"); + openapiFields.add("error_message"); + openapiFields.add("aws_s3_info"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("validation_step"); + openapiRequiredFields.add("status"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ChannelValidationDetail + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ChannelValidationDetail.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ChannelValidationDetail is not found" + + " in the empty JSON string", + ChannelValidationDetail.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ChannelValidationDetail.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("validation_step").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `validation_step` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("validation_step").toString())); + } + // validate the required field `validation_step` + ValidationStepEnum.validateJsonElement(jsonObj.get("validation_step")); + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `status` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("status").toString())); + } + // validate the required field `status` + StatusEnum.validateJsonElement(jsonObj.get("status")); + if ((jsonObj.get("error_message") != null && !jsonObj.get("error_message").isJsonNull()) + && !jsonObj.get("error_message").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `error_message` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("error_message").toString())); + } + // validate the optional field `aws_s3_info` + if (jsonObj.get("aws_s3_info") != null && !jsonObj.get("aws_s3_info").isJsonNull()) { + ChannelValidationAwsS3Info.validateJsonElement(jsonObj.get("aws_s3_info")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChannelValidationDetail.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChannelValidationDetail' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ChannelValidationDetail.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ChannelValidationDetail value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ChannelValidationDetail read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ChannelValidationDetail instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ChannelValidationDetail given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChannelValidationDetail + * @throws IOException if the JSON string is invalid with respect to ChannelValidationDetail + */ + public static ChannelValidationDetail fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChannelValidationDetail.class); + } + + /** + * Convert an instance of ChannelValidationDetail to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Collection.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Collection.java new file mode 100644 index 000000000..df0bc030d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Collection.java @@ -0,0 +1,633 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Response object for a collection. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Collection implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; + + public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable + private String createdAt; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable + private String updatedAt; + + public static final String SERIALIZED_NAME_AUTHOR_NAME = "author_name"; + + @SerializedName(SERIALIZED_NAME_AUTHOR_NAME) + @javax.annotation.Nullable + private String authorName; + + public static final String SERIALIZED_NAME_AUTHOR_ID = "author_id"; + + @SerializedName(SERIALIZED_NAME_AUTHOR_ID) + @javax.annotation.Nullable + private String authorId; + + public static final String SERIALIZED_NAME_ORG = "org"; + + @SerializedName(SERIALIZED_NAME_ORG) + @javax.annotation.Nullable + private CollectionEntityIdentifier org; + + public Collection() {} + + public Collection id(@javax.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the collection. + * + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull String id) { + this.id = id; + } + + public Collection name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the collection. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public Collection description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the collection. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public Collection metadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public Collection addMetadataItem(CollectionMetadataItem metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects in the collection. + * + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + public Collection createdAt(@javax.annotation.Nullable String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation timestamp in milliseconds. + * + * @return createdAt + */ + @javax.annotation.Nullable + public String getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nullable String createdAt) { + this.createdAt = createdAt; + } + + public Collection updatedAt(@javax.annotation.Nullable String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Last updated timestamp in milliseconds. + * + * @return updatedAt + */ + @javax.annotation.Nullable + public String getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nullable String updatedAt) { + this.updatedAt = updatedAt; + } + + public Collection authorName(@javax.annotation.Nullable String authorName) { + this.authorName = authorName; + return this; + } + + /** + * Name of the author who created the collection. + * + * @return authorName + */ + @javax.annotation.Nullable + public String getAuthorName() { + return authorName; + } + + public void setAuthorName(@javax.annotation.Nullable String authorName) { + this.authorName = authorName; + } + + public Collection authorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + return this; + } + + /** + * Unique identifier of the author. + * + * @return authorId + */ + @javax.annotation.Nullable + public String getAuthorId() { + return authorId; + } + + public void setAuthorId(@javax.annotation.Nullable String authorId) { + this.authorId = authorId; + } + + public Collection org(@javax.annotation.Nullable CollectionEntityIdentifier org) { + this.org = org; + return this; + } + + /** + * Get org + * + * @return org + */ + @javax.annotation.Nullable + public CollectionEntityIdentifier getOrg() { + return org; + } + + public void setOrg(@javax.annotation.Nullable CollectionEntityIdentifier org) { + this.org = org; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Collection instance itself + */ + public Collection putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Collection collection = (Collection) o; + return Objects.equals(this.id, collection.id) + && Objects.equals(this.name, collection.name) + && Objects.equals(this.description, collection.description) + && Objects.equals(this.metadata, collection.metadata) + && Objects.equals(this.createdAt, collection.createdAt) + && Objects.equals(this.updatedAt, collection.updatedAt) + && Objects.equals(this.authorName, collection.authorName) + && Objects.equals(this.authorId, collection.authorId) + && Objects.equals(this.org, collection.org) + && Objects.equals(this.additionalProperties, collection.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + name, + description, + metadata, + createdAt, + updatedAt, + authorName, + authorId, + org, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Collection {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" authorName: ").append(toIndentedString(authorName)).append("\n"); + sb.append(" authorId: ").append(toIndentedString(authorId)).append("\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("metadata"); + openapiFields.add("created_at"); + openapiFields.add("updated_at"); + openapiFields.add("author_name"); + openapiFields.add("author_id"); + openapiFields.add("org"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Collection + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Collection.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Collection is not found in the empty" + + " JSON string", + Collection.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Collection.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + CollectionMetadataItem.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + } + } + if ((jsonObj.get("created_at") != null && !jsonObj.get("created_at").isJsonNull()) + && !jsonObj.get("created_at").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `created_at` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("created_at").toString())); + } + if ((jsonObj.get("updated_at") != null && !jsonObj.get("updated_at").isJsonNull()) + && !jsonObj.get("updated_at").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `updated_at` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("updated_at").toString())); + } + if ((jsonObj.get("author_name") != null && !jsonObj.get("author_name").isJsonNull()) + && !jsonObj.get("author_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `author_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("author_name").toString())); + } + if ((jsonObj.get("author_id") != null && !jsonObj.get("author_id").isJsonNull()) + && !jsonObj.get("author_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `author_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("author_id").toString())); + } + // validate the optional field `org` + if (jsonObj.get("org") != null && !jsonObj.get("org").isJsonNull()) { + CollectionEntityIdentifier.validateJsonElement(jsonObj.get("org")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Collection.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Collection' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(Collection.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, Collection value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Collection read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Collection instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of Collection given an JSON string + * + * @param jsonString JSON string + * @return An instance of Collection + * @throws IOException if the JSON string is invalid with respect to Collection + */ + public static Collection fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Collection.class); + } + + /** + * Convert an instance of Collection to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionDeleteResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionDeleteResponse.java new file mode 100644 index 000000000..60dde2b21 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionDeleteResponse.java @@ -0,0 +1,398 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Response object for delete collection operation. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CollectionDeleteResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_METADATA_DELETED = "metadata_deleted"; + + @SerializedName(SERIALIZED_NAME_METADATA_DELETED) + @javax.annotation.Nullable + private List metadataDeleted; + + public static final String SERIALIZED_NAME_METADATA_SKIPPED = "metadata_skipped"; + + @SerializedName(SERIALIZED_NAME_METADATA_SKIPPED) + @javax.annotation.Nullable + private List metadataSkipped; + + public CollectionDeleteResponse() {} + + public CollectionDeleteResponse metadataDeleted( + @javax.annotation.Nullable List metadataDeleted) { + this.metadataDeleted = metadataDeleted; + return this; + } + + public CollectionDeleteResponse addMetadataDeletedItem( + CollectionDeleteTypeIdentifiers metadataDeletedItem) { + if (this.metadataDeleted == null) { + this.metadataDeleted = new ArrayList<>(); + } + this.metadataDeleted.add(metadataDeletedItem); + return this; + } + + /** + * List of metadata objects that were successfully deleted. + * + * @return metadataDeleted + */ + @javax.annotation.Nullable + public List getMetadataDeleted() { + return metadataDeleted; + } + + public void setMetadataDeleted( + @javax.annotation.Nullable List metadataDeleted) { + this.metadataDeleted = metadataDeleted; + } + + public CollectionDeleteResponse metadataSkipped( + @javax.annotation.Nullable List metadataSkipped) { + this.metadataSkipped = metadataSkipped; + return this; + } + + public CollectionDeleteResponse addMetadataSkippedItem( + CollectionDeleteTypeIdentifiers metadataSkippedItem) { + if (this.metadataSkipped == null) { + this.metadataSkipped = new ArrayList<>(); + } + this.metadataSkipped.add(metadataSkippedItem); + return this; + } + + /** + * List of metadata objects that were skipped during deletion. Objects may be skipped due to + * lack of permissions, dependencies, or other constraints. + * + * @return metadataSkipped + */ + @javax.annotation.Nullable + public List getMetadataSkipped() { + return metadataSkipped; + } + + public void setMetadataSkipped( + @javax.annotation.Nullable List metadataSkipped) { + this.metadataSkipped = metadataSkipped; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CollectionDeleteResponse instance itself + */ + public CollectionDeleteResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionDeleteResponse collectionDeleteResponse = (CollectionDeleteResponse) o; + return Objects.equals(this.metadataDeleted, collectionDeleteResponse.metadataDeleted) + && Objects.equals(this.metadataSkipped, collectionDeleteResponse.metadataSkipped) + && Objects.equals( + this.additionalProperties, collectionDeleteResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(metadataDeleted, metadataSkipped, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionDeleteResponse {\n"); + sb.append(" metadataDeleted: ").append(toIndentedString(metadataDeleted)).append("\n"); + sb.append(" metadataSkipped: ").append(toIndentedString(metadataSkipped)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_deleted"); + openapiFields.add("metadata_skipped"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CollectionDeleteResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CollectionDeleteResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CollectionDeleteResponse is not found" + + " in the empty JSON string", + CollectionDeleteResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("metadata_deleted") != null + && !jsonObj.get("metadata_deleted").isJsonNull()) { + JsonArray jsonArraymetadataDeleted = jsonObj.getAsJsonArray("metadata_deleted"); + if (jsonArraymetadataDeleted != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata_deleted").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_deleted` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("metadata_deleted").toString())); + } + + // validate the optional field `metadata_deleted` (array) + for (int i = 0; i < jsonArraymetadataDeleted.size(); i++) { + CollectionDeleteTypeIdentifiers.validateJsonElement( + jsonArraymetadataDeleted.get(i)); + } + ; + } + } + if (jsonObj.get("metadata_skipped") != null + && !jsonObj.get("metadata_skipped").isJsonNull()) { + JsonArray jsonArraymetadataSkipped = jsonObj.getAsJsonArray("metadata_skipped"); + if (jsonArraymetadataSkipped != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata_skipped").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_skipped` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("metadata_skipped").toString())); + } + + // validate the optional field `metadata_skipped` (array) + for (int i = 0; i < jsonArraymetadataSkipped.size(); i++) { + CollectionDeleteTypeIdentifiers.validateJsonElement( + jsonArraymetadataSkipped.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CollectionDeleteResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CollectionDeleteResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CollectionDeleteResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CollectionDeleteResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CollectionDeleteResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CollectionDeleteResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CollectionDeleteResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CollectionDeleteResponse + * @throws IOException if the JSON string is invalid with respect to CollectionDeleteResponse + */ + public static CollectionDeleteResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CollectionDeleteResponse.class); + } + + /** + * Convert an instance of CollectionDeleteResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionDeleteTypeIdentifiers.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionDeleteTypeIdentifiers.java new file mode 100644 index 000000000..ba286bc35 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionDeleteTypeIdentifiers.java @@ -0,0 +1,376 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Group of metadata objects identified by type. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CollectionDeleteTypeIdentifiers implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public static final String SERIALIZED_NAME_IDENTIFIERS = "identifiers"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIERS) + @javax.annotation.Nullable + private List identifiers; + + public CollectionDeleteTypeIdentifiers() {} + + public CollectionDeleteTypeIdentifiers type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Type of the metadata object (e.g., Collection, Worksheet, Table). + * + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + public CollectionDeleteTypeIdentifiers identifiers( + @javax.annotation.Nullable List identifiers) { + this.identifiers = identifiers; + return this; + } + + public CollectionDeleteTypeIdentifiers addIdentifiersItem(GenericInfo identifiersItem) { + if (this.identifiers == null) { + this.identifiers = new ArrayList<>(); + } + this.identifiers.add(identifiersItem); + return this; + } + + /** + * List of metadata identifiers belonging to the given type. + * + * @return identifiers + */ + @javax.annotation.Nullable + public List getIdentifiers() { + return identifiers; + } + + public void setIdentifiers(@javax.annotation.Nullable List identifiers) { + this.identifiers = identifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CollectionDeleteTypeIdentifiers instance itself + */ + public CollectionDeleteTypeIdentifiers putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionDeleteTypeIdentifiers collectionDeleteTypeIdentifiers = + (CollectionDeleteTypeIdentifiers) o; + return Objects.equals(this.type, collectionDeleteTypeIdentifiers.type) + && Objects.equals(this.identifiers, collectionDeleteTypeIdentifiers.identifiers) + && Objects.equals( + this.additionalProperties, + collectionDeleteTypeIdentifiers.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifiers, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionDeleteTypeIdentifiers {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifiers: ").append(toIndentedString(identifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * CollectionDeleteTypeIdentifiers + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CollectionDeleteTypeIdentifiers.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CollectionDeleteTypeIdentifiers is" + + " not found in the empty JSON string", + CollectionDeleteTypeIdentifiers.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + if (jsonObj.get("identifiers") != null && !jsonObj.get("identifiers").isJsonNull()) { + JsonArray jsonArrayidentifiers = jsonObj.getAsJsonArray("identifiers"); + if (jsonArrayidentifiers != null) { + // ensure the json data is an array + if (!jsonObj.get("identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("identifiers").toString())); + } + + // validate the optional field `identifiers` (array) + for (int i = 0; i < jsonArrayidentifiers.size(); i++) { + GenericInfo.validateJsonElement(jsonArrayidentifiers.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CollectionDeleteTypeIdentifiers.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CollectionDeleteTypeIdentifiers' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(CollectionDeleteTypeIdentifiers.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CollectionDeleteTypeIdentifiers value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CollectionDeleteTypeIdentifiers read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CollectionDeleteTypeIdentifiers instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CollectionDeleteTypeIdentifiers given an JSON string + * + * @param jsonString JSON string + * @return An instance of CollectionDeleteTypeIdentifiers + * @throws IOException if the JSON string is invalid with respect to + * CollectionDeleteTypeIdentifiers + */ + public static CollectionDeleteTypeIdentifiers fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CollectionDeleteTypeIdentifiers.class); + } + + /** + * Convert an instance of CollectionDeleteTypeIdentifiers to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionEntityIdentifier.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionEntityIdentifier.java new file mode 100644 index 000000000..34cb7e4e7 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionEntityIdentifier.java @@ -0,0 +1,347 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Entity identifier with name. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CollectionEntityIdentifier implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + @javax.annotation.Nullable + private String identifier; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public CollectionEntityIdentifier() {} + + public CollectionEntityIdentifier identifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Unique identifier of the entity. + * + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(@javax.annotation.Nullable String identifier) { + this.identifier = identifier; + } + + public CollectionEntityIdentifier name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the entity. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CollectionEntityIdentifier instance itself + */ + public CollectionEntityIdentifier putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionEntityIdentifier collectionEntityIdentifier = (CollectionEntityIdentifier) o; + return Objects.equals(this.identifier, collectionEntityIdentifier.identifier) + && Objects.equals(this.name, collectionEntityIdentifier.name) + && Objects.equals( + this.additionalProperties, collectionEntityIdentifier.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifier, name, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionEntityIdentifier {\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifier"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CollectionEntityIdentifier + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CollectionEntityIdentifier.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CollectionEntityIdentifier is not" + + " found in the empty JSON string", + CollectionEntityIdentifier.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) + && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifier` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("identifier").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CollectionEntityIdentifier.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CollectionEntityIdentifier' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CollectionEntityIdentifier.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CollectionEntityIdentifier value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CollectionEntityIdentifier read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CollectionEntityIdentifier instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CollectionEntityIdentifier given an JSON string + * + * @param jsonString JSON string + * @return An instance of CollectionEntityIdentifier + * @throws IOException if the JSON string is invalid with respect to CollectionEntityIdentifier + */ + public static CollectionEntityIdentifier fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CollectionEntityIdentifier.class); + } + + /** + * Convert an instance of CollectionEntityIdentifier to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionMetadataInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionMetadataInput.java new file mode 100644 index 000000000..3acf06dbd --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionMetadataInput.java @@ -0,0 +1,411 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Input type for metadata to be added to a collection. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CollectionMetadataInput implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of metadata object. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + LIVEBOARD("LIVEBOARD"), + + ANSWER("ANSWER"), + + LOGICAL_TABLE("LOGICAL_TABLE"), + + COLLECTION("COLLECTION"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_IDENTIFIERS = "identifiers"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIERS) + @javax.annotation.Nonnull + private List identifiers; + + public CollectionMetadataInput() {} + + public CollectionMetadataInput type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of metadata object. + * + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public CollectionMetadataInput identifiers(@javax.annotation.Nonnull List identifiers) { + this.identifiers = identifiers; + return this; + } + + public CollectionMetadataInput addIdentifiersItem(String identifiersItem) { + if (this.identifiers == null) { + this.identifiers = new ArrayList<>(); + } + this.identifiers.add(identifiersItem); + return this; + } + + /** + * List of unique IDs or names of metadata objects. + * + * @return identifiers + */ + @javax.annotation.Nonnull + public List getIdentifiers() { + return identifiers; + } + + public void setIdentifiers(@javax.annotation.Nonnull List identifiers) { + this.identifiers = identifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CollectionMetadataInput instance itself + */ + public CollectionMetadataInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionMetadataInput collectionMetadataInput = (CollectionMetadataInput) o; + return Objects.equals(this.type, collectionMetadataInput.type) + && Objects.equals(this.identifiers, collectionMetadataInput.identifiers) + && Objects.equals( + this.additionalProperties, collectionMetadataInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionMetadataInput {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifiers: ").append(toIndentedString(identifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CollectionMetadataInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CollectionMetadataInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CollectionMetadataInput is not found" + + " in the empty JSON string", + CollectionMetadataInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CollectionMetadataInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + // ensure the required json array is present + if (jsonObj.get("identifiers") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifiers` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CollectionMetadataInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CollectionMetadataInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CollectionMetadataInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CollectionMetadataInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CollectionMetadataInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CollectionMetadataInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CollectionMetadataInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of CollectionMetadataInput + * @throws IOException if the JSON string is invalid with respect to CollectionMetadataInput + */ + public static CollectionMetadataInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CollectionMetadataInput.class); + } + + /** + * Convert an instance of CollectionMetadataInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionMetadataItem.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionMetadataItem.java new file mode 100644 index 000000000..2dc232adb --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionMetadataItem.java @@ -0,0 +1,369 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Metadata item in a collection response. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CollectionMetadataItem implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public static final String SERIALIZED_NAME_IDENTIFIERS = "identifiers"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIERS) + @javax.annotation.Nullable + private List identifiers; + + public CollectionMetadataItem() {} + + public CollectionMetadataItem type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Type of the metadata object. + * + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + public CollectionMetadataItem identifiers( + @javax.annotation.Nullable List identifiers) { + this.identifiers = identifiers; + return this; + } + + public CollectionMetadataItem addIdentifiersItem(CollectionEntityIdentifier identifiersItem) { + if (this.identifiers == null) { + this.identifiers = new ArrayList<>(); + } + this.identifiers.add(identifiersItem); + return this; + } + + /** + * List of identifiers for this metadata type. + * + * @return identifiers + */ + @javax.annotation.Nullable + public List getIdentifiers() { + return identifiers; + } + + public void setIdentifiers( + @javax.annotation.Nullable List identifiers) { + this.identifiers = identifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CollectionMetadataItem instance itself + */ + public CollectionMetadataItem putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionMetadataItem collectionMetadataItem = (CollectionMetadataItem) o; + return Objects.equals(this.type, collectionMetadataItem.type) + && Objects.equals(this.identifiers, collectionMetadataItem.identifiers) + && Objects.equals( + this.additionalProperties, collectionMetadataItem.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, identifiers, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionMetadataItem {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" identifiers: ").append(toIndentedString(identifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CollectionMetadataItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CollectionMetadataItem.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CollectionMetadataItem is not found" + + " in the empty JSON string", + CollectionMetadataItem.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) + && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + if (jsonObj.get("identifiers") != null && !jsonObj.get("identifiers").isJsonNull()) { + JsonArray jsonArrayidentifiers = jsonObj.getAsJsonArray("identifiers"); + if (jsonArrayidentifiers != null) { + // ensure the json data is an array + if (!jsonObj.get("identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("identifiers").toString())); + } + + // validate the optional field `identifiers` (array) + for (int i = 0; i < jsonArrayidentifiers.size(); i++) { + CollectionEntityIdentifier.validateJsonElement(jsonArrayidentifiers.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CollectionMetadataItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CollectionMetadataItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CollectionMetadataItem.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CollectionMetadataItem value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CollectionMetadataItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CollectionMetadataItem instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CollectionMetadataItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of CollectionMetadataItem + * @throws IOException if the JSON string is invalid with respect to CollectionMetadataItem + */ + public static CollectionMetadataItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CollectionMetadataItem.class); + } + + /** + * Convert an instance of CollectionMetadataItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionSearchResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionSearchResponse.java new file mode 100644 index 000000000..c8b92cd58 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CollectionSearchResponse.java @@ -0,0 +1,453 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Response object for search collections operation. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CollectionSearchResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COLLECTIONS = "collections"; + + @SerializedName(SERIALIZED_NAME_COLLECTIONS) + @javax.annotation.Nonnull + private List collections; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize; + + public static final String SERIALIZED_NAME_IS_LAST_BATCH = "is_last_batch"; + + @SerializedName(SERIALIZED_NAME_IS_LAST_BATCH) + @javax.annotation.Nullable + private Boolean isLastBatch; + + public static final String SERIALIZED_NAME_COUNT = "count"; + + @SerializedName(SERIALIZED_NAME_COUNT) + @javax.annotation.Nullable + private Integer count; + + public CollectionSearchResponse() {} + + public CollectionSearchResponse collections( + @javax.annotation.Nonnull List collections) { + this.collections = collections; + return this; + } + + public CollectionSearchResponse addCollectionsItem(Collection collectionsItem) { + if (this.collections == null) { + this.collections = new ArrayList<>(); + } + this.collections.add(collectionsItem); + return this; + } + + /** + * List of collections matching the search criteria. + * + * @return collections + */ + @javax.annotation.Nonnull + public List getCollections() { + return collections; + } + + public void setCollections(@javax.annotation.Nonnull List collections) { + this.collections = collections; + } + + public CollectionSearchResponse recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records are included. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public CollectionSearchResponse recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records returned. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public CollectionSearchResponse isLastBatch(@javax.annotation.Nullable Boolean isLastBatch) { + this.isLastBatch = isLastBatch; + return this; + } + + /** + * Indicates if this is the last batch of results. + * + * @return isLastBatch + */ + @javax.annotation.Nullable + public Boolean getIsLastBatch() { + return isLastBatch; + } + + public void setIsLastBatch(@javax.annotation.Nullable Boolean isLastBatch) { + this.isLastBatch = isLastBatch; + } + + public CollectionSearchResponse count(@javax.annotation.Nullable Integer count) { + this.count = count; + return this; + } + + /** + * Total count of records returned. + * + * @return count + */ + @javax.annotation.Nullable + public Integer getCount() { + return count; + } + + public void setCount(@javax.annotation.Nullable Integer count) { + this.count = count; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CollectionSearchResponse instance itself + */ + public CollectionSearchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionSearchResponse collectionSearchResponse = (CollectionSearchResponse) o; + return Objects.equals(this.collections, collectionSearchResponse.collections) + && Objects.equals(this.recordOffset, collectionSearchResponse.recordOffset) + && Objects.equals(this.recordSize, collectionSearchResponse.recordSize) + && Objects.equals(this.isLastBatch, collectionSearchResponse.isLastBatch) + && Objects.equals(this.count, collectionSearchResponse.count) + && Objects.equals( + this.additionalProperties, collectionSearchResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + collections, recordOffset, recordSize, isLastBatch, count, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionSearchResponse {\n"); + sb.append(" collections: ").append(toIndentedString(collections)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" isLastBatch: ").append(toIndentedString(isLastBatch)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("collections"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("is_last_batch"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("collections"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CollectionSearchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CollectionSearchResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CollectionSearchResponse is not found" + + " in the empty JSON string", + CollectionSearchResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CollectionSearchResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("collections").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `collections` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("collections").toString())); + } + + JsonArray jsonArraycollections = jsonObj.getAsJsonArray("collections"); + // validate the required field `collections` (array) + for (int i = 0; i < jsonArraycollections.size(); i++) { + Collection.validateJsonElement(jsonArraycollections.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CollectionSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CollectionSearchResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CollectionSearchResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CollectionSearchResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CollectionSearchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CollectionSearchResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CollectionSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CollectionSearchResponse + * @throws IOException if the JSON string is invalid with respect to CollectionSearchResponse + */ + public static CollectionSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CollectionSearchResponse.class); + } + + /** + * Convert an instance of CollectionSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CommunicationChannelValidateResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CommunicationChannelValidateResponse.java new file mode 100644 index 000000000..a467f72b5 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CommunicationChannelValidateResponse.java @@ -0,0 +1,742 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Response containing validation results for communication channel configuration. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CommunicationChannelValidateResponse implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of communication channel that was validated. */ + @JsonAdapter(ChannelTypeEnum.Adapter.class) + public enum ChannelTypeEnum { + WEBHOOK("WEBHOOK"); + + private String value; + + ChannelTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ChannelTypeEnum fromValue(String value) { + for (ChannelTypeEnum b : ChannelTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ChannelTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ChannelTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ChannelTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ChannelTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CHANNEL_TYPE = "channel_type"; + + @SerializedName(SERIALIZED_NAME_CHANNEL_TYPE) + @javax.annotation.Nonnull + private ChannelTypeEnum channelType; + + public static final String SERIALIZED_NAME_CHANNEL_ID = "channel_id"; + + @SerializedName(SERIALIZED_NAME_CHANNEL_ID) + @javax.annotation.Nonnull + private String channelId; + + public static final String SERIALIZED_NAME_CHANNEL_NAME = "channel_name"; + + @SerializedName(SERIALIZED_NAME_CHANNEL_NAME) + @javax.annotation.Nullable + private String channelName; + + /** Event type that was validated. */ + @JsonAdapter(EventTypeEnum.Adapter.class) + public enum EventTypeEnum { + LIVEBOARD_SCHEDULE("LIVEBOARD_SCHEDULE"); + + private String value; + + EventTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EventTypeEnum fromValue(String value) { + for (EventTypeEnum b : EventTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EventTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EventTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EventTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EventTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EVENT_TYPE = "event_type"; + + @SerializedName(SERIALIZED_NAME_EVENT_TYPE) + @javax.annotation.Nonnull + private EventTypeEnum eventType; + + public static final String SERIALIZED_NAME_JOB_ID = "job_id"; + + @SerializedName(SERIALIZED_NAME_JOB_ID) + @javax.annotation.Nonnull + private String jobId; + + /** Overall result of the validation. */ + @JsonAdapter(ResultCodeEnum.Adapter.class) + public enum ResultCodeEnum { + SUCCESS("SUCCESS"), + + FAILED("FAILED"), + + PARTIAL_SUCCESS("PARTIAL_SUCCESS"); + + private String value; + + ResultCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ResultCodeEnum fromValue(String value) { + for (ResultCodeEnum b : ResultCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ResultCodeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ResultCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ResultCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ResultCodeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_RESULT_CODE = "result_code"; + + @SerializedName(SERIALIZED_NAME_RESULT_CODE) + @javax.annotation.Nonnull + private ResultCodeEnum resultCode; + + public static final String SERIALIZED_NAME_DETAILS = "details"; + + @SerializedName(SERIALIZED_NAME_DETAILS) + @javax.annotation.Nullable + private List details; + + public CommunicationChannelValidateResponse() {} + + public CommunicationChannelValidateResponse channelType( + @javax.annotation.Nonnull ChannelTypeEnum channelType) { + this.channelType = channelType; + return this; + } + + /** + * Type of communication channel that was validated. + * + * @return channelType + */ + @javax.annotation.Nonnull + public ChannelTypeEnum getChannelType() { + return channelType; + } + + public void setChannelType(@javax.annotation.Nonnull ChannelTypeEnum channelType) { + this.channelType = channelType; + } + + public CommunicationChannelValidateResponse channelId( + @javax.annotation.Nonnull String channelId) { + this.channelId = channelId; + return this; + } + + /** + * ID of the communication channel (e.g., webhook_id). + * + * @return channelId + */ + @javax.annotation.Nonnull + public String getChannelId() { + return channelId; + } + + public void setChannelId(@javax.annotation.Nonnull String channelId) { + this.channelId = channelId; + } + + public CommunicationChannelValidateResponse channelName( + @javax.annotation.Nullable String channelName) { + this.channelName = channelName; + return this; + } + + /** + * Name of the communication channel (e.g., webhook name). + * + * @return channelName + */ + @javax.annotation.Nullable + public String getChannelName() { + return channelName; + } + + public void setChannelName(@javax.annotation.Nullable String channelName) { + this.channelName = channelName; + } + + public CommunicationChannelValidateResponse eventType( + @javax.annotation.Nonnull EventTypeEnum eventType) { + this.eventType = eventType; + return this; + } + + /** + * Event type that was validated. + * + * @return eventType + */ + @javax.annotation.Nonnull + public EventTypeEnum getEventType() { + return eventType; + } + + public void setEventType(@javax.annotation.Nonnull EventTypeEnum eventType) { + this.eventType = eventType; + } + + public CommunicationChannelValidateResponse jobId(@javax.annotation.Nonnull String jobId) { + this.jobId = jobId; + return this; + } + + /** + * Unique Job Id of the validation. + * + * @return jobId + */ + @javax.annotation.Nonnull + public String getJobId() { + return jobId; + } + + public void setJobId(@javax.annotation.Nonnull String jobId) { + this.jobId = jobId; + } + + public CommunicationChannelValidateResponse resultCode( + @javax.annotation.Nonnull ResultCodeEnum resultCode) { + this.resultCode = resultCode; + return this; + } + + /** + * Overall result of the validation. + * + * @return resultCode + */ + @javax.annotation.Nonnull + public ResultCodeEnum getResultCode() { + return resultCode; + } + + public void setResultCode(@javax.annotation.Nonnull ResultCodeEnum resultCode) { + this.resultCode = resultCode; + } + + public CommunicationChannelValidateResponse details( + @javax.annotation.Nullable List details) { + this.details = details; + return this; + } + + public CommunicationChannelValidateResponse addDetailsItem( + ChannelValidationDetail detailsItem) { + if (this.details == null) { + this.details = new ArrayList<>(); + } + this.details.add(detailsItem); + return this; + } + + /** + * Detailed results of various validation sub-steps. + * + * @return details + */ + @javax.annotation.Nullable + public List getDetails() { + return details; + } + + public void setDetails(@javax.annotation.Nullable List details) { + this.details = details; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CommunicationChannelValidateResponse instance itself + */ + public CommunicationChannelValidateResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommunicationChannelValidateResponse communicationChannelValidateResponse = + (CommunicationChannelValidateResponse) o; + return Objects.equals(this.channelType, communicationChannelValidateResponse.channelType) + && Objects.equals(this.channelId, communicationChannelValidateResponse.channelId) + && Objects.equals( + this.channelName, communicationChannelValidateResponse.channelName) + && Objects.equals(this.eventType, communicationChannelValidateResponse.eventType) + && Objects.equals(this.jobId, communicationChannelValidateResponse.jobId) + && Objects.equals(this.resultCode, communicationChannelValidateResponse.resultCode) + && Objects.equals(this.details, communicationChannelValidateResponse.details) + && Objects.equals( + this.additionalProperties, + communicationChannelValidateResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + channelType, + channelId, + channelName, + eventType, + jobId, + resultCode, + details, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommunicationChannelValidateResponse {\n"); + sb.append(" channelType: ").append(toIndentedString(channelType)).append("\n"); + sb.append(" channelId: ").append(toIndentedString(channelId)).append("\n"); + sb.append(" channelName: ").append(toIndentedString(channelName)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); + sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("channel_type"); + openapiFields.add("channel_id"); + openapiFields.add("channel_name"); + openapiFields.add("event_type"); + openapiFields.add("job_id"); + openapiFields.add("result_code"); + openapiFields.add("details"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("channel_type"); + openapiRequiredFields.add("channel_id"); + openapiRequiredFields.add("event_type"); + openapiRequiredFields.add("job_id"); + openapiRequiredFields.add("result_code"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * CommunicationChannelValidateResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CommunicationChannelValidateResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CommunicationChannelValidateResponse" + + " is not found in the empty JSON string", + CommunicationChannelValidateResponse.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CommunicationChannelValidateResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("channel_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channel_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("channel_type").toString())); + } + // validate the required field `channel_type` + ChannelTypeEnum.validateJsonElement(jsonObj.get("channel_type")); + if (!jsonObj.get("channel_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channel_id` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("channel_id").toString())); + } + if ((jsonObj.get("channel_name") != null && !jsonObj.get("channel_name").isJsonNull()) + && !jsonObj.get("channel_name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channel_name` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("channel_name").toString())); + } + if (!jsonObj.get("event_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `event_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("event_type").toString())); + } + // validate the required field `event_type` + EventTypeEnum.validateJsonElement(jsonObj.get("event_type")); + if (!jsonObj.get("job_id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `job_id` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("job_id").toString())); + } + if (!jsonObj.get("result_code").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `result_code` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("result_code").toString())); + } + // validate the required field `result_code` + ResultCodeEnum.validateJsonElement(jsonObj.get("result_code")); + if (jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) { + JsonArray jsonArraydetails = jsonObj.getAsJsonArray("details"); + if (jsonArraydetails != null) { + // ensure the json data is an array + if (!jsonObj.get("details").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `details` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("details").toString())); + } + + // validate the optional field `details` (array) + for (int i = 0; i < jsonArraydetails.size(); i++) { + ChannelValidationDetail.validateJsonElement(jsonArraydetails.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CommunicationChannelValidateResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CommunicationChannelValidateResponse' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(CommunicationChannelValidateResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, CommunicationChannelValidateResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CommunicationChannelValidateResponse read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CommunicationChannelValidateResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CommunicationChannelValidateResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CommunicationChannelValidateResponse + * @throws IOException if the JSON string is invalid with respect to + * CommunicationChannelValidateResponse + */ + public static CommunicationChannelValidateResponse fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, CommunicationChannelValidateResponse.class); + } + + /** + * Convert an instance of CommunicationChannelValidateResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCollectionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCollectionRequest.java new file mode 100644 index 000000000..72616a460 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateCollectionRequest.java @@ -0,0 +1,397 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** CreateCollectionRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class CreateCollectionRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; + + public CreateCollectionRequest() {} + + public CreateCollectionRequest name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Name of the collection. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public CreateCollectionRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the collection. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public CreateCollectionRequest metadata( + @javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public CreateCollectionRequest addMetadataItem(CollectionMetadataInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects to add to the collection. + * + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateCollectionRequest instance itself + */ + public CreateCollectionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCollectionRequest createCollectionRequest = (CreateCollectionRequest) o; + return Objects.equals(this.name, createCollectionRequest.name) + && Objects.equals(this.description, createCollectionRequest.description) + && Objects.equals(this.metadata, createCollectionRequest.metadata) + && Objects.equals( + this.additionalProperties, createCollectionRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, metadata, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCollectionRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("metadata"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateCollectionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateCollectionRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in CreateCollectionRequest is not found" + + " in the empty JSON string", + CreateCollectionRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateCollectionRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + CollectionMetadataInput.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCollectionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCollectionRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateCollectionRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCollectionRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateCollectionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateCollectionRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of CreateCollectionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateCollectionRequest + * @throws IOException if the JSON string is invalid with respect to CreateCollectionRequest + */ + public static CreateCollectionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCollectionRequest.class); + } + + /** + * Convert an instance of CreateCollectionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequest.java index e6597e002..da5f95e5d 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequest.java @@ -5,6 +5,7 @@ package com.thoughtspot.client.model; import com.google.gson.Gson; +import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; @@ -128,6 +129,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nullable private StorageDestinationInput storageDestination; + public static final String SERIALIZED_NAME_ADDITIONAL_HEADERS = "additional_headers"; + + @SerializedName(SERIALIZED_NAME_ADDITIONAL_HEADERS) + @javax.annotation.Nullable + private List additionalHeaders; + public CreateWebhookConfigurationRequest() {} public CreateWebhookConfigurationRequest name(@javax.annotation.Nonnull String name) { @@ -305,6 +312,38 @@ public void setStorageDestination( this.storageDestination = storageDestination; } + public CreateWebhookConfigurationRequest additionalHeaders( + @javax.annotation.Nullable List additionalHeaders) { + this.additionalHeaders = additionalHeaders; + return this; + } + + public CreateWebhookConfigurationRequest addAdditionalHeadersItem( + WebhookKeyValuePairInput additionalHeadersItem) { + if (this.additionalHeaders == null) { + this.additionalHeaders = new ArrayList<>(); + } + this.additionalHeaders.add(additionalHeadersItem); + return this; + } + + /** + * Additional headers as an array of key-value pairs. Example: [{\"key\": + * \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: + * 26.4.0.cl or later + * + * @return additionalHeaders + */ + @javax.annotation.Nullable + public List getAdditionalHeaders() { + return additionalHeaders; + } + + public void setAdditionalHeaders( + @javax.annotation.Nullable List additionalHeaders) { + this.additionalHeaders = additionalHeaders; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -372,6 +411,8 @@ public boolean equals(Object o) { && Objects.equals( this.storageDestination, createWebhookConfigurationRequest.storageDestination) + && Objects.equals( + this.additionalHeaders, createWebhookConfigurationRequest.additionalHeaders) && Objects.equals( this.additionalProperties, createWebhookConfigurationRequest.additionalProperties); @@ -388,6 +429,7 @@ public int hashCode() { authentication, signatureVerification, storageDestination, + additionalHeaders, additionalProperties); } @@ -407,6 +449,9 @@ public String toString() { sb.append(" storageDestination: ") .append(toIndentedString(storageDestination)) .append("\n"); + sb.append(" additionalHeaders: ") + .append(toIndentedString(additionalHeaders)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -439,6 +484,7 @@ private String toIndentedString(Object o) { openapiFields.add("authentication"); openapiFields.add("signature_verification"); openapiFields.add("storage_destination"); + openapiFields.add("additional_headers"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -526,6 +572,26 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti && !jsonObj.get("storage_destination").isJsonNull()) { StorageDestinationInput.validateJsonElement(jsonObj.get("storage_destination")); } + if (jsonObj.get("additional_headers") != null + && !jsonObj.get("additional_headers").isJsonNull()) { + JsonArray jsonArrayadditionalHeaders = jsonObj.getAsJsonArray("additional_headers"); + if (jsonArrayadditionalHeaders != null) { + // ensure the json data is an array + if (!jsonObj.get("additional_headers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `additional_headers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("additional_headers").toString())); + } + + // validate the optional field `additional_headers` (array) + for (int i = 0; i < jsonArrayadditionalHeaders.size(); i++) { + WebhookKeyValuePairInput.validateJsonElement(jsonArrayadditionalHeaders.get(i)); + } + ; + } + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteCollectionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteCollectionRequest.java new file mode 100644 index 000000000..3a442d29d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteCollectionRequest.java @@ -0,0 +1,399 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** DeleteCollectionRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DeleteCollectionRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_COLLECTION_IDENTIFIERS = "collection_identifiers"; + + @SerializedName(SERIALIZED_NAME_COLLECTION_IDENTIFIERS) + @javax.annotation.Nonnull + private List collectionIdentifiers; + + public static final String SERIALIZED_NAME_DELETE_CHILDREN = "delete_children"; + + @SerializedName(SERIALIZED_NAME_DELETE_CHILDREN) + @javax.annotation.Nullable + private Boolean deleteChildren = false; + + public static final String SERIALIZED_NAME_DRY_RUN = "dry_run"; + + @SerializedName(SERIALIZED_NAME_DRY_RUN) + @javax.annotation.Nullable + private Boolean dryRun = false; + + public DeleteCollectionRequest() {} + + public DeleteCollectionRequest collectionIdentifiers( + @javax.annotation.Nonnull List collectionIdentifiers) { + this.collectionIdentifiers = collectionIdentifiers; + return this; + } + + public DeleteCollectionRequest addCollectionIdentifiersItem(String collectionIdentifiersItem) { + if (this.collectionIdentifiers == null) { + this.collectionIdentifiers = new ArrayList<>(); + } + this.collectionIdentifiers.add(collectionIdentifiersItem); + return this; + } + + /** + * Unique GUIDs of collections to delete. Note: Collection names cannot be used as identifiers + * since duplicate names are allowed. + * + * @return collectionIdentifiers + */ + @javax.annotation.Nonnull + public List getCollectionIdentifiers() { + return collectionIdentifiers; + } + + public void setCollectionIdentifiers( + @javax.annotation.Nonnull List collectionIdentifiers) { + this.collectionIdentifiers = collectionIdentifiers; + } + + public DeleteCollectionRequest deleteChildren( + @javax.annotation.Nullable Boolean deleteChildren) { + this.deleteChildren = deleteChildren; + return this; + } + + /** + * Flag to delete child objects of the collection that the user has access to. + * + * @return deleteChildren + */ + @javax.annotation.Nullable + public Boolean getDeleteChildren() { + return deleteChildren; + } + + public void setDeleteChildren(@javax.annotation.Nullable Boolean deleteChildren) { + this.deleteChildren = deleteChildren; + } + + public DeleteCollectionRequest dryRun(@javax.annotation.Nullable Boolean dryRun) { + this.dryRun = dryRun; + return this; + } + + /** + * Preview deletion without actually deleting. When set to true, returns what would be deleted + * without performing the actual deletion. + * + * @return dryRun + */ + @javax.annotation.Nullable + public Boolean getDryRun() { + return dryRun; + } + + public void setDryRun(@javax.annotation.Nullable Boolean dryRun) { + this.dryRun = dryRun; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeleteCollectionRequest instance itself + */ + public DeleteCollectionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteCollectionRequest deleteCollectionRequest = (DeleteCollectionRequest) o; + return Objects.equals( + this.collectionIdentifiers, deleteCollectionRequest.collectionIdentifiers) + && Objects.equals(this.deleteChildren, deleteCollectionRequest.deleteChildren) + && Objects.equals(this.dryRun, deleteCollectionRequest.dryRun) + && Objects.equals( + this.additionalProperties, deleteCollectionRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(collectionIdentifiers, deleteChildren, dryRun, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteCollectionRequest {\n"); + sb.append(" collectionIdentifiers: ") + .append(toIndentedString(collectionIdentifiers)) + .append("\n"); + sb.append(" deleteChildren: ").append(toIndentedString(deleteChildren)).append("\n"); + sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("collection_identifiers"); + openapiFields.add("delete_children"); + openapiFields.add("dry_run"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("collection_identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteCollectionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteCollectionRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DeleteCollectionRequest is not found" + + " in the empty JSON string", + DeleteCollectionRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeleteCollectionRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("collection_identifiers") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("collection_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `collection_identifiers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("collection_identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteCollectionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteCollectionRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DeleteCollectionRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteCollectionRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DeleteCollectionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DeleteCollectionRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DeleteCollectionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteCollectionRequest + * @throws IOException if the JSON string is invalid with respect to DeleteCollectionRequest + */ + public static DeleteCollectionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteCollectionRequest.class); + } + + /** + * Convert an instance of DeleteCollectionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteVariablesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteVariablesRequest.java new file mode 100644 index 000000000..4d762bbb0 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/DeleteVariablesRequest.java @@ -0,0 +1,316 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** DeleteVariablesRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class DeleteVariablesRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_IDENTIFIERS = "identifiers"; + + @SerializedName(SERIALIZED_NAME_IDENTIFIERS) + @javax.annotation.Nonnull + private List identifiers; + + public DeleteVariablesRequest() {} + + public DeleteVariablesRequest identifiers(@javax.annotation.Nonnull List identifiers) { + this.identifiers = identifiers; + return this; + } + + public DeleteVariablesRequest addIdentifiersItem(String identifiersItem) { + if (this.identifiers == null) { + this.identifiers = new ArrayList<>(); + } + this.identifiers.add(identifiersItem); + return this; + } + + /** + * Unique id(s) or name(s) of the variable(s) to delete + * + * @return identifiers + */ + @javax.annotation.Nonnull + public List getIdentifiers() { + return identifiers; + } + + public void setIdentifiers(@javax.annotation.Nonnull List identifiers) { + this.identifiers = identifiers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeleteVariablesRequest instance itself + */ + public DeleteVariablesRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteVariablesRequest deleteVariablesRequest = (DeleteVariablesRequest) o; + return Objects.equals(this.identifiers, deleteVariablesRequest.identifiers) + && Objects.equals( + this.additionalProperties, deleteVariablesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(identifiers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteVariablesRequest {\n"); + sb.append(" identifiers: ").append(toIndentedString(identifiers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifiers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("identifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DeleteVariablesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DeleteVariablesRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in DeleteVariablesRequest is not found" + + " in the empty JSON string", + DeleteVariablesRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeleteVariablesRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("identifiers") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `identifiers` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("identifiers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeleteVariablesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeleteVariablesRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DeleteVariablesRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DeleteVariablesRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DeleteVariablesRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DeleteVariablesRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of DeleteVariablesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeleteVariablesRequest + * @throws IOException if the JSON string is invalid with respect to DeleteVariablesRequest + */ + public static DeleteVariablesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeleteVariablesRequest.class); + } + + /** + * Convert an instance of DeleteVariablesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportOptions.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportOptions.java index 7a1dd5c4c..e8864127e 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ExportOptions.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ExportOptions.java @@ -50,7 +50,7 @@ public class ExportOptions implements Serializable { @SerializedName(SERIALIZED_NAME_INCLUDE_OBJ_ID) @javax.annotation.Nullable - private Boolean includeObjId = false; + private Boolean includeObjId = true; public static final String SERIALIZED_NAME_EXPORT_WITH_ASSOCIATED_FEEDBACKS = "export_with_associated_feedbacks"; diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/JobRecipient.java b/sdks/java/src/main/java/com/thoughtspot/client/model/JobRecipient.java new file mode 100644 index 000000000..a56d3b00d --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/JobRecipient.java @@ -0,0 +1,480 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** A recipient (user, group, or external) for a job execution. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class JobRecipient implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of the recipient. */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + USER("USER"), + + EXTERNAL("EXTERNAL"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + + @SerializedName(SERIALIZED_NAME_EMAIL) + @javax.annotation.Nullable + private String email; + + public JobRecipient() {} + + public JobRecipient type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the recipient. + * + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public JobRecipient id(@javax.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique ID of the recipient. + * + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@javax.annotation.Nullable String id) { + this.id = id; + } + + public JobRecipient name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the recipient. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public JobRecipient email(@javax.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Email of the recipient. + * + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(@javax.annotation.Nullable String email) { + this.email = email; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the JobRecipient instance itself + */ + public JobRecipient putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JobRecipient jobRecipient = (JobRecipient) o; + return Objects.equals(this.type, jobRecipient.type) + && Objects.equals(this.id, jobRecipient.id) + && Objects.equals(this.name, jobRecipient.name) + && Objects.equals(this.email, jobRecipient.email) + && Objects.equals(this.additionalProperties, jobRecipient.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, id, name, email, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JobRecipient {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JobRecipient + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JobRecipient.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in JobRecipient is not found in the" + + " empty JSON string", + JobRecipient.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : JobRecipient.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `type` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) + && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `email` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JobRecipient.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JobRecipient' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(JobRecipient.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, JobRecipient value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public JobRecipient read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + JobRecipient instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of JobRecipient given an JSON string + * + * @param jsonString JSON string + * @return An instance of JobRecipient + * @throws IOException if the JSON string is invalid with respect to JobRecipient + */ + public static JobRecipient fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, JobRecipient.class); + } + + /** + * Convert an instance of JobRecipient to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterizeMetadataFieldsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterizeMetadataFieldsRequest.java new file mode 100644 index 000000000..d9c8e1e3a --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ParameterizeMetadataFieldsRequest.java @@ -0,0 +1,599 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ParameterizeMetadataFieldsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ParameterizeMetadataFieldsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of metadata object to parameterize. */ + @JsonAdapter(MetadataTypeEnum.Adapter.class) + public enum MetadataTypeEnum { + LOGICAL_TABLE("LOGICAL_TABLE"), + + CONNECTION("CONNECTION"), + + CONNECTION_CONFIG("CONNECTION_CONFIG"); + + private String value; + + MetadataTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetadataTypeEnum fromValue(String value) { + for (MetadataTypeEnum b : MetadataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetadataTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetadataTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetadataTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MetadataTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_METADATA_TYPE = "metadata_type"; + + @SerializedName(SERIALIZED_NAME_METADATA_TYPE) + @javax.annotation.Nullable + private MetadataTypeEnum metadataType; + + public static final String SERIALIZED_NAME_METADATA_IDENTIFIER = "metadata_identifier"; + + @SerializedName(SERIALIZED_NAME_METADATA_IDENTIFIER) + @javax.annotation.Nonnull + private String metadataIdentifier; + + /** Type of field in the metadata to parameterize. */ + @JsonAdapter(FieldTypeEnum.Adapter.class) + public enum FieldTypeEnum { + ATTRIBUTE("ATTRIBUTE"), + + CONNECTION_PROPERTY("CONNECTION_PROPERTY"); + + private String value; + + FieldTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FieldTypeEnum fromValue(String value) { + for (FieldTypeEnum b : FieldTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FieldTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FieldTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FieldTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FieldTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FIELD_TYPE = "field_type"; + + @SerializedName(SERIALIZED_NAME_FIELD_TYPE) + @javax.annotation.Nonnull + private FieldTypeEnum fieldType; + + public static final String SERIALIZED_NAME_FIELD_NAMES = "field_names"; + + @SerializedName(SERIALIZED_NAME_FIELD_NAMES) + @javax.annotation.Nonnull + private List fieldNames; + + public static final String SERIALIZED_NAME_VARIABLE_IDENTIFIER = "variable_identifier"; + + @SerializedName(SERIALIZED_NAME_VARIABLE_IDENTIFIER) + @javax.annotation.Nonnull + private String variableIdentifier; + + public ParameterizeMetadataFieldsRequest() {} + + public ParameterizeMetadataFieldsRequest metadataType( + @javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + return this; + } + + /** + * Type of metadata object to parameterize. + * + * @return metadataType + */ + @javax.annotation.Nullable + public MetadataTypeEnum getMetadataType() { + return metadataType; + } + + public void setMetadataType(@javax.annotation.Nullable MetadataTypeEnum metadataType) { + this.metadataType = metadataType; + } + + public ParameterizeMetadataFieldsRequest metadataIdentifier( + @javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + return this; + } + + /** + * Unique ID or name of the metadata object to parameterize. + * + * @return metadataIdentifier + */ + @javax.annotation.Nonnull + public String getMetadataIdentifier() { + return metadataIdentifier; + } + + public void setMetadataIdentifier(@javax.annotation.Nonnull String metadataIdentifier) { + this.metadataIdentifier = metadataIdentifier; + } + + public ParameterizeMetadataFieldsRequest fieldType( + @javax.annotation.Nonnull FieldTypeEnum fieldType) { + this.fieldType = fieldType; + return this; + } + + /** + * Type of field in the metadata to parameterize. + * + * @return fieldType + */ + @javax.annotation.Nonnull + public FieldTypeEnum getFieldType() { + return fieldType; + } + + public void setFieldType(@javax.annotation.Nonnull FieldTypeEnum fieldType) { + this.fieldType = fieldType; + } + + public ParameterizeMetadataFieldsRequest fieldNames( + @javax.annotation.Nonnull List fieldNames) { + this.fieldNames = fieldNames; + return this; + } + + public ParameterizeMetadataFieldsRequest addFieldNamesItem(String fieldNamesItem) { + if (this.fieldNames == null) { + this.fieldNames = new ArrayList<>(); + } + this.fieldNames.add(fieldNamesItem); + return this; + } + + /** + * JSON array of field names to parameterize. Example: [schemaName, databaseName, tableName] + * + * @return fieldNames + */ + @javax.annotation.Nonnull + public List getFieldNames() { + return fieldNames; + } + + public void setFieldNames(@javax.annotation.Nonnull List fieldNames) { + this.fieldNames = fieldNames; + } + + public ParameterizeMetadataFieldsRequest variableIdentifier( + @javax.annotation.Nonnull String variableIdentifier) { + this.variableIdentifier = variableIdentifier; + return this; + } + + /** + * Unique ID or name of the variable to use for parameterization of these fields. + * + * @return variableIdentifier + */ + @javax.annotation.Nonnull + public String getVariableIdentifier() { + return variableIdentifier; + } + + public void setVariableIdentifier(@javax.annotation.Nonnull String variableIdentifier) { + this.variableIdentifier = variableIdentifier; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ParameterizeMetadataFieldsRequest instance itself + */ + public ParameterizeMetadataFieldsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest = + (ParameterizeMetadataFieldsRequest) o; + return Objects.equals(this.metadataType, parameterizeMetadataFieldsRequest.metadataType) + && Objects.equals( + this.metadataIdentifier, + parameterizeMetadataFieldsRequest.metadataIdentifier) + && Objects.equals(this.fieldType, parameterizeMetadataFieldsRequest.fieldType) + && Objects.equals(this.fieldNames, parameterizeMetadataFieldsRequest.fieldNames) + && Objects.equals( + this.variableIdentifier, + parameterizeMetadataFieldsRequest.variableIdentifier) + && Objects.equals( + this.additionalProperties, + parameterizeMetadataFieldsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + metadataType, + metadataIdentifier, + fieldType, + fieldNames, + variableIdentifier, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParameterizeMetadataFieldsRequest {\n"); + sb.append(" metadataType: ").append(toIndentedString(metadataType)).append("\n"); + sb.append(" metadataIdentifier: ") + .append(toIndentedString(metadataIdentifier)) + .append("\n"); + sb.append(" fieldType: ").append(toIndentedString(fieldType)).append("\n"); + sb.append(" fieldNames: ").append(toIndentedString(fieldNames)).append("\n"); + sb.append(" variableIdentifier: ") + .append(toIndentedString(variableIdentifier)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata_type"); + openapiFields.add("metadata_identifier"); + openapiFields.add("field_type"); + openapiFields.add("field_names"); + openapiFields.add("variable_identifier"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata_identifier"); + openapiRequiredFields.add("field_type"); + openapiRequiredFields.add("field_names"); + openapiRequiredFields.add("variable_identifier"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ParameterizeMetadataFieldsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ParameterizeMetadataFieldsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ParameterizeMetadataFieldsRequest is" + + " not found in the empty JSON string", + ParameterizeMetadataFieldsRequest.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ParameterizeMetadataFieldsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) + && !jsonObj.get("metadata_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("metadata_type").toString())); + } + // validate the optional field `metadata_type` + if (jsonObj.get("metadata_type") != null && !jsonObj.get("metadata_type").isJsonNull()) { + MetadataTypeEnum.validateJsonElement(jsonObj.get("metadata_type")); + } + if (!jsonObj.get("metadata_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("metadata_identifier").toString())); + } + if (!jsonObj.get("field_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `field_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("field_type").toString())); + } + // validate the required field `field_type` + FieldTypeEnum.validateJsonElement(jsonObj.get("field_type")); + // ensure the required json array is present + if (jsonObj.get("field_names") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("field_names").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `field_names` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("field_names").toString())); + } + if (!jsonObj.get("variable_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `variable_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("variable_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ParameterizeMetadataFieldsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ParameterizeMetadataFieldsRequest' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ParameterizeMetadataFieldsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ParameterizeMetadataFieldsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ParameterizeMetadataFieldsRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ParameterizeMetadataFieldsRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ParameterizeMetadataFieldsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ParameterizeMetadataFieldsRequest + * @throws IOException if the JSON string is invalid with respect to + * ParameterizeMetadataFieldsRequest + */ + public static ParameterizeMetadataFieldsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ParameterizeMetadataFieldsRequest.class); + } + + /** + * Convert an instance of ParameterizeMetadataFieldsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/PutVariableValuesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/PutVariableValuesRequest.java new file mode 100644 index 000000000..33af3d3ed --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/PutVariableValuesRequest.java @@ -0,0 +1,423 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** PutVariableValuesRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class PutVariableValuesRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** Operation to perform */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + ADD("ADD"), + + REMOVE("REMOVE"), + + REPLACE("REPLACE"), + + RESET("RESET"); + + private String value; + + OperationEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperationEnum fromValue(String value) { + for (OperationEnum b : OperationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperationEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperationEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nullable + private OperationEnum operation; + + public static final String SERIALIZED_NAME_VARIABLE_ASSIGNMENT = "variable_assignment"; + + @SerializedName(SERIALIZED_NAME_VARIABLE_ASSIGNMENT) + @javax.annotation.Nonnull + private List variableAssignment; + + public PutVariableValuesRequest() {} + + public PutVariableValuesRequest operation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * Operation to perform + * + * @return operation + */ + @javax.annotation.Nullable + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + } + + public PutVariableValuesRequest variableAssignment( + @javax.annotation.Nonnull List variableAssignment) { + this.variableAssignment = variableAssignment; + return this; + } + + public PutVariableValuesRequest addVariableAssignmentItem( + VariablePutAssignmentInput variableAssignmentItem) { + if (this.variableAssignment == null) { + this.variableAssignment = new ArrayList<>(); + } + this.variableAssignment.add(variableAssignmentItem); + return this; + } + + /** + * Variable assignments + * + * @return variableAssignment + */ + @javax.annotation.Nonnull + public List getVariableAssignment() { + return variableAssignment; + } + + public void setVariableAssignment( + @javax.annotation.Nonnull List variableAssignment) { + this.variableAssignment = variableAssignment; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PutVariableValuesRequest instance itself + */ + public PutVariableValuesRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PutVariableValuesRequest putVariableValuesRequest = (PutVariableValuesRequest) o; + return Objects.equals(this.operation, putVariableValuesRequest.operation) + && Objects.equals( + this.variableAssignment, putVariableValuesRequest.variableAssignment) + && Objects.equals( + this.additionalProperties, putVariableValuesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(operation, variableAssignment, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PutVariableValuesRequest {\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" variableAssignment: ") + .append(toIndentedString(variableAssignment)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("operation"); + openapiFields.add("variable_assignment"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("variable_assignment"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PutVariableValuesRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PutVariableValuesRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PutVariableValuesRequest is not found" + + " in the empty JSON string", + PutVariableValuesRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PutVariableValuesRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) + && !jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `operation` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("operation").toString())); + } + // validate the optional field `operation` + if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { + OperationEnum.validateJsonElement(jsonObj.get("operation")); + } + // ensure the json data is an array + if (!jsonObj.get("variable_assignment").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `variable_assignment` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("variable_assignment").toString())); + } + + JsonArray jsonArrayvariableAssignment = jsonObj.getAsJsonArray("variable_assignment"); + // validate the required field `variable_assignment` (array) + for (int i = 0; i < jsonArrayvariableAssignment.size(); i++) { + VariablePutAssignmentInput.validateJsonElement(jsonArrayvariableAssignment.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PutVariableValuesRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PutVariableValuesRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PutVariableValuesRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PutVariableValuesRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PutVariableValuesRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PutVariableValuesRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of PutVariableValuesRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of PutVariableValuesRequest + * @throws IOException if the JSON string is invalid with respect to PutVariableValuesRequest + */ + public static PutVariableValuesRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PutVariableValuesRequest.class); + } + + /** + * Convert an instance of PutVariableValuesRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchChannelHistoryRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchChannelHistoryRequest.java new file mode 100644 index 000000000..e4c9bd3e3 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchChannelHistoryRequest.java @@ -0,0 +1,650 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** SearchChannelHistoryRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchChannelHistoryRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of communication channel to search history for. */ + @JsonAdapter(ChannelTypeEnum.Adapter.class) + public enum ChannelTypeEnum { + WEBHOOK("WEBHOOK"); + + private String value; + + ChannelTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ChannelTypeEnum fromValue(String value) { + for (ChannelTypeEnum b : ChannelTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ChannelTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ChannelTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ChannelTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ChannelTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CHANNEL_TYPE = "channel_type"; + + @SerializedName(SERIALIZED_NAME_CHANNEL_TYPE) + @javax.annotation.Nonnull + private ChannelTypeEnum channelType; + + public static final String SERIALIZED_NAME_JOB_IDS = "job_ids"; + + @SerializedName(SERIALIZED_NAME_JOB_IDS) + @javax.annotation.Nullable + private List jobIds; + + public static final String SERIALIZED_NAME_CHANNEL_IDENTIFIERS = "channel_identifiers"; + + @SerializedName(SERIALIZED_NAME_CHANNEL_IDENTIFIERS) + @javax.annotation.Nullable + private List channelIdentifiers; + + /** Filter by channel delivery status. */ + @JsonAdapter(ChannelStatusEnum.Adapter.class) + public enum ChannelStatusEnum { + PENDING("PENDING"), + + RETRY("RETRY"), + + SUCCESS("SUCCESS"), + + FAILED("FAILED"); + + private String value; + + ChannelStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ChannelStatusEnum fromValue(String value) { + for (ChannelStatusEnum b : ChannelStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ChannelStatusEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ChannelStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ChannelStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ChannelStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CHANNEL_STATUS = "channel_status"; + + @SerializedName(SERIALIZED_NAME_CHANNEL_STATUS) + @javax.annotation.Nullable + private ChannelStatusEnum channelStatus; + + public static final String SERIALIZED_NAME_EVENTS = "events"; + + @SerializedName(SERIALIZED_NAME_EVENTS) + @javax.annotation.Nullable + private List events; + + public static final String SERIALIZED_NAME_START_EPOCH_TIME_IN_MILLIS = + "start_epoch_time_in_millis"; + + @SerializedName(SERIALIZED_NAME_START_EPOCH_TIME_IN_MILLIS) + @javax.annotation.Nullable + private Float startEpochTimeInMillis; + + public SearchChannelHistoryRequest() {} + + public SearchChannelHistoryRequest channelType( + @javax.annotation.Nonnull ChannelTypeEnum channelType) { + this.channelType = channelType; + return this; + } + + /** + * Type of communication channel to search history for. + * + * @return channelType + */ + @javax.annotation.Nonnull + public ChannelTypeEnum getChannelType() { + return channelType; + } + + public void setChannelType(@javax.annotation.Nonnull ChannelTypeEnum channelType) { + this.channelType = channelType; + } + + public SearchChannelHistoryRequest jobIds(@javax.annotation.Nullable List jobIds) { + this.jobIds = jobIds; + return this; + } + + public SearchChannelHistoryRequest addJobIdsItem(String jobIdsItem) { + if (this.jobIds == null) { + this.jobIds = new ArrayList<>(); + } + this.jobIds.add(jobIdsItem); + return this; + } + + /** + * List of job execution record IDs to retrieve. + * + * @return jobIds + */ + @javax.annotation.Nullable + public List getJobIds() { + return jobIds; + } + + public void setJobIds(@javax.annotation.Nullable List jobIds) { + this.jobIds = jobIds; + } + + public SearchChannelHistoryRequest channelIdentifiers( + @javax.annotation.Nullable List channelIdentifiers) { + this.channelIdentifiers = channelIdentifiers; + return this; + } + + public SearchChannelHistoryRequest addChannelIdentifiersItem(String channelIdentifiersItem) { + if (this.channelIdentifiers == null) { + this.channelIdentifiers = new ArrayList<>(); + } + this.channelIdentifiers.add(channelIdentifiersItem); + return this; + } + + /** + * List of channel IDs or names to filter by. + * + * @return channelIdentifiers + */ + @javax.annotation.Nullable + public List getChannelIdentifiers() { + return channelIdentifiers; + } + + public void setChannelIdentifiers(@javax.annotation.Nullable List channelIdentifiers) { + this.channelIdentifiers = channelIdentifiers; + } + + public SearchChannelHistoryRequest channelStatus( + @javax.annotation.Nullable ChannelStatusEnum channelStatus) { + this.channelStatus = channelStatus; + return this; + } + + /** + * Filter by channel delivery status. + * + * @return channelStatus + */ + @javax.annotation.Nullable + public ChannelStatusEnum getChannelStatus() { + return channelStatus; + } + + public void setChannelStatus(@javax.annotation.Nullable ChannelStatusEnum channelStatus) { + this.channelStatus = channelStatus; + } + + public SearchChannelHistoryRequest events( + @javax.annotation.Nullable List events) { + this.events = events; + return this; + } + + public SearchChannelHistoryRequest addEventsItem(ChannelHistoryEventInput eventsItem) { + if (this.events == null) { + this.events = new ArrayList<>(); + } + this.events.add(eventsItem); + return this; + } + + /** + * Filter by events that triggered the channel. + * + * @return events + */ + @javax.annotation.Nullable + public List getEvents() { + return events; + } + + public void setEvents(@javax.annotation.Nullable List events) { + this.events = events; + } + + public SearchChannelHistoryRequest startEpochTimeInMillis( + @javax.annotation.Nullable Float startEpochTimeInMillis) { + this.startEpochTimeInMillis = startEpochTimeInMillis; + return this; + } + + /** + * Filter records created on or after this time (epoch milliseconds). + * + * @return startEpochTimeInMillis + */ + @javax.annotation.Nullable + public Float getStartEpochTimeInMillis() { + return startEpochTimeInMillis; + } + + public void setStartEpochTimeInMillis(@javax.annotation.Nullable Float startEpochTimeInMillis) { + this.startEpochTimeInMillis = startEpochTimeInMillis; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchChannelHistoryRequest instance itself + */ + public SearchChannelHistoryRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchChannelHistoryRequest searchChannelHistoryRequest = (SearchChannelHistoryRequest) o; + return Objects.equals(this.channelType, searchChannelHistoryRequest.channelType) + && Objects.equals(this.jobIds, searchChannelHistoryRequest.jobIds) + && Objects.equals( + this.channelIdentifiers, searchChannelHistoryRequest.channelIdentifiers) + && Objects.equals(this.channelStatus, searchChannelHistoryRequest.channelStatus) + && Objects.equals(this.events, searchChannelHistoryRequest.events) + && Objects.equals( + this.startEpochTimeInMillis, + searchChannelHistoryRequest.startEpochTimeInMillis) + && Objects.equals( + this.additionalProperties, + searchChannelHistoryRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + channelType, + jobIds, + channelIdentifiers, + channelStatus, + events, + startEpochTimeInMillis, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchChannelHistoryRequest {\n"); + sb.append(" channelType: ").append(toIndentedString(channelType)).append("\n"); + sb.append(" jobIds: ").append(toIndentedString(jobIds)).append("\n"); + sb.append(" channelIdentifiers: ") + .append(toIndentedString(channelIdentifiers)) + .append("\n"); + sb.append(" channelStatus: ").append(toIndentedString(channelStatus)).append("\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append(" startEpochTimeInMillis: ") + .append(toIndentedString(startEpochTimeInMillis)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("channel_type"); + openapiFields.add("job_ids"); + openapiFields.add("channel_identifiers"); + openapiFields.add("channel_status"); + openapiFields.add("events"); + openapiFields.add("start_epoch_time_in_millis"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("channel_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SearchChannelHistoryRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchChannelHistoryRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchChannelHistoryRequest is not" + + " found in the empty JSON string", + SearchChannelHistoryRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchChannelHistoryRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("channel_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channel_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("channel_type").toString())); + } + // validate the required field `channel_type` + ChannelTypeEnum.validateJsonElement(jsonObj.get("channel_type")); + // ensure the optional json data is an array if present + if (jsonObj.get("job_ids") != null + && !jsonObj.get("job_ids").isJsonNull() + && !jsonObj.get("job_ids").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `job_ids` to be an array in the JSON string but" + + " got `%s`", + jsonObj.get("job_ids").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("channel_identifiers") != null + && !jsonObj.get("channel_identifiers").isJsonNull() + && !jsonObj.get("channel_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channel_identifiers` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("channel_identifiers").toString())); + } + if ((jsonObj.get("channel_status") != null && !jsonObj.get("channel_status").isJsonNull()) + && !jsonObj.get("channel_status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channel_status` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("channel_status").toString())); + } + // validate the optional field `channel_status` + if (jsonObj.get("channel_status") != null && !jsonObj.get("channel_status").isJsonNull()) { + ChannelStatusEnum.validateJsonElement(jsonObj.get("channel_status")); + } + if (jsonObj.get("events") != null && !jsonObj.get("events").isJsonNull()) { + JsonArray jsonArrayevents = jsonObj.getAsJsonArray("events"); + if (jsonArrayevents != null) { + // ensure the json data is an array + if (!jsonObj.get("events").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `events` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("events").toString())); + } + + // validate the optional field `events` (array) + for (int i = 0; i < jsonArrayevents.size(); i++) { + ChannelHistoryEventInput.validateJsonElement(jsonArrayevents.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchChannelHistoryRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchChannelHistoryRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchChannelHistoryRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchChannelHistoryRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchChannelHistoryRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchChannelHistoryRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchChannelHistoryRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchChannelHistoryRequest + * @throws IOException if the JSON string is invalid with respect to SearchChannelHistoryRequest + */ + public static SearchChannelHistoryRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchChannelHistoryRequest.class); + } + + /** + * Convert an instance of SearchChannelHistoryRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchChannelHistoryResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchChannelHistoryResponse.java new file mode 100644 index 000000000..d53fba8cf --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchChannelHistoryResponse.java @@ -0,0 +1,328 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response wrapper for channel delivery history. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchChannelHistoryResponse implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_JOBS = "jobs"; + + @SerializedName(SERIALIZED_NAME_JOBS) + @javax.annotation.Nonnull + private List jobs; + + public SearchChannelHistoryResponse() {} + + public SearchChannelHistoryResponse jobs( + @javax.annotation.Nonnull List jobs) { + this.jobs = jobs; + return this; + } + + public SearchChannelHistoryResponse addJobsItem(ChannelHistoryJob jobsItem) { + if (this.jobs == null) { + this.jobs = new ArrayList<>(); + } + this.jobs.add(jobsItem); + return this; + } + + /** + * List of job execution records. + * + * @return jobs + */ + @javax.annotation.Nonnull + public List getJobs() { + return jobs; + } + + public void setJobs(@javax.annotation.Nonnull List jobs) { + this.jobs = jobs; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchChannelHistoryResponse instance itself + */ + public SearchChannelHistoryResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchChannelHistoryResponse searchChannelHistoryResponse = + (SearchChannelHistoryResponse) o; + return Objects.equals(this.jobs, searchChannelHistoryResponse.jobs) + && Objects.equals( + this.additionalProperties, + searchChannelHistoryResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(jobs, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchChannelHistoryResponse {\n"); + sb.append(" jobs: ").append(toIndentedString(jobs)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("jobs"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("jobs"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * SearchChannelHistoryResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchChannelHistoryResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchChannelHistoryResponse is not" + + " found in the empty JSON string", + SearchChannelHistoryResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SearchChannelHistoryResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("jobs").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `jobs` to be an array in the JSON string but got" + + " `%s`", + jsonObj.get("jobs").toString())); + } + + JsonArray jsonArrayjobs = jsonObj.getAsJsonArray("jobs"); + // validate the required field `jobs` (array) + for (int i = 0; i < jsonArrayjobs.size(); i++) { + ChannelHistoryJob.validateJsonElement(jsonArrayjobs.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchChannelHistoryResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchChannelHistoryResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(SearchChannelHistoryResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchChannelHistoryResponse value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchChannelHistoryResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchChannelHistoryResponse instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchChannelHistoryResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchChannelHistoryResponse + * @throws IOException if the JSON string is invalid with respect to + * SearchChannelHistoryResponse + */ + public static SearchChannelHistoryResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchChannelHistoryResponse.class); + } + + /** + * Convert an instance of SearchChannelHistoryResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCollectionsRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCollectionsRequest.java new file mode 100644 index 000000000..806d4ab4e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/SearchCollectionsRequest.java @@ -0,0 +1,546 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** SearchCollectionsRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class SearchCollectionsRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME_PATTERN = "name_pattern"; + + @SerializedName(SERIALIZED_NAME_NAME_PATTERN) + @javax.annotation.Nullable + private String namePattern; + + public static final String SERIALIZED_NAME_RECORD_OFFSET = "record_offset"; + + @SerializedName(SERIALIZED_NAME_RECORD_OFFSET) + @javax.annotation.Nullable + private Integer recordOffset = 0; + + public static final String SERIALIZED_NAME_RECORD_SIZE = "record_size"; + + @SerializedName(SERIALIZED_NAME_RECORD_SIZE) + @javax.annotation.Nullable + private Integer recordSize = 10; + + public static final String SERIALIZED_NAME_COLLECTION_IDENTIFIERS = "collection_identifiers"; + + @SerializedName(SERIALIZED_NAME_COLLECTION_IDENTIFIERS) + @javax.annotation.Nullable + private List collectionIdentifiers; + + public static final String SERIALIZED_NAME_CREATED_BY_USER_IDENTIFIERS = + "created_by_user_identifiers"; + + @SerializedName(SERIALIZED_NAME_CREATED_BY_USER_IDENTIFIERS) + @javax.annotation.Nullable + private List createdByUserIdentifiers; + + public static final String SERIALIZED_NAME_INCLUDE_METADATA = "include_metadata"; + + @SerializedName(SERIALIZED_NAME_INCLUDE_METADATA) + @javax.annotation.Nullable + private Boolean includeMetadata = false; + + public static final String SERIALIZED_NAME_SORT_OPTIONS = "sort_options"; + + @SerializedName(SERIALIZED_NAME_SORT_OPTIONS) + @javax.annotation.Nullable + private SortOptions sortOptions; + + public SearchCollectionsRequest() {} + + public SearchCollectionsRequest namePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + return this; + } + + /** + * A pattern to match case-insensitive name of the Collection object. Use '%' for + * wildcard match. + * + * @return namePattern + */ + @javax.annotation.Nullable + public String getNamePattern() { + return namePattern; + } + + public void setNamePattern(@javax.annotation.Nullable String namePattern) { + this.namePattern = namePattern; + } + + public SearchCollectionsRequest recordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + return this; + } + + /** + * The starting record number from where the records should be included. + * + * @return recordOffset + */ + @javax.annotation.Nullable + public Integer getRecordOffset() { + return recordOffset; + } + + public void setRecordOffset(@javax.annotation.Nullable Integer recordOffset) { + this.recordOffset = recordOffset; + } + + public SearchCollectionsRequest recordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + return this; + } + + /** + * The number of records that should be included. -1 implies no pagination. + * + * @return recordSize + */ + @javax.annotation.Nullable + public Integer getRecordSize() { + return recordSize; + } + + public void setRecordSize(@javax.annotation.Nullable Integer recordSize) { + this.recordSize = recordSize; + } + + public SearchCollectionsRequest collectionIdentifiers( + @javax.annotation.Nullable List collectionIdentifiers) { + this.collectionIdentifiers = collectionIdentifiers; + return this; + } + + public SearchCollectionsRequest addCollectionIdentifiersItem(String collectionIdentifiersItem) { + if (this.collectionIdentifiers == null) { + this.collectionIdentifiers = new ArrayList<>(); + } + this.collectionIdentifiers.add(collectionIdentifiersItem); + return this; + } + + /** + * Unique GUIDs of collections to search. Note: Collection names cannot be used as identifiers + * since duplicate names are allowed. + * + * @return collectionIdentifiers + */ + @javax.annotation.Nullable + public List getCollectionIdentifiers() { + return collectionIdentifiers; + } + + public void setCollectionIdentifiers( + @javax.annotation.Nullable List collectionIdentifiers) { + this.collectionIdentifiers = collectionIdentifiers; + } + + public SearchCollectionsRequest createdByUserIdentifiers( + @javax.annotation.Nullable List createdByUserIdentifiers) { + this.createdByUserIdentifiers = createdByUserIdentifiers; + return this; + } + + public SearchCollectionsRequest addCreatedByUserIdentifiersItem( + String createdByUserIdentifiersItem) { + if (this.createdByUserIdentifiers == null) { + this.createdByUserIdentifiers = new ArrayList<>(); + } + this.createdByUserIdentifiers.add(createdByUserIdentifiersItem); + return this; + } + + /** + * Filter collections by author. Provide unique IDs or names of users who created the + * collections. + * + * @return createdByUserIdentifiers + */ + @javax.annotation.Nullable + public List getCreatedByUserIdentifiers() { + return createdByUserIdentifiers; + } + + public void setCreatedByUserIdentifiers( + @javax.annotation.Nullable List createdByUserIdentifiers) { + this.createdByUserIdentifiers = createdByUserIdentifiers; + } + + public SearchCollectionsRequest includeMetadata( + @javax.annotation.Nullable Boolean includeMetadata) { + this.includeMetadata = includeMetadata; + return this; + } + + /** + * Include collection metadata items in the response. + * + * @return includeMetadata + */ + @javax.annotation.Nullable + public Boolean getIncludeMetadata() { + return includeMetadata; + } + + public void setIncludeMetadata(@javax.annotation.Nullable Boolean includeMetadata) { + this.includeMetadata = includeMetadata; + } + + public SearchCollectionsRequest sortOptions( + @javax.annotation.Nullable SortOptions sortOptions) { + this.sortOptions = sortOptions; + return this; + } + + /** + * Sort options. + * + * @return sortOptions + */ + @javax.annotation.Nullable + public SortOptions getSortOptions() { + return sortOptions; + } + + public void setSortOptions(@javax.annotation.Nullable SortOptions sortOptions) { + this.sortOptions = sortOptions; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SearchCollectionsRequest instance itself + */ + public SearchCollectionsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchCollectionsRequest searchCollectionsRequest = (SearchCollectionsRequest) o; + return Objects.equals(this.namePattern, searchCollectionsRequest.namePattern) + && Objects.equals(this.recordOffset, searchCollectionsRequest.recordOffset) + && Objects.equals(this.recordSize, searchCollectionsRequest.recordSize) + && Objects.equals( + this.collectionIdentifiers, searchCollectionsRequest.collectionIdentifiers) + && Objects.equals( + this.createdByUserIdentifiers, + searchCollectionsRequest.createdByUserIdentifiers) + && Objects.equals(this.includeMetadata, searchCollectionsRequest.includeMetadata) + && Objects.equals(this.sortOptions, searchCollectionsRequest.sortOptions) + && Objects.equals( + this.additionalProperties, searchCollectionsRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + namePattern, + recordOffset, + recordSize, + collectionIdentifiers, + createdByUserIdentifiers, + includeMetadata, + sortOptions, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchCollectionsRequest {\n"); + sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n"); + sb.append(" recordOffset: ").append(toIndentedString(recordOffset)).append("\n"); + sb.append(" recordSize: ").append(toIndentedString(recordSize)).append("\n"); + sb.append(" collectionIdentifiers: ") + .append(toIndentedString(collectionIdentifiers)) + .append("\n"); + sb.append(" createdByUserIdentifiers: ") + .append(toIndentedString(createdByUserIdentifiers)) + .append("\n"); + sb.append(" includeMetadata: ").append(toIndentedString(includeMetadata)).append("\n"); + sb.append(" sortOptions: ").append(toIndentedString(sortOptions)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name_pattern"); + openapiFields.add("record_offset"); + openapiFields.add("record_size"); + openapiFields.add("collection_identifiers"); + openapiFields.add("created_by_user_identifiers"); + openapiFields.add("include_metadata"); + openapiFields.add("sort_options"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SearchCollectionsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchCollectionsRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in SearchCollectionsRequest is not found" + + " in the empty JSON string", + SearchCollectionsRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name_pattern") != null && !jsonObj.get("name_pattern").isJsonNull()) + && !jsonObj.get("name_pattern").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name_pattern` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("name_pattern").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("collection_identifiers") != null + && !jsonObj.get("collection_identifiers").isJsonNull() + && !jsonObj.get("collection_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `collection_identifiers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("collection_identifiers").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("created_by_user_identifiers") != null + && !jsonObj.get("created_by_user_identifiers").isJsonNull() + && !jsonObj.get("created_by_user_identifiers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `created_by_user_identifiers` to be an array in" + + " the JSON string but got `%s`", + jsonObj.get("created_by_user_identifiers").toString())); + } + // validate the optional field `sort_options` + if (jsonObj.get("sort_options") != null && !jsonObj.get("sort_options").isJsonNull()) { + SortOptions.validateJsonElement(jsonObj.get("sort_options")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchCollectionsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchCollectionsRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(SearchCollectionsRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchCollectionsRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SearchCollectionsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SearchCollectionsRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of SearchCollectionsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchCollectionsRequest + * @throws IOException if the JSON string is invalid with respect to SearchCollectionsRequest + */ + public static SearchCollectionsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchCollectionsRequest.class); + } + + /** + * Convert an instance of SearchCollectionsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/TemplatePropertiesInputCreate.java b/sdks/java/src/main/java/com/thoughtspot/client/model/TemplatePropertiesInputCreate.java index 4c97c625b..3cf0e18cc 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/TemplatePropertiesInputCreate.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/TemplatePropertiesInputCreate.java @@ -201,6 +201,12 @@ public class TemplatePropertiesInputCreate implements Serializable { @javax.annotation.Nullable private Boolean hideContactSupportUrl; + public static final String SERIALIZED_NAME_HIDE_LOGO_URL = "hide_logo_url"; + + @SerializedName(SERIALIZED_NAME_HIDE_LOGO_URL) + @javax.annotation.Nullable + private Boolean hideLogoUrl; + public TemplatePropertiesInputCreate() {} public TemplatePropertiesInputCreate ctaButtonBgColor( @@ -747,6 +753,26 @@ public void setHideContactSupportUrl(@javax.annotation.Nullable Boolean hideCont this.hideContactSupportUrl = hideContactSupportUrl; } + public TemplatePropertiesInputCreate hideLogoUrl( + @javax.annotation.Nullable Boolean hideLogoUrl) { + this.hideLogoUrl = hideLogoUrl; + return this; + } + + /** + * Whether to hide logo Version: 26.4.0.cl or later + * + * @return hideLogoUrl + */ + @javax.annotation.Nullable + public Boolean getHideLogoUrl() { + return hideLogoUrl; + } + + public void setHideLogoUrl(@javax.annotation.Nullable Boolean hideLogoUrl) { + this.hideLogoUrl = hideLogoUrl; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -855,6 +881,7 @@ public boolean equals(Object o) { && Objects.equals( this.hideContactSupportUrl, templatePropertiesInputCreate.hideContactSupportUrl) + && Objects.equals(this.hideLogoUrl, templatePropertiesInputCreate.hideLogoUrl) && Objects.equals( this.additionalProperties, templatePropertiesInputCreate.additionalProperties); @@ -899,6 +926,7 @@ public int hashCode() { companyWebsiteUrl, contactSupportUrl, hideContactSupportUrl, + hideLogoUrl, additionalProperties); } @@ -968,6 +996,7 @@ public String toString() { sb.append(" hideContactSupportUrl: ") .append(toIndentedString(hideContactSupportUrl)) .append("\n"); + sb.append(" hideLogoUrl: ").append(toIndentedString(hideLogoUrl)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -1019,6 +1048,7 @@ private String toIndentedString(Object o) { openapiFields.add("company_website_url"); openapiFields.add("contact_support_url"); openapiFields.add("hide_contact_support_url"); + openapiFields.add("hide_logo_url"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCollectionRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCollectionRequest.java new file mode 100644 index 000000000..5d45d1230 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateCollectionRequest.java @@ -0,0 +1,481 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** UpdateCollectionRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class UpdateCollectionRequest implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + + @SerializedName(SERIALIZED_NAME_METADATA) + @javax.annotation.Nullable + private List metadata; + + /** Type of update operation. Default operation type is REPLACE. */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + ADD("ADD"), + + REMOVE("REMOVE"), + + REPLACE("REPLACE"); + + private String value; + + OperationEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperationEnum fromValue(String value) { + for (OperationEnum b : OperationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperationEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OperationEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OPERATION = "operation"; + + @SerializedName(SERIALIZED_NAME_OPERATION) + @javax.annotation.Nullable + private OperationEnum operation = OperationEnum.REPLACE; + + public UpdateCollectionRequest() {} + + public UpdateCollectionRequest name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * Name of the collection. + * + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public UpdateCollectionRequest description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of the collection. + * + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + public UpdateCollectionRequest metadata( + @javax.annotation.Nullable List metadata) { + this.metadata = metadata; + return this; + } + + public UpdateCollectionRequest addMetadataItem(CollectionMetadataInput metadataItem) { + if (this.metadata == null) { + this.metadata = new ArrayList<>(); + } + this.metadata.add(metadataItem); + return this; + } + + /** + * Metadata objects to add, remove, or replace in the collection. + * + * @return metadata + */ + @javax.annotation.Nullable + public List getMetadata() { + return metadata; + } + + public void setMetadata(@javax.annotation.Nullable List metadata) { + this.metadata = metadata; + } + + public UpdateCollectionRequest operation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * Type of update operation. Default operation type is REPLACE. + * + * @return operation + */ + @javax.annotation.Nullable + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(@javax.annotation.Nullable OperationEnum operation) { + this.operation = operation; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateCollectionRequest instance itself + */ + public UpdateCollectionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCollectionRequest updateCollectionRequest = (UpdateCollectionRequest) o; + return Objects.equals(this.name, updateCollectionRequest.name) + && Objects.equals(this.description, updateCollectionRequest.description) + && Objects.equals(this.metadata, updateCollectionRequest.metadata) + && Objects.equals(this.operation, updateCollectionRequest.operation) + && Objects.equals( + this.additionalProperties, updateCollectionRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, metadata, operation, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCollectionRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("metadata"); + openapiFields.add("operation"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateCollectionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateCollectionRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in UpdateCollectionRequest is not found" + + " in the empty JSON string", + UpdateCollectionRequest.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `name` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `description` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("description").toString())); + } + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + JsonArray jsonArraymetadata = jsonObj.getAsJsonArray("metadata"); + if (jsonArraymetadata != null) { + // ensure the json data is an array + if (!jsonObj.get("metadata").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `metadata` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("metadata").toString())); + } + + // validate the optional field `metadata` (array) + for (int i = 0; i < jsonArraymetadata.size(); i++) { + CollectionMetadataInput.validateJsonElement(jsonArraymetadata.get(i)); + } + ; + } + } + if ((jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) + && !jsonObj.get("operation").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `operation` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("operation").toString())); + } + // validate the optional field `operation` + if (jsonObj.get("operation") != null && !jsonObj.get("operation").isJsonNull()) { + OperationEnum.validateJsonElement(jsonObj.get("operation")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateCollectionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateCollectionRequest' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateCollectionRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateCollectionRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateCollectionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateCollectionRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateCollectionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateCollectionRequest + * @throws IOException if the JSON string is invalid with respect to UpdateCollectionRequest + */ + public static UpdateCollectionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateCollectionRequest.class); + } + + /** + * Convert an instance of UpdateCollectionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableValuesRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableValuesRequest.java index 9b149e6f1..6590a0917 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableValuesRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateVariableValuesRequest.java @@ -61,7 +61,8 @@ public UpdateVariableValuesRequest addVariableAssignmentItem( } /** - * Variables and values to update + * Array of variable assignment objects specifying the variable identifier, values to assign, + * and the operation type (ADD, REMOVE, REPLACE, or RESET) to perform on each variable. * * @return variableAssignment */ @@ -91,7 +92,9 @@ public UpdateVariableValuesRequest addVariableValueScopeItem( } /** - * Variables and values to update + * Array of scope objects defining where the variable values apply, including organization + * context, optional principal constraints (user or group), model reference for formula + * variables, and priority for conflict resolution. * * @return variableValueScope */ diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequest.java index 7817b2ced..3d73ee9e1 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequest.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequest.java @@ -5,6 +5,7 @@ package com.thoughtspot.client.model; import com.google.gson.Gson; +import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; @@ -128,6 +129,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nullable private StorageDestinationInput storageDestination; + public static final String SERIALIZED_NAME_ADDITIONAL_HEADERS = "additional_headers"; + + @SerializedName(SERIALIZED_NAME_ADDITIONAL_HEADERS) + @javax.annotation.Nullable + private List additionalHeaders; + public UpdateWebhookConfigurationRequest() {} public UpdateWebhookConfigurationRequest name(@javax.annotation.Nullable String name) { @@ -305,6 +312,38 @@ public void setStorageDestination( this.storageDestination = storageDestination; } + public UpdateWebhookConfigurationRequest additionalHeaders( + @javax.annotation.Nullable List additionalHeaders) { + this.additionalHeaders = additionalHeaders; + return this; + } + + public UpdateWebhookConfigurationRequest addAdditionalHeadersItem( + WebhookKeyValuePairInput additionalHeadersItem) { + if (this.additionalHeaders == null) { + this.additionalHeaders = new ArrayList<>(); + } + this.additionalHeaders.add(additionalHeadersItem); + return this; + } + + /** + * Additional headers as an array of key-value pairs. Example: [{\"key\": + * \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: + * 26.4.0.cl or later + * + * @return additionalHeaders + */ + @javax.annotation.Nullable + public List getAdditionalHeaders() { + return additionalHeaders; + } + + public void setAdditionalHeaders( + @javax.annotation.Nullable List additionalHeaders) { + this.additionalHeaders = additionalHeaders; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -372,6 +411,8 @@ public boolean equals(Object o) { && Objects.equals( this.storageDestination, updateWebhookConfigurationRequest.storageDestination) + && Objects.equals( + this.additionalHeaders, updateWebhookConfigurationRequest.additionalHeaders) && Objects.equals( this.additionalProperties, updateWebhookConfigurationRequest.additionalProperties); @@ -388,6 +429,7 @@ public int hashCode() { authentication, signatureVerification, storageDestination, + additionalHeaders, additionalProperties); } @@ -407,6 +449,9 @@ public String toString() { sb.append(" storageDestination: ") .append(toIndentedString(storageDestination)) .append("\n"); + sb.append(" additionalHeaders: ") + .append(toIndentedString(additionalHeaders)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -439,6 +484,7 @@ private String toIndentedString(Object o) { openapiFields.add("authentication"); openapiFields.add("signature_verification"); openapiFields.add("storage_destination"); + openapiFields.add("additional_headers"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -513,6 +559,26 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti && !jsonObj.get("storage_destination").isJsonNull()) { StorageDestinationInput.validateJsonElement(jsonObj.get("storage_destination")); } + if (jsonObj.get("additional_headers") != null + && !jsonObj.get("additional_headers").isJsonNull()) { + JsonArray jsonArrayadditionalHeaders = jsonObj.getAsJsonArray("additional_headers"); + if (jsonArrayadditionalHeaders != null) { + // ensure the json data is an array + if (!jsonObj.get("additional_headers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `additional_headers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("additional_headers").toString())); + } + + // validate the optional field `additional_headers` (array) + for (int i = 0; i < jsonArrayadditionalHeaders.size(); i++) { + WebhookKeyValuePairInput.validateJsonElement(jsonArrayadditionalHeaders.get(i)); + } + ; + } + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateCommunicationChannelRequest.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateCommunicationChannelRequest.java new file mode 100644 index 000000000..3e15171af --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ValidateCommunicationChannelRequest.java @@ -0,0 +1,494 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** ValidateCommunicationChannelRequest */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ValidateCommunicationChannelRequest implements Serializable { + private static final long serialVersionUID = 1L; + + /** Type of communication channel to validate (e.g., WEBHOOK). */ + @JsonAdapter(ChannelTypeEnum.Adapter.class) + public enum ChannelTypeEnum { + WEBHOOK("WEBHOOK"); + + private String value; + + ChannelTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ChannelTypeEnum fromValue(String value) { + for (ChannelTypeEnum b : ChannelTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ChannelTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ChannelTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ChannelTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ChannelTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CHANNEL_TYPE = "channel_type"; + + @SerializedName(SERIALIZED_NAME_CHANNEL_TYPE) + @javax.annotation.Nonnull + private ChannelTypeEnum channelType; + + public static final String SERIALIZED_NAME_CHANNEL_IDENTIFIER = "channel_identifier"; + + @SerializedName(SERIALIZED_NAME_CHANNEL_IDENTIFIER) + @javax.annotation.Nonnull + private String channelIdentifier; + + /** Event type to validate for this channel. */ + @JsonAdapter(EventTypeEnum.Adapter.class) + public enum EventTypeEnum { + LIVEBOARD_SCHEDULE("LIVEBOARD_SCHEDULE"); + + private String value; + + EventTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EventTypeEnum fromValue(String value) { + for (EventTypeEnum b : EventTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EventTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EventTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EventTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EventTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EVENT_TYPE = "event_type"; + + @SerializedName(SERIALIZED_NAME_EVENT_TYPE) + @javax.annotation.Nonnull + private EventTypeEnum eventType; + + public ValidateCommunicationChannelRequest() {} + + public ValidateCommunicationChannelRequest channelType( + @javax.annotation.Nonnull ChannelTypeEnum channelType) { + this.channelType = channelType; + return this; + } + + /** + * Type of communication channel to validate (e.g., WEBHOOK). + * + * @return channelType + */ + @javax.annotation.Nonnull + public ChannelTypeEnum getChannelType() { + return channelType; + } + + public void setChannelType(@javax.annotation.Nonnull ChannelTypeEnum channelType) { + this.channelType = channelType; + } + + public ValidateCommunicationChannelRequest channelIdentifier( + @javax.annotation.Nonnull String channelIdentifier) { + this.channelIdentifier = channelIdentifier; + return this; + } + + /** + * Unique identifier or name for the communication channel. + * + * @return channelIdentifier + */ + @javax.annotation.Nonnull + public String getChannelIdentifier() { + return channelIdentifier; + } + + public void setChannelIdentifier(@javax.annotation.Nonnull String channelIdentifier) { + this.channelIdentifier = channelIdentifier; + } + + public ValidateCommunicationChannelRequest eventType( + @javax.annotation.Nonnull EventTypeEnum eventType) { + this.eventType = eventType; + return this; + } + + /** + * Event type to validate for this channel. + * + * @return eventType + */ + @javax.annotation.Nonnull + public EventTypeEnum getEventType() { + return eventType; + } + + public void setEventType(@javax.annotation.Nonnull EventTypeEnum eventType) { + this.eventType = eventType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ValidateCommunicationChannelRequest instance itself + */ + public ValidateCommunicationChannelRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValidateCommunicationChannelRequest validateCommunicationChannelRequest = + (ValidateCommunicationChannelRequest) o; + return Objects.equals(this.channelType, validateCommunicationChannelRequest.channelType) + && Objects.equals( + this.channelIdentifier, + validateCommunicationChannelRequest.channelIdentifier) + && Objects.equals(this.eventType, validateCommunicationChannelRequest.eventType) + && Objects.equals( + this.additionalProperties, + validateCommunicationChannelRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(channelType, channelIdentifier, eventType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValidateCommunicationChannelRequest {\n"); + sb.append(" channelType: ").append(toIndentedString(channelType)).append("\n"); + sb.append(" channelIdentifier: ") + .append(toIndentedString(channelIdentifier)) + .append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("channel_type"); + openapiFields.add("channel_identifier"); + openapiFields.add("event_type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("channel_type"); + openapiRequiredFields.add("channel_identifier"); + openapiRequiredFields.add("event_type"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ValidateCommunicationChannelRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ValidateCommunicationChannelRequest.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ValidateCommunicationChannelRequest" + + " is not found in the empty JSON string", + ValidateCommunicationChannelRequest.openapiRequiredFields + .toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ValidateCommunicationChannelRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("channel_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channel_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("channel_type").toString())); + } + // validate the required field `channel_type` + ChannelTypeEnum.validateJsonElement(jsonObj.get("channel_type")); + if (!jsonObj.get("channel_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `channel_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("channel_identifier").toString())); + } + if (!jsonObj.get("event_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `event_type` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("event_type").toString())); + } + // validate the required field `event_type` + EventTypeEnum.validateJsonElement(jsonObj.get("event_type")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValidateCommunicationChannelRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValidateCommunicationChannelRequest' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ValidateCommunicationChannelRequest.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ValidateCommunicationChannelRequest value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ValidateCommunicationChannelRequest read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ValidateCommunicationChannelRequest instance = + thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ValidateCommunicationChannelRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValidateCommunicationChannelRequest + * @throws IOException if the JSON string is invalid with respect to + * ValidateCommunicationChannelRequest + */ + public static ValidateCommunicationChannelRequest fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, ValidateCommunicationChannelRequest.class); + } + + /** + * Convert an instance of ValidateCommunicationChannelRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/ValueScopeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/ValueScopeInput.java index f0b12e3dc..5c64684d1 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/ValueScopeInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/ValueScopeInput.java @@ -25,7 +25,7 @@ import java.util.Objects; import org.openapitools.jackson.nullable.JsonNullable; -/** Input for variable scope in search */ +/** Input for filtering variable values by scope in search operations */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @@ -38,7 +38,10 @@ public class ValueScopeInput implements Serializable { @javax.annotation.Nullable private String orgIdentifier; - /** Principal type */ + /** + * Type of principal to filter by. Use USER to filter values assigned to specific users, or + * USER_GROUP to filter values assigned to groups. + */ @JsonAdapter(PrincipalTypeEnum.Adapter.class) public enum PrincipalTypeEnum { USER("USER"), @@ -135,7 +138,8 @@ public ValueScopeInput principalType( } /** - * Principal type + * Type of principal to filter by. Use USER to filter values assigned to specific users, or + * USER_GROUP to filter values assigned to groups. * * @return principalType */ @@ -174,7 +178,7 @@ public ValueScopeInput modelIdentifier(@javax.annotation.Nullable String modelId } /** - * Model Identifier + * Unique ID or name of the model to filter by. Applicable only for FORMULA_VARIABLE type. * * @return modelIdentifier */ diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/Variable.java b/sdks/java/src/main/java/com/thoughtspot/client/model/Variable.java index 11a4d13d9..0b18b0404 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/Variable.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/Variable.java @@ -55,7 +55,9 @@ public enum VariableTypeEnum { CONNECTION_PROPERTY_PER_PRINCIPAL("CONNECTION_PROPERTY_PER_PRINCIPAL"), - FORMULA_VARIABLE("FORMULA_VARIABLE"); + FORMULA_VARIABLE("FORMULA_VARIABLE"), + + USER_PROPERTY("USER_PROPERTY"); private String value; diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableDetailInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableDetailInput.java index e90046418..5d0600a37 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableDetailInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableDetailInput.java @@ -47,7 +47,9 @@ public enum TypeEnum { CONNECTION_PROPERTY_PER_PRINCIPAL("CONNECTION_PROPERTY_PER_PRINCIPAL"), - FORMULA_VARIABLE("FORMULA_VARIABLE"); + FORMULA_VARIABLE("FORMULA_VARIABLE"), + + USER_PROPERTY("USER_PROPERTY"); private String value; diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/VariablePutAssignmentInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/VariablePutAssignmentInput.java new file mode 100644 index 000000000..6eeb018de --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/VariablePutAssignmentInput.java @@ -0,0 +1,580 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Input for variable value put operations */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class VariablePutAssignmentInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_ASSIGNED_VALUES = "assigned_values"; + + @SerializedName(SERIALIZED_NAME_ASSIGNED_VALUES) + @javax.annotation.Nonnull + private List assignedValues; + + public static final String SERIALIZED_NAME_ORG_IDENTIFIER = "org_identifier"; + + @SerializedName(SERIALIZED_NAME_ORG_IDENTIFIER) + @javax.annotation.Nullable + private String orgIdentifier; + + /** Principal type */ + @JsonAdapter(PrincipalTypeEnum.Adapter.class) + public enum PrincipalTypeEnum { + USER("USER"), + + USER_GROUP("USER_GROUP"); + + private String value; + + PrincipalTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrincipalTypeEnum fromValue(String value) { + for (PrincipalTypeEnum b : PrincipalTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrincipalTypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrincipalTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrincipalTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PrincipalTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PRINCIPAL_TYPE = "principal_type"; + + @SerializedName(SERIALIZED_NAME_PRINCIPAL_TYPE) + @javax.annotation.Nullable + private PrincipalTypeEnum principalType; + + public static final String SERIALIZED_NAME_PRINCIPAL_IDENTIFIER = "principal_identifier"; + + @SerializedName(SERIALIZED_NAME_PRINCIPAL_IDENTIFIER) + @javax.annotation.Nullable + private String principalIdentifier; + + public static final String SERIALIZED_NAME_MODEL_IDENTIFIER = "model_identifier"; + + @SerializedName(SERIALIZED_NAME_MODEL_IDENTIFIER) + @javax.annotation.Nullable + private String modelIdentifier; + + public static final String SERIALIZED_NAME_PRIORITY = "priority"; + + @SerializedName(SERIALIZED_NAME_PRIORITY) + @javax.annotation.Nullable + private Integer priority; + + public VariablePutAssignmentInput() {} + + public VariablePutAssignmentInput assignedValues( + @javax.annotation.Nonnull List assignedValues) { + this.assignedValues = assignedValues; + return this; + } + + public VariablePutAssignmentInput addAssignedValuesItem(String assignedValuesItem) { + if (this.assignedValues == null) { + this.assignedValues = new ArrayList<>(); + } + this.assignedValues.add(assignedValuesItem); + return this; + } + + /** + * Values of the variable + * + * @return assignedValues + */ + @javax.annotation.Nonnull + public List getAssignedValues() { + return assignedValues; + } + + public void setAssignedValues(@javax.annotation.Nonnull List assignedValues) { + this.assignedValues = assignedValues; + } + + public VariablePutAssignmentInput orgIdentifier( + @javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + return this; + } + + /** + * The unique name of the org + * + * @return orgIdentifier + */ + @javax.annotation.Nullable + public String getOrgIdentifier() { + return orgIdentifier; + } + + public void setOrgIdentifier(@javax.annotation.Nullable String orgIdentifier) { + this.orgIdentifier = orgIdentifier; + } + + public VariablePutAssignmentInput principalType( + @javax.annotation.Nullable PrincipalTypeEnum principalType) { + this.principalType = principalType; + return this; + } + + /** + * Principal type + * + * @return principalType + */ + @javax.annotation.Nullable + public PrincipalTypeEnum getPrincipalType() { + return principalType; + } + + public void setPrincipalType(@javax.annotation.Nullable PrincipalTypeEnum principalType) { + this.principalType = principalType; + } + + public VariablePutAssignmentInput principalIdentifier( + @javax.annotation.Nullable String principalIdentifier) { + this.principalIdentifier = principalIdentifier; + return this; + } + + /** + * Unique ID or name of the principal + * + * @return principalIdentifier + */ + @javax.annotation.Nullable + public String getPrincipalIdentifier() { + return principalIdentifier; + } + + public void setPrincipalIdentifier(@javax.annotation.Nullable String principalIdentifier) { + this.principalIdentifier = principalIdentifier; + } + + public VariablePutAssignmentInput modelIdentifier( + @javax.annotation.Nullable String modelIdentifier) { + this.modelIdentifier = modelIdentifier; + return this; + } + + /** + * Unique ID of the model + * + * @return modelIdentifier + */ + @javax.annotation.Nullable + public String getModelIdentifier() { + return modelIdentifier; + } + + public void setModelIdentifier(@javax.annotation.Nullable String modelIdentifier) { + this.modelIdentifier = modelIdentifier; + } + + public VariablePutAssignmentInput priority(@javax.annotation.Nullable Integer priority) { + this.priority = priority; + return this; + } + + /** + * Priority level + * + * @return priority + */ + @javax.annotation.Nullable + public Integer getPriority() { + return priority; + } + + public void setPriority(@javax.annotation.Nullable Integer priority) { + this.priority = priority; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the VariablePutAssignmentInput instance itself + */ + public VariablePutAssignmentInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VariablePutAssignmentInput variablePutAssignmentInput = (VariablePutAssignmentInput) o; + return Objects.equals(this.assignedValues, variablePutAssignmentInput.assignedValues) + && Objects.equals(this.orgIdentifier, variablePutAssignmentInput.orgIdentifier) + && Objects.equals(this.principalType, variablePutAssignmentInput.principalType) + && Objects.equals( + this.principalIdentifier, variablePutAssignmentInput.principalIdentifier) + && Objects.equals(this.modelIdentifier, variablePutAssignmentInput.modelIdentifier) + && Objects.equals(this.priority, variablePutAssignmentInput.priority) + && Objects.equals( + this.additionalProperties, variablePutAssignmentInput.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash( + assignedValues, + orgIdentifier, + principalType, + principalIdentifier, + modelIdentifier, + priority, + additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VariablePutAssignmentInput {\n"); + sb.append(" assignedValues: ").append(toIndentedString(assignedValues)).append("\n"); + sb.append(" orgIdentifier: ").append(toIndentedString(orgIdentifier)).append("\n"); + sb.append(" principalType: ").append(toIndentedString(principalType)).append("\n"); + sb.append(" principalIdentifier: ") + .append(toIndentedString(principalIdentifier)) + .append("\n"); + sb.append(" modelIdentifier: ").append(toIndentedString(modelIdentifier)).append("\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("assigned_values"); + openapiFields.add("org_identifier"); + openapiFields.add("principal_type"); + openapiFields.add("principal_identifier"); + openapiFields.add("model_identifier"); + openapiFields.add("priority"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("assigned_values"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to VariablePutAssignmentInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VariablePutAssignmentInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in VariablePutAssignmentInput is not" + + " found in the empty JSON string", + VariablePutAssignmentInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VariablePutAssignmentInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("assigned_values") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got" + + " `null`"); + } else if (!jsonObj.get("assigned_values").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `assigned_values` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("assigned_values").toString())); + } + if ((jsonObj.get("org_identifier") != null && !jsonObj.get("org_identifier").isJsonNull()) + && !jsonObj.get("org_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `org_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("org_identifier").toString())); + } + if ((jsonObj.get("principal_type") != null && !jsonObj.get("principal_type").isJsonNull()) + && !jsonObj.get("principal_type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `principal_type` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("principal_type").toString())); + } + // validate the optional field `principal_type` + if (jsonObj.get("principal_type") != null && !jsonObj.get("principal_type").isJsonNull()) { + PrincipalTypeEnum.validateJsonElement(jsonObj.get("principal_type")); + } + if ((jsonObj.get("principal_identifier") != null + && !jsonObj.get("principal_identifier").isJsonNull()) + && !jsonObj.get("principal_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `principal_identifier` to be a primitive type in" + + " the JSON string but got `%s`", + jsonObj.get("principal_identifier").toString())); + } + if ((jsonObj.get("model_identifier") != null + && !jsonObj.get("model_identifier").isJsonNull()) + && !jsonObj.get("model_identifier").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `model_identifier` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("model_identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VariablePutAssignmentInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VariablePutAssignmentInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(VariablePutAssignmentInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VariablePutAssignmentInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public VariablePutAssignmentInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + VariablePutAssignmentInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of VariablePutAssignmentInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of VariablePutAssignmentInput + * @throws IOException if the JSON string is invalid with respect to VariablePutAssignmentInput + */ + public static VariablePutAssignmentInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VariablePutAssignmentInput.class); + } + + /** + * Convert an instance of VariablePutAssignmentInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableUpdateScopeInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableUpdateScopeInput.java index 924bd0b87..7b05cd17e 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableUpdateScopeInput.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableUpdateScopeInput.java @@ -25,7 +25,7 @@ import java.util.Objects; import org.openapitools.jackson.nullable.JsonNullable; -/** Input for variable value update in batch operations */ +/** Input for defining the scope of variable value assignments in batch update operations */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @@ -38,7 +38,10 @@ public class VariableUpdateScopeInput implements Serializable { @javax.annotation.Nonnull private String orgIdentifier; - /** Principal type */ + /** + * Type of principal to which the variable value applies. Use USER to assign values to a + * specific user, or USER_GROUP to assign values to a group. + */ @JsonAdapter(PrincipalTypeEnum.Adapter.class) public enum PrincipalTypeEnum { USER("USER"), @@ -141,7 +144,8 @@ public VariableUpdateScopeInput principalType( } /** - * Principal type + * Type of principal to which the variable value applies. Use USER to assign values to a + * specific user, or USER_GROUP to assign values to a group. * * @return principalType */ @@ -181,7 +185,8 @@ public VariableUpdateScopeInput modelIdentifier( } /** - * Unique ID of the model + * Unique ID or name of the model. Required for FORMULA_VARIABLE type to scope the variable + * value to a specific worksheet. * * @return modelIdentifier */ @@ -200,7 +205,8 @@ public VariableUpdateScopeInput priority(@javax.annotation.Nullable Integer prio } /** - * Priority level + * The priority level for this scope assignment, used for conflict resolution when multiple + * values match. Higher priority values (larger numbers) take precedence. * * @return priority */ diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableValue.java b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableValue.java index 0c52e995e..2d6835438 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/VariableValue.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/VariableValue.java @@ -51,7 +51,10 @@ public class VariableValue implements Serializable { @javax.annotation.Nonnull private String orgIdentifier; - /** Principal type */ + /** + * Type of principal to which this value applies. Use USER to assign the value to a specific + * user, or USER_GROUP to assign it to a group. + */ @JsonAdapter(PrincipalTypeEnum.Adapter.class) public enum PrincipalTypeEnum { USER("USER"), @@ -199,7 +202,8 @@ public VariableValue principalType(@javax.annotation.Nullable PrincipalTypeEnum } /** - * Principal type + * Type of principal to which this value applies. Use USER to assign the value to a specific + * user, or USER_GROUP to assign it to a group. * * @return principalType */ diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookKeyValuePair.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookKeyValuePair.java new file mode 100644 index 000000000..6dd99546e --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookKeyValuePair.java @@ -0,0 +1,338 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Key-value pair for additional webhook headers. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookKeyValuePair implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_KEY = "key"; + + @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nonnull + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private String value; + + public WebhookKeyValuePair() {} + + public WebhookKeyValuePair key(@javax.annotation.Nonnull String key) { + this.key = key; + return this; + } + + /** + * Header name. + * + * @return key + */ + @javax.annotation.Nonnull + public String getKey() { + return key; + } + + public void setKey(@javax.annotation.Nonnull String key) { + this.key = key; + } + + public WebhookKeyValuePair value(@javax.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * Header value. + * + * @return value + */ + @javax.annotation.Nonnull + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookKeyValuePair instance itself + */ + public WebhookKeyValuePair putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookKeyValuePair webhookKeyValuePair = (WebhookKeyValuePair) o; + return Objects.equals(this.key, webhookKeyValuePair.key) + && Objects.equals(this.value, webhookKeyValuePair.value) + && Objects.equals( + this.additionalProperties, webhookKeyValuePair.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(key, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookKeyValuePair {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("key"); + openapiRequiredFields.add("value"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookKeyValuePair + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookKeyValuePair.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookKeyValuePair is not found in" + + " the empty JSON string", + WebhookKeyValuePair.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookKeyValuePair.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `key` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("key").toString())); + } + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `value` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookKeyValuePair.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookKeyValuePair' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookKeyValuePair.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookKeyValuePair value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookKeyValuePair read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookKeyValuePair instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookKeyValuePair given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookKeyValuePair + * @throws IOException if the JSON string is invalid with respect to WebhookKeyValuePair + */ + public static WebhookKeyValuePair fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookKeyValuePair.class); + } + + /** + * Convert an instance of WebhookKeyValuePair to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookKeyValuePairInput.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookKeyValuePairInput.java new file mode 100644 index 000000000..e52adc596 --- /dev/null +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookKeyValuePairInput.java @@ -0,0 +1,339 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.thoughtspot.client.JSON; +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Key-value pair input for additional webhook headers. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class WebhookKeyValuePairInput implements Serializable { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_KEY = "key"; + + @SerializedName(SERIALIZED_NAME_KEY) + @javax.annotation.Nonnull + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private String value; + + public WebhookKeyValuePairInput() {} + + public WebhookKeyValuePairInput key(@javax.annotation.Nonnull String key) { + this.key = key; + return this; + } + + /** + * Header name. + * + * @return key + */ + @javax.annotation.Nonnull + public String getKey() { + return key; + } + + public void setKey(@javax.annotation.Nonnull String key) { + this.key = key; + } + + public WebhookKeyValuePairInput value(@javax.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * Header value. + * + * @return value + */ + @javax.annotation.Nonnull + public String getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the WebhookKeyValuePairInput instance itself + */ + public WebhookKeyValuePairInput putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookKeyValuePairInput webhookKeyValuePairInput = (WebhookKeyValuePairInput) o; + return Objects.equals(this.key, webhookKeyValuePairInput.key) + && Objects.equals(this.value, webhookKeyValuePairInput.value) + && Objects.equals( + this.additionalProperties, webhookKeyValuePairInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(key, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookKeyValuePairInput {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("key"); + openapiRequiredFields.add("value"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to WebhookKeyValuePairInput + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!WebhookKeyValuePairInput.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in WebhookKeyValuePairInput is not found" + + " in the empty JSON string", + WebhookKeyValuePairInput.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : WebhookKeyValuePairInput.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + "The required field `%s` is not found in the JSON string: %s", + requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `key` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("key").toString())); + } + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `value` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!WebhookKeyValuePairInput.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WebhookKeyValuePairInput' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(WebhookKeyValuePairInput.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, WebhookKeyValuePairInput value) + throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public WebhookKeyValuePairInput read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + WebhookKeyValuePairInput instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + "The field `%s` has unknown primitive" + + " type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of WebhookKeyValuePairInput given an JSON string + * + * @param jsonString JSON string + * @return An instance of WebhookKeyValuePairInput + * @throws IOException if the JSON string is invalid with respect to WebhookKeyValuePairInput + */ + public static WebhookKeyValuePairInput fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WebhookKeyValuePairInput.class); + } + + /** + * Convert an instance of WebhookKeyValuePairInput to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookResponse.java b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookResponse.java index cd663424b..4f9410ff5 100644 --- a/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookResponse.java +++ b/sdks/java/src/main/java/com/thoughtspot/client/model/WebhookResponse.java @@ -5,6 +5,7 @@ package com.thoughtspot.client.model; import com.google.gson.Gson; +import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; @@ -136,6 +137,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nullable private WebhookSignatureVerification signatureVerification; + public static final String SERIALIZED_NAME_ADDITIONAL_HEADERS = "additional_headers"; + + @SerializedName(SERIALIZED_NAME_ADDITIONAL_HEADERS) + @javax.annotation.Nullable + private List additionalHeaders; + public static final String SERIALIZED_NAME_CREATION_TIME_IN_MILLIS = "creation_time_in_millis"; @SerializedName(SERIALIZED_NAME_CREATION_TIME_IN_MILLIS) @@ -351,6 +358,35 @@ public void setSignatureVerification( this.signatureVerification = signatureVerification; } + public WebhookResponse additionalHeaders( + @javax.annotation.Nullable List additionalHeaders) { + this.additionalHeaders = additionalHeaders; + return this; + } + + public WebhookResponse addAdditionalHeadersItem(WebhookKeyValuePair additionalHeadersItem) { + if (this.additionalHeaders == null) { + this.additionalHeaders = new ArrayList<>(); + } + this.additionalHeaders.add(additionalHeadersItem); + return this; + } + + /** + * Additional headers as an array of key-value pairs. Version: 26.4.0.cl or later + * + * @return additionalHeaders + */ + @javax.annotation.Nullable + public List getAdditionalHeaders() { + return additionalHeaders; + } + + public void setAdditionalHeaders( + @javax.annotation.Nullable List additionalHeaders) { + this.additionalHeaders = additionalHeaders; + } + public WebhookResponse creationTimeInMillis( @javax.annotation.Nonnull Float creationTimeInMillis) { this.creationTimeInMillis = creationTimeInMillis; @@ -513,6 +549,7 @@ public boolean equals(Object o) { && Objects.equals(this.events, webhookResponse.events) && Objects.equals(this.authentication, webhookResponse.authentication) && Objects.equals(this.signatureVerification, webhookResponse.signatureVerification) + && Objects.equals(this.additionalHeaders, webhookResponse.additionalHeaders) && Objects.equals(this.creationTimeInMillis, webhookResponse.creationTimeInMillis) && Objects.equals( this.modificationTimeInMillis, webhookResponse.modificationTimeInMillis) @@ -543,6 +580,7 @@ public int hashCode() { events, authentication, signatureVerification, + additionalHeaders, creationTimeInMillis, modificationTimeInMillis, createdBy, @@ -573,6 +611,9 @@ public String toString() { sb.append(" signatureVerification: ") .append(toIndentedString(signatureVerification)) .append("\n"); + sb.append(" additionalHeaders: ") + .append(toIndentedString(additionalHeaders)) + .append("\n"); sb.append(" creationTimeInMillis: ") .append(toIndentedString(creationTimeInMillis)) .append("\n"); @@ -617,6 +658,7 @@ private String toIndentedString(Object o) { openapiFields.add("events"); openapiFields.add("authentication"); openapiFields.add("signature_verification"); + openapiFields.add("additional_headers"); openapiFields.add("creation_time_in_millis"); openapiFields.add("modification_time_in_millis"); openapiFields.add("created_by"); @@ -715,6 +757,26 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti && !jsonObj.get("signature_verification").isJsonNull()) { WebhookSignatureVerification.validateJsonElement(jsonObj.get("signature_verification")); } + if (jsonObj.get("additional_headers") != null + && !jsonObj.get("additional_headers").isJsonNull()) { + JsonArray jsonArrayadditionalHeaders = jsonObj.getAsJsonArray("additional_headers"); + if (jsonArrayadditionalHeaders != null) { + // ensure the json data is an array + if (!jsonObj.get("additional_headers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `additional_headers` to be an array in the" + + " JSON string but got `%s`", + jsonObj.get("additional_headers").toString())); + } + + // validate the optional field `additional_headers` (array) + for (int i = 0; i < jsonArrayadditionalHeaders.size(); i++) { + WebhookKeyValuePair.validateJsonElement(jsonArrayadditionalHeaders.get(i)); + } + ; + } + } // validate the optional field `created_by` if (jsonObj.get("created_by") != null && !jsonObj.get("created_by").isJsonNull()) { WebhookUser.validateJsonElement(jsonObj.get("created_by")); diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/AiApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/AiApiTest.java index d6cc6a2aa..c41fd9257 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/AiApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/AiApiTest.java @@ -36,7 +36,49 @@ public class AiApiTest { private final AiApi api = new AiApi(); /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided + * context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include the + * `metadata_context` parameter to define the conversation context. The context type + * can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific + * data source. Provide `data_source_identifier` in `data_source_context` + * for a single data source, or `data_source_identifiers` for multi-data-source + * context. The deprecated `guid` field is accepted for backwards compatibility. - + * `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the + * most relevant datasets for the user's queries. > **Note for callers on versions + * 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the + * `guid` field instead of the above. Example: `{ \"type\": + * \"data_source\", \"data_source_context\": { \"guid\": + * \"<worksheet-id>\" } }`. The `conversation_settings` parameter + * controls which Spotter capabilities are enabled for the conversation: - + * `enable_contextual_change_analysis` (default: `true`, **deprecated from + * 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect + * on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` + * (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; + * setting this to `false` has no effect on versions >= 26.2.0.cl - + * `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — + * always enabled in Spotter 3; setting this to `false` has no effect on versions + * >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available + * from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation + * history If the request is successful, the response includes a unique + * `conversation_identifier` that must be passed to + * `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` + * to send messages within this conversation. The response also includes + * `conversation_id` with the same value for backwards compatibility; use + * `conversation_identifier` for new integrations. #### Example request + * ```json { \"metadata_context\": { \"type\": + * \"DATA_SOURCE\", \"data_source_context\": { + * \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, + * \"conversation_settings\": {} } ``` #### Error responses | Code | + * Description | | ---- | + * --------------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > > - This + * endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version + * 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to + * enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ @@ -48,13 +90,18 @@ public void createAgentConversationTest() throws ApiException { } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation - * based on a specific data model. Requires at least view access to the metadata object - * specified in the request. #### Usage guidelines This API requires the - * `metadata_identifier` parameter to define the context for the conversation. You can - * also specify the tokens to initiate the conversation as shown in this example: - * `\"tokens\": \"[tea],[sales],[type]\"` If the API request is - * successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model + * for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and + * at least view access to the metadata object specified in the request. #### Usage guidelines + * The request must include: - `metadata_identifier`: the unique ID of the data source + * that provides context for the conversation Optionally, you can provide: - `tokens`: + * a token string to set initial context for the conversation (e.g., `\"[sales],[item + * type],[state]\"`) If the request is successful, ThoughtSpot returns a unique + * `conversation_identifier` that must be passed to `sendMessage` to + * continue the conversation. #### Error responses | Code | Description | |------|-------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot * support to enable Spotter on your cluster. @@ -69,19 +116,25 @@ public void createConversationTest() throws ApiException { } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a - * user-submitted natural language query. To use this API, the user must have at least - * view-level access to the underlying metadata entities referenced in the response. #### Usage - * guidelines The request must include a `query` string via the request body. The - * returned results include metadata such as: - `confidence`: a float indicating the - * model's confidence in the relevance of each recommendation - `details`: - * includes `data_source_identifier`, `data_source_name`, and - * `description` of each recommended data source - `reasoning`: rationale - * provided by the LLM to explain why each data source was recommended If the API request is - * successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant - * reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may - * be introduced before it is made Generally Available. > * This endpoint requires Spotter — - * please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural + * language query, ranked by confidence with LLM-generated reasoning. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying + * metadata entities referenced in the response. #### Usage guidelines The request must include: + * - `query`: the natural language question to find relevant data sources for If the + * request is successful, the API returns a ranked list of suggested data sources, each + * containing: - `confidence`: a float score indicating the model's confidence in + * the relevance of the suggestion - `details`: metadata about the data source - + * `data_source_identifier`: the unique ID of the data source - + * `data_source_name`: the display name of the data source - `description`: + * a description of the data source - `reasoning`: LLM-generated rationale explaining + * why the data source was recommended #### Error responses | Code | Description | + * |------|--------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the underlying metadata entities. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally + * Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to + * enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ @@ -94,23 +147,28 @@ public void getDataSourceSuggestionsTest() throws ApiException { } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) - * instructions for a specific data-model. These instructions guide the AI system in - * understanding data context and generating more accurate responses when processing natural - * language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the - * request must include: - `data_source_identifier`: The unique ID of the data-model - * to retrieve NL instructions The API returns a response object with: - - * `nl_instructions_info`: An array of instruction objects, each containing: - - * `instructions`: Array of text instructions for natural language processing - - * `scope`: The scope of the instruction (`GLOBAL`). It can be extended to - * data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that - * apply globally across the system on the given data-model (currently only global instructions - * are supported) > ###### Note: > * To use this API, the user needs atleast view access - * on the data-model and they must use corresponding org related bearerToken where the - * data-model exists. > * This endpoint is currently in Beta. Breaking changes may be - * introduced before the endpoint is made Generally Available. > * Available from version - * 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot - * Support to enable Spotter on your cluster. > * Use this API to view currently configured + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured + * for a specific data model. These instructions guide the AI system in understanding data + * context and generating more accurate responses. Requires `CAN_USE_SPOTTER` + * privilege, at least view access on the data model, and a bearer token corresponding to the + * org where the data model exists. #### Usage guidelines The request must include: - + * `data_source_identifier`: the unique ID of the data model to retrieve instructions + * for If the request is successful, the API returns: - `nl_instructions_info`: an + * array of instruction objects, each containing: - `instructions`: the configured + * text instructions for AI processing - `scope`: the scope of the instruction — + * currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: + * Instructions that apply globally across the system on the given data-model (currently only + * global instructions are supported) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * view access on the data model, or the bearer token does not correspond to the org where the + * data model exists. | > ###### Note: > > - To use this API, the user needs at least + * view access on the data model, and must use the bearer token corresponding to the org where + * the data model exists. > - This endpoint is currently in Beta. Breaking changes may be + * introduced before the endpoint is made Generally Available. > - Available from version + * 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot + * Support to enable Spotter on your cluster. > - Use this API to review currently configured * instructions before modifying them with `setNLInstructions`. * * @throws ApiException if the Api call fails @@ -123,26 +181,33 @@ public void getNLInstructionsTest() throws ApiException { } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical - * sub-questions using relevant contextual metadata. To use this API, the user must have at - * least view-level access to the referenced metadata objects. #### Usage guidelines To - * accurately generate relevant questions, the request must include at least one of the - * following metadata identifiers within `metadata_context` : - * `conversation_identifier`, `answer_identifiers`, - * `liveboard_identifiers`, or `data_source_identifiers`. You can further - * enhance the quality and precision of breakdown by providing additional `ai_context` - * such as: - `content`: User provided content like text data, csv data as a string - * message to provide context & potentially improve the quality of the response. - - * `instructions`: User specific text instructions sent to AI system for processing - * the query. Additional optional parameters include: - `limit_relevant_questions`: - * Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - - * `bypass_cache`: If set to true, forces fresh computation instead of returning - * cached results. If the API request is successful, ThoughtSpot returns a list of relevant - * analytical queries, each aligned with the user's original question. Each returned - * question includes the query string, along with the identifier and name of the corresponding - * data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes - * may be introduced before the endpoint is made Generally Available. > * This endpoint - * requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller + * analytical sub-questions, each mapped to a relevant data source. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request must include: - `query`: the + * natural language question to decompose into analytical sub-questions - + * `metadata_context`: at least one of the following context identifiers to guide + * question generation: - `conversation_identifier` — an existing conversation session + * ID - `answer_identifiers` — a list of Answer GUIDs - + * `liveboard_identifiers` — a list of Liveboard GUIDs - + * `data_source_identifiers` — a list of data source GUIDs Optional parameters for + * refining the output: - `ai_context`: additional context to improve response quality + * - `content` — supplementary text or CSV data as string input - + * `instructions` — custom text instructions for the AI system - + * `limit_relevant_questions`: maximum number of questions to return (default: + * `5`) - `bypass_cache`: if `true`, forces fresh computation + * instead of returning cached results If the request is successful, the API returns a list of + * relevant analytical questions, each containing: - `query`: the generated + * sub-question - `data_source_identifier`: the unique ID of the data source the + * question targets - `data_source_name`: the display name of the corresponding data + * source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ @@ -155,7 +220,32 @@ public void getRelevantQuestionsTest() throws ApiException { } /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead + * (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question + * into smaller, actionable analytical sub-questions, each mapped to a relevant data source for + * independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level + * access to the referenced metadata objects. #### Usage guidelines The request accepts the + * following parameters: - `nlsRequest`: contains the user `query` to + * decompose, along with optional `instructions` and `bypassCache` flag - + * `worksheetIds`: list of data source identifiers to scope the decomposition - + * `answerIds`: list of Answer GUIDs whose data guides the response - + * `liveboardIds`: list of Liveboard GUIDs whose data guides the response - + * `conversationId`: an existing conversation session ID for context continuity - + * `content`: supplementary text or CSV data to improve response quality - + * `maxDecomposedQueries`: maximum number of sub-questions to return (default: + * `5`) If the request is successful, the API returns a + * `decomposedQueryResponse` containing a list of `decomposedQueries`, each + * with: - `query`: the generated analytical sub-question - `worksheetId`: + * the unique ID of the data source the question targets - `worksheetName`: the + * display name of the corresponding data source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new + * integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > * This endpoint requires Spotter — + * please contact ThoughtSpot support to enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ @@ -168,19 +258,28 @@ public void queryGetDecomposedQueryTest() throws ApiException { } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) - * conversation by submitting one or more natural language messages. To use this API, the user - * must have access to the relevant conversational session (via conversation_identifier) and - * submit at least one message. #### Usage guidelines To initiate or continue a conversation, - * the request must include: - `conversation_identifier`: a unique session ID for - * continuity and message tracking - `messages`: an array of one or more text - * messages, each with a value and type The API returns a array of object with a type, message, - * and metadata. - `type`: Type of the message — text, answer, or error. - - * `message`: Main content of the response. - `metadata`: Additional info - * depending on the message type. > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` + * instead. Send natural language messages to an existing Spotter agent conversation and returns + * the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and + * access to the metadata object associated with the conversation. The user must have access to + * the conversation session referenced by `conversation_identifier`. A conversation + * must first be created using the `createAgentConversation` API. #### Usage + * guidelines The request must include: - `conversation_identifier`: the unique + * session ID returned by `createAgentConversation`, used for context continuity and + * message tracking - `messages`: an array of one or more text messages to send to the + * agent The API returns an array of response objects, each containing: - `type`: the + * kind of response — `text`, `answer`, or `error` - + * `message`: the main content of the response - `metadata`: additional + * information depending on the message type (e.g., answer metadata includes analytics and + * visualization details) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + * > - This endpoint is currently in Beta. Breaking changes may be introduced before the + * endpoint is made Generally Available. > - This endpoint requires Spotter - please contact + * ThoughtSpot support to enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ @@ -193,25 +292,40 @@ public void sendAgentMessageTest() throws ApiException { } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) - * conversation by submitting one or more natural language messages. To use this API, the user - * must have access to the relevant conversational session (via conversation_identifier) and - * submit at least one message. #### Usage guidelines To initiate or continue a conversation, - * the request must include: - `conversation_identifier`: a unique session ID for - * continuity and message tracking - `messages`: an array of one or more text - * messages, each with a value and type Additionally, user can specify what tool can be included - * `conversation_settings` parameter, which supports: - - * `enable_contextual_change_analysis` (default: false) - - * `enable_natural_language_answer_generation` (default: true) - - * `enable_reasoning` (default: false) If the request is valid, the API returns a - * stream of messages in real time, including: - `ack`: confirms receipt of the - * request - `text / text-chunk`: content chunks, optionally formatted (e.g., - * markdown) - `answer`: the final structured response with metadata and analytics - - * `error`: if a failure occurs - `notification`: notification messages for - * operation being performed > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessageStreaming` instead. Sends one or more natural language + * messages to an existing Spotter agent conversation and returns the response as a real-time + * Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the + * metadata object associated with the conversation. The user must have access to the + * conversation session referenced by `conversation_identifier`. A conversation must + * first be created using the `createAgentConversation` API. #### Usage guidelines The + * request must include: - `conversation_identifier`: the unique session ID returned + * by `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new + * integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - This endpoint requires Spotter - + * please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). * * @throws ApiException if the Api call fails */ @@ -224,16 +338,28 @@ public void sendAgentMessageStreamingTest() throws ApiException { } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation - * within the context of the metadata model. Requires at least view access to the metadata - * object specified in the request. #### Usage guidelines The API requires you to specify the - * `conversation_identifier` in the request path, and a - * `metadata_identifier` and `message` string in the request body. If the - * API request is successful, ThoughtSpot returns the session ID, tokens used in the - * conversation, and visualization type. > ###### Note: > * This endpoint is currently in - * Beta. Breaking changes may be introduced before the endpoint is made Generally Available. - * > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter - * on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the + * context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view + * access to the metadata object specified in the request. A conversation must first be created + * using the `createConversation` API. #### Usage guidelines The request must include: + * - `conversation_identifier`: the unique session ID returned by + * `createConversation` - `metadata_identifier`: the unique ID of the data + * source used for the conversation - `message`: a natural language string with the + * follow-up question If the request is successful, the API returns an array of response + * messages, each containing: - `session_identifier`: the unique ID of the generated + * response - `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ @@ -250,22 +376,30 @@ public void sendMessageTest() throws ApiException { * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions * for a specific data-model to improve AI-generated answers and query processing. These * instructions help guide the AI system to better understand the data context and provide more - * accurate responses. #### Usage guidelines To set NL instructions for a data-model, the - * request must include: - `data_source_identifier`: The unique ID of the data-model - * for which to set NL instructions - `nl_instructions_info`: An array of instruction - * objects, each containing: - `instructions`: Array of text instructions for the LLM - * - `scope`: The scope of the instruction (`GLOBAL`). Currently only - * `GLOBAL` is supported. It can be extended to data-model-user scope in future. The - * API returns a response object with: - `success`: Boolean indicating whether the - * operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply - * globally for that data-model across the system > ###### Note: > * To use this API, the - * user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must - * use corresponding org related bearerToken where the data-model exists. > * This endpoint - * is currently in Beta. Breaking changes may be introduced before the endpoint is made - * Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint - * requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - * * Instructions help improve the accuracy and relevance of AI-generated responses for the - * specified data-model. + * accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or + * `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to + * the org where the data model exists. #### Usage guidelines To set NL instructions for a + * data-model, the request must include: - `data_source_identifier`: The unique ID of + * the data-model for which to set NL instructions - `nl_instructions_info`: An array + * of instruction objects, each containing: - `instructions`: Array of text + * instructions for the LLM - `scope`: The scope of the instruction + * (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to + * data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that + * apply to all users querying this data model If the request is successful, the API returns: - + * `success`: a boolean indicating whether the operation completed successfully #### + * Error responses | Code | Description | + * |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token + * does not correspond to the org where the data model exists. | > ###### Note: > > - + * To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` + * on the data model, and must use the bearer token corresponding to the org where the data + * model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and + * later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable + * Spotter on your cluster. > - Instructions help improve the accuracy and relevance of + * AI-generated responses for the specified data-model. * * @throws ApiException if the Api call fails */ @@ -277,12 +411,27 @@ public void setNLInstructionsTest() throws ApiException { } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated - * response based on a specified data model. Requires at least view access to the metadata - * object specified in the request. > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model + * and returns a single AI-generated answer without requiring a conversation session. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include: - + * `query`: a natural language question (e.g., \"What were total sales last + * quarter?\") - `metadata_identifier`: the unique ID of the data source to query + * against If the request is successful, the API returns a response message containing: - + * `session_identifier`: the unique ID of the generated response - + * `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/CollectionsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/CollectionsApiTest.java new file mode 100644 index 000000000..eb0262a57 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/CollectionsApiTest.java @@ -0,0 +1,100 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.Collection; +import com.thoughtspot.client.model.CollectionDeleteResponse; +import com.thoughtspot.client.model.CollectionSearchResponse; +import com.thoughtspot.client.model.CreateCollectionRequest; +import com.thoughtspot.client.model.DeleteCollectionRequest; +import com.thoughtspot.client.model.SearchCollectionsRequest; +import com.thoughtspot.client.model.UpdateCollectionRequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for CollectionsApi */ +@Disabled +public class CollectionsApiTest { + + private final CollectionsApi api = new CollectionsApi(); + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to + * organize and group related metadata objects such as Liveboards, Answers, worksheets, and + * other data objects. You can also create nested collections (sub-collections) to build a + * hierarchical structure. #### Supported operations The API endpoint lets you perform the + * following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, + * Logical Tables) to the collection * Create nested collections by adding sub-collections + * + * @throws ApiException if the Api call fails + */ + @Test + public void createCollectionTest() throws ApiException { + CreateCollectionRequest createCollectionRequest = null; + Collection response = api.createCollection(createCollectionRequest); + // TODO: test validations + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete + * options * **delete_children**: When set to `true`, deletes the child objects + * (metadata items) within the collection that the user has access to. Objects that the user + * does not have permission to delete will be skipped. * **dry_run**: When set to + * `true`, performs a preview of the deletion operation without actually deleting + * anything. The response shows what would be deleted, allowing you to review before committing + * the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata + * objects that were successfully deleted * **metadata_skipped**: List of metadata objects that + * were skipped due to lack of permissions or other constraints + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteCollectionTest() throws ApiException { + DeleteCollectionRequest deleteCollectionRequest = null; + CollectionDeleteResponse response = api.deleteCollection(deleteCollectionRequest); + // TODO: test validations + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get + * details of a specific collection, specify the collection GUID or name. You can also filter + * the API response based on the collection name pattern, author, and other criteria. #### + * Search options * **name_pattern**: Use '%' as a wildcard character to match + * collection names * **collection_identifiers**: Search for specific collections by their GUIDs + * or names * **include_metadata**: When set to `true`, includes the metadata objects + * within each collection in the response **NOTE**: If the API returns an empty list, consider + * increasing the value of the `record_size` parameter. To search across all available + * collections, set `record_size` to `-1`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchCollectionsTest() throws ApiException { + SearchCollectionsRequest searchCollectionsRequest = null; + CollectionSearchResponse response = api.searchCollections(searchCollectionsRequest); + // TODO: test validations + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported + * operations This API endpoint lets you perform the following operations: * Update collection + * name and description * Change visibility settings * Add metadata objects to the collection + * (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace + * all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: + * Adds the specified metadata objects to the existing collection without removing current items + * * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: + * Replaces all existing metadata objects with the specified items (default behavior) + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateCollectionTest() throws ApiException { + String collectionIdentifier = null; + UpdateCollectionRequest updateCollectionRequest = null; + api.updateCollection(collectionIdentifier, updateCollectionRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionsApiTest.java index 976ddec3a..a9814b67d 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionsApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/ConnectionsApiTest.java @@ -40,15 +40,23 @@ public class ConnectionsApiTest { * \"accountName\":\"thoughtspot_partner\", * \"user\":\"tsadmin\", \"password\":\"TestConn123\", * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", * \"externalDatabases\":[ ] } ``` 2. Set `validate` to - * `false`. #### Create a connection with tables To create a connection with tables: - * 1. Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes, database details, and - * table properties in `data_warehouse_config` as shown in the following example: - * ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. #### Create a connection with tables If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. To create a connection with tables: 1. Pass these parameters in your API request. * + * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of + * configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: ``` { + * \"configuration\":{ \"accountName\":\"thoughtspot_partner\", * \"user\":\"tsadmin\", \"password\":\"TestConn123\", * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", * \"isAutoCreated\":false, \"schemas\":[ { * \"name\":\"alldatatypes\", \"tables\":[ { @@ -65,7 +73,10 @@ public class ConnectionsApiTest { * \"isImported\":false, \"tableName\":\"allDatatypes\", * \"schemaName\":\"alldatatypes\", * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set - * `validate` to `true`. + * `validate` to `true`. **NOTE:** If the `authentication_type` is + * anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType + * property in the payload. If you do not specify authenticationType, the API will default to + * SERVICE_ACCOUNT as the authentication type. * * @throws ApiException if the Api call fails */ diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/JobsApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/JobsApiTest.java new file mode 100644 index 000000000..88813acf1 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/JobsApiTest.java @@ -0,0 +1,45 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.api; + +import com.thoughtspot.client.ApiException; +import com.thoughtspot.client.model.SearchChannelHistoryRequest; +import com.thoughtspot.client.model.SearchChannelHistoryResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** API tests for JobsApi */ +@Disabled +public class JobsApiTest { + + private final JobsApi api = new JobsApi(); + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as + * webhooks. Returns channel-level delivery status for each job execution record. Use this to + * monitor channel health and delivery success rates across events. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the + * following constraints apply: - `job_ids`, `channel_identifiers`, and + * `events` each accept at most one element. - When `job_ids` is provided, + * it is used as the sole lookup key and other filter fields are ignored. - When + * `job_ids` is not provided, `channel_identifiers` and `events` + * are both required. Each must contain exactly one element, and the event object must include + * the `identifier` field. - Records older than the configured retention period are + * not returned. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchChannelHistoryTest() throws ApiException { + SearchChannelHistoryRequest searchChannelHistoryRequest = null; + SearchChannelHistoryResponse response = + api.searchChannelHistory(searchChannelHistoryRequest); + // TODO: test validations + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/MetadataApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/MetadataApiTest.java index 6462867d4..871370732 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/MetadataApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/MetadataApiTest.java @@ -18,6 +18,7 @@ import com.thoughtspot.client.model.ImportMetadataTMLAsyncRequest; import com.thoughtspot.client.model.ImportMetadataTMLRequest; import com.thoughtspot.client.model.MetadataSearchResponse; +import com.thoughtspot.client.model.ParameterizeMetadataFieldsRequest; import com.thoughtspot.client.model.ParameterizeMetadataRequest; import com.thoughtspot.client.model.ResponseCopyObject; import com.thoughtspot.client.model.ResponseWorksheetToModelConversion; @@ -324,15 +325,17 @@ public void importMetadataTMLAsyncTest() throws ApiException { } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing - * fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the - * metadata object. The API endpoint allows parameterizing the following types of metadata - * objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field - * type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName - * * tableName For a Connection or Connection Config, the field type is always - * `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the - * Connection or Connection Config that needs to be parameterized. For Connection Config, the - * only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API + * endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) + * instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows parameterizing + * the following types of metadata objects: * Logical Tables * Connections * Connection Configs + * For a Logical Table the field type must be `ATTRIBUTE` and field name can be one + * of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field + * type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact + * property of the Connection or Connection Config that needs to be parameterized. For + * Connection Config, the only supported field name is: * impersonate_user * * @throws ApiException if the Api call fails */ @@ -343,6 +346,29 @@ public void parameterizeMetadataTest() throws ApiException { // TODO: test validations } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for + * LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata + * objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for + * LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API + * endpoint allows parameterizing the following types of metadata objects: * Logical Tables * + * Connections * Connection Configs For a Logical Table, the field type must be + * `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName + * For a Connection or Connection Config, the field type is always + * `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of + * the Connection or Connection Config that need to be parameterized. For Connection Config, + * supported field names include: * impersonate_user You can parameterize multiple fields at + * once by providing an array of field names. + * + * @throws ApiException if the Api call fails + */ + @Test + public void parameterizeMetadataFieldsTest() throws ApiException { + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest = null; + api.parameterizeMetadataFields(parameterizeMetadataFieldsRequest); + // TODO: test validations + } + /** * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot * system. This API endpoint is available to all users who have view access to the object. Users diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/SystemApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/SystemApiTest.java index faf012fe5..cad43326a 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/SystemApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/SystemApiTest.java @@ -6,6 +6,7 @@ import com.thoughtspot.client.ApiException; import com.thoughtspot.client.model.CommunicationChannelPreferencesResponse; +import com.thoughtspot.client.model.CommunicationChannelValidateResponse; import com.thoughtspot.client.model.ConfigureCommunicationChannelPreferencesRequest; import com.thoughtspot.client.model.ConfigureSecuritySettingsRequest; import com.thoughtspot.client.model.SearchCommunicationChannelPreferencesRequest; @@ -15,6 +16,7 @@ import com.thoughtspot.client.model.SystemInfo; import com.thoughtspot.client.model.SystemOverrideInfo; import com.thoughtspot.client.model.UpdateSystemConfigRequest; +import com.thoughtspot.client.model.ValidateCommunicationChannelRequest; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -180,4 +182,25 @@ public void updateSystemConfigTest() throws ApiException { api.updateSystemConfig(updateSystemConfigRequest); // TODO: test validations } + + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is + * properly set up and can receive events. - Use `channel_type` to specify the type of + * communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to + * provide the unique identifier or name for the communication channel. - Use + * `event_type` to specify the event type to validate for this channel. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. For webhook channels, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void validateCommunicationChannelTest() throws ApiException { + ValidateCommunicationChannelRequest validateCommunicationChannelRequest = null; + CommunicationChannelValidateResponse response = + api.validateCommunicationChannel(validateCommunicationChannelRequest); + // TODO: test validations + } } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/ThoughtSpotRestApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/ThoughtSpotRestApiTest.java index 2aa7d5fc7..3dc8f031f 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/ThoughtSpotRestApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/ThoughtSpotRestApiTest.java @@ -13,11 +13,15 @@ import com.thoughtspot.client.model.AssignTagRequest; import com.thoughtspot.client.model.CalendarResponse; import com.thoughtspot.client.model.ChangeUserPasswordRequest; +import com.thoughtspot.client.model.Collection; +import com.thoughtspot.client.model.CollectionDeleteResponse; +import com.thoughtspot.client.model.CollectionSearchResponse; import com.thoughtspot.client.model.ColumnSecurityRuleResponse; import com.thoughtspot.client.model.CommitBranchRequest; import com.thoughtspot.client.model.CommitHistoryResponse; import com.thoughtspot.client.model.CommitResponse; import com.thoughtspot.client.model.CommunicationChannelPreferencesResponse; +import com.thoughtspot.client.model.CommunicationChannelValidateResponse; import com.thoughtspot.client.model.ConfigureCommunicationChannelPreferencesRequest; import com.thoughtspot.client.model.ConfigureSecuritySettingsRequest; import com.thoughtspot.client.model.ConnectionConfigurationResponse; @@ -27,6 +31,7 @@ import com.thoughtspot.client.model.CopyObjectRequest; import com.thoughtspot.client.model.CreateAgentConversationRequest; import com.thoughtspot.client.model.CreateCalendarRequest; +import com.thoughtspot.client.model.CreateCollectionRequest; import com.thoughtspot.client.model.CreateConfigRequest; import com.thoughtspot.client.model.CreateConnectionConfigurationRequest; import com.thoughtspot.client.model.CreateConnectionRequest; @@ -45,11 +50,13 @@ import com.thoughtspot.client.model.CreateWebhookConfigurationRequest; import com.thoughtspot.client.model.DbtSearchResponse; import com.thoughtspot.client.model.DeactivateUserRequest; +import com.thoughtspot.client.model.DeleteCollectionRequest; import com.thoughtspot.client.model.DeleteConfigRequest; import com.thoughtspot.client.model.DeleteConnectionConfigurationRequest; import com.thoughtspot.client.model.DeleteConnectionRequest; import com.thoughtspot.client.model.DeleteMetadataRequest; import com.thoughtspot.client.model.DeleteOrgEmailCustomizationRequest; +import com.thoughtspot.client.model.DeleteVariablesRequest; import com.thoughtspot.client.model.DeleteWebhookConfigurationsRequest; import com.thoughtspot.client.model.DeployCommitRequest; import com.thoughtspot.client.model.DeployResponse; @@ -97,10 +104,12 @@ import com.thoughtspot.client.model.MetadataSearchResponse; import com.thoughtspot.client.model.ObjectPrivilegesOfMetadataResponse; import com.thoughtspot.client.model.OrgResponse; +import com.thoughtspot.client.model.ParameterizeMetadataFieldsRequest; import com.thoughtspot.client.model.ParameterizeMetadataRequest; import com.thoughtspot.client.model.PermissionOfMetadataResponse; import com.thoughtspot.client.model.PermissionOfPrincipalsResponse; import com.thoughtspot.client.model.PublishMetadataRequest; +import com.thoughtspot.client.model.PutVariableValuesRequest; import com.thoughtspot.client.model.QueryGetDecomposedQueryRequest; import com.thoughtspot.client.model.RepoConfigObject; import com.thoughtspot.client.model.ResetUserPasswordRequest; @@ -117,6 +126,9 @@ import com.thoughtspot.client.model.RevokeTokenRequest; import com.thoughtspot.client.model.RoleResponse; import com.thoughtspot.client.model.SearchCalendarsRequest; +import com.thoughtspot.client.model.SearchChannelHistoryRequest; +import com.thoughtspot.client.model.SearchChannelHistoryResponse; +import com.thoughtspot.client.model.SearchCollectionsRequest; import com.thoughtspot.client.model.SearchCommitsRequest; import com.thoughtspot.client.model.SearchCommunicationChannelPreferencesRequest; import com.thoughtspot.client.model.SearchConfigRequest; @@ -156,6 +168,7 @@ import com.thoughtspot.client.model.UnparameterizeMetadataRequest; import com.thoughtspot.client.model.UnpublishMetadataRequest; import com.thoughtspot.client.model.UpdateCalendarRequest; +import com.thoughtspot.client.model.UpdateCollectionRequest; import com.thoughtspot.client.model.UpdateColumnSecurityRulesRequest; import com.thoughtspot.client.model.UpdateConfigRequest; import com.thoughtspot.client.model.UpdateConnectionConfigurationRequest; @@ -177,6 +190,7 @@ import com.thoughtspot.client.model.UpdateWebhookConfigurationRequest; import com.thoughtspot.client.model.User; import com.thoughtspot.client.model.UserGroupResponse; +import com.thoughtspot.client.model.ValidateCommunicationChannelRequest; import com.thoughtspot.client.model.ValidateMergeRequest; import com.thoughtspot.client.model.ValidateTokenRequest; import com.thoughtspot.client.model.Variable; @@ -402,7 +416,49 @@ public void copyObjectTest() throws ApiException { } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided + * context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include the + * `metadata_context` parameter to define the conversation context. The context type + * can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific + * data source. Provide `data_source_identifier` in `data_source_context` + * for a single data source, or `data_source_identifiers` for multi-data-source + * context. The deprecated `guid` field is accepted for backwards compatibility. - + * `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the + * most relevant datasets for the user's queries. > **Note for callers on versions + * 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the + * `guid` field instead of the above. Example: `{ \"type\": + * \"data_source\", \"data_source_context\": { \"guid\": + * \"<worksheet-id>\" } }`. The `conversation_settings` parameter + * controls which Spotter capabilities are enabled for the conversation: - + * `enable_contextual_change_analysis` (default: `true`, **deprecated from + * 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect + * on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` + * (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; + * setting this to `false` has no effect on versions >= 26.2.0.cl - + * `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — + * always enabled in Spotter 3; setting this to `false` has no effect on versions + * >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available + * from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation + * history If the request is successful, the response includes a unique + * `conversation_identifier` that must be passed to + * `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` + * to send messages within this conversation. The response also includes + * `conversation_id` with the same value for backwards compatibility; use + * `conversation_identifier` for new integrations. #### Example request + * ```json { \"metadata_context\": { \"type\": + * \"DATA_SOURCE\", \"data_source_context\": { + * \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, + * \"conversation_settings\": {} } ``` #### Error responses | Code | + * Description | | ---- | + * --------------------------------------------------------------------------------------------------------------------------------------- + * | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > > - This + * endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version + * 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to + * enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ @@ -475,6 +531,23 @@ public void createCalendarTest() throws ApiException { // TODO: test validations } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to + * organize and group related metadata objects such as Liveboards, Answers, worksheets, and + * other data objects. You can also create nested collections (sub-collections) to build a + * hierarchical structure. #### Supported operations The API endpoint lets you perform the + * following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, + * Logical Tables) to the collection * Create nested collections by adding sub-collections + * + * @throws ApiException if the Api call fails + */ + @Test + public void createCollectionTest() throws ApiException { + CreateCollectionRequest createCollectionRequest = null; + Collection response = api.createCollection(createCollectionRequest); + // TODO: test validations + } + /** * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. * Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If @@ -516,15 +589,23 @@ public void createConfigTest() throws ApiException { * \"accountName\":\"thoughtspot_partner\", * \"user\":\"tsadmin\", \"password\":\"TestConn123\", * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", * \"externalDatabases\":[ ] } ``` 2. Set `validate` to - * `false`. #### Create a connection with tables To create a connection with tables: - * 1. Pass these parameters in your API request. * Name of the connection. * Type of the data - * warehouse to connect to. * A JSON map of configuration attributes, database details, and - * table properties in `data_warehouse_config` as shown in the following example: - * ``` { \"configuration\":{ - * \"accountName\":\"thoughtspot_partner\", + * `false`. **NOTE:** If the `authentication_type` is anything other than + * SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. + * If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the + * authentication type. #### Create a connection with tables If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the + * `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and + * `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is + * required. To create a connection with tables: 1. Pass these parameters in your API request. * + * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of + * configuration attributes, database details, and table properties in + * `data_warehouse_config` as shown in the following example: ``` { + * \"configuration\":{ \"accountName\":\"thoughtspot_partner\", * \"user\":\"tsadmin\", \"password\":\"TestConn123\", * \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, + * \"authenticationType\": \"SERVICE_ACCOUNT\", * \"externalDatabases\":[ { \"name\":\"AllDatatypes\", * \"isAutoCreated\":false, \"schemas\":[ { * \"name\":\"alldatatypes\", \"tables\":[ { @@ -541,7 +622,10 @@ public void createConfigTest() throws ApiException { * \"isImported\":false, \"tableName\":\"allDatatypes\", * \"schemaName\":\"alldatatypes\", * \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set - * `validate` to `true`. + * `validate` to `true`. **NOTE:** If the `authentication_type` is + * anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType + * property in the payload. If you do not specify authenticationType, the API will default to + * SERVICE_ACCOUNT as the authentication type. * * @throws ApiException if the Api call fails */ @@ -583,13 +667,18 @@ public void createConnectionConfigurationTest() throws ApiException { } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation - * based on a specific data model. Requires at least view access to the metadata object - * specified in the request. #### Usage guidelines This API requires the - * `metadata_identifier` parameter to define the context for the conversation. You can - * also specify the tokens to initiate the conversation as shown in this example: - * `\"tokens\": \"[tea],[sales],[type]\"` If the API request is - * successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model + * for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and + * at least view access to the metadata object specified in the request. #### Usage guidelines + * The request must include: - `metadata_identifier`: the unique ID of the data source + * that provides context for the conversation Optionally, you can provide: - `tokens`: + * a token string to set initial context for the conversation (e.g., `\"[sales],[item + * type],[state]\"`) If the request is successful, ThoughtSpot returns a unique + * `conversation_identifier` that must be passed to `sendMessage` to + * continue the conversation. #### Error responses | Code | Description | |------|-------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot * support to enable Spotter on your cluster. @@ -997,6 +1086,26 @@ public void deleteCalendarTest() throws ApiException { // TODO: test validations } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete + * options * **delete_children**: When set to `true`, deletes the child objects + * (metadata items) within the collection that the user has access to. Objects that the user + * does not have permission to delete will be skipped. * **dry_run**: When set to + * `true`, performs a preview of the deletion operation without actually deleting + * anything. The response shows what would be deleted, allowing you to review before committing + * the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata + * objects that were successfully deleted * **metadata_skipped**: List of metadata objects that + * were skipped due to lack of permissions or other constraints + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteCollectionTest() throws ApiException { + DeleteCollectionRequest deleteCollectionRequest = null; + CollectionDeleteResponse response = api.deleteCollection(deleteCollectionRequest); + // TODO: test validations + } + /** * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot * instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If @@ -1257,11 +1366,14 @@ public void deleteUserGroupTest() throws ApiException { } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. - * Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you - * to manage Formula Variables in the current organization scope. The API endpoint requires: * - * The variable identifier (ID or name) The operation will fail if: * The user lacks required - * permissions * The variable doesn't exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and + * will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. + * Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. + * The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifier (ID or name) The + * operation will fail if: * The user lacks required permissions * The variable doesn't + * exist * The variable is being used by other objects * * @throws ApiException if the Api call fails */ @@ -1272,6 +1384,23 @@ public void deleteVariableTest() throws ApiException { // TODO: test validations } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * + * The user lacks required permissions * Any of the variables don't exist * Any of the + * variables are being used by other objects + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteVariablesTest() throws ApiException { + DeleteVariablesRequest deleteVariablesRequest = null; + api.deleteVariables(deleteVariablesRequest); + // TODO: test validations + } + /** * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or * name. Returns status of each deletion operation, including successfully deleted webhooks and @@ -1912,19 +2041,25 @@ public void getCustomAccessTokenTest() throws ApiException { } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a - * user-submitted natural language query. To use this API, the user must have at least - * view-level access to the underlying metadata entities referenced in the response. #### Usage - * guidelines The request must include a `query` string via the request body. The - * returned results include metadata such as: - `confidence`: a float indicating the - * model's confidence in the relevance of each recommendation - `details`: - * includes `data_source_identifier`, `data_source_name`, and - * `description` of each recommended data source - `reasoning`: rationale - * provided by the LLM to explain why each data source was recommended If the API request is - * successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant - * reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may - * be introduced before it is made Generally Available. > * This endpoint requires Spotter — - * please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural + * language query, ranked by confidence with LLM-generated reasoning. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying + * metadata entities referenced in the response. #### Usage guidelines The request must include: + * - `query`: the natural language question to find relevant data sources for If the + * request is successful, the API returns a ranked list of suggested data sources, each + * containing: - `confidence`: a float score indicating the model's confidence in + * the relevance of the suggestion - `details`: metadata about the data source - + * `data_source_identifier`: the unique ID of the data source - + * `data_source_name`: the display name of the data source - `description`: + * a description of the data source - `reasoning`: LLM-generated rationale explaining + * why the data source was recommended #### Error responses | Code | Description | + * |------|--------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the underlying metadata entities. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally + * Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to + * enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ @@ -1978,23 +2113,28 @@ public void getFullAccessTokenTest() throws ApiException { } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) - * instructions for a specific data-model. These instructions guide the AI system in - * understanding data context and generating more accurate responses when processing natural - * language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the - * request must include: - `data_source_identifier`: The unique ID of the data-model - * to retrieve NL instructions The API returns a response object with: - - * `nl_instructions_info`: An array of instruction objects, each containing: - - * `instructions`: Array of text instructions for natural language processing - - * `scope`: The scope of the instruction (`GLOBAL`). It can be extended to - * data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that - * apply globally across the system on the given data-model (currently only global instructions - * are supported) > ###### Note: > * To use this API, the user needs atleast view access - * on the data-model and they must use corresponding org related bearerToken where the - * data-model exists. > * This endpoint is currently in Beta. Breaking changes may be - * introduced before the endpoint is made Generally Available. > * Available from version - * 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot - * Support to enable Spotter on your cluster. > * Use this API to view currently configured + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured + * for a specific data model. These instructions guide the AI system in understanding data + * context and generating more accurate responses. Requires `CAN_USE_SPOTTER` + * privilege, at least view access on the data model, and a bearer token corresponding to the + * org where the data model exists. #### Usage guidelines The request must include: - + * `data_source_identifier`: the unique ID of the data model to retrieve instructions + * for If the request is successful, the API returns: - `nl_instructions_info`: an + * array of instruction objects, each containing: - `instructions`: the configured + * text instructions for AI processing - `scope`: the scope of the instruction — + * currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: + * Instructions that apply globally across the system on the given data-model (currently only + * global instructions are supported) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * view access on the data model, or the bearer token does not correspond to the org where the + * data model exists. | > ###### Note: > > - To use this API, the user needs at least + * view access on the data model, and must use the bearer token corresponding to the org where + * the data model exists. > - This endpoint is currently in Beta. Breaking changes may be + * introduced before the endpoint is made Generally Available. > - Available from version + * 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot + * Support to enable Spotter on your cluster. > - Use this API to review currently configured * instructions before modifying them with `setNLInstructions`. * * @throws ApiException if the Api call fails @@ -2049,26 +2189,33 @@ public void getObjectAccessTokenTest() throws ApiException { } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical - * sub-questions using relevant contextual metadata. To use this API, the user must have at - * least view-level access to the referenced metadata objects. #### Usage guidelines To - * accurately generate relevant questions, the request must include at least one of the - * following metadata identifiers within `metadata_context` : - * `conversation_identifier`, `answer_identifiers`, - * `liveboard_identifiers`, or `data_source_identifiers`. You can further - * enhance the quality and precision of breakdown by providing additional `ai_context` - * such as: - `content`: User provided content like text data, csv data as a string - * message to provide context & potentially improve the quality of the response. - - * `instructions`: User specific text instructions sent to AI system for processing - * the query. Additional optional parameters include: - `limit_relevant_questions`: - * Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - - * `bypass_cache`: If set to true, forces fresh computation instead of returning - * cached results. If the API request is successful, ThoughtSpot returns a list of relevant - * analytical queries, each aligned with the user's original question. Each returned - * question includes the query string, along with the identifier and name of the corresponding - * data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes - * may be introduced before the endpoint is made Generally Available. > * This endpoint - * requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller + * analytical sub-questions, each mapped to a relevant data source. Requires + * `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced + * metadata objects. #### Usage guidelines The request must include: - `query`: the + * natural language question to decompose into analytical sub-questions - + * `metadata_context`: at least one of the following context identifiers to guide + * question generation: - `conversation_identifier` — an existing conversation session + * ID - `answer_identifiers` — a list of Answer GUIDs - + * `liveboard_identifiers` — a list of Liveboard GUIDs - + * `data_source_identifiers` — a list of data source GUIDs Optional parameters for + * refining the output: - `ai_context`: additional context to improve response quality + * - `content` — supplementary text or CSV data as string input - + * `instructions` — custom text instructions for the AI system - + * `limit_relevant_questions`: maximum number of questions to return (default: + * `5`) - `bypass_cache`: if `true`, forces fresh computation + * instead of returning cached results If the request is successful, the API returns a list of + * relevant analytical questions, each containing: - `query`: the generated + * sub-question - `data_source_identifier`: the unique ID of the data source the + * question targets - `data_source_name`: the display name of the corresponding data + * source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ @@ -2303,15 +2450,17 @@ public void manageObjectPrivilegeTest() throws ApiException { } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing - * fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the - * metadata object. The API endpoint allows parameterizing the following types of metadata - * objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field - * type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName - * * tableName For a Connection or Connection Config, the field type is always - * `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the - * Connection or Connection Config that needs to be parameterized. For Connection Config, the - * only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API + * endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) + * instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires + * appropriate permissions to modify the metadata object. The API endpoint allows parameterizing + * the following types of metadata objects: * Logical Tables * Connections * Connection Configs + * For a Logical Table the field type must be `ATTRIBUTE` and field name can be one + * of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field + * type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact + * property of the Connection or Connection Config that needs to be parameterized. For + * Connection Config, the only supported field name is: * impersonate_user * * @throws ApiException if the Api call fails */ @@ -2322,6 +2471,29 @@ public void parameterizeMetadataTest() throws ApiException { // TODO: test validations } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for + * LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata + * objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for + * LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API + * endpoint allows parameterizing the following types of metadata objects: * Logical Tables * + * Connections * Connection Configs For a Logical Table, the field type must be + * `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName + * For a Connection or Connection Config, the field type is always + * `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of + * the Connection or Connection Config that need to be parameterized. For Connection Config, + * supported field names include: * impersonate_user You can parameterize multiple fields at + * once by providing an array of field names. + * + * @throws ApiException if the Api call fails + */ + @Test + public void parameterizeMetadataFieldsTest() throws ApiException { + ParameterizeMetadataFieldsRequest parameterizeMetadataFieldsRequest = null; + api.parameterizeMetadataFields(parameterizeMetadataFieldsRequest); + // TODO: test validations + } + /** * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows @@ -2339,7 +2511,56 @@ public void publishMetadataTest() throws ApiException { } /** - * Version: 10.7.0.cl or later + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a + * specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting + * values from the variable * Resetting all values When updating variable values, you need to + * specify: * The variable identifier (ID or name) * The values to add/replace/remove * The + * operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - + * Adds values to the variable if this is a list type variable, else same as replace. * REPLACE + * - Replaces all values of a given set of constraints with the current set of values. * REMOVE + * - Removes any values which match the set of conditions of the variables if this is a list + * type variable, else clears value. * RESET - Removes all constraints for the given variable, + * scope is ignored + * + * @throws ApiException if the Api call fails + */ + @Test + public void putVariableValuesTest() throws ApiException { + String identifier = null; + PutVariableValuesRequest putVariableValuesRequest = null; + api.putVariableValues(identifier, putVariableValuesRequest); + // TODO: test validations + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead + * (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question + * into smaller, actionable analytical sub-questions, each mapped to a relevant data source for + * independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level + * access to the referenced metadata objects. #### Usage guidelines The request accepts the + * following parameters: - `nlsRequest`: contains the user `query` to + * decompose, along with optional `instructions` and `bypassCache` flag - + * `worksheetIds`: list of data source identifiers to scope the decomposition - + * `answerIds`: list of Answer GUIDs whose data guides the response - + * `liveboardIds`: list of Liveboard GUIDs whose data guides the response - + * `conversationId`: an existing conversation session ID for context continuity - + * `content`: supplementary text or CSV data to improve response quality - + * `maxDecomposedQueries`: maximum number of sub-questions to return (default: + * `5`) If the request is successful, the API returns a + * `decomposedQueryResponse` containing a list of `decomposedQueries`, each + * with: - `query`: the generated analytical sub-question - `worksheetId`: + * the unique ID of the data source the question targets - `worksheetName`: the + * display name of the corresponding data source #### Error responses | Code | Description | + * |------|---------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view access to the referenced metadata objects. | > ###### Note: > * This + * endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new + * integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > * This endpoint requires Spotter — + * please contact ThoughtSpot support to enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ @@ -2463,6 +2684,53 @@ public void searchCalendarsTest() throws ApiException { // TODO: test validations } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as + * webhooks. Returns channel-level delivery status for each job execution record. Use this to + * monitor channel health and delivery success rates across events. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. If [Role-Based Access Control + * (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the + * following constraints apply: - `job_ids`, `channel_identifiers`, and + * `events` each accept at most one element. - When `job_ids` is provided, + * it is used as the sole lookup key and other filter fields are ignored. - When + * `job_ids` is not provided, `channel_identifiers` and `events` + * are both required. Each must contain exactly one element, and the event object must include + * the `identifier` field. - Records older than the configured retention period are + * not returned. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchChannelHistoryTest() throws ApiException { + SearchChannelHistoryRequest searchChannelHistoryRequest = null; + SearchChannelHistoryResponse response = + api.searchChannelHistory(searchChannelHistoryRequest); + // TODO: test validations + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get + * details of a specific collection, specify the collection GUID or name. You can also filter + * the API response based on the collection name pattern, author, and other criteria. #### + * Search options * **name_pattern**: Use '%' as a wildcard character to match + * collection names * **collection_identifiers**: Search for specific collections by their GUIDs + * or names * **include_metadata**: When set to `true`, includes the metadata objects + * within each collection in the response **NOTE**: If the API returns an empty list, consider + * increasing the value of the `record_size` parameter. To search across all available + * collections, set `record_size` to `-1`. + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchCollectionsTest() throws ApiException { + SearchCollectionsRequest searchCollectionsRequest = null; + CollectionSearchResponse response = api.searchCollections(searchCollectionsRequest); + // TODO: test validations + } + /** * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires * `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control @@ -2865,19 +3133,28 @@ public void searchWebhookConfigurationsTest() throws ApiException { } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) - * conversation by submitting one or more natural language messages. To use this API, the user - * must have access to the relevant conversational session (via conversation_identifier) and - * submit at least one message. #### Usage guidelines To initiate or continue a conversation, - * the request must include: - `conversation_identifier`: a unique session ID for - * continuity and message tracking - `messages`: an array of one or more text - * messages, each with a value and type The API returns a array of object with a type, message, - * and metadata. - `type`: Type of the message — text, answer, or error. - - * `message`: Main content of the response. - `metadata`: Additional info - * depending on the message type. > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` + * instead. Send natural language messages to an existing Spotter agent conversation and returns + * the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and + * access to the metadata object associated with the conversation. The user must have access to + * the conversation session referenced by `conversation_identifier`. A conversation + * must first be created using the `createAgentConversation` API. #### Usage + * guidelines The request must include: - `conversation_identifier`: the unique + * session ID returned by `createAgentConversation`, used for context continuity and + * message tracking - `messages`: an array of one or more text messages to send to the + * agent The API returns an array of response objects, each containing: - `type`: the + * kind of response — `text`, `answer`, or `error` - + * `message`: the main content of the response - `metadata`: additional + * information depending on the message type (e.g., answer metadata includes analytics and + * visualization details) #### Error responses | Code | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. + * > - This endpoint is currently in Beta. Breaking changes may be introduced before the + * endpoint is made Generally Available. > - This endpoint requires Spotter - please contact + * ThoughtSpot support to enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ @@ -2890,25 +3167,40 @@ public void sendAgentMessageTest() throws ApiException { } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) - * conversation by submitting one or more natural language messages. To use this API, the user - * must have access to the relevant conversational session (via conversation_identifier) and - * submit at least one message. #### Usage guidelines To initiate or continue a conversation, - * the request must include: - `conversation_identifier`: a unique session ID for - * continuity and message tracking - `messages`: an array of one or more text - * messages, each with a value and type Additionally, user can specify what tool can be included - * `conversation_settings` parameter, which supports: - - * `enable_contextual_change_analysis` (default: false) - - * `enable_natural_language_answer_generation` (default: true) - - * `enable_reasoning` (default: false) If the request is valid, the API returns a - * stream of messages in real time, including: - `ack`: confirms receipt of the - * request - `text / text-chunk`: content chunks, optionally formatted (e.g., - * markdown) - `answer`: the final structured response with metadata and analytics - - * `error`: if a failure occurs - `notification`: notification messages for - * operation being performed > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use + * `sendAgentConversationMessageStreaming` instead. Sends one or more natural language + * messages to an existing Spotter agent conversation and returns the response as a real-time + * Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the + * metadata object associated with the conversation. The user must have access to the + * conversation session referenced by `conversation_identifier`. A conversation must + * first be created using the `createAgentConversation` API. #### Usage guidelines The + * request must include: - `conversation_identifier`: the unique session ID returned + * by `createAgentConversation`, used for context continuity and message tracking - + * `messages`: an array of one or more text messages to send to the agent If the + * request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form + * `data: [{\"type\": \"...\", ...}]` — a JSON array of event + * objects. Event types include: - `ack`: confirms receipt of the request + * (`node_id`) - `conv_title`: conversation title (`title`, + * `conv_id`) - `notification`: status updates on operations + * (`group_id`, `metadata`, `code` — e.g. + * `TOOL_CALL_NOTIFICATION`, `nls_start`, + * `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks + * (`id`, `group_id`, `metadata` with `format` and + * `type` such as `thinking` or `text`, `content`) - + * `text`: full text block with same structure as `text-chunk` - + * `answer`: structured answer with metadata (`id`, `group_id`, + * `metadata` with `sage_query`, `session_id`, `title`, + * etc., `title`) - `error`: if a failure occurs #### Error responses | Code + * | Description | + * |------|----------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks permission on the referenced conversation. | > ###### Note: > > - This + * endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new + * integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - This endpoint requires Spotter - + * please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming + * protocol uses Server-Sent Events (SSE). * * @throws ApiException if the Api call fails */ @@ -2921,16 +3213,28 @@ public void sendAgentMessageStreamingTest() throws ApiException { } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation - * within the context of the metadata model. Requires at least view access to the metadata - * object specified in the request. #### Usage guidelines The API requires you to specify the - * `conversation_identifier` in the request path, and a - * `metadata_identifier` and `message` string in the request body. If the - * API request is successful, ThoughtSpot returns the session ID, tokens used in the - * conversation, and visualization type. > ###### Note: > * This endpoint is currently in - * Beta. Breaking changes may be introduced before the endpoint is made Generally Available. - * > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter - * on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the + * context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view + * access to the metadata object specified in the request. A conversation must first be created + * using the `createConversation` API. #### Usage guidelines The request must include: + * - `conversation_identifier`: the unique session ID returned by + * `createConversation` - `metadata_identifier`: the unique ID of the data + * source used for the conversation - `message`: a natural language string with the + * follow-up question If the request is successful, the API returns an array of response + * messages, each containing: - `session_identifier`: the unique ID of the generated + * response - `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ @@ -2947,22 +3251,30 @@ public void sendMessageTest() throws ApiException { * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions * for a specific data-model to improve AI-generated answers and query processing. These * instructions help guide the AI system to better understand the data context and provide more - * accurate responses. #### Usage guidelines To set NL instructions for a data-model, the - * request must include: - `data_source_identifier`: The unique ID of the data-model - * for which to set NL instructions - `nl_instructions_info`: An array of instruction - * objects, each containing: - `instructions`: Array of text instructions for the LLM - * - `scope`: The scope of the instruction (`GLOBAL`). Currently only - * `GLOBAL` is supported. It can be extended to data-model-user scope in future. The - * API returns a response object with: - `success`: Boolean indicating whether the - * operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply - * globally for that data-model across the system > ###### Note: > * To use this API, the - * user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must - * use corresponding org related bearerToken where the data-model exists. > * This endpoint - * is currently in Beta. Breaking changes may be introduced before the endpoint is made - * Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint - * requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - * * Instructions help improve the accuracy and relevance of AI-generated responses for the - * specified data-model. + * accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or + * `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to + * the org where the data model exists. #### Usage guidelines To set NL instructions for a + * data-model, the request must include: - `data_source_identifier`: The unique ID of + * the data-model for which to set NL instructions - `nl_instructions_info`: An array + * of instruction objects, each containing: - `instructions`: Array of text + * instructions for the LLM - `scope`: The scope of the instruction + * (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to + * data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that + * apply to all users querying this data model If the request is successful, the API returns: - + * `success`: a boolean indicating whether the operation completed successfully #### + * Error responses | Code | Description | + * |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks + * edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token + * does not correspond to the org where the data model exists. | > ###### Note: > > - + * To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` + * on the data model, and must use the bearer token corresponding to the org where the data + * model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced + * before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and + * later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable + * Spotter on your cluster. > - Instructions help improve the accuracy and relevance of + * AI-generated responses for the specified data-model. * * @throws ApiException if the Api call fails */ @@ -2999,12 +3311,27 @@ public void shareMetadataTest() throws ApiException { } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated - * response based on a specified data model. Requires at least view access to the metadata - * object specified in the request. > ###### Note: > * This endpoint is currently in Beta. - * Breaking changes may be introduced before the endpoint is made Generally Available. > * - * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your - * cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model + * and returns a single AI-generated answer without requiring a conversation session. Requires + * `CAN_USE_SPOTTER` privilege and at least view access to the metadata object + * specified in the request. #### Usage guidelines The request must include: - + * `query`: a natural language question (e.g., \"What were total sales last + * quarter?\") - `metadata_identifier`: the unique ID of the data source to query + * against If the request is successful, the API returns a response message containing: - + * `session_identifier`: the unique ID of the generated response - + * `generation_number`: the generation number of the response - + * `message_type`: the type of the response (e.g., `TSAnswer`) - + * `visualization_type`: the generated visualization type (`Chart`, + * `Table`, or `Undefined`) - `tokens` / + * `display_tokens`: the search tokens and user-friendly display tokens for the + * response #### Error responses | Code | Description | + * |------|-----------------------------------------------------------------------------------------------------------------------------------------| + * | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | + * Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or + * lacks view permission on the specified metadata object. | > ###### Note: > * This + * endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made + * Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot + * support to enable Spotter on your cluster. * * @throws ApiException if the Api call fails */ @@ -3113,6 +3440,26 @@ public void updateCalendarTest() throws ApiException { // TODO: test validations } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported + * operations This API endpoint lets you perform the following operations: * Update collection + * name and description * Change visibility settings * Add metadata objects to the collection + * (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace + * all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: + * Adds the specified metadata objects to the existing collection without removing current items + * * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: + * Replaces all existing metadata objects with the specified items (default behavior) + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateCollectionTest() throws ApiException { + String collectionIdentifier = null; + UpdateCollectionRequest updateCollectionRequest = null; + api.updateCollection(collectionIdentifier, updateCollectionRequest); + // TODO: test validations + } + /** * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified * tables. This API endpoint allows you to create, update, or delete column-level security rules @@ -3676,17 +4023,20 @@ public void updateVariableTest() throws ApiException { } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for - * multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES - * permission allows you to manage Formula Variables in the current organization scope. The API - * endpoint allows: * Adding new values to variables * Replacing existing values * Deleting - * values from variables When updating variable values, you need to specify: * The variable - * identifiers * The values to add/replace/remove for each variable * The operation to perform - * (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the - * variable if this is a list type variable, else same as replace. * REPLACE - Replaces all - * values of a given set of constraints with the current set of values. * REMOVE - Removes any - * values which match the set of conditions of the variables if this is a list type variable, - * else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint + * is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) + * instead. Allows updating values for multiple variables in ThoughtSpot. Requires + * ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula + * Variables in the current organization scope. The API endpoint allows: * Adding new values to + * variables * Replacing existing values * Deleting values from variables When updating variable + * values, you need to specify: * The variable identifiers * The values to add/replace/remove + * for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on + * operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constrains for a given variable, scope is ignored * * @throws ApiException if the Api call fails */ @@ -3715,6 +4065,27 @@ public void updateWebhookConfigurationTest() throws ApiException { // TODO: test validations } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is + * properly set up and can receive events. - Use `channel_type` to specify the type of + * communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to + * provide the unique identifier or name for the communication channel. - Use + * `event_type` to specify the event type to validate for this channel. Requires + * `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has + * developer privilege**) privilege. For webhook channels, users with + * `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to + * perform this action. + * + * @throws ApiException if the Api call fails + */ + @Test + public void validateCommunicationChannelTest() throws ApiException { + ValidateCommunicationChannelRequest validateCommunicationChannelRequest = null; + CommunicationChannelValidateResponse response = + api.validateCommunicationChannel(validateCommunicationChannelRequest); + // TODO: test validations + } + /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for * the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer diff --git a/sdks/java/src/test/java/com/thoughtspot/client/api/VariableApiTest.java b/sdks/java/src/test/java/com/thoughtspot/client/api/VariableApiTest.java index b7813852d..ac15546b4 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/api/VariableApiTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/api/VariableApiTest.java @@ -6,6 +6,8 @@ import com.thoughtspot.client.ApiException; import com.thoughtspot.client.model.CreateVariableRequest; +import com.thoughtspot.client.model.DeleteVariablesRequest; +import com.thoughtspot.client.model.PutVariableValuesRequest; import com.thoughtspot.client.model.SearchVariablesRequest; import com.thoughtspot.client.model.UpdateVariableRequest; import com.thoughtspot.client.model.UpdateVariableValuesRequest; @@ -44,11 +46,14 @@ public void createVariableTest() throws ApiException { } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. - * Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you - * to manage Formula Variables in the current organization scope. The API endpoint requires: * - * The variable identifier (ID or name) The operation will fail if: * The user lacks required - * permissions * The variable doesn't exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and + * will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. + * Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. + * The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current + * organization scope. The API endpoint requires: * The variable identifier (ID or name) The + * operation will fail if: * The user lacks required permissions * The variable doesn't + * exist * The variable is being used by other objects * * @throws ApiException if the Api call fails */ @@ -59,6 +64,47 @@ public void deleteVariableTest() throws ApiException { // TODO: test validations } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from + * ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * + * The user lacks required permissions * Any of the variables don't exist * Any of the + * variables are being used by other objects + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteVariablesTest() throws ApiException { + DeleteVariablesRequest deleteVariablesRequest = null; + api.deleteVariables(deleteVariablesRequest); + // TODO: test validations + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a + * specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES + * permission allows you to manage Formula Variables in the current organization scope. The API + * endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting + * values from the variable * Resetting all values When updating variable values, you need to + * specify: * The variable identifier (ID or name) * The values to add/replace/remove * The + * operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - + * Adds values to the variable if this is a list type variable, else same as replace. * REPLACE + * - Replaces all values of a given set of constraints with the current set of values. * REMOVE + * - Removes any values which match the set of conditions of the variables if this is a list + * type variable, else clears value. * RESET - Removes all constraints for the given variable, + * scope is ignored + * + * @throws ApiException if the Api call fails + */ + @Test + public void putVariableValuesTest() throws ApiException { + String identifier = null; + PutVariableValuesRequest putVariableValuesRequest = null; + api.putVariableValues(identifier, putVariableValuesRequest); + // TODO: test validations + } + /** * Search variables Version: 10.14.0.cl or later Allows searching for variables in ThoughtSpot. * Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage @@ -95,17 +141,20 @@ public void updateVariableTest() throws ApiException { } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for - * multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES - * permission allows you to manage Formula Variables in the current organization scope. The API - * endpoint allows: * Adding new values to variables * Replacing existing values * Deleting - * values from variables When updating variable values, you need to specify: * The variable - * identifiers * The values to add/replace/remove for each variable * The operation to perform - * (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the - * variable if this is a list type variable, else same as replace. * REPLACE - Replaces all - * values of a given set of constraints with the current set of values. * REMOVE - Removes any - * values which match the set of conditions of the variables if this is a list type variable, - * else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint + * is deprecated and will be removed from ThoughtSpot in a future release. Use [POST + * /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) + * instead. Allows updating values for multiple variables in ThoughtSpot. Requires + * ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula + * Variables in the current organization scope. The API endpoint allows: * Adding new values to + * variables * Replacing existing values * Deleting values from variables When updating variable + * values, you need to specify: * The variable identifiers * The values to add/replace/remove + * for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on + * operation type: * ADD - Adds values to the variable if this is a list type variable, else + * same as replace. * REPLACE - Replaces all values of a given set of constraints with the + * current set of values. * REMOVE - Removes any values which match the set of conditions of the + * variables if this is a list type variable, else clears value. * RESET - Removes all + * constrains for a given variable, scope is ignored * * @throws ApiException if the Api call fails */ diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryEventInfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryEventInfoTest.java new file mode 100644 index 000000000..2bfd0fbe4 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryEventInfoTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ChannelHistoryEventInfo */ +public class ChannelHistoryEventInfoTest { + private final ChannelHistoryEventInfo model = new ChannelHistoryEventInfo(); + + /** Model tests for ChannelHistoryEventInfo */ + @Test + public void testChannelHistoryEventInfo() { + // TODO: test ChannelHistoryEventInfo + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'runId' */ + @Test + public void runIdTest() { + // TODO: test runId + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryEventInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryEventInputTest.java new file mode 100644 index 000000000..16a9281b2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryEventInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ChannelHistoryEventInput */ +public class ChannelHistoryEventInputTest { + private final ChannelHistoryEventInput model = new ChannelHistoryEventInput(); + + /** Model tests for ChannelHistoryEventInput */ + @Test + public void testChannelHistoryEventInput() { + // TODO: test ChannelHistoryEventInput + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryJobTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryJobTest.java new file mode 100644 index 000000000..246bc22c3 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelHistoryJobTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ChannelHistoryJob */ +public class ChannelHistoryJobTest { + private final ChannelHistoryJob model = new ChannelHistoryJob(); + + /** Model tests for ChannelHistoryJob */ + @Test + public void testChannelHistoryJob() { + // TODO: test ChannelHistoryJob + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'creationTimeInMillis' */ + @Test + public void creationTimeInMillisTest() { + // TODO: test creationTimeInMillis + } + + /** Test the property 'event' */ + @Test + public void eventTest() { + // TODO: test event + } + + /** Test the property 'recipients' */ + @Test + public void recipientsTest() { + // TODO: test recipients + } + + /** Test the property 'detail' */ + @Test + public void detailTest() { + // TODO: test detail + } + + /** Test the property 'tryCount' */ + @Test + public void tryCountTest() { + // TODO: test tryCount + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelValidationAwsS3InfoTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelValidationAwsS3InfoTest.java new file mode 100644 index 000000000..615dbcf57 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelValidationAwsS3InfoTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ChannelValidationAwsS3Info */ +public class ChannelValidationAwsS3InfoTest { + private final ChannelValidationAwsS3Info model = new ChannelValidationAwsS3Info(); + + /** Model tests for ChannelValidationAwsS3Info */ + @Test + public void testChannelValidationAwsS3Info() { + // TODO: test ChannelValidationAwsS3Info + } + + /** Test the property 'bucketName' */ + @Test + public void bucketNameTest() { + // TODO: test bucketName + } + + /** Test the property 'fileName' */ + @Test + public void fileNameTest() { + // TODO: test fileName + } + + /** Test the property 'objectKey' */ + @Test + public void objectKeyTest() { + // TODO: test objectKey + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelValidationDetailTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelValidationDetailTest.java new file mode 100644 index 000000000..57ddd5d10 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ChannelValidationDetailTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ChannelValidationDetail */ +public class ChannelValidationDetailTest { + private final ChannelValidationDetail model = new ChannelValidationDetail(); + + /** Model tests for ChannelValidationDetail */ + @Test + public void testChannelValidationDetail() { + // TODO: test ChannelValidationDetail + } + + /** Test the property 'validationStep' */ + @Test + public void validationStepTest() { + // TODO: test validationStep + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'httpStatus' */ + @Test + public void httpStatusTest() { + // TODO: test httpStatus + } + + /** Test the property 'errorMessage' */ + @Test + public void errorMessageTest() { + // TODO: test errorMessage + } + + /** Test the property 'awsS3Info' */ + @Test + public void awsS3InfoTest() { + // TODO: test awsS3Info + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionDeleteResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionDeleteResponseTest.java new file mode 100644 index 000000000..620c9e484 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionDeleteResponseTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CollectionDeleteResponse */ +public class CollectionDeleteResponseTest { + private final CollectionDeleteResponse model = new CollectionDeleteResponse(); + + /** Model tests for CollectionDeleteResponse */ + @Test + public void testCollectionDeleteResponse() { + // TODO: test CollectionDeleteResponse + } + + /** Test the property 'metadataDeleted' */ + @Test + public void metadataDeletedTest() { + // TODO: test metadataDeleted + } + + /** Test the property 'metadataSkipped' */ + @Test + public void metadataSkippedTest() { + // TODO: test metadataSkipped + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionDeleteTypeIdentifiersTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionDeleteTypeIdentifiersTest.java new file mode 100644 index 000000000..e615a94f6 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionDeleteTypeIdentifiersTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CollectionDeleteTypeIdentifiers */ +public class CollectionDeleteTypeIdentifiersTest { + private final CollectionDeleteTypeIdentifiers model = new CollectionDeleteTypeIdentifiers(); + + /** Model tests for CollectionDeleteTypeIdentifiers */ + @Test + public void testCollectionDeleteTypeIdentifiers() { + // TODO: test CollectionDeleteTypeIdentifiers + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifiers' */ + @Test + public void identifiersTest() { + // TODO: test identifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionEntityIdentifierTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionEntityIdentifierTest.java new file mode 100644 index 000000000..48660ba58 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionEntityIdentifierTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CollectionEntityIdentifier */ +public class CollectionEntityIdentifierTest { + private final CollectionEntityIdentifier model = new CollectionEntityIdentifier(); + + /** Model tests for CollectionEntityIdentifier */ + @Test + public void testCollectionEntityIdentifier() { + // TODO: test CollectionEntityIdentifier + } + + /** Test the property 'identifier' */ + @Test + public void identifierTest() { + // TODO: test identifier + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionMetadataInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionMetadataInputTest.java new file mode 100644 index 000000000..dcbedca87 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionMetadataInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CollectionMetadataInput */ +public class CollectionMetadataInputTest { + private final CollectionMetadataInput model = new CollectionMetadataInput(); + + /** Model tests for CollectionMetadataInput */ + @Test + public void testCollectionMetadataInput() { + // TODO: test CollectionMetadataInput + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifiers' */ + @Test + public void identifiersTest() { + // TODO: test identifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionMetadataItemTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionMetadataItemTest.java new file mode 100644 index 000000000..bed481270 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionMetadataItemTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CollectionMetadataItem */ +public class CollectionMetadataItemTest { + private final CollectionMetadataItem model = new CollectionMetadataItem(); + + /** Model tests for CollectionMetadataItem */ + @Test + public void testCollectionMetadataItem() { + // TODO: test CollectionMetadataItem + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'identifiers' */ + @Test + public void identifiersTest() { + // TODO: test identifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionSearchResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionSearchResponseTest.java new file mode 100644 index 000000000..396c0e310 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionSearchResponseTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CollectionSearchResponse */ +public class CollectionSearchResponseTest { + private final CollectionSearchResponse model = new CollectionSearchResponse(); + + /** Model tests for CollectionSearchResponse */ + @Test + public void testCollectionSearchResponse() { + // TODO: test CollectionSearchResponse + } + + /** Test the property 'collections' */ + @Test + public void collectionsTest() { + // TODO: test collections + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'isLastBatch' */ + @Test + public void isLastBatchTest() { + // TODO: test isLastBatch + } + + /** Test the property 'count' */ + @Test + public void countTest() { + // TODO: test count + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionTest.java new file mode 100644 index 000000000..88b937f09 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CollectionTest.java @@ -0,0 +1,72 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for Collection */ +public class CollectionTest { + private final Collection model = new Collection(); + + /** Model tests for Collection */ + @Test + public void testCollection() { + // TODO: test Collection + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'createdAt' */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** Test the property 'updatedAt' */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** Test the property 'authorName' */ + @Test + public void authorNameTest() { + // TODO: test authorName + } + + /** Test the property 'authorId' */ + @Test + public void authorIdTest() { + // TODO: test authorId + } + + /** Test the property 'org' */ + @Test + public void orgTest() { + // TODO: test org + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CommunicationChannelValidateResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CommunicationChannelValidateResponseTest.java new file mode 100644 index 000000000..d92f9ef82 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CommunicationChannelValidateResponseTest.java @@ -0,0 +1,61 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CommunicationChannelValidateResponse */ +public class CommunicationChannelValidateResponseTest { + private final CommunicationChannelValidateResponse model = + new CommunicationChannelValidateResponse(); + + /** Model tests for CommunicationChannelValidateResponse */ + @Test + public void testCommunicationChannelValidateResponse() { + // TODO: test CommunicationChannelValidateResponse + } + + /** Test the property 'channelType' */ + @Test + public void channelTypeTest() { + // TODO: test channelType + } + + /** Test the property 'channelId' */ + @Test + public void channelIdTest() { + // TODO: test channelId + } + + /** Test the property 'channelName' */ + @Test + public void channelNameTest() { + // TODO: test channelName + } + + /** Test the property 'eventType' */ + @Test + public void eventTypeTest() { + // TODO: test eventType + } + + /** Test the property 'jobId' */ + @Test + public void jobIdTest() { + // TODO: test jobId + } + + /** Test the property 'resultCode' */ + @Test + public void resultCodeTest() { + // TODO: test resultCode + } + + /** Test the property 'details' */ + @Test + public void detailsTest() { + // TODO: test details + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCollectionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCollectionRequestTest.java new file mode 100644 index 000000000..e7a8188c5 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateCollectionRequestTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateCollectionRequest */ +public class CreateCollectionRequestTest { + private final CreateCollectionRequest model = new CreateCollectionRequest(); + + /** Model tests for CreateCollectionRequest */ + @Test + public void testCreateCollectionRequest() { + // TODO: test CreateCollectionRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequestTest.java index 21c8fd45f..1f26fa880 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/CreateWebhookConfigurationRequestTest.java @@ -63,4 +63,10 @@ public void signatureVerificationTest() { public void storageDestinationTest() { // TODO: test storageDestination } + + /** Test the property 'additionalHeaders' */ + @Test + public void additionalHeadersTest() { + // TODO: test additionalHeaders + } } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteCollectionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteCollectionRequestTest.java new file mode 100644 index 000000000..f0f1538b7 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteCollectionRequestTest.java @@ -0,0 +1,36 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DeleteCollectionRequest */ +public class DeleteCollectionRequestTest { + private final DeleteCollectionRequest model = new DeleteCollectionRequest(); + + /** Model tests for DeleteCollectionRequest */ + @Test + public void testDeleteCollectionRequest() { + // TODO: test DeleteCollectionRequest + } + + /** Test the property 'collectionIdentifiers' */ + @Test + public void collectionIdentifiersTest() { + // TODO: test collectionIdentifiers + } + + /** Test the property 'deleteChildren' */ + @Test + public void deleteChildrenTest() { + // TODO: test deleteChildren + } + + /** Test the property 'dryRun' */ + @Test + public void dryRunTest() { + // TODO: test dryRun + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteVariablesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteVariablesRequestTest.java new file mode 100644 index 000000000..43974b269 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/DeleteVariablesRequestTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for DeleteVariablesRequest */ +public class DeleteVariablesRequestTest { + private final DeleteVariablesRequest model = new DeleteVariablesRequest(); + + /** Model tests for DeleteVariablesRequest */ + @Test + public void testDeleteVariablesRequest() { + // TODO: test DeleteVariablesRequest + } + + /** Test the property 'identifiers' */ + @Test + public void identifiersTest() { + // TODO: test identifiers + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/JobRecipientTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/JobRecipientTest.java new file mode 100644 index 000000000..bdd874b98 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/JobRecipientTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for JobRecipient */ +public class JobRecipientTest { + private final JobRecipient model = new JobRecipient(); + + /** Model tests for JobRecipient */ + @Test + public void testJobRecipient() { + // TODO: test JobRecipient + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'email' */ + @Test + public void emailTest() { + // TODO: test email + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterizeMetadataFieldsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterizeMetadataFieldsRequestTest.java new file mode 100644 index 000000000..286244a16 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ParameterizeMetadataFieldsRequestTest.java @@ -0,0 +1,48 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ParameterizeMetadataFieldsRequest */ +public class ParameterizeMetadataFieldsRequestTest { + private final ParameterizeMetadataFieldsRequest model = new ParameterizeMetadataFieldsRequest(); + + /** Model tests for ParameterizeMetadataFieldsRequest */ + @Test + public void testParameterizeMetadataFieldsRequest() { + // TODO: test ParameterizeMetadataFieldsRequest + } + + /** Test the property 'metadataType' */ + @Test + public void metadataTypeTest() { + // TODO: test metadataType + } + + /** Test the property 'metadataIdentifier' */ + @Test + public void metadataIdentifierTest() { + // TODO: test metadataIdentifier + } + + /** Test the property 'fieldType' */ + @Test + public void fieldTypeTest() { + // TODO: test fieldType + } + + /** Test the property 'fieldNames' */ + @Test + public void fieldNamesTest() { + // TODO: test fieldNames + } + + /** Test the property 'variableIdentifier' */ + @Test + public void variableIdentifierTest() { + // TODO: test variableIdentifier + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/PutVariableValuesRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/PutVariableValuesRequestTest.java new file mode 100644 index 000000000..73c723033 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/PutVariableValuesRequestTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for PutVariableValuesRequest */ +public class PutVariableValuesRequestTest { + private final PutVariableValuesRequest model = new PutVariableValuesRequest(); + + /** Model tests for PutVariableValuesRequest */ + @Test + public void testPutVariableValuesRequest() { + // TODO: test PutVariableValuesRequest + } + + /** Test the property 'operation' */ + @Test + public void operationTest() { + // TODO: test operation + } + + /** Test the property 'variableAssignment' */ + @Test + public void variableAssignmentTest() { + // TODO: test variableAssignment + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchChannelHistoryRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchChannelHistoryRequestTest.java new file mode 100644 index 000000000..e53c9fe61 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchChannelHistoryRequestTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchChannelHistoryRequest */ +public class SearchChannelHistoryRequestTest { + private final SearchChannelHistoryRequest model = new SearchChannelHistoryRequest(); + + /** Model tests for SearchChannelHistoryRequest */ + @Test + public void testSearchChannelHistoryRequest() { + // TODO: test SearchChannelHistoryRequest + } + + /** Test the property 'channelType' */ + @Test + public void channelTypeTest() { + // TODO: test channelType + } + + /** Test the property 'jobIds' */ + @Test + public void jobIdsTest() { + // TODO: test jobIds + } + + /** Test the property 'channelIdentifiers' */ + @Test + public void channelIdentifiersTest() { + // TODO: test channelIdentifiers + } + + /** Test the property 'channelStatus' */ + @Test + public void channelStatusTest() { + // TODO: test channelStatus + } + + /** Test the property 'events' */ + @Test + public void eventsTest() { + // TODO: test events + } + + /** Test the property 'startEpochTimeInMillis' */ + @Test + public void startEpochTimeInMillisTest() { + // TODO: test startEpochTimeInMillis + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchChannelHistoryResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchChannelHistoryResponseTest.java new file mode 100644 index 000000000..37e05541e --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchChannelHistoryResponseTest.java @@ -0,0 +1,24 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchChannelHistoryResponse */ +public class SearchChannelHistoryResponseTest { + private final SearchChannelHistoryResponse model = new SearchChannelHistoryResponse(); + + /** Model tests for SearchChannelHistoryResponse */ + @Test + public void testSearchChannelHistoryResponse() { + // TODO: test SearchChannelHistoryResponse + } + + /** Test the property 'jobs' */ + @Test + public void jobsTest() { + // TODO: test jobs + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCollectionsRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCollectionsRequestTest.java new file mode 100644 index 000000000..7fd8caada --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/SearchCollectionsRequestTest.java @@ -0,0 +1,60 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for SearchCollectionsRequest */ +public class SearchCollectionsRequestTest { + private final SearchCollectionsRequest model = new SearchCollectionsRequest(); + + /** Model tests for SearchCollectionsRequest */ + @Test + public void testSearchCollectionsRequest() { + // TODO: test SearchCollectionsRequest + } + + /** Test the property 'namePattern' */ + @Test + public void namePatternTest() { + // TODO: test namePattern + } + + /** Test the property 'recordOffset' */ + @Test + public void recordOffsetTest() { + // TODO: test recordOffset + } + + /** Test the property 'recordSize' */ + @Test + public void recordSizeTest() { + // TODO: test recordSize + } + + /** Test the property 'collectionIdentifiers' */ + @Test + public void collectionIdentifiersTest() { + // TODO: test collectionIdentifiers + } + + /** Test the property 'createdByUserIdentifiers' */ + @Test + public void createdByUserIdentifiersTest() { + // TODO: test createdByUserIdentifiers + } + + /** Test the property 'includeMetadata' */ + @Test + public void includeMetadataTest() { + // TODO: test includeMetadata + } + + /** Test the property 'sortOptions' */ + @Test + public void sortOptionsTest() { + // TODO: test sortOptions + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/TemplatePropertiesInputCreateTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/TemplatePropertiesInputCreateTest.java index 40416efeb..bae57e288 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/TemplatePropertiesInputCreateTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/TemplatePropertiesInputCreateTest.java @@ -177,4 +177,10 @@ public void contactSupportUrlTest() { public void hideContactSupportUrlTest() { // TODO: test hideContactSupportUrl } + + /** Test the property 'hideLogoUrl' */ + @Test + public void hideLogoUrlTest() { + // TODO: test hideLogoUrl + } } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCollectionRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCollectionRequestTest.java new file mode 100644 index 000000000..7cb04129a --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateCollectionRequestTest.java @@ -0,0 +1,42 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for UpdateCollectionRequest */ +public class UpdateCollectionRequestTest { + private final UpdateCollectionRequest model = new UpdateCollectionRequest(); + + /** Model tests for UpdateCollectionRequest */ + @Test + public void testUpdateCollectionRequest() { + // TODO: test UpdateCollectionRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } + + /** Test the property 'operation' */ + @Test + public void operationTest() { + // TODO: test operation + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequestTest.java index 1a7aa8b7b..f56ecdb34 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequestTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/UpdateWebhookConfigurationRequestTest.java @@ -63,4 +63,10 @@ public void signatureVerificationTest() { public void storageDestinationTest() { // TODO: test storageDestination } + + /** Test the property 'additionalHeaders' */ + @Test + public void additionalHeadersTest() { + // TODO: test additionalHeaders + } } diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateCommunicationChannelRequestTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateCommunicationChannelRequestTest.java new file mode 100644 index 000000000..bdb49beab --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/ValidateCommunicationChannelRequestTest.java @@ -0,0 +1,37 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for ValidateCommunicationChannelRequest */ +public class ValidateCommunicationChannelRequestTest { + private final ValidateCommunicationChannelRequest model = + new ValidateCommunicationChannelRequest(); + + /** Model tests for ValidateCommunicationChannelRequest */ + @Test + public void testValidateCommunicationChannelRequest() { + // TODO: test ValidateCommunicationChannelRequest + } + + /** Test the property 'channelType' */ + @Test + public void channelTypeTest() { + // TODO: test channelType + } + + /** Test the property 'channelIdentifier' */ + @Test + public void channelIdentifierTest() { + // TODO: test channelIdentifier + } + + /** Test the property 'eventType' */ + @Test + public void eventTypeTest() { + // TODO: test eventType + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/VariablePutAssignmentInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/VariablePutAssignmentInputTest.java new file mode 100644 index 000000000..7e77ecb40 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/VariablePutAssignmentInputTest.java @@ -0,0 +1,54 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for VariablePutAssignmentInput */ +public class VariablePutAssignmentInputTest { + private final VariablePutAssignmentInput model = new VariablePutAssignmentInput(); + + /** Model tests for VariablePutAssignmentInput */ + @Test + public void testVariablePutAssignmentInput() { + // TODO: test VariablePutAssignmentInput + } + + /** Test the property 'assignedValues' */ + @Test + public void assignedValuesTest() { + // TODO: test assignedValues + } + + /** Test the property 'orgIdentifier' */ + @Test + public void orgIdentifierTest() { + // TODO: test orgIdentifier + } + + /** Test the property 'principalType' */ + @Test + public void principalTypeTest() { + // TODO: test principalType + } + + /** Test the property 'principalIdentifier' */ + @Test + public void principalIdentifierTest() { + // TODO: test principalIdentifier + } + + /** Test the property 'modelIdentifier' */ + @Test + public void modelIdentifierTest() { + // TODO: test modelIdentifier + } + + /** Test the property 'priority' */ + @Test + public void priorityTest() { + // TODO: test priority + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookKeyValuePairInputTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookKeyValuePairInputTest.java new file mode 100644 index 000000000..4fa43f78b --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookKeyValuePairInputTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookKeyValuePairInput */ +public class WebhookKeyValuePairInputTest { + private final WebhookKeyValuePairInput model = new WebhookKeyValuePairInput(); + + /** Model tests for WebhookKeyValuePairInput */ + @Test + public void testWebhookKeyValuePairInput() { + // TODO: test WebhookKeyValuePairInput + } + + /** Test the property 'key' */ + @Test + public void keyTest() { + // TODO: test key + } + + /** Test the property 'value' */ + @Test + public void valueTest() { + // TODO: test value + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookKeyValuePairTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookKeyValuePairTest.java new file mode 100644 index 000000000..ea73823f2 --- /dev/null +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookKeyValuePairTest.java @@ -0,0 +1,30 @@ +/* + * NOTE: This class is auto generated. Do not edit the class manually. + */ + +package com.thoughtspot.client.model; + +import org.junit.jupiter.api.Test; + +/** Model tests for WebhookKeyValuePair */ +public class WebhookKeyValuePairTest { + private final WebhookKeyValuePair model = new WebhookKeyValuePair(); + + /** Model tests for WebhookKeyValuePair */ + @Test + public void testWebhookKeyValuePair() { + // TODO: test WebhookKeyValuePair + } + + /** Test the property 'key' */ + @Test + public void keyTest() { + // TODO: test key + } + + /** Test the property 'value' */ + @Test + public void valueTest() { + // TODO: test value + } +} diff --git a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookResponseTest.java b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookResponseTest.java index 710a956aa..50a9777dd 100644 --- a/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookResponseTest.java +++ b/sdks/java/src/test/java/com/thoughtspot/client/model/WebhookResponseTest.java @@ -70,6 +70,12 @@ public void signatureVerificationTest() { // TODO: test signatureVerification } + /** Test the property 'additionalHeaders' */ + @Test + public void additionalHeadersTest() { + // TODO: test additionalHeaders + } + /** Test the property 'creationTimeInMillis' */ @Test public void creationTimeInMillisTest() { diff --git a/sdks/typescript/.openapi-generator/FILES b/sdks/typescript/.openapi-generator/FILES index ea959928b..23a4fb768 100644 --- a/sdks/typescript/.openapi-generator/FILES +++ b/sdks/typescript/.openapi-generator/FILES @@ -1,6 +1,7 @@ .gitignore AIApi.md AuthenticationApi.md +CollectionsApi.md ConnectionConfigurationsApi.md ConnectionsApi.md CustomActionApi.md @@ -9,6 +10,7 @@ DBTApi.md DataApi.md EmailCustomizationApi.md GroupsApi.md +JobsApi.md LogApi.md MetadataApi.md OrgsApi.md @@ -26,6 +28,7 @@ VersionControlApi.md WebhooksApi.md apis/AIApi.ts apis/AuthenticationApi.ts +apis/CollectionsApi.ts apis/ConnectionConfigurationsApi.ts apis/ConnectionsApi.ts apis/CustomActionApi.ts @@ -34,6 +37,7 @@ apis/DBTApi.ts apis/DataApi.ts apis/EmailCustomizationApi.ts apis/GroupsApi.ts +apis/JobsApi.ts apis/LogApi.ts apis/MetadataApi.ts apis/OrgsApi.ts @@ -90,8 +94,20 @@ models/CALLBACKInput.ts models/CALLBACKInputMandatory.ts models/CalendarResponse.ts models/ChangeUserPasswordRequest.ts +models/ChannelHistoryEventInfo.ts +models/ChannelHistoryEventInput.ts +models/ChannelHistoryJob.ts +models/ChannelValidationAwsS3Info.ts +models/ChannelValidationDetail.ts models/ClusterNonEmbedAccess.ts models/ClusterNonEmbedAccessInput.ts +models/Collection.ts +models/CollectionDeleteResponse.ts +models/CollectionDeleteTypeIdentifiers.ts +models/CollectionEntityIdentifier.ts +models/CollectionMetadataInput.ts +models/CollectionMetadataItem.ts +models/CollectionSearchResponse.ts models/Column.ts models/ColumnSecurityRule.ts models/ColumnSecurityRuleColumn.ts @@ -107,6 +123,7 @@ models/CommitHistoryResponse.ts models/CommitResponse.ts models/CommiterType.ts models/CommunicationChannelPreferencesResponse.ts +models/CommunicationChannelValidateResponse.ts models/ConfigureCommunicationChannelPreferencesRequest.ts models/ConfigureSecuritySettingsRequest.ts models/ConfigureSecuritySettingsRequestClusterPreferences.ts @@ -123,6 +140,7 @@ models/CreateAgentConversationRequestConversationSettings.ts models/CreateAgentConversationRequestMetadataContext.ts models/CreateCalendarRequest.ts models/CreateCalendarRequestTableReference.ts +models/CreateCollectionRequest.ts models/CreateConfigRequest.ts models/CreateConnectionConfigurationRequest.ts models/CreateConnectionConfigurationRequestPolicyProcessOptions.ts @@ -166,12 +184,14 @@ models/DefaultActionConfig.ts models/DefaultActionConfigInput.ts models/DefaultActionConfigInputCreate.ts models/DefaultActionConfigSearchInput.ts +models/DeleteCollectionRequest.ts models/DeleteConfigRequest.ts models/DeleteConnectionConfigurationRequest.ts models/DeleteConnectionRequest.ts models/DeleteMetadataRequest.ts models/DeleteMetadataTypeInput.ts models/DeleteOrgEmailCustomizationRequest.ts +models/DeleteVariablesRequest.ts models/DeleteWebhookConfigurationsRequest.ts models/DeployCommitRequest.ts models/DeployResponse.ts @@ -249,6 +269,7 @@ models/JWTMetadataObject.ts models/JWTParameter.ts models/JWTUserOptions.ts models/JWTUserOptionsFull.ts +models/JobRecipient.ts models/LBContextInput.ts models/LiveboardContent.ts models/LiveboardDataResponse.ts @@ -283,6 +304,7 @@ models/OrgPreferenceSearchCriteriaInput.ts models/OrgResponse.ts models/OrgType.ts models/ParameterValues.ts +models/ParameterizeMetadataFieldsRequest.ts models/ParameterizeMetadataRequest.ts models/ParametersListItem.ts models/ParametersListItemInput.ts @@ -300,6 +322,7 @@ models/PrincipalsListItem.ts models/PrincipalsListItemInput.ts models/PublishMetadataListItem.ts models/PublishMetadataRequest.ts +models/PutVariableValuesRequest.ts models/QueryGetDecomposedQueryRequest.ts models/QueryGetDecomposedQueryRequestNlsRequest.ts models/RecipientDetails.ts @@ -346,6 +369,10 @@ models/ScriptSrcUrls.ts models/ScriptSrcUrlsInput.ts models/SearchCalendarsRequest.ts models/SearchCalendarsRequestSortOptions.ts +models/SearchChannelHistoryRequest.ts +models/SearchChannelHistoryResponse.ts +models/SearchCollectionsRequest.ts +models/SearchCollectionsRequestSortOptions.ts models/SearchCommitsRequest.ts models/SearchCommunicationChannelPreferencesRequest.ts models/SearchConfigRequest.ts @@ -371,7 +398,6 @@ models/SearchTagsRequest.ts models/SearchUserGroupsRequest.ts models/SearchUserGroupsRequestSortOptions.ts models/SearchUsersRequest.ts -models/SearchUsersRequestSortOptions.ts models/SearchVariablesRequest.ts models/SearchWebhookConfigurationsRequest.ts models/SearchWebhookConfigurationsRequestSortOptions.ts @@ -418,6 +444,7 @@ models/UnparameterizeMetadataRequest.ts models/UnpublishMetadataRequest.ts models/UpdateCalendarRequest.ts models/UpdateCalendarRequestTableReference.ts +models/UpdateCollectionRequest.ts models/UpdateColumnSecurityRulesRequest.ts models/UpdateConfigRequest.ts models/UpdateConnectionConfigurationRequest.ts @@ -451,11 +478,13 @@ models/UserInfo.ts models/UserObject.ts models/UserParameterOptions.ts models/UserPrincipal.ts +models/ValidateCommunicationChannelRequest.ts models/ValidateMergeRequest.ts models/ValidateTokenRequest.ts models/ValueScopeInput.ts models/Variable.ts models/VariableDetailInput.ts +models/VariablePutAssignmentInput.ts models/VariableUpdateAssignmentInput.ts models/VariableUpdateScopeInput.ts models/VariableValue.ts @@ -470,6 +499,8 @@ models/WebhookAuthentication.ts models/WebhookAuthenticationInput.ts models/WebhookDeleteFailure.ts models/WebhookDeleteResponse.ts +models/WebhookKeyValuePair.ts +models/WebhookKeyValuePairInput.ts models/WebhookOrg.ts models/WebhookPagination.ts models/WebhookResponse.ts @@ -484,6 +515,7 @@ rxjsStub.ts servers.ts tests/AIApiTest.ts tests/AuthenticationApiTest.ts +tests/CollectionsApiTest.ts tests/ConnectionConfigurationsApiTest.ts tests/ConnectionsApiTest.ts tests/CustomActionApiTest.ts @@ -492,6 +524,7 @@ tests/DBTApiTest.ts tests/DataApiTest.ts tests/EmailCustomizationApiTest.ts tests/GroupsApiTest.ts +tests/JobsApiTest.ts tests/LogApiTest.ts tests/MetadataApiTest.ts tests/OrgsApiTest.ts diff --git a/sdks/typescript/AIApi.md b/sdks/typescript/AIApi.md index 2db2d8b82..f0c000e35 100644 --- a/sdks/typescript/AIApi.md +++ b/sdks/typescript/AIApi.md @@ -20,7 +20,7 @@ Method | HTTP request | Description # **createAgentConversation** > AgentConversation createAgentConversation(createAgentConversationRequest) - Version: 10.13.0.cl or later + Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Example @@ -75,6 +75,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -82,7 +84,7 @@ Name | Type | Description | Notes # **createConversation** > Conversation createConversation(createConversationRequest) - Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Example @@ -137,6 +139,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -144,7 +148,7 @@ Name | Type | Description | Notes # **getDataSourceSuggestions** > EurekaDataSourceSuggestionResponse getDataSourceSuggestions(getDataSourceSuggestionsRequest) - Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. ### Example @@ -198,6 +202,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -205,7 +211,7 @@ Name | Type | Description | Notes # **getNLInstructions** > EurekaGetNLInstructionsResponse getNLInstructions(getNLInstructionsRequest) - Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. ### Example @@ -259,6 +265,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -266,7 +274,7 @@ Name | Type | Description | Notes # **getRelevantQuestions** > EurekaGetRelevantQuestionsResponse getRelevantQuestions(getRelevantQuestionsRequest) - Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Example @@ -324,6 +332,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -331,7 +341,7 @@ Name | Type | Description | Notes # **queryGetDecomposedQuery** > EurekaDecomposeQueryResponse queryGetDecomposedQuery(queryGetDecomposedQueryRequest) - Version: 10.7.0.cl or later + Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. ### Example @@ -399,6 +409,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -406,7 +418,7 @@ Name | Type | Description | Notes # **sendAgentMessage** > any sendAgentMessage(sendAgentMessageRequest) - Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Example @@ -465,6 +477,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -472,7 +486,7 @@ Name | Type | Description | Notes # **sendAgentMessageStreaming** > SendAgentMessageResponse sendAgentMessageStreaming(sendAgentMessageStreamingRequest) - Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). ### Example @@ -529,6 +543,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -536,7 +552,7 @@ Name | Type | Description | Notes # **sendMessage** > Array sendMessage(sendMessageRequest) - Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Example @@ -594,6 +610,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -601,7 +619,7 @@ Name | Type | Description | Notes # **setNLInstructions** > EurekaSetNLInstructionsResponse setNLInstructions(setNLInstructionsRequest) - Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. ### Example @@ -663,6 +681,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -670,7 +690,7 @@ Name | Type | Description | Notes # **singleAnswer** > ResponseMessage singleAnswer(singleAnswerRequest) - Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Example @@ -725,6 +745,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) diff --git a/sdks/typescript/CollectionsApi.md b/sdks/typescript/CollectionsApi.md new file mode 100644 index 000000000..c4a78c811 --- /dev/null +++ b/sdks/typescript/CollectionsApi.md @@ -0,0 +1,298 @@ +# ThoughtSpotRestApiSdk.CollectionsApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createCollection**](CollectionsApi.md#createCollection) | **POST** /api/rest/2.0/collections/create | +[**deleteCollection**](CollectionsApi.md#deleteCollection) | **POST** /api/rest/2.0/collections/delete | +[**searchCollections**](CollectionsApi.md#searchCollections) | **POST** /api/rest/2.0/collections/search | +[**updateCollection**](CollectionsApi.md#updateCollection) | **POST** /api/rest/2.0/collections/{collection_identifier}/update | + + +# **createCollection** +> Collection createCollection(createCollectionRequest) + + Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + +### Example + + +```typescript +import { createBearerAuthenticationConfig, CollectionsApi, CreateCollectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new CollectionsApi(configuration); + +apiInstance.createCollection( + // CreateCollectionRequest + { + name: "name_example", + description: "description_example", + metadata: [ + { + type: "LIVEBOARD", + identifiers: [ + "identifiers_example", + ], + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createCollectionRequest** | **CreateCollectionRequest**| | + + +### Return type + +**Collection** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collection created successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **deleteCollection** +> CollectionDeleteResponse deleteCollection(deleteCollectionRequest) + + Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + +### Example + + +```typescript +import { createBearerAuthenticationConfig, CollectionsApi, DeleteCollectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new CollectionsApi(configuration); + +apiInstance.deleteCollection( + // DeleteCollectionRequest + { + collection_identifiers: [ + "collection_identifiers_example", + ], + delete_children: false, + dry_run: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteCollectionRequest** | **DeleteCollectionRequest**| | + + +### Return type + +**CollectionDeleteResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collections deleted successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**404** | Resource not found. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchCollections** +> CollectionSearchResponse searchCollections(searchCollectionsRequest) + + Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, CollectionsApi, SearchCollectionsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new CollectionsApi(configuration); + +apiInstance.searchCollections( + // SearchCollectionsRequest + { + name_pattern: "name_pattern_example", + record_offset: 0, + record_size: 10, + collection_identifiers: [ + "collection_identifiers_example", + ], + created_by_user_identifiers: [ + "created_by_user_identifiers_example", + ], + include_metadata: false, + sort_options: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchCollectionsRequest** | **SearchCollectionsRequest**| | + + +### Return type + +**CollectionSearchResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved list of collections | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **updateCollection** +> void updateCollection(updateCollectionRequest) + + Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + +### Example + + +```typescript +import { createBearerAuthenticationConfig, CollectionsApi, UpdateCollectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new CollectionsApi(configuration); + +apiInstance.updateCollection( + // string | Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + "collection_identifier_example" , + // UpdateCollectionRequest + { + name: "name_example", + description: "description_example", + metadata: [ + { + type: "LIVEBOARD", + identifiers: [ + "identifiers_example", + ], + }, + ], + operation: "REPLACE", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateCollectionRequest** | **UpdateCollectionRequest**| | + **collectionIdentifier** | [**string**] | Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Collection updated successfully. No content returned. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**404** | Resource not found. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/ConnectionsApi.md b/sdks/typescript/ConnectionsApi.md index 2e89aee8f..f193803aa 100644 --- a/sdks/typescript/ConnectionsApi.md +++ b/sdks/typescript/ConnectionsApi.md @@ -18,7 +18,7 @@ Method | HTTP request | Description # **createConnection** > CreateConnectionResponse createConnection(createConnectionRequest) - Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. ### Example diff --git a/sdks/typescript/JobsApi.md b/sdks/typescript/JobsApi.md new file mode 100644 index 000000000..f648e457c --- /dev/null +++ b/sdks/typescript/JobsApi.md @@ -0,0 +1,85 @@ +# ThoughtSpotRestApiSdk.JobsApi + +All URIs are relative to *CLUSTER_URL* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**searchChannelHistory**](JobsApi.md#searchChannelHistory) | **POST** /api/rest/2.0/jobs/history/communication-channels/search | + + +# **searchChannelHistory** +> SearchChannelHistoryResponse searchChannelHistory(searchChannelHistoryRequest) + + Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, JobsApi, SearchChannelHistoryRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new JobsApi(configuration); + +apiInstance.searchChannelHistory( + // SearchChannelHistoryRequest + { + channel_type: "WEBHOOK", + job_ids: [ + "job_ids_example", + ], + channel_identifiers: [ + "channel_identifiers_example", + ], + channel_status: "PENDING", + events: [ + { + type: "LIVEBOARD_SCHEDULE", + identifier: "identifier_example", + }, + ], + start_epoch_time_in_millis: 3.14, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchChannelHistoryRequest** | **SearchChannelHistoryRequest**| | + + +### Return type + +**SearchChannelHistoryResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Channel status logs retrieved successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/MetadataApi.md b/sdks/typescript/MetadataApi.md index 84ca00c21..b801bec7a 100644 --- a/sdks/typescript/MetadataApi.md +++ b/sdks/typescript/MetadataApi.md @@ -15,6 +15,7 @@ Method | HTTP request | Description [**importMetadataTML**](MetadataApi.md#importMetadataTML) | **POST** /api/rest/2.0/metadata/tml/import | [**importMetadataTMLAsync**](MetadataApi.md#importMetadataTMLAsync) | **POST** /api/rest/2.0/metadata/tml/async/import | [**parameterizeMetadata**](MetadataApi.md#parameterizeMetadata) | **POST** /api/rest/2.0/metadata/parameterize | +[**parameterizeMetadataFields**](MetadataApi.md#parameterizeMetadataFields) | **POST** /api/rest/2.0/metadata/parameterize-fields | [**searchMetadata**](MetadataApi.md#searchMetadata) | **POST** /api/rest/2.0/metadata/search | [**unparameterizeMetadata**](MetadataApi.md#unparameterizeMetadata) | **POST** /api/rest/2.0/metadata/unparameterize | [**updateMetadataHeader**](MetadataApi.md#updateMetadataHeader) | **POST** /api/rest/2.0/metadata/headers/update | @@ -707,7 +708,7 @@ Name | Type | Description | Notes # **parameterizeMetadata** > void parameterizeMetadata(parameterizeMetadataRequest) - Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user ### Example @@ -759,6 +760,74 @@ Name | Type | Description | Notes - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Parameterize successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **parameterizeMetadataFields** +> void parameterizeMetadataFields(parameterizeMetadataFieldsRequest) + + Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, MetadataApi, ParameterizeMetadataFieldsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new MetadataApi(configuration); + +apiInstance.parameterizeMetadataFields( + // ParameterizeMetadataFieldsRequest + { + metadata_type: "LOGICAL_TABLE", + metadata_identifier: "metadata_identifier_example", + field_type: "ATTRIBUTE", + field_names: [ + "field_names_example", + ], + variable_identifier: "variable_identifier_example", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **parameterizeMetadataFieldsRequest** | **ParameterizeMetadataFieldsRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| diff --git a/sdks/typescript/README.md b/sdks/typescript/README.md index 74a87cfd5..26bf61097 100644 --- a/sdks/typescript/README.md +++ b/sdks/typescript/README.md @@ -1,4 +1,4 @@ -## @thoughtspot/rest-api-sdk@2.22.0 +## @thoughtspot/rest-api-sdk@2.23.0 TypeScript/JavaScript client for ThoughtSpot's v2 [Rest APIs](https://developers.thoughtspot.com/docs/rest-api-v2). diff --git a/sdks/typescript/SystemApi.md b/sdks/typescript/SystemApi.md index 312c3646f..298743549 100644 --- a/sdks/typescript/SystemApi.md +++ b/sdks/typescript/SystemApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**searchCommunicationChannelPreferences**](SystemApi.md#searchCommunicationChannelPreferences) | **POST** /api/rest/2.0/system/preferences/communication-channels/search | [**searchSecuritySettings**](SystemApi.md#searchSecuritySettings) | **POST** /api/rest/2.0/system/security-settings/search | [**updateSystemConfig**](SystemApi.md#updateSystemConfig) | **POST** /api/rest/2.0/system/config-update | +[**validateCommunicationChannel**](SystemApi.md#validateCommunicationChannel) | **POST** /api/rest/2.0/system/communication-channels/validate | # **configureCommunicationChannelPreferences** @@ -534,3 +535,67 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **validateCommunicationChannel** +> CommunicationChannelValidateResponse validateCommunicationChannel(validateCommunicationChannelRequest) + + Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, SystemApi, ValidateCommunicationChannelRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new SystemApi(configuration); + +apiInstance.validateCommunicationChannel( + // ValidateCommunicationChannelRequest + { + channel_type: "WEBHOOK", + channel_identifier: "channel_identifier_example", + event_type: "LIVEBOARD_SCHEDULE", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **validateCommunicationChannelRequest** | **ValidateCommunicationChannelRequest**| | + + +### Return type + +**CommunicationChannelValidateResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | communication channel configuration validated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/sdks/typescript/ThoughtSpotRestApi.md b/sdks/typescript/ThoughtSpotRestApi.md index 41f237d36..aba28ac17 100644 --- a/sdks/typescript/ThoughtSpotRestApi.md +++ b/sdks/typescript/ThoughtSpotRestApi.md @@ -16,6 +16,7 @@ Method | HTTP request | Description [**copyObject**](ThoughtSpotRestApi.md#copyObject) | **POST** /api/rest/2.0/metadata/copyobject | [**createAgentConversation**](ThoughtSpotRestApi.md#createAgentConversation) | **POST** /api/rest/2.0/ai/agent/conversation/create | [**createCalendar**](ThoughtSpotRestApi.md#createCalendar) | **POST** /api/rest/2.0/calendars/create | +[**createCollection**](ThoughtSpotRestApi.md#createCollection) | **POST** /api/rest/2.0/collections/create | [**createConfig**](ThoughtSpotRestApi.md#createConfig) | **POST** /api/rest/2.0/vcs/git/config/create | [**createConnection**](ThoughtSpotRestApi.md#createConnection) | **POST** /api/rest/2.0/connection/create | [**createConnectionConfiguration**](ThoughtSpotRestApi.md#createConnectionConfiguration) | **POST** /api/rest/2.0/connection-configurations/create | @@ -36,6 +37,7 @@ Method | HTTP request | Description [**dbtSearch**](ThoughtSpotRestApi.md#dbtSearch) | **POST** /api/rest/2.0/dbt/search | [**deactivateUser**](ThoughtSpotRestApi.md#deactivateUser) | **POST** /api/rest/2.0/users/deactivate | [**deleteCalendar**](ThoughtSpotRestApi.md#deleteCalendar) | **POST** /api/rest/2.0/calendars/{calendar_identifier}/delete | +[**deleteCollection**](ThoughtSpotRestApi.md#deleteCollection) | **POST** /api/rest/2.0/collections/delete | [**deleteConfig**](ThoughtSpotRestApi.md#deleteConfig) | **POST** /api/rest/2.0/vcs/git/config/delete | [**deleteConnection**](ThoughtSpotRestApi.md#deleteConnection) | **POST** /api/rest/2.0/connection/delete | [**deleteConnectionConfiguration**](ThoughtSpotRestApi.md#deleteConnectionConfiguration) | **POST** /api/rest/2.0/connection-configurations/delete | @@ -52,6 +54,7 @@ Method | HTTP request | Description [**deleteUser**](ThoughtSpotRestApi.md#deleteUser) | **POST** /api/rest/2.0/users/{user_identifier}/delete | [**deleteUserGroup**](ThoughtSpotRestApi.md#deleteUserGroup) | **POST** /api/rest/2.0/groups/{group_identifier}/delete | [**deleteVariable**](ThoughtSpotRestApi.md#deleteVariable) | **POST** /api/rest/2.0/template/variables/{identifier}/delete | +[**deleteVariables**](ThoughtSpotRestApi.md#deleteVariables) | **POST** /api/rest/2.0/template/variables/delete | [**deleteWebhookConfigurations**](ThoughtSpotRestApi.md#deleteWebhookConfigurations) | **POST** /api/rest/2.0/webhooks/delete | [**deployCommit**](ThoughtSpotRestApi.md#deployCommit) | **POST** /api/rest/2.0/vcs/git/commits/deploy | [**downloadConnectionMetadataChanges**](ThoughtSpotRestApi.md#downloadConnectionMetadataChanges) | **POST** /api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier} | @@ -91,13 +94,17 @@ Method | HTTP request | Description [**logout**](ThoughtSpotRestApi.md#logout) | **POST** /api/rest/2.0/auth/session/logout | [**manageObjectPrivilege**](ThoughtSpotRestApi.md#manageObjectPrivilege) | **POST** /api/rest/2.0/security/metadata/manage-object-privilege | [**parameterizeMetadata**](ThoughtSpotRestApi.md#parameterizeMetadata) | **POST** /api/rest/2.0/metadata/parameterize | +[**parameterizeMetadataFields**](ThoughtSpotRestApi.md#parameterizeMetadataFields) | **POST** /api/rest/2.0/metadata/parameterize-fields | [**publishMetadata**](ThoughtSpotRestApi.md#publishMetadata) | **POST** /api/rest/2.0/security/metadata/publish | +[**putVariableValues**](ThoughtSpotRestApi.md#putVariableValues) | **POST** /api/rest/2.0/template/variables/{identifier}/update-values | [**queryGetDecomposedQuery**](ThoughtSpotRestApi.md#queryGetDecomposedQuery) | **POST** /api/rest/2.0/ai/analytical-questions | [**resetUserPassword**](ThoughtSpotRestApi.md#resetUserPassword) | **POST** /api/rest/2.0/users/reset-password | [**revertCommit**](ThoughtSpotRestApi.md#revertCommit) | **POST** /api/rest/2.0/vcs/git/commits/{commit_id}/revert | [**revokeRefreshTokens**](ThoughtSpotRestApi.md#revokeRefreshTokens) | **POST** /api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens | [**revokeToken**](ThoughtSpotRestApi.md#revokeToken) | **POST** /api/rest/2.0/auth/token/revoke | [**searchCalendars**](ThoughtSpotRestApi.md#searchCalendars) | **POST** /api/rest/2.0/calendars/search | +[**searchChannelHistory**](ThoughtSpotRestApi.md#searchChannelHistory) | **POST** /api/rest/2.0/jobs/history/communication-channels/search | +[**searchCollections**](ThoughtSpotRestApi.md#searchCollections) | **POST** /api/rest/2.0/collections/search | [**searchCommits**](ThoughtSpotRestApi.md#searchCommits) | **POST** /api/rest/2.0/vcs/git/commits/search | [**searchCommunicationChannelPreferences**](ThoughtSpotRestApi.md#searchCommunicationChannelPreferences) | **POST** /api/rest/2.0/system/preferences/communication-channels/search | [**searchConfig**](ThoughtSpotRestApi.md#searchConfig) | **POST** /api/rest/2.0/vcs/git/config/search | @@ -125,6 +132,7 @@ Method | HTTP request | Description [**unparameterizeMetadata**](ThoughtSpotRestApi.md#unparameterizeMetadata) | **POST** /api/rest/2.0/metadata/unparameterize | [**unpublishMetadata**](ThoughtSpotRestApi.md#unpublishMetadata) | **POST** /api/rest/2.0/security/metadata/unpublish | [**updateCalendar**](ThoughtSpotRestApi.md#updateCalendar) | **POST** /api/rest/2.0/calendars/{calendar_identifier}/update | +[**updateCollection**](ThoughtSpotRestApi.md#updateCollection) | **POST** /api/rest/2.0/collections/{collection_identifier}/update | [**updateColumnSecurityRules**](ThoughtSpotRestApi.md#updateColumnSecurityRules) | **POST** /api/rest/2.0/security/column/rules/update | [**updateConfig**](ThoughtSpotRestApi.md#updateConfig) | **POST** /api/rest/2.0/vcs/git/config/update | [**updateConnection**](ThoughtSpotRestApi.md#updateConnection) | **POST** /api/rest/2.0/connection/update | @@ -145,6 +153,7 @@ Method | HTTP request | Description [**updateVariable**](ThoughtSpotRestApi.md#updateVariable) | **POST** /api/rest/2.0/template/variables/{identifier}/update | [**updateVariableValues**](ThoughtSpotRestApi.md#updateVariableValues) | **POST** /api/rest/2.0/template/variables/update-values | [**updateWebhookConfiguration**](ThoughtSpotRestApi.md#updateWebhookConfiguration) | **POST** /api/rest/2.0/webhooks/{webhook_identifier}/update | +[**validateCommunicationChannel**](ThoughtSpotRestApi.md#validateCommunicationChannel) | **POST** /api/rest/2.0/system/communication-channels/validate | [**validateEmailCustomization**](ThoughtSpotRestApi.md#validateEmailCustomization) | **POST** /api/rest/2.0/customization/email/validate | [**validateMerge**](ThoughtSpotRestApi.md#validateMerge) | **POST** /api/rest/2.0/vcs/git/branches/validate | [**validateToken**](ThoughtSpotRestApi.md#validateToken) | **POST** /api/rest/2.0/auth/token/validate | @@ -852,7 +861,7 @@ Name | Type | Description | Notes # **createAgentConversation** > AgentConversation createAgentConversation(createAgentConversationRequest) - Version: 10.13.0.cl or later + Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Example @@ -907,6 +916,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -982,6 +993,77 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **createCollection** +> Collection createCollection(createCollectionRequest) + + Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, CreateCollectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.createCollection( + // CreateCollectionRequest + { + name: "name_example", + description: "description_example", + metadata: [ + { + type: "LIVEBOARD", + identifiers: [ + "identifiers_example", + ], + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createCollectionRequest** | **CreateCollectionRequest**| | + + +### Return type + +**Collection** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collection created successfully | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **createConfig** > RepoConfigObject createConfig(createConfigRequest) @@ -1056,7 +1138,7 @@ Name | Type | Description | Notes # **createConnection** > CreateConnectionResponse createConnection(createConnectionRequest) - Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. ### Example @@ -1197,7 +1279,7 @@ Name | Type | Description | Notes # **createConversation** > Conversation createConversation(createConversationRequest) - Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Example @@ -1252,6 +1334,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -1926,6 +2010,12 @@ apiInstance.createWebhookConfiguration( authentication: null, signature_verification: null, storage_destination: null, + additional_headers: [ + { + key: "key_example", + value: "value_example", + }, + ], } ).then((data:any) => { console.log('API called successfully. Returned data: ' + data); @@ -2366,6 +2456,73 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **deleteCollection** +> CollectionDeleteResponse deleteCollection(deleteCollectionRequest) + + Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteCollectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteCollection( + // DeleteCollectionRequest + { + collection_identifiers: [ + "collection_identifiers_example", + ], + delete_children: false, + dry_run: false, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteCollectionRequest** | **DeleteCollectionRequest**| | + + +### Return type + +**CollectionDeleteResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Collections deleted successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**404** | Resource not found. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **deleteConfig** > void deleteConfig(deleteConfigRequest) @@ -3287,7 +3444,7 @@ Name | Type | Description | Notes # **deleteVariable** > void deleteVariable() - Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects ### Example @@ -3344,6 +3501,70 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **deleteVariables** +> void deleteVariables(deleteVariablesRequest) + + Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, DeleteVariablesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.deleteVariables( + // DeleteVariablesRequest + { + identifiers: [ + "identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteVariablesRequest** | **DeleteVariablesRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Deletion of variable(s) is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **deleteWebhookConfigurations** > WebhookDeleteResponse deleteWebhookConfigurations(deleteWebhookConfigurationsRequest) @@ -4931,7 +5152,7 @@ No authorization required # **getDataSourceSuggestions** > EurekaDataSourceSuggestionResponse getDataSourceSuggestions(getDataSourceSuggestionsRequest) - Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. ### Example @@ -4985,6 +5206,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -5065,7 +5288,7 @@ No authorization required # **getNLInstructions** > EurekaGetNLInstructionsResponse getNLInstructions(getNLInstructionsRequest) - Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. ### Example @@ -5119,6 +5342,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -5200,7 +5425,7 @@ No authorization required # **getRelevantQuestions** > EurekaGetRelevantQuestionsResponse getRelevantQuestions(getRelevantQuestionsRequest) - Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Example @@ -5258,6 +5483,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -5936,7 +6163,7 @@ Name | Type | Description | Notes # **parameterizeMetadata** > void parameterizeMetadata(parameterizeMetadataRequest) - Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user ### Example @@ -5999,16 +6226,16 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) -# **publishMetadata** -> void publishMetadata(publishMetadataRequest) +# **parameterizeMetadataFields** +> void parameterizeMetadataFields(parameterizeMetadataFieldsRequest) - Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. + Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. ### Example ```typescript -import { createBearerAuthenticationConfig, ThoughtSpotRestApi, PublishMetadataRequest } from '@thoughtspot/rest-api-sdk'; +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ParameterizeMetadataFieldsRequest } from '@thoughtspot/rest-api-sdk'; const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { username: "YOUR_USERNAME", @@ -6016,19 +6243,16 @@ const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { }); const apiInstance = new ThoughtSpotRestApi(configuration); -apiInstance.publishMetadata( - // PublishMetadataRequest +apiInstance.parameterizeMetadataFields( + // ParameterizeMetadataFieldsRequest { - metadata: [ - { - identifier: "identifier_example", - type: "LIVEBOARD", - }, - ], - org_identifiers: [ - "org_identifiers_example", + metadata_type: "LOGICAL_TABLE", + metadata_identifier: "metadata_identifier_example", + field_type: "ATTRIBUTE", + field_names: [ + "field_names_example", ], - skip_validation: true, + variable_identifier: "variable_identifier_example", } ).then((data:any) => { console.log('API called successfully. Returned data: ' + data); @@ -6042,7 +6266,7 @@ apiInstance.publishMetadata( Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **publishMetadataRequest** | **PublishMetadataRequest**| | + **parameterizeMetadataFieldsRequest** | **ParameterizeMetadataFieldsRequest**| | ### Return type @@ -6062,7 +6286,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**204** | Publishing metadata objects is successful. | - | +**204** | Parameterize successful. | - | **400** | Invalid request. | - | **401** | Unauthorized access. | - | **403** | Forbidden access. | - | @@ -6070,16 +6294,16 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) -# **queryGetDecomposedQuery** -> EurekaDecomposeQueryResponse queryGetDecomposedQuery(queryGetDecomposedQueryRequest) +# **publishMetadata** +> void publishMetadata(publishMetadataRequest) - Version: 10.7.0.cl or later + Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. ### Example ```typescript -import { createBearerAuthenticationConfig, ThoughtSpotRestApi, QueryGetDecomposedQueryRequest } from '@thoughtspot/rest-api-sdk'; +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, PublishMetadataRequest } from '@thoughtspot/rest-api-sdk'; const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { username: "YOUR_USERNAME", @@ -6087,24 +6311,19 @@ const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { }); const apiInstance = new ThoughtSpotRestApi(configuration); -apiInstance.queryGetDecomposedQuery( - // QueryGetDecomposedQueryRequest +apiInstance.publishMetadata( + // PublishMetadataRequest { - answerIds: [ - "answerIds_example", - ], - content: [ - "content_example", - ], - conversationId: "conversationId_example", - liveboardIds: [ - "liveboardIds_example", + metadata: [ + { + identifier: "identifier_example", + type: "LIVEBOARD", + }, ], - maxDecomposedQueries: 1, - nlsRequest: null, - worksheetIds: [ - "worksheetIds_example", + org_identifiers: [ + "org_identifiers_example", ], + skip_validation: true, } ).then((data:any) => { console.log('API called successfully. Returned data: ' + data); @@ -6118,12 +6337,12 @@ apiInstance.queryGetDecomposedQuery( Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **queryGetDecomposedQueryRequest** | **QueryGetDecomposedQueryRequest**| | + **publishMetadataRequest** | **PublishMetadataRequest**| | ### Return type -**EurekaDecomposeQueryResponse** +**void** ### Authorization @@ -6138,23 +6357,24 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Common successful response | - | -**201** | Common error response | - | -**400** | Operation failed | - | -**500** | Operation failed | - | +**204** | Publishing metadata objects is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) -# **resetUserPassword** -> void resetUserPassword(resetUserPasswordRequest) +# **putVariableValues** +> void putVariableValues(putVariableValuesRequest) - Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored ### Example ```typescript -import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ResetUserPasswordRequest } from '@thoughtspot/rest-api-sdk'; +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, PutVariableValuesRequest } from '@thoughtspot/rest-api-sdk'; const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { username: "YOUR_USERNAME", @@ -6162,11 +6382,165 @@ const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { }); const apiInstance = new ThoughtSpotRestApi(configuration); -apiInstance.resetUserPassword( - // ResetUserPasswordRequest +apiInstance.putVariableValues( + // string | Unique ID or name of the variable + "identifier_example" , + // PutVariableValuesRequest { - new_password: "new_password_example", - user_identifier: "user_identifier_example", + operation: "ADD", + variable_assignment: [ + { + assigned_values: [ + "assigned_values_example", + ], + org_identifier: "org_identifier_example", + principal_type: "USER", + principal_identifier: "principal_identifier_example", + model_identifier: "model_identifier_example", + priority: 1, + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **putVariableValuesRequest** | **PutVariableValuesRequest**| | + **identifier** | [**string**] | Unique ID or name of the variable | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Variable values updated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **queryGetDecomposedQuery** +> EurekaDecomposeQueryResponse queryGetDecomposedQuery(queryGetDecomposedQueryRequest) + + Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, QueryGetDecomposedQueryRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.queryGetDecomposedQuery( + // QueryGetDecomposedQueryRequest + { + answerIds: [ + "answerIds_example", + ], + content: [ + "content_example", + ], + conversationId: "conversationId_example", + liveboardIds: [ + "liveboardIds_example", + ], + maxDecomposedQueries: 1, + nlsRequest: null, + worksheetIds: [ + "worksheetIds_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **queryGetDecomposedQueryRequest** | **QueryGetDecomposedQueryRequest**| | + + +### Return type + +**EurekaDecomposeQueryResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Common successful response | - | +**201** | Common error response | - | +**400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Operation failed | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **resetUserPassword** +> void resetUserPassword(resetUserPasswordRequest) + + Version: 9.0.0.cl or later Resets the password of a user account. Administrators can reset password on behalf of a user. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `USER_ADMINISTRATION` (**Can manage users**) privilege is required. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ResetUserPasswordRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.resetUserPassword( + // ResetUserPasswordRequest + { + new_password: "new_password_example", + user_identifier: "user_identifier_example", } ).then((data:any) => { console.log('API called successfully. Returned data: ' + data); @@ -6484,6 +6858,154 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **searchChannelHistory** +> SearchChannelHistoryResponse searchChannelHistory(searchChannelHistoryRequest) + + Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchChannelHistoryRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchChannelHistory( + // SearchChannelHistoryRequest + { + channel_type: "WEBHOOK", + job_ids: [ + "job_ids_example", + ], + channel_identifiers: [ + "channel_identifiers_example", + ], + channel_status: "PENDING", + events: [ + { + type: "LIVEBOARD_SCHEDULE", + identifier: "identifier_example", + }, + ], + start_epoch_time_in_millis: 3.14, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchChannelHistoryRequest** | **SearchChannelHistoryRequest**| | + + +### Return type + +**SearchChannelHistoryResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Channel status logs retrieved successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **searchCollections** +> CollectionSearchResponse searchCollections(searchCollectionsRequest) + + Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, SearchCollectionsRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.searchCollections( + // SearchCollectionsRequest + { + name_pattern: "name_pattern_example", + record_offset: 0, + record_size: 10, + collection_identifiers: [ + "collection_identifiers_example", + ], + created_by_user_identifiers: [ + "created_by_user_identifiers_example", + ], + include_metadata: false, + sort_options: null, + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchCollectionsRequest** | **SearchCollectionsRequest**| | + + +### Return type + +**CollectionSearchResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved list of collections | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **searchCommits** > Array searchCommits(searchCommitsRequest) @@ -7776,7 +8298,7 @@ Name | Type | Description | Notes # **sendAgentMessage** > any sendAgentMessage(sendAgentMessageRequest) - Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Example @@ -7835,6 +8357,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -7842,7 +8366,7 @@ Name | Type | Description | Notes # **sendAgentMessageStreaming** > SendAgentMessageResponse sendAgentMessageStreaming(sendAgentMessageStreamingRequest) - Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). ### Example @@ -7899,6 +8423,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -7906,7 +8432,7 @@ Name | Type | Description | Notes # **sendMessage** > Array sendMessage(sendMessageRequest) - Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Example @@ -7964,6 +8490,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -7971,7 +8499,7 @@ Name | Type | Description | Notes # **setNLInstructions** > EurekaSetNLInstructionsResponse setNLInstructions(setNLInstructionsRequest) - Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. ### Example @@ -8033,6 +8561,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -8128,7 +8658,7 @@ Name | Type | Description | Notes # **singleAnswer** > ResponseMessage singleAnswer(singleAnswerRequest) - Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. ### Example @@ -8183,6 +8713,8 @@ Name | Type | Description | Notes **200** | Common successful response | - | **201** | Common error response | - | **400** | Operation failed | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | **500** | Operation failed | - | [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) @@ -8468,6 +9000,82 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **updateCollection** +> void updateCollection(updateCollectionRequest) + + Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, UpdateCollectionRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.updateCollection( + // string | Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + "collection_identifier_example" , + // UpdateCollectionRequest + { + name: "name_example", + description: "description_example", + metadata: [ + { + type: "LIVEBOARD", + identifiers: [ + "identifiers_example", + ], + }, + ], + operation: "REPLACE", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **updateCollectionRequest** | **UpdateCollectionRequest**| | + **collectionIdentifier** | [**string**] | Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Collection updated successfully. No content returned. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**404** | Resource not found. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **updateColumnSecurityRules** > void updateColumnSecurityRules(updateColumnSecurityRulesRequest) @@ -9797,7 +10405,7 @@ Name | Type | Description | Notes # **updateVariableValues** > void updateVariableValues(updateVariableValuesRequest) - Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored ### Example @@ -9905,6 +10513,12 @@ apiInstance.updateWebhookConfiguration( authentication: null, signature_verification: null, storage_destination: null, + additional_headers: [ + { + key: "key_example", + value: "value_example", + }, + ], } ).then((data:any) => { console.log('API called successfully. Returned data: ' + data); @@ -9947,6 +10561,70 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **validateCommunicationChannel** +> CommunicationChannelValidateResponse validateCommunicationChannel(validateCommunicationChannelRequest) + + Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + +### Example + + +```typescript +import { createBearerAuthenticationConfig, ThoughtSpotRestApi, ValidateCommunicationChannelRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new ThoughtSpotRestApi(configuration); + +apiInstance.validateCommunicationChannel( + // ValidateCommunicationChannelRequest + { + channel_type: "WEBHOOK", + channel_identifier: "channel_identifier_example", + event_type: "LIVEBOARD_SCHEDULE", + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **validateCommunicationChannelRequest** | **ValidateCommunicationChannelRequest**| | + + +### Return type + +**CommunicationChannelValidateResponse** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | communication channel configuration validated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **validateEmailCustomization** > void validateEmailCustomization() diff --git a/sdks/typescript/VariableApi.md b/sdks/typescript/VariableApi.md index c485d3f13..c90deb1a4 100644 --- a/sdks/typescript/VariableApi.md +++ b/sdks/typescript/VariableApi.md @@ -6,6 +6,8 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**createVariable**](VariableApi.md#createVariable) | **POST** /api/rest/2.0/template/variables/create | [**deleteVariable**](VariableApi.md#deleteVariable) | **POST** /api/rest/2.0/template/variables/{identifier}/delete | +[**deleteVariables**](VariableApi.md#deleteVariables) | **POST** /api/rest/2.0/template/variables/delete | +[**putVariableValues**](VariableApi.md#putVariableValues) | **POST** /api/rest/2.0/template/variables/{identifier}/update-values | [**searchVariables**](VariableApi.md#searchVariables) | **POST** /api/rest/2.0/template/variables/search | [**updateVariable**](VariableApi.md#updateVariable) | **POST** /api/rest/2.0/template/variables/{identifier}/update | [**updateVariableValues**](VariableApi.md#updateVariableValues) | **POST** /api/rest/2.0/template/variables/update-values | @@ -79,7 +81,7 @@ Name | Type | Description | Notes # **deleteVariable** > void deleteVariable() - Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects ### Example @@ -136,6 +138,147 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **deleteVariables** +> void deleteVariables(deleteVariablesRequest) + + Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VariableApi, DeleteVariablesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VariableApi(configuration); + +apiInstance.deleteVariables( + // DeleteVariablesRequest + { + identifiers: [ + "identifiers_example", + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteVariablesRequest** | **DeleteVariablesRequest**| | + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Deletion of variable(s) is successful. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **putVariableValues** +> void putVariableValues(putVariableValuesRequest) + + Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + +### Example + + +```typescript +import { createBearerAuthenticationConfig, VariableApi, PutVariableValuesRequest } from '@thoughtspot/rest-api-sdk'; + +const configuration = createBearerAuthenticationConfig("CLUSTER_SERVER_URL", { + username: "YOUR_USERNAME", + password: "YOUR_PASSWORD", +}); +const apiInstance = new VariableApi(configuration); + +apiInstance.putVariableValues( + // string | Unique ID or name of the variable + "identifier_example" , + // PutVariableValuesRequest + { + operation: "ADD", + variable_assignment: [ + { + assigned_values: [ + "assigned_values_example", + ], + org_identifier: "org_identifier_example", + principal_type: "USER", + principal_identifier: "principal_identifier_example", + model_identifier: "model_identifier_example", + priority: 1, + }, + ], + } +).then((data:any) => { + console.log('API called successfully. Returned data: ' + data); +}).catch((error:any) => console.error(error)); + + +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **putVariableValuesRequest** | **PutVariableValuesRequest**| | + **identifier** | [**string**] | Unique ID or name of the variable | defaults to undefined + + +### Return type + +**void** + +### Authorization + +[bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Variable values updated successfully. | - | +**400** | Invalid request. | - | +**401** | Unauthorized access. | - | +**403** | Forbidden access. | - | +**500** | Unexpected error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **searchVariables** > Array searchVariables(searchVariablesRequest) @@ -283,7 +426,7 @@ Name | Type | Description | Notes # **updateVariableValues** > void updateVariableValues(updateVariableValuesRequest) - Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored ### Example diff --git a/sdks/typescript/WebhooksApi.md b/sdks/typescript/WebhooksApi.md index 2f71887fb..3f3aea5f8 100644 --- a/sdks/typescript/WebhooksApi.md +++ b/sdks/typescript/WebhooksApi.md @@ -40,6 +40,12 @@ apiInstance.createWebhookConfiguration( authentication: null, signature_verification: null, storage_destination: null, + additional_headers: [ + { + key: "key_example", + value: "value_example", + }, + ], } ).then((data:any) => { console.log('API called successfully. Returned data: ' + data); @@ -244,6 +250,12 @@ apiInstance.updateWebhookConfiguration( authentication: null, signature_verification: null, storage_destination: null, + additional_headers: [ + { + key: "key_example", + value: "value_example", + }, + ], } ).then((data:any) => { console.log('API called successfully. Returned data: ' + data); diff --git a/sdks/typescript/apis/AIApi.ts b/sdks/typescript/apis/AIApi.ts index 413f0a2f5..e206eebaf 100644 --- a/sdks/typescript/apis/AIApi.ts +++ b/sdks/typescript/apis/AIApi.ts @@ -36,7 +36,7 @@ import { SingleAnswerRequest } from '../models/SingleAnswerRequest'; export class AIApiRequestFactory extends BaseAPIRequestFactory { /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ public async createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise { @@ -54,8 +54,8 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -87,7 +87,7 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ public async createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise { @@ -105,8 +105,8 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -138,7 +138,7 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ public async getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise { @@ -156,8 +156,8 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -189,7 +189,7 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ public async getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise { @@ -207,8 +207,8 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -240,7 +240,7 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ public async getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise { @@ -258,8 +258,8 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -291,7 +291,7 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ public async queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise { @@ -309,8 +309,8 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -342,7 +342,7 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -368,8 +368,8 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -401,7 +401,7 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ public async sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise { @@ -419,8 +419,8 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -452,7 +452,7 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -478,8 +478,8 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -511,7 +511,7 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ public async setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise { @@ -529,8 +529,8 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -562,7 +562,7 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ public async singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise { @@ -580,8 +580,8 @@ export class AIApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -646,6 +646,20 @@ export class AIApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -696,6 +710,20 @@ export class AIApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -746,6 +774,20 @@ export class AIApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -796,6 +838,20 @@ export class AIApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -846,6 +902,20 @@ export class AIApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -896,6 +966,20 @@ export class AIApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -946,6 +1030,20 @@ export class AIApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -996,6 +1094,20 @@ export class AIApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -1046,6 +1158,20 @@ export class AIApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -1096,6 +1222,20 @@ export class AIApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -1146,6 +1286,20 @@ export class AIApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), diff --git a/sdks/typescript/apis/AuthenticationApi.ts b/sdks/typescript/apis/AuthenticationApi.ts index d4cf96ff5..9fdae1e63 100644 --- a/sdks/typescript/apis/AuthenticationApi.ts +++ b/sdks/typescript/apis/AuthenticationApi.ts @@ -38,8 +38,8 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -71,8 +71,8 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -111,8 +111,8 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -156,8 +156,8 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -201,8 +201,8 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -246,8 +246,8 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -290,8 +290,8 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -330,8 +330,8 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -381,8 +381,8 @@ export class AuthenticationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/CollectionsApi.ts b/sdks/typescript/apis/CollectionsApi.ts new file mode 100644 index 000000000..d40062de3 --- /dev/null +++ b/sdks/typescript/apis/CollectionsApi.ts @@ -0,0 +1,479 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { Collection } from '../models/Collection'; +import { CollectionDeleteResponse } from '../models/CollectionDeleteResponse'; +import { CollectionSearchResponse } from '../models/CollectionSearchResponse'; +import { CreateCollectionRequest } from '../models/CreateCollectionRequest'; +import { DeleteCollectionRequest } from '../models/DeleteCollectionRequest'; +import { ErrorResponse } from '../models/ErrorResponse'; +import { SearchCollectionsRequest } from '../models/SearchCollectionsRequest'; +import { UpdateCollectionRequest } from '../models/UpdateCollectionRequest'; + +/** + * no description + */ +export class CollectionsApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + public async createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createCollectionRequest' is not null or undefined + if (createCollectionRequest === null || createCollectionRequest === undefined) { + throw new RequiredError("CollectionsApi", "createCollection", "createCollectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/collections/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCollectionRequest, "CreateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + public async deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteCollectionRequest' is not null or undefined + if (deleteCollectionRequest === null || deleteCollectionRequest === undefined) { + throw new RequiredError("CollectionsApi", "deleteCollection", "deleteCollectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/collections/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteCollectionRequest, "DeleteCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + public async searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchCollectionsRequest' is not null or undefined + if (searchCollectionsRequest === null || searchCollectionsRequest === undefined) { + throw new RequiredError("CollectionsApi", "searchCollections", "searchCollectionsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/collections/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCollectionsRequest, "SearchCollectionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + public async updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'collectionIdentifier' is not null or undefined + if (collectionIdentifier === null || collectionIdentifier === undefined) { + throw new RequiredError("CollectionsApi", "updateCollection", "collectionIdentifier"); + } + + + // verify required parameter 'updateCollectionRequest' is not null or undefined + if (updateCollectionRequest === null || updateCollectionRequest === undefined) { + throw new RequiredError("CollectionsApi", "updateCollection", "updateCollectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/collections/{collection_identifier}/update' + .replace('{' + 'collection_identifier' + '}', encodeURIComponent(String(collectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCollectionRequest, "UpdateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class CollectionsApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + public async createCollection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Collection = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Collection", "" + ) as Collection; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Collection = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Collection", "" + ) as Collection; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCollection + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteCollection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CollectionDeleteResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CollectionDeleteResponse", "" + ) as CollectionDeleteResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CollectionDeleteResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CollectionDeleteResponse", "" + ) as CollectionDeleteResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCollections + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchCollections(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CollectionSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CollectionSearchResponse", "" + ) as CollectionSearchResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CollectionSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CollectionSearchResponse", "" + ) as CollectionSearchResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateCollection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/ConnectionConfigurationsApi.ts b/sdks/typescript/apis/ConnectionConfigurationsApi.ts index aed31e5b5..a99183f8c 100644 --- a/sdks/typescript/apis/ConnectionConfigurationsApi.ts +++ b/sdks/typescript/apis/ConnectionConfigurationsApi.ts @@ -39,8 +39,8 @@ export class ConnectionConfigurationsApiRequestFactory extends BaseAPIRequestFac // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -90,8 +90,8 @@ export class ConnectionConfigurationsApiRequestFactory extends BaseAPIRequestFac // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -141,8 +141,8 @@ export class ConnectionConfigurationsApiRequestFactory extends BaseAPIRequestFac // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -200,8 +200,8 @@ export class ConnectionConfigurationsApiRequestFactory extends BaseAPIRequestFac // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/ConnectionsApi.ts b/sdks/typescript/apis/ConnectionsApi.ts index f08e954f0..1d6d12aec 100644 --- a/sdks/typescript/apis/ConnectionsApi.ts +++ b/sdks/typescript/apis/ConnectionsApi.ts @@ -26,7 +26,7 @@ import { UpdateConnectionV2Request } from '../models/UpdateConnectionV2Request'; export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ public async createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise { @@ -44,8 +44,8 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -95,8 +95,8 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -147,8 +147,8 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -188,8 +188,8 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -229,8 +229,8 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -277,8 +277,8 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -328,8 +328,8 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -379,8 +379,8 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -438,8 +438,8 @@ export class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/CustomActionApi.ts b/sdks/typescript/apis/CustomActionApi.ts index 09801fc5a..aaa8e0d36 100644 --- a/sdks/typescript/apis/CustomActionApi.ts +++ b/sdks/typescript/apis/CustomActionApi.ts @@ -38,8 +38,8 @@ export class CustomActionApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -90,8 +90,8 @@ export class CustomActionApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -130,8 +130,8 @@ export class CustomActionApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -189,8 +189,8 @@ export class CustomActionApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/CustomCalendarsApi.ts b/sdks/typescript/apis/CustomCalendarsApi.ts index 12c68c7d1..5ecddf8f8 100644 --- a/sdks/typescript/apis/CustomCalendarsApi.ts +++ b/sdks/typescript/apis/CustomCalendarsApi.ts @@ -39,8 +39,8 @@ export class CustomCalendarsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -91,8 +91,8 @@ export class CustomCalendarsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -131,8 +131,8 @@ export class CustomCalendarsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -182,8 +182,8 @@ export class CustomCalendarsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -241,8 +241,8 @@ export class CustomCalendarsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/DBTApi.ts b/sdks/typescript/apis/DBTApi.ts index e02488420..fd1ef79fe 100644 --- a/sdks/typescript/apis/DBTApi.ts +++ b/sdks/typescript/apis/DBTApi.ts @@ -58,8 +58,8 @@ export class DBTApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -163,8 +163,8 @@ export class DBTApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -252,8 +252,8 @@ export class DBTApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -328,8 +328,8 @@ export class DBTApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -369,8 +369,8 @@ export class DBTApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -429,8 +429,8 @@ export class DBTApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/DataApi.ts b/sdks/typescript/apis/DataApi.ts index 740c061e8..3dad09918 100644 --- a/sdks/typescript/apis/DataApi.ts +++ b/sdks/typescript/apis/DataApi.ts @@ -40,8 +40,8 @@ export class DataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -91,8 +91,8 @@ export class DataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -142,8 +142,8 @@ export class DataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/EmailCustomizationApi.ts b/sdks/typescript/apis/EmailCustomizationApi.ts index 31dafabac..009c3a1c0 100644 --- a/sdks/typescript/apis/EmailCustomizationApi.ts +++ b/sdks/typescript/apis/EmailCustomizationApi.ts @@ -39,8 +39,8 @@ export class EmailCustomizationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -91,8 +91,8 @@ export class EmailCustomizationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -131,8 +131,8 @@ export class EmailCustomizationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -182,8 +182,8 @@ export class EmailCustomizationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -233,8 +233,8 @@ export class EmailCustomizationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -277,8 +277,8 @@ export class EmailCustomizationApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/GroupsApi.ts b/sdks/typescript/apis/GroupsApi.ts index 95872a569..24e5b6876 100644 --- a/sdks/typescript/apis/GroupsApi.ts +++ b/sdks/typescript/apis/GroupsApi.ts @@ -40,8 +40,8 @@ export class GroupsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -92,8 +92,8 @@ export class GroupsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -132,8 +132,8 @@ export class GroupsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -183,8 +183,8 @@ export class GroupsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -242,8 +242,8 @@ export class GroupsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/JobsApi.ts b/sdks/typescript/apis/JobsApi.ts new file mode 100644 index 000000000..57eadbaac --- /dev/null +++ b/sdks/typescript/apis/JobsApi.ts @@ -0,0 +1,132 @@ +// TODO: better import syntax? +import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi'; +import {Configuration} from '../configuration'; +import {RequestContext, HttpMethod, ResponseContext, HttpFile} from '../http/http'; +import {ObjectSerializer} from '../models/ObjectSerializer'; +import {ApiException} from './exception'; +import {canConsumeForm, isCodeInRange} from '../util'; +import {SecurityAuthentication} from '../auth/auth'; + + +import { ErrorResponse } from '../models/ErrorResponse'; +import { SearchChannelHistoryRequest } from '../models/SearchChannelHistoryRequest'; +import { SearchChannelHistoryResponse } from '../models/SearchChannelHistoryResponse'; + +/** + * no description + */ +export class JobsApiRequestFactory extends BaseAPIRequestFactory { + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + public async searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchChannelHistoryRequest' is not null or undefined + if (searchChannelHistoryRequest === null || searchChannelHistoryRequest === undefined) { + throw new RequiredError("JobsApi", "searchChannelHistory", "searchChannelHistoryRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/jobs/history/communication-channels/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchChannelHistoryRequest, "SearchChannelHistoryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + +} + +export class JobsApiResponseProcessor { + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchChannelHistory(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SearchChannelHistoryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SearchChannelHistoryResponse", "" + ) as SearchChannelHistoryResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SearchChannelHistoryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SearchChannelHistoryResponse", "" + ) as SearchChannelHistoryResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + +} diff --git a/sdks/typescript/apis/LogApi.ts b/sdks/typescript/apis/LogApi.ts index 2d0199a57..d4e4d9668 100644 --- a/sdks/typescript/apis/LogApi.ts +++ b/sdks/typescript/apis/LogApi.ts @@ -36,8 +36,8 @@ export class LogApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/MetadataApi.ts b/sdks/typescript/apis/MetadataApi.ts index b1bdf39b4..9f8d98775 100644 --- a/sdks/typescript/apis/MetadataApi.ts +++ b/sdks/typescript/apis/MetadataApi.ts @@ -22,6 +22,7 @@ import { ImportEPackAsyncTaskStatus } from '../models/ImportEPackAsyncTaskStatus import { ImportMetadataTMLAsyncRequest } from '../models/ImportMetadataTMLAsyncRequest'; import { ImportMetadataTMLRequest } from '../models/ImportMetadataTMLRequest'; import { MetadataSearchResponse } from '../models/MetadataSearchResponse'; +import { ParameterizeMetadataFieldsRequest } from '../models/ParameterizeMetadataFieldsRequest'; import { ParameterizeMetadataRequest } from '../models/ParameterizeMetadataRequest'; import { ResponseCopyObject } from '../models/ResponseCopyObject'; import { ResponseWorksheetToModelConversion } from '../models/ResponseWorksheetToModelConversion'; @@ -55,8 +56,8 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -106,8 +107,8 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -157,8 +158,8 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -208,8 +209,8 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -259,8 +260,8 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -310,8 +311,8 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -361,8 +362,8 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -412,8 +413,8 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -463,8 +464,8 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -514,8 +515,8 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -547,7 +548,7 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ public async parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise { @@ -565,8 +566,8 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -597,6 +598,57 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + public async parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'parameterizeMetadataFieldsRequest' is not null or undefined + if (parameterizeMetadataFieldsRequest === null || parameterizeMetadataFieldsRequest === undefined) { + throw new RequiredError("MetadataApi", "parameterizeMetadataFields", "parameterizeMetadataFieldsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/parameterize-fields'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataFieldsRequest, "ParameterizeMetadataFieldsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. * @param searchMetadataRequest @@ -616,8 +668,8 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -667,8 +719,8 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -718,8 +770,8 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -769,8 +821,8 @@ export class MetadataApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -1431,6 +1483,59 @@ export class MetadataApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadataFields + * @throws ApiException if the response code was not in [200, 299] + */ + public async parameterizeMetadataFields(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects diff --git a/sdks/typescript/apis/OrgsApi.ts b/sdks/typescript/apis/OrgsApi.ts index 66f7772e1..cb2faa682 100644 --- a/sdks/typescript/apis/OrgsApi.ts +++ b/sdks/typescript/apis/OrgsApi.ts @@ -38,8 +38,8 @@ export class OrgsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -90,8 +90,8 @@ export class OrgsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -130,8 +130,8 @@ export class OrgsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -189,8 +189,8 @@ export class OrgsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/ReportsApi.ts b/sdks/typescript/apis/ReportsApi.ts index 363a87927..dcc77e8fc 100644 --- a/sdks/typescript/apis/ReportsApi.ts +++ b/sdks/typescript/apis/ReportsApi.ts @@ -36,8 +36,8 @@ export class ReportsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -87,8 +87,8 @@ export class ReportsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/RolesApi.ts b/sdks/typescript/apis/RolesApi.ts index f5cfc3704..0a63d0124 100644 --- a/sdks/typescript/apis/RolesApi.ts +++ b/sdks/typescript/apis/RolesApi.ts @@ -39,8 +39,8 @@ export class RolesApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -91,8 +91,8 @@ export class RolesApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -131,8 +131,8 @@ export class RolesApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -190,8 +190,8 @@ export class RolesApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/SchedulesApi.ts b/sdks/typescript/apis/SchedulesApi.ts index 5c39df3c2..e22a03ecb 100644 --- a/sdks/typescript/apis/SchedulesApi.ts +++ b/sdks/typescript/apis/SchedulesApi.ts @@ -38,8 +38,8 @@ export class SchedulesApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -90,8 +90,8 @@ export class SchedulesApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -130,8 +130,8 @@ export class SchedulesApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -189,8 +189,8 @@ export class SchedulesApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/SecurityApi.ts b/sdks/typescript/apis/SecurityApi.ts index 05948da96..eae6e6815 100644 --- a/sdks/typescript/apis/SecurityApi.ts +++ b/sdks/typescript/apis/SecurityApi.ts @@ -48,8 +48,8 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -99,8 +99,8 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -150,8 +150,8 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -201,8 +201,8 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -252,8 +252,8 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -303,8 +303,8 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -354,8 +354,8 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -405,8 +405,8 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -456,8 +456,8 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -507,8 +507,8 @@ export class SecurityApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/SystemApi.ts b/sdks/typescript/apis/SystemApi.ts index 31c57232a..63d775455 100644 --- a/sdks/typescript/apis/SystemApi.ts +++ b/sdks/typescript/apis/SystemApi.ts @@ -9,6 +9,7 @@ import {SecurityAuthentication} from '../auth/auth'; import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { CommunicationChannelValidateResponse } from '../models/CommunicationChannelValidateResponse'; import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; import { ConfigureSecuritySettingsRequest } from '../models/ConfigureSecuritySettingsRequest'; import { ErrorResponse } from '../models/ErrorResponse'; @@ -19,6 +20,7 @@ import { SystemConfig } from '../models/SystemConfig'; import { SystemInfo } from '../models/SystemInfo'; import { SystemOverrideInfo } from '../models/SystemOverrideInfo'; import { UpdateSystemConfigRequest } from '../models/UpdateSystemConfigRequest'; +import { ValidateCommunicationChannelRequest } from '../models/ValidateCommunicationChannelRequest'; /** * no description @@ -44,8 +46,8 @@ export class SystemApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -95,8 +97,8 @@ export class SystemApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -139,8 +141,8 @@ export class SystemApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -172,8 +174,8 @@ export class SystemApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -205,8 +207,8 @@ export class SystemApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -245,8 +247,8 @@ export class SystemApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -296,8 +298,8 @@ export class SystemApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -347,8 +349,8 @@ export class SystemApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -379,6 +381,57 @@ export class SystemApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + public async validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'validateCommunicationChannelRequest' is not null or undefined + if (validateCommunicationChannelRequest === null || validateCommunicationChannelRequest === undefined) { + throw new RequiredError("SystemApi", "validateCommunicationChannel", "validateCommunicationChannelRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/communication-channels/validate'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateCommunicationChannelRequest, "ValidateCommunicationChannelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class SystemApiResponseProcessor { @@ -827,4 +880,61 @@ export class SystemApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + public async validateCommunicationChannel(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CommunicationChannelValidateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommunicationChannelValidateResponse", "" + ) as CommunicationChannelValidateResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CommunicationChannelValidateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommunicationChannelValidateResponse", "" + ) as CommunicationChannelValidateResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/sdks/typescript/apis/TagsApi.ts b/sdks/typescript/apis/TagsApi.ts index 84bfcb89b..e93ec176c 100644 --- a/sdks/typescript/apis/TagsApi.ts +++ b/sdks/typescript/apis/TagsApi.ts @@ -40,8 +40,8 @@ export class TagsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -91,8 +91,8 @@ export class TagsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -143,8 +143,8 @@ export class TagsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -183,8 +183,8 @@ export class TagsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -234,8 +234,8 @@ export class TagsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -293,8 +293,8 @@ export class TagsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/ThoughtSpotRestApi.ts b/sdks/typescript/apis/ThoughtSpotRestApi.ts index 3346cb6d6..87ffc3723 100644 --- a/sdks/typescript/apis/ThoughtSpotRestApi.ts +++ b/sdks/typescript/apis/ThoughtSpotRestApi.ts @@ -16,11 +16,15 @@ import { AssignChangeAuthorRequest } from '../models/AssignChangeAuthorRequest'; import { AssignTagRequest } from '../models/AssignTagRequest'; import { CalendarResponse } from '../models/CalendarResponse'; import { ChangeUserPasswordRequest } from '../models/ChangeUserPasswordRequest'; +import { Collection } from '../models/Collection'; +import { CollectionDeleteResponse } from '../models/CollectionDeleteResponse'; +import { CollectionSearchResponse } from '../models/CollectionSearchResponse'; import { ColumnSecurityRuleResponse } from '../models/ColumnSecurityRuleResponse'; import { CommitBranchRequest } from '../models/CommitBranchRequest'; import { CommitHistoryResponse } from '../models/CommitHistoryResponse'; import { CommitResponse } from '../models/CommitResponse'; import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { CommunicationChannelValidateResponse } from '../models/CommunicationChannelValidateResponse'; import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; import { ConfigureSecuritySettingsRequest } from '../models/ConfigureSecuritySettingsRequest'; import { ConnectionConfigurationResponse } from '../models/ConnectionConfigurationResponse'; @@ -30,6 +34,7 @@ import { ConvertWorksheetToModelRequest } from '../models/ConvertWorksheetToMode import { CopyObjectRequest } from '../models/CopyObjectRequest'; import { CreateAgentConversationRequest } from '../models/CreateAgentConversationRequest'; import { CreateCalendarRequest } from '../models/CreateCalendarRequest'; +import { CreateCollectionRequest } from '../models/CreateCollectionRequest'; import { CreateConfigRequest } from '../models/CreateConfigRequest'; import { CreateConnectionConfigurationRequest } from '../models/CreateConnectionConfigurationRequest'; import { CreateConnectionRequest } from '../models/CreateConnectionRequest'; @@ -48,11 +53,13 @@ import { CreateVariableRequest } from '../models/CreateVariableRequest'; import { CreateWebhookConfigurationRequest } from '../models/CreateWebhookConfigurationRequest'; import { DbtSearchResponse } from '../models/DbtSearchResponse'; import { DeactivateUserRequest } from '../models/DeactivateUserRequest'; +import { DeleteCollectionRequest } from '../models/DeleteCollectionRequest'; import { DeleteConfigRequest } from '../models/DeleteConfigRequest'; import { DeleteConnectionConfigurationRequest } from '../models/DeleteConnectionConfigurationRequest'; import { DeleteConnectionRequest } from '../models/DeleteConnectionRequest'; import { DeleteMetadataRequest } from '../models/DeleteMetadataRequest'; import { DeleteOrgEmailCustomizationRequest } from '../models/DeleteOrgEmailCustomizationRequest'; +import { DeleteVariablesRequest } from '../models/DeleteVariablesRequest'; import { DeleteWebhookConfigurationsRequest } from '../models/DeleteWebhookConfigurationsRequest'; import { DeployCommitRequest } from '../models/DeployCommitRequest'; import { DeployResponse } from '../models/DeployResponse'; @@ -101,10 +108,12 @@ import { ManageObjectPrivilegeRequest } from '../models/ManageObjectPrivilegeReq import { MetadataSearchResponse } from '../models/MetadataSearchResponse'; import { ObjectPrivilegesOfMetadataResponse } from '../models/ObjectPrivilegesOfMetadataResponse'; import { OrgResponse } from '../models/OrgResponse'; +import { ParameterizeMetadataFieldsRequest } from '../models/ParameterizeMetadataFieldsRequest'; import { ParameterizeMetadataRequest } from '../models/ParameterizeMetadataRequest'; import { PermissionOfMetadataResponse } from '../models/PermissionOfMetadataResponse'; import { PermissionOfPrincipalsResponse } from '../models/PermissionOfPrincipalsResponse'; import { PublishMetadataRequest } from '../models/PublishMetadataRequest'; +import { PutVariableValuesRequest } from '../models/PutVariableValuesRequest'; import { QueryGetDecomposedQueryRequest } from '../models/QueryGetDecomposedQueryRequest'; import { RepoConfigObject } from '../models/RepoConfigObject'; import { ResetUserPasswordRequest } from '../models/ResetUserPasswordRequest'; @@ -121,6 +130,9 @@ import { RevokeRefreshTokensResponse } from '../models/RevokeRefreshTokensRespon import { RevokeTokenRequest } from '../models/RevokeTokenRequest'; import { RoleResponse } from '../models/RoleResponse'; import { SearchCalendarsRequest } from '../models/SearchCalendarsRequest'; +import { SearchChannelHistoryRequest } from '../models/SearchChannelHistoryRequest'; +import { SearchChannelHistoryResponse } from '../models/SearchChannelHistoryResponse'; +import { SearchCollectionsRequest } from '../models/SearchCollectionsRequest'; import { SearchCommitsRequest } from '../models/SearchCommitsRequest'; import { SearchCommunicationChannelPreferencesRequest } from '../models/SearchCommunicationChannelPreferencesRequest'; import { SearchConfigRequest } from '../models/SearchConfigRequest'; @@ -160,6 +172,7 @@ import { UnassignTagRequest } from '../models/UnassignTagRequest'; import { UnparameterizeMetadataRequest } from '../models/UnparameterizeMetadataRequest'; import { UnpublishMetadataRequest } from '../models/UnpublishMetadataRequest'; import { UpdateCalendarRequest } from '../models/UpdateCalendarRequest'; +import { UpdateCollectionRequest } from '../models/UpdateCollectionRequest'; import { UpdateColumnSecurityRulesRequest } from '../models/UpdateColumnSecurityRulesRequest'; import { UpdateConfigRequest } from '../models/UpdateConfigRequest'; import { UpdateConnectionConfigurationRequest } from '../models/UpdateConnectionConfigurationRequest'; @@ -181,6 +194,7 @@ import { UpdateVariableValuesRequest } from '../models/UpdateVariableValuesReque import { UpdateWebhookConfigurationRequest } from '../models/UpdateWebhookConfigurationRequest'; import { User } from '../models/User'; import { UserGroupResponse } from '../models/UserGroupResponse'; +import { ValidateCommunicationChannelRequest } from '../models/ValidateCommunicationChannelRequest'; import { ValidateMergeRequest } from '../models/ValidateMergeRequest'; import { ValidateTokenRequest } from '../models/ValidateTokenRequest'; import { Variable } from '../models/Variable'; @@ -212,8 +226,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -263,8 +277,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -314,8 +328,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -365,8 +379,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -416,8 +430,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -467,8 +481,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -518,8 +532,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -569,8 +583,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -620,8 +634,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -671,8 +685,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -704,7 +718,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ public async createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise { @@ -722,8 +736,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -773,8 +787,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -805,6 +819,57 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + public async createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createCollectionRequest' is not null or undefined + if (createCollectionRequest === null || createCollectionRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "createCollection", "createCollectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/collections/create'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCollectionRequest, "CreateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. * @param createConfigRequest @@ -824,8 +889,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -857,7 +922,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ public async createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise { @@ -875,8 +940,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -926,8 +991,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -959,7 +1024,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ public async createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise { @@ -977,8 +1042,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -1028,8 +1093,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -1079,8 +1144,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -1130,8 +1195,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -1181,8 +1246,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -1232,8 +1297,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -1283,8 +1348,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -1334,8 +1399,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -1385,8 +1450,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -1436,8 +1501,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -1487,8 +1552,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -1561,8 +1626,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -1666,8 +1731,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -1755,8 +1820,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -1831,8 +1896,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -1871,8 +1936,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -1923,12 +1988,63 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + public async deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteCollectionRequest' is not null or undefined + if (deleteCollectionRequest === null || deleteCollectionRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteCollection", "deleteCollectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/collections/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteCollectionRequest, "DeleteCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] @@ -1963,8 +2079,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2014,8 +2130,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2065,8 +2181,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2117,8 +2233,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2158,8 +2274,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2199,8 +2315,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2240,8 +2356,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2280,8 +2396,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2332,8 +2448,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2372,8 +2488,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2424,8 +2540,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2465,8 +2581,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2506,8 +2622,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2547,8 +2663,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2588,8 +2704,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2610,7 +2726,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ public async deleteVariable(identifier: string, _options?: Configuration): Promise { @@ -2629,12 +2745,63 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + public async deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteVariablesRequest' is not null or undefined + if (deleteVariablesRequest === null || deleteVariablesRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "deleteVariables", "deleteVariablesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteVariablesRequest, "DeleteVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] @@ -2669,8 +2836,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2720,8 +2887,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2772,8 +2939,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2812,8 +2979,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2863,8 +3030,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2914,8 +3081,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -2965,8 +3132,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3016,8 +3183,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3067,8 +3234,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3118,8 +3285,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3169,8 +3336,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3221,8 +3388,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3261,8 +3428,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3312,8 +3479,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3363,8 +3530,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3414,8 +3581,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3465,8 +3632,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3516,8 +3683,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3567,8 +3734,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3618,8 +3785,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3662,8 +3829,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3695,8 +3862,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3735,8 +3902,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3762,7 +3929,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ public async getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise { @@ -3780,8 +3947,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3831,8 +3998,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3858,7 +4025,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ public async getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise { @@ -3876,8 +4043,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3927,8 +4094,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -3954,7 +4121,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ public async getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise { @@ -3972,8 +4139,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4016,8 +4183,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4049,8 +4216,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4082,8 +4249,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4122,8 +4289,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4173,8 +4340,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4224,8 +4391,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4275,8 +4442,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4326,8 +4493,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4370,8 +4537,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4410,8 +4577,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4443,7 +4610,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ public async parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise { @@ -4461,8 +4628,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4493,6 +4660,57 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + public async parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'parameterizeMetadataFieldsRequest' is not null or undefined + if (parameterizeMetadataFieldsRequest === null || parameterizeMetadataFieldsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "parameterizeMetadataFields", "parameterizeMetadataFieldsRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/metadata/parameterize-fields'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataFieldsRequest, "ParameterizeMetadataFieldsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. * @param publishMetadataRequest @@ -4512,8 +4730,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4545,7 +4763,66 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.7.0.cl or later + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + public async putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'identifier' is not null or undefined + if (identifier === null || identifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "putVariableValues", "identifier"); + } + + + // verify required parameter 'putVariableValuesRequest' is not null or undefined + if (putVariableValuesRequest === null || putVariableValuesRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "putVariableValues", "putVariableValuesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/{identifier}/update-values' + .replace('{' + 'identifier' + '}', encodeURIComponent(String(identifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(putVariableValuesRequest, "PutVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ public async queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise { @@ -4563,8 +4840,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4614,8 +4891,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4673,8 +4950,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4732,8 +5009,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4783,8 +5060,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4834,8 +5111,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4867,26 +5144,26 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. - * @param searchCommitsRequest + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest */ - public async searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise { + public async searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; - // verify required parameter 'searchCommitsRequest' is not null or undefined - if (searchCommitsRequest === null || searchCommitsRequest === undefined) { - throw new RequiredError("ThoughtSpotRestApi", "searchCommits", "searchCommitsRequest"); + // verify required parameter 'searchChannelHistoryRequest' is not null or undefined + if (searchChannelHistoryRequest === null || searchChannelHistoryRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchChannelHistory", "searchChannelHistoryRequest"); } // Path Params - const localVarPath = '/api/rest/2.0/vcs/git/commits/search'; + const localVarPath = '/api/rest/2.0/jobs/history/communication-channels/search'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4897,7 +5174,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(searchCommitsRequest, "SearchCommitsRequest", ""), + ObjectSerializer.serialize(searchChannelHistoryRequest, "SearchChannelHistoryRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -4918,26 +5195,26 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. - * @param searchCommunicationChannelPreferencesRequest + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest */ - public async searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { + public async searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; - // verify required parameter 'searchCommunicationChannelPreferencesRequest' is not null or undefined - if (searchCommunicationChannelPreferencesRequest === null || searchCommunicationChannelPreferencesRequest === undefined) { - throw new RequiredError("ThoughtSpotRestApi", "searchCommunicationChannelPreferences", "searchCommunicationChannelPreferencesRequest"); + // verify required parameter 'searchCollectionsRequest' is not null or undefined + if (searchCollectionsRequest === null || searchCollectionsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchCollections", "searchCollectionsRequest"); } // Path Params - const localVarPath = '/api/rest/2.0/system/preferences/communication-channels/search'; + const localVarPath = '/api/rest/2.0/collections/search'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4948,7 +5225,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(searchCommunicationChannelPreferencesRequest, "SearchCommunicationChannelPreferencesRequest", ""), + ObjectSerializer.serialize(searchCollectionsRequest, "SearchCollectionsRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -4969,26 +5246,26 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. - * @param searchConfigRequest + * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. + * @param searchCommitsRequest */ - public async searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Promise { + public async searchCommits(searchCommitsRequest: SearchCommitsRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; - // verify required parameter 'searchConfigRequest' is not null or undefined - if (searchConfigRequest === null || searchConfigRequest === undefined) { - throw new RequiredError("ThoughtSpotRestApi", "searchConfig", "searchConfigRequest"); + // verify required parameter 'searchCommitsRequest' is not null or undefined + if (searchCommitsRequest === null || searchCommitsRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchCommits", "searchCommitsRequest"); } // Path Params - const localVarPath = '/api/rest/2.0/vcs/git/config/search'; + const localVarPath = '/api/rest/2.0/vcs/git/commits/search'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -4999,7 +5276,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(searchConfigRequest, "SearchConfigRequest", ""), + ObjectSerializer.serialize(searchCommitsRequest, "SearchCommitsRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -5020,26 +5297,128 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. - * @param searchConnectionRequest + * Version: 10.14.0.cl or later Fetch communication channel preferences. - Use `cluster_preferences` to fetch the default preferences for your ThoughtSpot application instance. - If your instance has [Orgs](https://docs.thoughtspot.com/cloud/latest/orgs-overview), use `org_preferences` to fetch any Org-specific preferences that override the defaults. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `APPLICATION_ADMINISTRATION` (**Can manage application settings**) privilege are also authorized to perform this action. + * @param searchCommunicationChannelPreferencesRequest */ - public async searchConnection(searchConnectionRequest: SearchConnectionRequest, _options?: Configuration): Promise { + public async searchCommunicationChannelPreferences(searchCommunicationChannelPreferencesRequest: SearchCommunicationChannelPreferencesRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; - // verify required parameter 'searchConnectionRequest' is not null or undefined - if (searchConnectionRequest === null || searchConnectionRequest === undefined) { - throw new RequiredError("ThoughtSpotRestApi", "searchConnection", "searchConnectionRequest"); + // verify required parameter 'searchCommunicationChannelPreferencesRequest' is not null or undefined + if (searchCommunicationChannelPreferencesRequest === null || searchCommunicationChannelPreferencesRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchCommunicationChannelPreferences", "searchCommunicationChannelPreferencesRequest"); } // Path Params - const localVarPath = '/api/rest/2.0/connection/search'; + const localVarPath = '/api/rest/2.0/system/preferences/communication-channels/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCommunicationChannelPreferencesRequest, "SearchCommunicationChannelPreferencesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Gets Git repository connections configured on the ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. + * @param searchConfigRequest + */ + public async searchConfig(searchConfigRequest: SearchConfigRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchConfigRequest' is not null or undefined + if (searchConfigRequest === null || searchConfigRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchConfig", "searchConfigRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/vcs/git/config/search'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchConfigRequest, "SearchConfigRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Version: 9.2.0.cl or later Gets connection objects. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. - To get a list of all connections available in the ThoughtSpot system, send the API request without any attributes in the request body. - To get the connection objects for a specific type of data warehouse, specify the type in `data_warehouse_types`. - To fetch details of a connection object, specify the connection object GUID or name. The `name_pattern` attribute allows passing partial text with `%` for a wildcard match. - To get details of the database, schemas, tables, or columns from a data connection object, specify `data_warehouse_object_type`. - To get a specific database, schema, table, or column from a connection object, define the object type in `data_warehouse_object_type` and object properties in the `data_warehouse_objects` array. For example, to search for a column, you must pass the database, schema, and table names in the API request. Note that in the following example, object properties are set in a hierarchical order (`database` > `schema` > `table` > `column`). ``` { \"connections\": [ { \"identifier\": \"b9d1f2ef-fa65-4a4b-994e-30fa2d57b0c2\", \"data_warehouse_objects\": [ { \"database\": \"NEBULADEV\", \"schema\": \"INFORMATION_SCHEMA\", \"table\": \"APPLICABLE_ROLES\", \"column\": \"ROLE_NAME\" } ] } ], \"data_warehouse_object_type\": \"COLUMN\" } ``` - To fetch data by `configuration`, specify `data_warehouse_object_type`. For example, to fetch columns from the `DEVELOPMENT` database, specify the `data_warehouse_object_type` as `DATABASE` and define the `configuration` string as `{\"database\":\"DEVELOPMENT\"}`. To get column data for a specific table, specify the table, for example,`{\"database\":\"RETAILAPPAREL\",\"table\":\"PIPES\"}`. - To query connections by `authentication_type`, specify `data_warehouse_object_type`. Supported values for `authentication_type` are: - `SERVICE_ACCOUNT`: For connections that require service account credentials to authenticate to the Cloud Data Warehouse and fetch data. - `OAUTH`: For connections that require OAuth credentials to authenticate to the Cloud Data Warehouse and fetch data. Teradata, Oracle, and Presto Cloud Data Warehouses do not support the OAuth authentication type. - `IAM`: For connections that have the IAM OAuth set up. This authentication type is supported on Amazon Redshift connections only. - `EXTOAUTH`: For connections that have External OAuth set up. ThoughtSpot supports external [OAuth with Microsoft Azure Active Directory (AD)](https://docs.thoughtspot.com/cloud/latest/ connections-snowflake-azure-ad-oauth) and [Okta for Snowflake data connections](https://docs.thoughtspot.com/cloud/latest/connections-snowflake-okta-oauth). - `KEY_PAIR`: For connections that require Key Pair account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PKCE`: For connections that require OAuth with PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake, Starburst, Databricks, Denodo connections only. - `EXTOAUTH_WITH_PKCE`: For connections that require External OAuth With PKCE account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - `OAUTH_WITH_PEZ`: For connections that require OAuth With PEZ account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Amazon Redshift connections only. - `OAUTH_WITH_SERVICE_PRINCIPAL`: For connections that require OAuth With Service Principal account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `PERSONAL_ACCESS_TOKEN`: For connections that require Personal Access Token account credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Databricks connections only. - `OAUTH_CLIENT_CREDENTIALS`: For connections that require OAuth Client Credentials to authenticate to the Cloud Data Warehouse and fetch data. This authentication type is supported on Snowflake connections only. - To include more details about connection objects in the API response, set `include_details` to `true`. - You can also sort the output by field names and filter connections by tags. **NOTE**: When filtering connection records by parameters other than `data_warehouse_types` or `tag_identifiers`, ensure that you set `record_size` to `-1` and `record_offset` to `0` for precise results. + * @param searchConnectionRequest + */ + public async searchConnection(searchConnectionRequest: SearchConnectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'searchConnectionRequest' is not null or undefined + if (searchConnectionRequest === null || searchConnectionRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "searchConnection", "searchConnectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/connection/search'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5089,8 +5468,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5140,8 +5519,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5191,8 +5570,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5242,8 +5621,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5293,8 +5672,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5344,8 +5723,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5395,8 +5774,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5446,8 +5825,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5497,8 +5876,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5548,8 +5927,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5599,8 +5978,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5650,8 +6029,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5701,8 +6080,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5734,7 +6113,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -5760,8 +6139,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5793,7 +6172,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ public async sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise { @@ -5811,8 +6190,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5844,7 +6223,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -5870,8 +6249,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5903,7 +6282,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ public async setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise { @@ -5921,8 +6300,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -5972,8 +6351,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -6005,7 +6384,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ public async singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise { @@ -6023,8 +6402,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -6074,8 +6453,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -6125,8 +6504,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -6176,8 +6555,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -6235,8 +6614,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -6267,6 +6646,65 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + public async updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'collectionIdentifier' is not null or undefined + if (collectionIdentifier === null || collectionIdentifier === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateCollection", "collectionIdentifier"); + } + + + // verify required parameter 'updateCollectionRequest' is not null or undefined + if (updateCollectionRequest === null || updateCollectionRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "updateCollection", "updateCollectionRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/collections/{collection_identifier}/update' + .replace('{' + 'collection_identifier' + '}', encodeURIComponent(String(collectionIdentifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCollectionRequest, "UpdateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups * @param updateColumnSecurityRulesRequest @@ -6286,8 +6724,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -6337,8 +6775,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -6388,8 +6826,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -6447,8 +6885,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -6506,8 +6944,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -6565,8 +7003,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -6636,8 +7074,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -6743,8 +7181,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -6794,8 +7232,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -6845,8 +7283,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -6904,8 +7342,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -6963,8 +7401,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -7022,8 +7460,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -7073,8 +7511,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -7132,8 +7570,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -7191,8 +7629,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -7250,8 +7688,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -7309,8 +7747,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -7342,7 +7780,7 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ public async updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise { @@ -7360,8 +7798,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -7419,8 +7857,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -7451,6 +7889,57 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + public async validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'validateCommunicationChannelRequest' is not null or undefined + if (validateCommunicationChannelRequest === null || validateCommunicationChannelRequest === undefined) { + throw new RequiredError("ThoughtSpotRestApi", "validateCommunicationChannel", "validateCommunicationChannelRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/system/communication-channels/validate'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateCommunicationChannelRequest, "ValidateCommunicationChannelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -7463,8 +7952,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -7503,8 +7992,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -7554,8 +8043,8 @@ export class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -8177,6 +8666,20 @@ export class ThoughtSpotRestApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -8254,6 +8757,63 @@ export class ThoughtSpotRestApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + public async createCollection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: Collection = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Collection", "" + ) as Collection; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Collection = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Collection", "" + ) as Collection; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -8455,18 +9015,32 @@ export class ThoughtSpotRestApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } - if (isCodeInRange("500", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "ErrorResponse", "" ) as ErrorResponse; - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: Conversation = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Conversation = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), "Conversation", "" ) as Conversation; return body; @@ -9376,6 +9950,70 @@ export class ThoughtSpotRestApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCollection + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteCollection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CollectionDeleteResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CollectionDeleteResponse", "" + ) as CollectionDeleteResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CollectionDeleteResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CollectionDeleteResponse", "" + ) as CollectionDeleteResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -10217,6 +10855,59 @@ export class ThoughtSpotRestApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteVariables(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -11545,6 +12236,20 @@ export class ThoughtSpotRestApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -11652,6 +12357,20 @@ export class ThoughtSpotRestApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -11759,6 +12478,20 @@ export class ThoughtSpotRestApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -12394,10 +13127,10 @@ export class ThoughtSpotRestApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to publishMetadata + * @params response Response returned by the server for a request to parameterizeMetadataFields * @throws ApiException if the response code was not in [200, 299] */ - public async publishMetadata(response: ResponseContext): Promise { + public async parameterizeMetadataFields(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { return; @@ -12447,46 +13180,49 @@ export class ThoughtSpotRestApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to queryGetDecomposedQuery + * @params response Response returned by the server for a request to publishMetadata * @throws ApiException if the response code was not in [200, 299] */ - public async queryGetDecomposedQuery(response: ResponseContext): Promise { + public async publishMetadata(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: EurekaDecomposeQueryResponse = ObjectSerializer.deserialize( + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "EurekaDecomposeQueryResponse", "" - ) as EurekaDecomposeQueryResponse; - return body; + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("201", response.httpStatusCode)) { - const body: EurekaDecomposeQueryResponse = ObjectSerializer.deserialize( + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "EurekaDecomposeQueryResponse", "" - ) as EurekaDecomposeQueryResponse; - return body; + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } - if (isCodeInRange("400", response.httpStatusCode)) { + if (isCodeInRange("403", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "ErrorResponse", "" ) as ErrorResponse; - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "ErrorResponse", "" ) as ErrorResponse; - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: EurekaDecomposeQueryResponse = ObjectSerializer.deserialize( + const body: void = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "EurekaDecomposeQueryResponse", "" - ) as EurekaDecomposeQueryResponse; + "void", "" + ) as void; return body; } @@ -12497,10 +13233,10 @@ export class ThoughtSpotRestApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to resetUserPassword + * @params response Response returned by the server for a request to putVariableValues * @throws ApiException if the response code was not in [200, 299] */ - public async resetUserPassword(response: ResponseContext): Promise { + public async putVariableValues(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { return; @@ -12550,16 +13286,23 @@ export class ThoughtSpotRestApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to revertCommit + * @params response Response returned by the server for a request to queryGetDecomposedQuery * @throws ApiException if the response code was not in [200, 299] */ - public async revertCommit(response: ResponseContext): Promise { + public async queryGetDecomposedQuery(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { - const body: RevertResponse = ObjectSerializer.deserialize( + const body: EurekaDecomposeQueryResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "RevertResponse", "" - ) as RevertResponse; + "EurekaDecomposeQueryResponse", "" + ) as EurekaDecomposeQueryResponse; + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body: EurekaDecomposeQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EurekaDecomposeQueryResponse", "" + ) as EurekaDecomposeQueryResponse; return body; } if (isCodeInRange("400", response.httpStatusCode)) { @@ -12567,7 +13310,7 @@ export class ThoughtSpotRestApiResponseProcessor { ObjectSerializer.parse(await response.body.text(), contentType), "ErrorResponse", "" ) as ErrorResponse; - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( @@ -12588,15 +13331,15 @@ export class ThoughtSpotRestApiResponseProcessor { ObjectSerializer.parse(await response.body.text(), contentType), "ErrorResponse", "" ) as ErrorResponse; - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: RevertResponse = ObjectSerializer.deserialize( + const body: EurekaDecomposeQueryResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "RevertResponse", "" - ) as RevertResponse; + "EurekaDecomposeQueryResponse", "" + ) as EurekaDecomposeQueryResponse; return body; } @@ -12607,17 +13350,13 @@ export class ThoughtSpotRestApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to revokeRefreshTokens + * @params response Response returned by the server for a request to resetUserPassword * @throws ApiException if the response code was not in [200, 299] */ - public async revokeRefreshTokens(response: ResponseContext): Promise { + public async resetUserPassword(response: ResponseContext): Promise { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: RevokeRefreshTokensResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "RevokeRefreshTokensResponse", "" - ) as RevokeRefreshTokensResponse; - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( @@ -12640,16 +13379,130 @@ export class ThoughtSpotRestApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } - if (isCodeInRange("404", response.httpStatusCode)) { + if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "ErrorResponse", "" ) as ErrorResponse; - throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } - if (isCodeInRange("409", response.httpStatusCode)) { - const body: ErrorResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revertCommit + * @throws ApiException if the response code was not in [200, 299] + */ + public async revertCommit(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: RevertResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RevertResponse", "" + ) as RevertResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RevertResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RevertResponse", "" + ) as RevertResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeRefreshTokens + * @throws ApiException if the response code was not in [200, 299] + */ + public async revokeRefreshTokens(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: RevokeRefreshTokensResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RevokeRefreshTokensResponse", "" + ) as RevokeRefreshTokensResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); + } + if (isCodeInRange("409", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), "ErrorResponse", "" ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Conflict", body, response.headers); @@ -12784,6 +13637,120 @@ export class ThoughtSpotRestApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchChannelHistory(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: SearchChannelHistoryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SearchChannelHistoryResponse", "" + ) as SearchChannelHistoryResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SearchChannelHistoryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SearchChannelHistoryResponse", "" + ) as SearchChannelHistoryResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCollections + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchCollections(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CollectionSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CollectionSearchResponse", "" + ) as CollectionSearchResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CollectionSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CollectionSearchResponse", "" + ) as CollectionSearchResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -13776,6 +14743,20 @@ export class ThoughtSpotRestApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -13826,6 +14807,20 @@ export class ThoughtSpotRestApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -13876,6 +14871,20 @@ export class ThoughtSpotRestApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -13926,6 +14935,20 @@ export class ThoughtSpotRestApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -14029,6 +15052,20 @@ export class ThoughtSpotRestApiResponseProcessor { ) as ErrorResponse; throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body: ErrorResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), @@ -14261,6 +15298,66 @@ export class ThoughtSpotRestApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateCollection(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -15333,6 +16430,63 @@ export class ThoughtSpotRestApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + public async validateCommunicationChannel(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CommunicationChannelValidateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommunicationChannelValidateResponse", "" + ) as CommunicationChannelValidateResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CommunicationChannelValidateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CommunicationChannelValidateResponse", "" + ) as CommunicationChannelValidateResponse; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects diff --git a/sdks/typescript/apis/UsersApi.ts b/sdks/typescript/apis/UsersApi.ts index 4b6da2cc9..1ba9f0974 100644 --- a/sdks/typescript/apis/UsersApi.ts +++ b/sdks/typescript/apis/UsersApi.ts @@ -46,8 +46,8 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -97,8 +97,8 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -148,8 +148,8 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -199,8 +199,8 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -251,8 +251,8 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -291,8 +291,8 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -342,8 +342,8 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -393,8 +393,8 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -444,8 +444,8 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -503,8 +503,8 @@ export class UsersApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/VariableApi.ts b/sdks/typescript/apis/VariableApi.ts index fbb339130..3b69f837e 100644 --- a/sdks/typescript/apis/VariableApi.ts +++ b/sdks/typescript/apis/VariableApi.ts @@ -9,7 +9,9 @@ import {SecurityAuthentication} from '../auth/auth'; import { CreateVariableRequest } from '../models/CreateVariableRequest'; +import { DeleteVariablesRequest } from '../models/DeleteVariablesRequest'; import { ErrorResponse } from '../models/ErrorResponse'; +import { PutVariableValuesRequest } from '../models/PutVariableValuesRequest'; import { SearchVariablesRequest } from '../models/SearchVariablesRequest'; import { UpdateVariableRequest } from '../models/UpdateVariableRequest'; import { UpdateVariableValuesRequest } from '../models/UpdateVariableValuesRequest'; @@ -39,8 +41,8 @@ export class VariableApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -72,7 +74,7 @@ export class VariableApiRequestFactory extends BaseAPIRequestFactory { } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ public async deleteVariable(identifier: string, _options?: Configuration): Promise { @@ -91,12 +93,122 @@ export class VariableApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + public async deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'deleteVariablesRequest' is not null or undefined + if (deleteVariablesRequest === null || deleteVariablesRequest === undefined) { + throw new RequiredError("VariableApi", "deleteVariables", "deleteVariablesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/delete'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteVariablesRequest, "DeleteVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + public async putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'identifier' is not null or undefined + if (identifier === null || identifier === undefined) { + throw new RequiredError("VariableApi", "putVariableValues", "identifier"); + } + + + // verify required parameter 'putVariableValuesRequest' is not null or undefined + if (putVariableValuesRequest === null || putVariableValuesRequest === undefined) { + throw new RequiredError("VariableApi", "putVariableValues", "putVariableValuesRequest"); + } + + + // Path Params + const localVarPath = '/api/rest/2.0/template/variables/{identifier}/update-values' + .replace('{' + 'identifier' + '}', encodeURIComponent(String(identifier))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") + + + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(putVariableValuesRequest, "PutVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] @@ -131,8 +243,8 @@ export class VariableApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -190,8 +302,8 @@ export class VariableApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -223,7 +335,7 @@ export class VariableApiRequestFactory extends BaseAPIRequestFactory { } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ public async updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise { @@ -241,8 +353,8 @@ export class VariableApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -387,6 +499,112 @@ export class VariableApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteVariables(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to putVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + public async putVariableValues(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: ErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ErrorResponse", "" + ) as ErrorResponse; + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", "" + ) as void; + return body; + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects diff --git a/sdks/typescript/apis/VersionControlApi.ts b/sdks/typescript/apis/VersionControlApi.ts index dfb0b569f..11b2a7611 100644 --- a/sdks/typescript/apis/VersionControlApi.ts +++ b/sdks/typescript/apis/VersionControlApi.ts @@ -48,8 +48,8 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -99,8 +99,8 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -150,8 +150,8 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -201,8 +201,8 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -260,8 +260,8 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -311,8 +311,8 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -362,8 +362,8 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -413,8 +413,8 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -464,8 +464,8 @@ export class VersionControlApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/apis/WebhooksApi.ts b/sdks/typescript/apis/WebhooksApi.ts index 20c437251..18440d6c3 100644 --- a/sdks/typescript/apis/WebhooksApi.ts +++ b/sdks/typescript/apis/WebhooksApi.ts @@ -41,8 +41,8 @@ export class WebhooksApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -92,8 +92,8 @@ export class WebhooksApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -143,8 +143,8 @@ export class WebhooksApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") @@ -202,8 +202,8 @@ export class WebhooksApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0") - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0") + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0") + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0") diff --git a/sdks/typescript/dist/index.cjs b/sdks/typescript/dist/index.cjs index 8e02f0271..8e71a3d54 100644 --- a/sdks/typescript/dist/index.cjs +++ b/sdks/typescript/dist/index.cjs @@ -77,8 +77,21 @@ __export(typescript_exports, { CALLBACKInputMandatory: () => CALLBACKInputMandatory, CalendarResponse: () => CalendarResponse, ChangeUserPasswordRequest: () => ChangeUserPasswordRequest, + ChannelHistoryEventInfo: () => ChannelHistoryEventInfo, + ChannelHistoryEventInput: () => ChannelHistoryEventInput, + ChannelHistoryJob: () => ChannelHistoryJob, + ChannelValidationAwsS3Info: () => ChannelValidationAwsS3Info, + ChannelValidationDetail: () => ChannelValidationDetail, ClusterNonEmbedAccess: () => ClusterNonEmbedAccess, ClusterNonEmbedAccessInput: () => ClusterNonEmbedAccessInput, + Collection: () => Collection, + CollectionDeleteResponse: () => CollectionDeleteResponse, + CollectionDeleteTypeIdentifiers: () => CollectionDeleteTypeIdentifiers, + CollectionEntityIdentifier: () => CollectionEntityIdentifier, + CollectionMetadataInput: () => CollectionMetadataInput, + CollectionMetadataItem: () => CollectionMetadataItem, + CollectionSearchResponse: () => CollectionSearchResponse, + CollectionsApi: () => PromiseCollectionsApi, Column: () => Column, ColumnSecurityRule: () => ColumnSecurityRule, ColumnSecurityRuleColumn: () => ColumnSecurityRuleColumn, @@ -94,6 +107,7 @@ __export(typescript_exports, { CommitResponse: () => CommitResponse, CommiterType: () => CommiterType, CommunicationChannelPreferencesResponse: () => CommunicationChannelPreferencesResponse, + CommunicationChannelValidateResponse: () => CommunicationChannelValidateResponse, ConfigureCommunicationChannelPreferencesRequest: () => ConfigureCommunicationChannelPreferencesRequest, ConfigureSecuritySettingsRequest: () => ConfigureSecuritySettingsRequest, ConfigureSecuritySettingsRequestClusterPreferences: () => ConfigureSecuritySettingsRequestClusterPreferences, @@ -112,6 +126,7 @@ __export(typescript_exports, { CreateAgentConversationRequestMetadataContext: () => CreateAgentConversationRequestMetadataContext, CreateCalendarRequest: () => CreateCalendarRequest, CreateCalendarRequestTableReference: () => CreateCalendarRequestTableReference, + CreateCollectionRequest: () => CreateCollectionRequest, CreateConfigRequest: () => CreateConfigRequest, CreateConnectionConfigurationRequest: () => CreateConnectionConfigurationRequest, CreateConnectionConfigurationRequestPolicyProcessOptions: () => CreateConnectionConfigurationRequestPolicyProcessOptions, @@ -159,12 +174,14 @@ __export(typescript_exports, { DefaultActionConfigInput: () => DefaultActionConfigInput, DefaultActionConfigInputCreate: () => DefaultActionConfigInputCreate, DefaultActionConfigSearchInput: () => DefaultActionConfigSearchInput, + DeleteCollectionRequest: () => DeleteCollectionRequest, DeleteConfigRequest: () => DeleteConfigRequest, DeleteConnectionConfigurationRequest: () => DeleteConnectionConfigurationRequest, DeleteConnectionRequest: () => DeleteConnectionRequest, DeleteMetadataRequest: () => DeleteMetadataRequest, DeleteMetadataTypeInput: () => DeleteMetadataTypeInput, DeleteOrgEmailCustomizationRequest: () => DeleteOrgEmailCustomizationRequest, + DeleteVariablesRequest: () => DeleteVariablesRequest, DeleteWebhookConfigurationsRequest: () => DeleteWebhookConfigurationsRequest, DeployCommitRequest: () => DeployCommitRequest, DeployResponse: () => DeployResponse, @@ -247,6 +264,8 @@ __export(typescript_exports, { JWTParameter: () => JWTParameter, JWTUserOptions: () => JWTUserOptions, JWTUserOptionsFull: () => JWTUserOptionsFull, + JobRecipient: () => JobRecipient, + JobsApi: () => PromiseJobsApi, LBContextInput: () => LBContextInput, LiveboardContent: () => LiveboardContent, LiveboardDataResponse: () => LiveboardDataResponse, @@ -283,6 +302,7 @@ __export(typescript_exports, { OrgType: () => OrgType, OrgsApi: () => PromiseOrgsApi, ParameterValues: () => ParameterValues, + ParameterizeMetadataFieldsRequest: () => ParameterizeMetadataFieldsRequest, ParameterizeMetadataRequest: () => ParameterizeMetadataRequest, ParametersListItem: () => ParametersListItem, ParametersListItemInput: () => ParametersListItemInput, @@ -300,6 +320,7 @@ __export(typescript_exports, { PrincipalsListItemInput: () => PrincipalsListItemInput, PublishMetadataListItem: () => PublishMetadataListItem, PublishMetadataRequest: () => PublishMetadataRequest, + PutVariableValuesRequest: () => PutVariableValuesRequest, QueryGetDecomposedQueryRequest: () => QueryGetDecomposedQueryRequest, QueryGetDecomposedQueryRequestNlsRequest: () => QueryGetDecomposedQueryRequestNlsRequest, RecipientDetails: () => RecipientDetails, @@ -352,6 +373,10 @@ __export(typescript_exports, { ScriptSrcUrlsInput: () => ScriptSrcUrlsInput, SearchCalendarsRequest: () => SearchCalendarsRequest, SearchCalendarsRequestSortOptions: () => SearchCalendarsRequestSortOptions, + SearchChannelHistoryRequest: () => SearchChannelHistoryRequest, + SearchChannelHistoryResponse: () => SearchChannelHistoryResponse, + SearchCollectionsRequest: () => SearchCollectionsRequest, + SearchCollectionsRequestSortOptions: () => SearchCollectionsRequestSortOptions, SearchCommitsRequest: () => SearchCommitsRequest, SearchCommunicationChannelPreferencesRequest: () => SearchCommunicationChannelPreferencesRequest, SearchConfigRequest: () => SearchConfigRequest, @@ -377,7 +402,6 @@ __export(typescript_exports, { SearchUserGroupsRequest: () => SearchUserGroupsRequest, SearchUserGroupsRequestSortOptions: () => SearchUserGroupsRequestSortOptions, SearchUsersRequest: () => SearchUsersRequest, - SearchUsersRequestSortOptions: () => SearchUsersRequestSortOptions, SearchVariablesRequest: () => SearchVariablesRequest, SearchWebhookConfigurationsRequest: () => SearchWebhookConfigurationsRequest, SearchWebhookConfigurationsRequestSortOptions: () => SearchWebhookConfigurationsRequestSortOptions, @@ -430,6 +454,7 @@ __export(typescript_exports, { UnpublishMetadataRequest: () => UnpublishMetadataRequest, UpdateCalendarRequest: () => UpdateCalendarRequest, UpdateCalendarRequestTableReference: () => UpdateCalendarRequestTableReference, + UpdateCollectionRequest: () => UpdateCollectionRequest, UpdateColumnSecurityRulesRequest: () => UpdateColumnSecurityRulesRequest, UpdateConfigRequest: () => UpdateConfigRequest, UpdateConnectionConfigurationRequest: () => UpdateConnectionConfigurationRequest, @@ -464,12 +489,14 @@ __export(typescript_exports, { UserParameterOptions: () => UserParameterOptions, UserPrincipal: () => UserPrincipal, UsersApi: () => PromiseUsersApi, + ValidateCommunicationChannelRequest: () => ValidateCommunicationChannelRequest, ValidateMergeRequest: () => ValidateMergeRequest, ValidateTokenRequest: () => ValidateTokenRequest, ValueScopeInput: () => ValueScopeInput, Variable: () => Variable, VariableApi: () => PromiseVariableApi, VariableDetailInput: () => VariableDetailInput, + VariablePutAssignmentInput: () => VariablePutAssignmentInput, VariableUpdateAssignmentInput: () => VariableUpdateAssignmentInput, VariableUpdateScopeInput: () => VariableUpdateScopeInput, VariableValue: () => VariableValue, @@ -485,6 +512,8 @@ __export(typescript_exports, { WebhookAuthenticationInput: () => WebhookAuthenticationInput, WebhookDeleteFailure: () => WebhookDeleteFailure, WebhookDeleteResponse: () => WebhookDeleteResponse, + WebhookKeyValuePair: () => WebhookKeyValuePair, + WebhookKeyValuePairInput: () => WebhookKeyValuePairInput, WebhookOrg: () => WebhookOrg, WebhookPagination: () => WebhookPagination, WebhookResponse: () => WebhookResponse, @@ -1753,6 +1782,197 @@ _ChangeUserPasswordRequest.attributeTypeMap = [ ]; var ChangeUserPasswordRequest = _ChangeUserPasswordRequest; +// models/ChannelHistoryEventInfo.ts +var _ChannelHistoryEventInfo = class _ChannelHistoryEventInfo { + static getAttributeTypeMap() { + return _ChannelHistoryEventInfo.attributeTypeMap; + } + constructor() { + } +}; +_ChannelHistoryEventInfo.discriminator = void 0; +_ChannelHistoryEventInfo.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ChannelHistoryEventInfoTypeEnum", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "run_id", + "baseName": "run_id", + "type": "string", + "format": "" + } +]; +var ChannelHistoryEventInfo = _ChannelHistoryEventInfo; + +// models/ChannelHistoryEventInput.ts +var _ChannelHistoryEventInput = class _ChannelHistoryEventInput { + static getAttributeTypeMap() { + return _ChannelHistoryEventInput.attributeTypeMap; + } + constructor() { + } +}; +_ChannelHistoryEventInput.discriminator = void 0; +_ChannelHistoryEventInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ChannelHistoryEventInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var ChannelHistoryEventInput = _ChannelHistoryEventInput; + +// models/ChannelHistoryJob.ts +var _ChannelHistoryJob = class _ChannelHistoryJob { + static getAttributeTypeMap() { + return _ChannelHistoryJob.attributeTypeMap; + } + constructor() { + } +}; +_ChannelHistoryJob.discriminator = void 0; +_ChannelHistoryJob.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "ChannelHistoryJobStatusEnum", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "event", + "baseName": "event", + "type": "ChannelHistoryEventInfo", + "format": "" + }, + { + "name": "recipients", + "baseName": "recipients", + "type": "Array", + "format": "" + }, + { + "name": "detail", + "baseName": "detail", + "type": "string", + "format": "" + }, + { + "name": "try_count", + "baseName": "try_count", + "type": "number", + "format": "int32" + } +]; +var ChannelHistoryJob = _ChannelHistoryJob; + +// models/ChannelValidationAwsS3Info.ts +var _ChannelValidationAwsS3Info = class _ChannelValidationAwsS3Info { + static getAttributeTypeMap() { + return _ChannelValidationAwsS3Info.attributeTypeMap; + } + constructor() { + } +}; +_ChannelValidationAwsS3Info.discriminator = void 0; +_ChannelValidationAwsS3Info.attributeTypeMap = [ + { + "name": "bucket_name", + "baseName": "bucket_name", + "type": "string", + "format": "" + }, + { + "name": "file_name", + "baseName": "file_name", + "type": "string", + "format": "" + }, + { + "name": "object_key", + "baseName": "object_key", + "type": "string", + "format": "" + } +]; +var ChannelValidationAwsS3Info = _ChannelValidationAwsS3Info; + +// models/ChannelValidationDetail.ts +var _ChannelValidationDetail = class _ChannelValidationDetail { + static getAttributeTypeMap() { + return _ChannelValidationDetail.attributeTypeMap; + } + constructor() { + } +}; +_ChannelValidationDetail.discriminator = void 0; +_ChannelValidationDetail.attributeTypeMap = [ + { + "name": "validation_step", + "baseName": "validation_step", + "type": "ChannelValidationDetailValidationStepEnum", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "ChannelValidationDetailStatusEnum", + "format": "" + }, + { + "name": "http_status", + "baseName": "http_status", + "type": "number", + "format": "int32" + }, + { + "name": "error_message", + "baseName": "error_message", + "type": "string", + "format": "" + }, + { + "name": "aws_s3_info", + "baseName": "aws_s3_info", + "type": "ChannelValidationAwsS3Info", + "format": "" + } +]; +var ChannelValidationDetail = _ChannelValidationDetail; + // models/ClusterNonEmbedAccess.ts var _ClusterNonEmbedAccess = class _ClusterNonEmbedAccess { static getAttributeTypeMap() { @@ -1803,6 +2023,241 @@ _ClusterNonEmbedAccessInput.attributeTypeMap = [ ]; var ClusterNonEmbedAccessInput = _ClusterNonEmbedAccessInput; +// models/Collection.ts +var _Collection = class _Collection { + static getAttributeTypeMap() { + return _Collection.attributeTypeMap; + } + constructor() { + } +}; +_Collection.discriminator = void 0; +_Collection.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "created_at", + "baseName": "created_at", + "type": "string", + "format": "" + }, + { + "name": "updated_at", + "baseName": "updated_at", + "type": "string", + "format": "" + }, + { + "name": "author_name", + "baseName": "author_name", + "type": "string", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "CollectionEntityIdentifier", + "format": "" + } +]; +var Collection = _Collection; + +// models/CollectionDeleteResponse.ts +var _CollectionDeleteResponse = class _CollectionDeleteResponse { + static getAttributeTypeMap() { + return _CollectionDeleteResponse.attributeTypeMap; + } + constructor() { + } +}; +_CollectionDeleteResponse.discriminator = void 0; +_CollectionDeleteResponse.attributeTypeMap = [ + { + "name": "metadata_deleted", + "baseName": "metadata_deleted", + "type": "Array", + "format": "" + }, + { + "name": "metadata_skipped", + "baseName": "metadata_skipped", + "type": "Array", + "format": "" + } +]; +var CollectionDeleteResponse = _CollectionDeleteResponse; + +// models/CollectionDeleteTypeIdentifiers.ts +var _CollectionDeleteTypeIdentifiers = class _CollectionDeleteTypeIdentifiers { + static getAttributeTypeMap() { + return _CollectionDeleteTypeIdentifiers.attributeTypeMap; + } + constructor() { + } +}; +_CollectionDeleteTypeIdentifiers.discriminator = void 0; +_CollectionDeleteTypeIdentifiers.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } +]; +var CollectionDeleteTypeIdentifiers = _CollectionDeleteTypeIdentifiers; + +// models/CollectionEntityIdentifier.ts +var _CollectionEntityIdentifier = class _CollectionEntityIdentifier { + static getAttributeTypeMap() { + return _CollectionEntityIdentifier.attributeTypeMap; + } + constructor() { + } +}; +_CollectionEntityIdentifier.discriminator = void 0; +_CollectionEntityIdentifier.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var CollectionEntityIdentifier = _CollectionEntityIdentifier; + +// models/CollectionMetadataInput.ts +var _CollectionMetadataInput = class _CollectionMetadataInput { + static getAttributeTypeMap() { + return _CollectionMetadataInput.attributeTypeMap; + } + constructor() { + } +}; +_CollectionMetadataInput.discriminator = void 0; +_CollectionMetadataInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "CollectionMetadataInputTypeEnum", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } +]; +var CollectionMetadataInput = _CollectionMetadataInput; + +// models/CollectionMetadataItem.ts +var _CollectionMetadataItem = class _CollectionMetadataItem { + static getAttributeTypeMap() { + return _CollectionMetadataItem.attributeTypeMap; + } + constructor() { + } +}; +_CollectionMetadataItem.discriminator = void 0; +_CollectionMetadataItem.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } +]; +var CollectionMetadataItem = _CollectionMetadataItem; + +// models/CollectionSearchResponse.ts +var _CollectionSearchResponse = class _CollectionSearchResponse { + static getAttributeTypeMap() { + return _CollectionSearchResponse.attributeTypeMap; + } + constructor() { + } +}; +_CollectionSearchResponse.discriminator = void 0; +_CollectionSearchResponse.attributeTypeMap = [ + { + "name": "collections", + "baseName": "collections", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "is_last_batch", + "baseName": "is_last_batch", + "type": "boolean", + "format": "" + }, + { + "name": "count", + "baseName": "count", + "type": "number", + "format": "int32" + } +]; +var CollectionSearchResponse = _CollectionSearchResponse; + // models/Column.ts var _Column = class _Column { static getAttributeTypeMap() { @@ -2292,6 +2747,61 @@ _CommunicationChannelPreferencesResponse.attributeTypeMap = [ ]; var CommunicationChannelPreferencesResponse = _CommunicationChannelPreferencesResponse; +// models/CommunicationChannelValidateResponse.ts +var _CommunicationChannelValidateResponse = class _CommunicationChannelValidateResponse { + static getAttributeTypeMap() { + return _CommunicationChannelValidateResponse.attributeTypeMap; + } + constructor() { + } +}; +_CommunicationChannelValidateResponse.discriminator = void 0; +_CommunicationChannelValidateResponse.attributeTypeMap = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "CommunicationChannelValidateResponseChannelTypeEnum", + "format": "" + }, + { + "name": "channel_id", + "baseName": "channel_id", + "type": "string", + "format": "" + }, + { + "name": "channel_name", + "baseName": "channel_name", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "CommunicationChannelValidateResponseEventTypeEnum", + "format": "" + }, + { + "name": "job_id", + "baseName": "job_id", + "type": "string", + "format": "" + }, + { + "name": "result_code", + "baseName": "result_code", + "type": "CommunicationChannelValidateResponseResultCodeEnum", + "format": "" + }, + { + "name": "details", + "baseName": "details", + "type": "Array", + "format": "" + } +]; +var CommunicationChannelValidateResponse = _CommunicationChannelValidateResponse; + // models/ConfigureCommunicationChannelPreferencesRequest.ts var _ConfigureCommunicationChannelPreferencesRequest = class _ConfigureCommunicationChannelPreferencesRequest { static getAttributeTypeMap() { @@ -2890,6 +3400,37 @@ _CreateCalendarRequestTableReference.attributeTypeMap = [ ]; var CreateCalendarRequestTableReference = _CreateCalendarRequestTableReference; +// models/CreateCollectionRequest.ts +var _CreateCollectionRequest = class _CreateCollectionRequest { + static getAttributeTypeMap() { + return _CreateCollectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateCollectionRequest.discriminator = void 0; +_CreateCollectionRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + } +]; +var CreateCollectionRequest = _CreateCollectionRequest; + // models/CreateConfigRequest.ts var _CreateConfigRequest = class _CreateConfigRequest { static getAttributeTypeMap() { @@ -3431,6 +3972,12 @@ _CreateEmailCustomizationRequestTemplateProperties.attributeTypeMap = [ "baseName": "hide_contact_support_url", "type": "boolean", "format": "" + }, + { + "name": "hide_logo_url", + "baseName": "hide_logo_url", + "type": "boolean", + "format": "" } ]; var CreateEmailCustomizationRequestTemplateProperties = _CreateEmailCustomizationRequestTemplateProperties; @@ -4068,6 +4615,12 @@ _CreateWebhookConfigurationRequest.attributeTypeMap = [ "baseName": "storage_destination", "type": "CreateWebhookConfigurationRequestStorageDestination", "format": "" + }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" } ]; var CreateWebhookConfigurationRequest = _CreateWebhookConfigurationRequest; @@ -4697,6 +5250,37 @@ _DefaultActionConfigSearchInput.attributeTypeMap = [ ]; var DefaultActionConfigSearchInput = _DefaultActionConfigSearchInput; +// models/DeleteCollectionRequest.ts +var _DeleteCollectionRequest = class _DeleteCollectionRequest { + static getAttributeTypeMap() { + return _DeleteCollectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteCollectionRequest.discriminator = void 0; +_DeleteCollectionRequest.attributeTypeMap = [ + { + "name": "collection_identifiers", + "baseName": "collection_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "delete_children", + "baseName": "delete_children", + "type": "boolean", + "format": "" + }, + { + "name": "dry_run", + "baseName": "dry_run", + "type": "boolean", + "format": "" + } +]; +var DeleteCollectionRequest = _DeleteCollectionRequest; + // models/DeleteConfigRequest.ts var _DeleteConfigRequest = class _DeleteConfigRequest { static getAttributeTypeMap() { @@ -4829,6 +5413,25 @@ _DeleteOrgEmailCustomizationRequest.attributeTypeMap = [ ]; var DeleteOrgEmailCustomizationRequest = _DeleteOrgEmailCustomizationRequest; +// models/DeleteVariablesRequest.ts +var _DeleteVariablesRequest = class _DeleteVariablesRequest { + static getAttributeTypeMap() { + return _DeleteVariablesRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteVariablesRequest.discriminator = void 0; +_DeleteVariablesRequest.attributeTypeMap = [ + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } +]; +var DeleteVariablesRequest = _DeleteVariablesRequest; + // models/DeleteWebhookConfigurationsRequest.ts var _DeleteWebhookConfigurationsRequest = class _DeleteWebhookConfigurationsRequest { static getAttributeTypeMap() { @@ -7750,6 +8353,43 @@ _JWTUserOptionsFull.attributeTypeMap = [ ]; var JWTUserOptionsFull = _JWTUserOptionsFull; +// models/JobRecipient.ts +var _JobRecipient = class _JobRecipient { + static getAttributeTypeMap() { + return _JobRecipient.attributeTypeMap; + } + constructor() { + } +}; +_JobRecipient.discriminator = void 0; +_JobRecipient.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "JobRecipientTypeEnum", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + } +]; +var JobRecipient = _JobRecipient; + // models/LBContextInput.ts var _LBContextInput = class _LBContextInput { static getAttributeTypeMap() { @@ -8761,6 +9401,49 @@ _ParameterValues.attributeTypeMap = [ ]; var ParameterValues = _ParameterValues; +// models/ParameterizeMetadataFieldsRequest.ts +var _ParameterizeMetadataFieldsRequest = class _ParameterizeMetadataFieldsRequest { + static getAttributeTypeMap() { + return _ParameterizeMetadataFieldsRequest.attributeTypeMap; + } + constructor() { + } +}; +_ParameterizeMetadataFieldsRequest.discriminator = void 0; +_ParameterizeMetadataFieldsRequest.attributeTypeMap = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ParameterizeMetadataFieldsRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "field_type", + "baseName": "field_type", + "type": "ParameterizeMetadataFieldsRequestFieldTypeEnum", + "format": "" + }, + { + "name": "field_names", + "baseName": "field_names", + "type": "Array", + "format": "" + }, + { + "name": "variable_identifier", + "baseName": "variable_identifier", + "type": "string", + "format": "" + } +]; +var ParameterizeMetadataFieldsRequest = _ParameterizeMetadataFieldsRequest; + // models/ParameterizeMetadataRequest.ts var _ParameterizeMetadataRequest = class _ParameterizeMetadataRequest { static getAttributeTypeMap() { @@ -9282,6 +9965,31 @@ _PublishMetadataRequest.attributeTypeMap = [ ]; var PublishMetadataRequest = _PublishMetadataRequest; +// models/PutVariableValuesRequest.ts +var _PutVariableValuesRequest = class _PutVariableValuesRequest { + static getAttributeTypeMap() { + return _PutVariableValuesRequest.attributeTypeMap; + } + constructor() { + } +}; +_PutVariableValuesRequest.discriminator = void 0; +_PutVariableValuesRequest.attributeTypeMap = [ + { + "name": "operation", + "baseName": "operation", + "type": "PutVariableValuesRequestOperationEnum", + "format": "" + }, + { + "name": "variable_assignment", + "baseName": "variable_assignment", + "type": "Array", + "format": "" + } +]; +var PutVariableValuesRequest = _PutVariableValuesRequest; + // models/QueryGetDecomposedQueryRequest.ts var _QueryGetDecomposedQueryRequest = class _QueryGetDecomposedQueryRequest { static getAttributeTypeMap() { @@ -10936,6 +11644,154 @@ _SearchCalendarsRequestSortOptions.attributeTypeMap = [ ]; var SearchCalendarsRequestSortOptions = _SearchCalendarsRequestSortOptions; +// models/SearchChannelHistoryRequest.ts +var _SearchChannelHistoryRequest = class _SearchChannelHistoryRequest { + static getAttributeTypeMap() { + return _SearchChannelHistoryRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchChannelHistoryRequest.discriminator = void 0; +_SearchChannelHistoryRequest.attributeTypeMap = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "SearchChannelHistoryRequestChannelTypeEnum", + "format": "" + }, + { + "name": "job_ids", + "baseName": "job_ids", + "type": "Array", + "format": "" + }, + { + "name": "channel_identifiers", + "baseName": "channel_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "channel_status", + "baseName": "channel_status", + "type": "SearchChannelHistoryRequestChannelStatusEnum", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "start_epoch_time_in_millis", + "baseName": "start_epoch_time_in_millis", + "type": "number", + "format": "float" + } +]; +var SearchChannelHistoryRequest = _SearchChannelHistoryRequest; + +// models/SearchChannelHistoryResponse.ts +var _SearchChannelHistoryResponse = class _SearchChannelHistoryResponse { + static getAttributeTypeMap() { + return _SearchChannelHistoryResponse.attributeTypeMap; + } + constructor() { + } +}; +_SearchChannelHistoryResponse.discriminator = void 0; +_SearchChannelHistoryResponse.attributeTypeMap = [ + { + "name": "jobs", + "baseName": "jobs", + "type": "Array", + "format": "" + } +]; +var SearchChannelHistoryResponse = _SearchChannelHistoryResponse; + +// models/SearchCollectionsRequest.ts +var _SearchCollectionsRequest = class _SearchCollectionsRequest { + static getAttributeTypeMap() { + return _SearchCollectionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchCollectionsRequest.discriminator = void 0; +_SearchCollectionsRequest.attributeTypeMap = [ + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "collection_identifiers", + "baseName": "collection_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "created_by_user_identifiers", + "baseName": "created_by_user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "include_metadata", + "baseName": "include_metadata", + "type": "boolean", + "format": "" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchCollectionsRequestSortOptions", + "format": "" + } +]; +var SearchCollectionsRequest = _SearchCollectionsRequest; + +// models/SearchCollectionsRequestSortOptions.ts +var _SearchCollectionsRequestSortOptions = class _SearchCollectionsRequestSortOptions { + static getAttributeTypeMap() { + return _SearchCollectionsRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchCollectionsRequestSortOptions.discriminator = void 0; +_SearchCollectionsRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchCollectionsRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchCollectionsRequestSortOptionsOrderEnum", + "format": "" + } +]; +var SearchCollectionsRequestSortOptions = _SearchCollectionsRequestSortOptions; + // models/SearchCommitsRequest.ts var _SearchCommitsRequest = class _SearchCommitsRequest { static getAttributeTypeMap() { @@ -12191,7 +13047,7 @@ _SearchUsersRequest.attributeTypeMap = [ { "name": "sort_options", "baseName": "sort_options", - "type": "SearchUsersRequestSortOptions", + "type": "SearchCollectionsRequestSortOptions", "format": "" }, { @@ -12215,31 +13071,6 @@ _SearchUsersRequest.attributeTypeMap = [ ]; var SearchUsersRequest = _SearchUsersRequest; -// models/SearchUsersRequestSortOptions.ts -var _SearchUsersRequestSortOptions = class _SearchUsersRequestSortOptions { - static getAttributeTypeMap() { - return _SearchUsersRequestSortOptions.attributeTypeMap; - } - constructor() { - } -}; -_SearchUsersRequestSortOptions.discriminator = void 0; -_SearchUsersRequestSortOptions.attributeTypeMap = [ - { - "name": "field_name", - "baseName": "field_name", - "type": "SearchUsersRequestSortOptionsFieldNameEnum", - "format": "" - }, - { - "name": "order", - "baseName": "order", - "type": "SearchUsersRequestSortOptionsOrderEnum", - "format": "" - } -]; -var SearchUsersRequestSortOptions = _SearchUsersRequestSortOptions; - // models/SearchVariablesRequest.ts var _SearchVariablesRequest = class _SearchVariablesRequest { static getAttributeTypeMap() { @@ -13615,6 +14446,12 @@ _TemplatePropertiesInputCreate.attributeTypeMap = [ "baseName": "hide_contact_support_url", "type": "boolean", "format": "" + }, + { + "name": "hide_logo_url", + "baseName": "hide_logo_url", + "type": "boolean", + "format": "" } ]; var TemplatePropertiesInputCreate = _TemplatePropertiesInputCreate; @@ -14056,6 +14893,43 @@ _UpdateCalendarRequestTableReference.attributeTypeMap = [ ]; var UpdateCalendarRequestTableReference = _UpdateCalendarRequestTableReference; +// models/UpdateCollectionRequest.ts +var _UpdateCollectionRequest = class _UpdateCollectionRequest { + static getAttributeTypeMap() { + return _UpdateCollectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateCollectionRequest.discriminator = void 0; +_UpdateCollectionRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateCollectionRequestOperationEnum", + "format": "" + } +]; +var UpdateCollectionRequest = _UpdateCollectionRequest; + // models/UpdateColumnSecurityRulesRequest.ts var _UpdateColumnSecurityRulesRequest = class _UpdateColumnSecurityRulesRequest { static getAttributeTypeMap() { @@ -15140,6 +16014,12 @@ _UpdateWebhookConfigurationRequest.attributeTypeMap = [ "baseName": "storage_destination", "type": "CreateWebhookConfigurationRequestStorageDestination", "format": "" + }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" } ]; var UpdateWebhookConfigurationRequest = _UpdateWebhookConfigurationRequest; @@ -15775,6 +16655,37 @@ _UserPrincipal.attributeTypeMap = [ ]; var UserPrincipal = _UserPrincipal; +// models/ValidateCommunicationChannelRequest.ts +var _ValidateCommunicationChannelRequest = class _ValidateCommunicationChannelRequest { + static getAttributeTypeMap() { + return _ValidateCommunicationChannelRequest.attributeTypeMap; + } + constructor() { + } +}; +_ValidateCommunicationChannelRequest.discriminator = void 0; +_ValidateCommunicationChannelRequest.attributeTypeMap = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "ValidateCommunicationChannelRequestChannelTypeEnum", + "format": "" + }, + { + "name": "channel_identifier", + "baseName": "channel_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "ValidateCommunicationChannelRequestEventTypeEnum", + "format": "" + } +]; +var ValidateCommunicationChannelRequest = _ValidateCommunicationChannelRequest; + // models/ValidateMergeRequest.ts var _ValidateMergeRequest = class _ValidateMergeRequest { static getAttributeTypeMap() { @@ -15930,6 +16841,55 @@ _VariableDetailInput.attributeTypeMap = [ ]; var VariableDetailInput = _VariableDetailInput; +// models/VariablePutAssignmentInput.ts +var _VariablePutAssignmentInput = class _VariablePutAssignmentInput { + static getAttributeTypeMap() { + return _VariablePutAssignmentInput.attributeTypeMap; + } + constructor() { + } +}; +_VariablePutAssignmentInput.discriminator = void 0; +_VariablePutAssignmentInput.attributeTypeMap = [ + { + "name": "assigned_values", + "baseName": "assigned_values", + "type": "Array", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "VariablePutAssignmentInputPrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number", + "format": "int32" + } +]; +var VariablePutAssignmentInput = _VariablePutAssignmentInput; + // models/VariableUpdateAssignmentInput.ts var _VariableUpdateAssignmentInput = class _VariableUpdateAssignmentInput { static getAttributeTypeMap() { @@ -16388,6 +17348,56 @@ _WebhookDeleteResponse.attributeTypeMap = [ ]; var WebhookDeleteResponse = _WebhookDeleteResponse; +// models/WebhookKeyValuePair.ts +var _WebhookKeyValuePair = class _WebhookKeyValuePair { + static getAttributeTypeMap() { + return _WebhookKeyValuePair.attributeTypeMap; + } + constructor() { + } +}; +_WebhookKeyValuePair.discriminator = void 0; +_WebhookKeyValuePair.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var WebhookKeyValuePair = _WebhookKeyValuePair; + +// models/WebhookKeyValuePairInput.ts +var _WebhookKeyValuePairInput = class _WebhookKeyValuePairInput { + static getAttributeTypeMap() { + return _WebhookKeyValuePairInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookKeyValuePairInput.discriminator = void 0; +_WebhookKeyValuePairInput.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var WebhookKeyValuePairInput = _WebhookKeyValuePairInput; + // models/WebhookOrg.ts var _WebhookOrg = class _WebhookOrg { static getAttributeTypeMap() { @@ -16514,6 +17524,12 @@ _WebhookResponse.attributeTypeMap = [ "type": "WebhookSignatureVerification", "format": "" }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" + }, { "name": "creation_time_in_millis", "baseName": "creation_time_in_millis", @@ -16815,7 +17831,16 @@ var enumsMap = /* @__PURE__ */ new Set([ "AssociateMetadataInputTypeEnum", "AssociateMetadataInputCreateTypeEnum", "AuthorMetadataTypeInputTypeEnum", + "ChannelHistoryEventInfoTypeEnum", + "ChannelHistoryEventInputTypeEnum", + "ChannelHistoryJobStatusEnum", + "ChannelValidationDetailValidationStepEnum", + "ChannelValidationDetailStatusEnum", + "CollectionMetadataInputTypeEnum", "ColumnSecurityRuleGroupOperationOperationEnum", + "CommunicationChannelValidateResponseChannelTypeEnum", + "CommunicationChannelValidateResponseEventTypeEnum", + "CommunicationChannelValidateResponseResultCodeEnum", "ConnectionConfigurationResponsePolicyProcessesEnum", "ConnectionConfigurationResponseDataWarehouseTypeEnum", "ConnectionConfigurationResponsePolicyTypeEnum", @@ -16896,6 +17921,7 @@ var enumsMap = /* @__PURE__ */ new Set([ "ImportUserVisibilityEnum", "ImportUserPreferredLocaleEnum", "JWTMetadataObjectTypeEnum", + "JobRecipientTypeEnum", "ManageObjectPrivilegeRequestOperationEnum", "ManageObjectPrivilegeRequestMetadataTypeEnum", "ManageObjectPrivilegeRequestObjectPrivilegeTypesEnum", @@ -16915,6 +17941,8 @@ var enumsMap = /* @__PURE__ */ new Set([ "OrgPreferenceSearchCriteriaInputEventTypesEnum", "OrgResponseStatusEnum", "OrgResponseVisibilityEnum", + "ParameterizeMetadataFieldsRequestMetadataTypeEnum", + "ParameterizeMetadataFieldsRequestFieldTypeEnum", "ParameterizeMetadataRequestMetadataTypeEnum", "ParameterizeMetadataRequestFieldTypeEnum", "PdfOptionsPageSizeEnum", @@ -16923,6 +17951,7 @@ var enumsMap = /* @__PURE__ */ new Set([ "PermissionsMetadataTypeInputTypeEnum", "PrincipalsInputTypeEnum", "PublishMetadataListItemTypeEnum", + "PutVariableValuesRequestOperationEnum", "RegionalSettingsInputCurrencyFormatEnum", "RegionalSettingsInputUserLocaleEnum", "RegionalSettingsInputNumberFormatLocaleEnum", @@ -16937,6 +17966,10 @@ var enumsMap = /* @__PURE__ */ new Set([ "SchedulesPdfOptionsInputPageSizeEnum", "SearchCalendarsRequestSortOptionsFieldNameEnum", "SearchCalendarsRequestSortOptionsOrderEnum", + "SearchChannelHistoryRequestChannelTypeEnum", + "SearchChannelHistoryRequestChannelStatusEnum", + "SearchCollectionsRequestSortOptionsFieldNameEnum", + "SearchCollectionsRequestSortOptionsOrderEnum", "SearchCommitsRequestMetadataTypeEnum", "SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum", "SearchConnectionRequestDataWarehouseTypesEnum", @@ -16967,8 +18000,6 @@ var enumsMap = /* @__PURE__ */ new Set([ "SearchUsersRequestPrivilegesEnum", "SearchUsersRequestAccountTypeEnum", "SearchUsersRequestAccountStatusEnum", - "SearchUsersRequestSortOptionsFieldNameEnum", - "SearchUsersRequestSortOptionsOrderEnum", "SearchVariablesRequestResponseContentEnum", "SearchWebhookConfigurationsRequestEventTypeEnum", "SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum", @@ -16993,6 +18024,7 @@ var enumsMap = /* @__PURE__ */ new Set([ "UpdateCalendarRequestCalendarTypeEnum", "UpdateCalendarRequestMonthOffsetEnum", "UpdateCalendarRequestStartDayOfWeekEnum", + "UpdateCollectionRequestOperationEnum", "UpdateConnectionConfigurationRequestAuthenticationTypeEnum", "UpdateConnectionConfigurationRequestPolicyTypeEnum", "UpdateConnectionConfigurationRequestPolicyProcessesEnum", @@ -17023,9 +18055,12 @@ var enumsMap = /* @__PURE__ */ new Set([ "UserGroupResponseTypeEnum", "UserGroupResponseVisibilityEnum", "UserObjectTypeEnum", + "ValidateCommunicationChannelRequestChannelTypeEnum", + "ValidateCommunicationChannelRequestEventTypeEnum", "ValueScopeInputPrincipalTypeEnum", "VariableVariableTypeEnum", "VariableDetailInputTypeEnum", + "VariablePutAssignmentInputPrincipalTypeEnum", "VariableUpdateAssignmentInputOperationEnum", "VariableUpdateScopeInputPrincipalTypeEnum", "VariableValuePrincipalTypeEnum", @@ -17071,8 +18106,20 @@ var typeMap = { "CALLBACKInputMandatory": CALLBACKInputMandatory, "CalendarResponse": CalendarResponse, "ChangeUserPasswordRequest": ChangeUserPasswordRequest, + "ChannelHistoryEventInfo": ChannelHistoryEventInfo, + "ChannelHistoryEventInput": ChannelHistoryEventInput, + "ChannelHistoryJob": ChannelHistoryJob, + "ChannelValidationAwsS3Info": ChannelValidationAwsS3Info, + "ChannelValidationDetail": ChannelValidationDetail, "ClusterNonEmbedAccess": ClusterNonEmbedAccess, "ClusterNonEmbedAccessInput": ClusterNonEmbedAccessInput, + "Collection": Collection, + "CollectionDeleteResponse": CollectionDeleteResponse, + "CollectionDeleteTypeIdentifiers": CollectionDeleteTypeIdentifiers, + "CollectionEntityIdentifier": CollectionEntityIdentifier, + "CollectionMetadataInput": CollectionMetadataInput, + "CollectionMetadataItem": CollectionMetadataItem, + "CollectionSearchResponse": CollectionSearchResponse, "Column": Column, "ColumnSecurityRule": ColumnSecurityRule, "ColumnSecurityRuleColumn": ColumnSecurityRuleColumn, @@ -17088,6 +18135,7 @@ var typeMap = { "CommitResponse": CommitResponse, "CommiterType": CommiterType, "CommunicationChannelPreferencesResponse": CommunicationChannelPreferencesResponse, + "CommunicationChannelValidateResponse": CommunicationChannelValidateResponse, "ConfigureCommunicationChannelPreferencesRequest": ConfigureCommunicationChannelPreferencesRequest, "ConfigureSecuritySettingsRequest": ConfigureSecuritySettingsRequest, "ConfigureSecuritySettingsRequestClusterPreferences": ConfigureSecuritySettingsRequestClusterPreferences, @@ -17104,6 +18152,7 @@ var typeMap = { "CreateAgentConversationRequestMetadataContext": CreateAgentConversationRequestMetadataContext, "CreateCalendarRequest": CreateCalendarRequest, "CreateCalendarRequestTableReference": CreateCalendarRequestTableReference, + "CreateCollectionRequest": CreateCollectionRequest, "CreateConfigRequest": CreateConfigRequest, "CreateConnectionConfigurationRequest": CreateConnectionConfigurationRequest, "CreateConnectionConfigurationRequestPolicyProcessOptions": CreateConnectionConfigurationRequestPolicyProcessOptions, @@ -17147,12 +18196,14 @@ var typeMap = { "DefaultActionConfigInput": DefaultActionConfigInput, "DefaultActionConfigInputCreate": DefaultActionConfigInputCreate, "DefaultActionConfigSearchInput": DefaultActionConfigSearchInput, + "DeleteCollectionRequest": DeleteCollectionRequest, "DeleteConfigRequest": DeleteConfigRequest, "DeleteConnectionConfigurationRequest": DeleteConnectionConfigurationRequest, "DeleteConnectionRequest": DeleteConnectionRequest, "DeleteMetadataRequest": DeleteMetadataRequest, "DeleteMetadataTypeInput": DeleteMetadataTypeInput, "DeleteOrgEmailCustomizationRequest": DeleteOrgEmailCustomizationRequest, + "DeleteVariablesRequest": DeleteVariablesRequest, "DeleteWebhookConfigurationsRequest": DeleteWebhookConfigurationsRequest, "DeployCommitRequest": DeployCommitRequest, "DeployResponse": DeployResponse, @@ -17230,6 +18281,7 @@ var typeMap = { "JWTParameter": JWTParameter, "JWTUserOptions": JWTUserOptions, "JWTUserOptionsFull": JWTUserOptionsFull, + "JobRecipient": JobRecipient, "LBContextInput": LBContextInput, "LiveboardContent": LiveboardContent, "LiveboardDataResponse": LiveboardDataResponse, @@ -17263,6 +18315,7 @@ var typeMap = { "OrgResponse": OrgResponse, "OrgType": OrgType, "ParameterValues": ParameterValues, + "ParameterizeMetadataFieldsRequest": ParameterizeMetadataFieldsRequest, "ParameterizeMetadataRequest": ParameterizeMetadataRequest, "ParametersListItem": ParametersListItem, "ParametersListItemInput": ParametersListItemInput, @@ -17280,6 +18333,7 @@ var typeMap = { "PrincipalsListItemInput": PrincipalsListItemInput, "PublishMetadataListItem": PublishMetadataListItem, "PublishMetadataRequest": PublishMetadataRequest, + "PutVariableValuesRequest": PutVariableValuesRequest, "QueryGetDecomposedQueryRequest": QueryGetDecomposedQueryRequest, "QueryGetDecomposedQueryRequestNlsRequest": QueryGetDecomposedQueryRequestNlsRequest, "RecipientDetails": RecipientDetails, @@ -17326,6 +18380,10 @@ var typeMap = { "ScriptSrcUrlsInput": ScriptSrcUrlsInput, "SearchCalendarsRequest": SearchCalendarsRequest, "SearchCalendarsRequestSortOptions": SearchCalendarsRequestSortOptions, + "SearchChannelHistoryRequest": SearchChannelHistoryRequest, + "SearchChannelHistoryResponse": SearchChannelHistoryResponse, + "SearchCollectionsRequest": SearchCollectionsRequest, + "SearchCollectionsRequestSortOptions": SearchCollectionsRequestSortOptions, "SearchCommitsRequest": SearchCommitsRequest, "SearchCommunicationChannelPreferencesRequest": SearchCommunicationChannelPreferencesRequest, "SearchConfigRequest": SearchConfigRequest, @@ -17351,7 +18409,6 @@ var typeMap = { "SearchUserGroupsRequest": SearchUserGroupsRequest, "SearchUserGroupsRequestSortOptions": SearchUserGroupsRequestSortOptions, "SearchUsersRequest": SearchUsersRequest, - "SearchUsersRequestSortOptions": SearchUsersRequestSortOptions, "SearchVariablesRequest": SearchVariablesRequest, "SearchWebhookConfigurationsRequest": SearchWebhookConfigurationsRequest, "SearchWebhookConfigurationsRequestSortOptions": SearchWebhookConfigurationsRequestSortOptions, @@ -17398,6 +18455,7 @@ var typeMap = { "UnpublishMetadataRequest": UnpublishMetadataRequest, "UpdateCalendarRequest": UpdateCalendarRequest, "UpdateCalendarRequestTableReference": UpdateCalendarRequestTableReference, + "UpdateCollectionRequest": UpdateCollectionRequest, "UpdateColumnSecurityRulesRequest": UpdateColumnSecurityRulesRequest, "UpdateConfigRequest": UpdateConfigRequest, "UpdateConnectionConfigurationRequest": UpdateConnectionConfigurationRequest, @@ -17431,11 +18489,13 @@ var typeMap = { "UserObject": UserObject, "UserParameterOptions": UserParameterOptions, "UserPrincipal": UserPrincipal, + "ValidateCommunicationChannelRequest": ValidateCommunicationChannelRequest, "ValidateMergeRequest": ValidateMergeRequest, "ValidateTokenRequest": ValidateTokenRequest, "ValueScopeInput": ValueScopeInput, "Variable": Variable, "VariableDetailInput": VariableDetailInput, + "VariablePutAssignmentInput": VariablePutAssignmentInput, "VariableUpdateAssignmentInput": VariableUpdateAssignmentInput, "VariableUpdateScopeInput": VariableUpdateScopeInput, "VariableValue": VariableValue, @@ -17450,6 +18510,8 @@ var typeMap = { "WebhookAuthenticationInput": WebhookAuthenticationInput, "WebhookDeleteFailure": WebhookDeleteFailure, "WebhookDeleteResponse": WebhookDeleteResponse, + "WebhookKeyValuePair": WebhookKeyValuePair, + "WebhookKeyValuePairInput": WebhookKeyValuePairInput, "WebhookOrg": WebhookOrg, "WebhookPagination": WebhookPagination, "WebhookResponse": WebhookResponse, @@ -17659,7 +18721,7 @@ function canConsumeForm(contentTypes) { // apis/AIApi.ts var AIApiRequestFactory = class extends BaseAPIRequestFactory { /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest, _options) { @@ -17672,8 +18734,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/agent/conversation/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17696,7 +18758,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest, _options) { @@ -17709,8 +18771,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/conversation/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17733,7 +18795,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { @@ -17746,8 +18808,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/data-source-suggestions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17770,7 +18832,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest, _options) { @@ -17783,8 +18845,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/instructions/get"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17807,7 +18869,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest, _options) { @@ -17820,8 +18882,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/relevant-questions/"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17844,7 +18906,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { @@ -17857,8 +18919,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/analytical-questions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17881,7 +18943,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -17898,8 +18960,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/agent/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17922,7 +18984,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { @@ -17935,8 +18997,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/agent/converse/sse"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17959,7 +19021,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -17976,8 +19038,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18000,7 +19062,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest, _options) { @@ -18013,8 +19075,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/instructions/set"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18037,7 +19099,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest, _options) { @@ -18050,8 +19112,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/answer/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18109,6 +19171,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -18162,6 +19240,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -18215,6 +19309,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -18268,6 +19378,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -18321,6 +19447,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -18374,6 +19516,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -18427,6 +19585,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -18480,6 +19654,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -18533,6 +19723,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -18586,6 +19792,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -18639,6 +19861,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -18672,8 +19910,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/user"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -18696,8 +19934,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/token"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -18724,8 +19962,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/custom"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18756,8 +19994,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/full"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18788,8 +20026,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/object"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18820,8 +20058,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/login"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18853,8 +20091,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/logout"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -18881,8 +20119,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/revoke"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18918,8 +20156,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19352,7 +20590,343 @@ var AuthenticationApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeToken + * @throws ApiException if the response code was not in [200, 299] + */ + revokeToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateToken + * @throws ApiException if the response code was not in [200, 299] + */ + validateToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "TokenValidationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "TokenValidationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/CollectionsApi.ts +var CollectionsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createCollectionRequest === null || createCollectionRequest === void 0) { + throw new RequiredError("CollectionsApi", "createCollection", "createCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCollectionRequest, "CreateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteCollectionRequest === null || deleteCollectionRequest === void 0) { + throw new RequiredError("CollectionsApi", "deleteCollection", "deleteCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteCollectionRequest, "DeleteCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCollectionsRequest === null || searchCollectionsRequest === void 0) { + throw new RequiredError("CollectionsApi", "searchCollections", "searchCollectionsRequest"); + } + const localVarPath = "/api/rest/2.0/collections/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCollectionsRequest, "SearchCollectionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (collectionIdentifier === null || collectionIdentifier === void 0) { + throw new RequiredError("CollectionsApi", "updateCollection", "collectionIdentifier"); + } + if (updateCollectionRequest === null || updateCollectionRequest === void 0) { + throw new RequiredError("CollectionsApi", "updateCollection", "updateCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/{collection_identifier}/update".replace("{collection_identifier}", encodeURIComponent(String(collectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCollectionRequest, "UpdateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var CollectionsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + createCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Collection", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Collection", "" ); return body; @@ -19364,14 +20938,19 @@ var AuthenticationApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to revokeToken + * @params response Response returned by the server for a request to deleteCollection * @throws ApiException if the response code was not in [200, 299] */ - revokeToken(response) { + deleteCollection(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionDeleteResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -19397,6 +20976,14 @@ var AuthenticationApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -19408,7 +20995,7 @@ var AuthenticationApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "CollectionDeleteResponse", "" ); return body; @@ -19420,16 +21007,16 @@ var AuthenticationApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to validateToken + * @params response Response returned by the server for a request to searchCollections * @throws ApiException if the response code was not in [200, 299] */ - validateToken(response) { + searchCollections(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "TokenValidationResponse", + "CollectionSearchResponse", "" ); return body; @@ -19469,7 +21056,71 @@ var AuthenticationApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "TokenValidationResponse", + "CollectionSearchResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + updateCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", "" ); return body; @@ -19495,8 +21146,8 @@ var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFact const localVarPath = "/api/rest/2.0/connection-configurations/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19532,8 +21183,8 @@ var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFact const localVarPath = "/api/rest/2.0/connection-configurations/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19569,8 +21220,8 @@ var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFact const localVarPath = "/api/rest/2.0/connection-configurations/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19610,8 +21261,8 @@ var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFact const localVarPath = "/api/rest/2.0/connection-configurations/{configuration_identifier}/update".replace("{configuration_identifier}", encodeURIComponent(String(configurationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19874,7 +21525,7 @@ var ConnectionConfigurationsApiResponseProcessor = class { // apis/ConnectionsApi.ts var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest, _options) { @@ -19887,8 +21538,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19924,8 +21575,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19961,8 +21612,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/delete".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -19989,8 +21640,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -20017,8 +21668,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -20049,8 +21700,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20086,8 +21737,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20123,8 +21774,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20164,8 +21815,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/update".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20748,8 +22399,8 @@ var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20785,8 +22436,8 @@ var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -20813,8 +22464,8 @@ var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20854,8 +22505,8 @@ var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21131,8 +22782,8 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21168,8 +22819,8 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/delete".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -21196,8 +22847,8 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/generate-csv"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21233,8 +22884,8 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21274,8 +22925,8 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/update".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21624,8 +23275,8 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/dbt-connection"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -21701,8 +23352,8 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/generate-sync-tml"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -21763,8 +23414,8 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/generate-tml"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -21820,8 +23471,8 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -21848,8 +23499,8 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete".replace("{dbt_connection_identifier}", encodeURIComponent(String(dbtConnectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -21886,8 +23537,8 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/update-dbt-connection"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -22332,8 +23983,8 @@ var DataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/answer/data"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22369,8 +24020,8 @@ var DataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/liveboard/data"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22406,8 +24057,8 @@ var DataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/searchdata"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22632,8 +24283,8 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22669,8 +24320,8 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/{template_identifier}/delete".replace("{template_identifier}", encodeURIComponent(String(templateIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -22697,8 +24348,8 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22734,8 +24385,8 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22771,8 +24422,8 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22804,8 +24455,8 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -23152,8 +24803,8 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23189,8 +24840,8 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/{group_identifier}/delete".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -23217,8 +24868,8 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23254,8 +24905,8 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23295,8 +24946,8 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/{group_identifier}/update".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23617,6 +25268,110 @@ var GroupsApiResponseProcessor = class { } }; +// apis/JobsApi.ts +var JobsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchChannelHistoryRequest === null || searchChannelHistoryRequest === void 0) { + throw new RequiredError("JobsApi", "searchChannelHistory", "searchChannelHistoryRequest"); + } + const localVarPath = "/api/rest/2.0/jobs/history/communication-channels/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchChannelHistoryRequest, "SearchChannelHistoryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var JobsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + searchChannelHistory(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchChannelHistoryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchChannelHistoryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + // apis/LogApi.ts var LogApiRequestFactory = class extends BaseAPIRequestFactory { /** @@ -23633,8 +25388,8 @@ var LogApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/logs/fetch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23737,8 +25492,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/worksheets/convert"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23774,8 +25529,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/copyobject"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23811,8 +25566,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23848,8 +25603,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/export"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23885,8 +25640,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/export/batch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23922,8 +25677,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/answer/sql"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23959,8 +25714,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/async/status"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23996,8 +25751,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/liveboard/sql"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24033,8 +25788,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24070,8 +25825,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/async/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24094,7 +25849,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest, _options) { @@ -24107,8 +25862,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/parameterize"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24130,6 +25885,43 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (parameterizeMetadataFieldsRequest === null || parameterizeMetadataFieldsRequest === void 0) { + throw new RequiredError("MetadataApi", "parameterizeMetadataFields", "parameterizeMetadataFieldsRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/parameterize-fields"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataFieldsRequest, "ParameterizeMetadataFieldsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. * @param searchMetadataRequest @@ -24144,8 +25936,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24181,8 +25973,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/unparameterize"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24218,8 +26010,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/headers/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24255,8 +26047,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/update-obj-id"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24702,7 +26494,68 @@ var MetadataApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "GetAsyncImportStatusResponse", + "GetAsyncImportStatusResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardSqlQuery(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", "" ); return body; @@ -24714,16 +26567,16 @@ var MetadataApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @params response Response returned by the server for a request to importMetadataTML * @throws ApiException if the response code was not in [200, 299] */ - fetchLiveboardSqlQuery(response) { + importMetadataTML(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "Array", "" ); return body; @@ -24763,7 +26616,7 @@ var MetadataApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "Array", "" ); return body; @@ -24775,16 +26628,16 @@ var MetadataApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importMetadataTML + * @params response Response returned by the server for a request to importMetadataTMLAsync * @throws ApiException if the response code was not in [200, 299] */ - importMetadataTML(response) { + importMetadataTMLAsync(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "ImportEPackAsyncTaskStatus", "" ); return body; @@ -24824,7 +26677,7 @@ var MetadataApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "ImportEPackAsyncTaskStatus", "" ); return body; @@ -24836,19 +26689,14 @@ var MetadataApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importMetadataTMLAsync + * @params response Response returned by the server for a request to parameterizeMetadata * @throws ApiException if the response code was not in [200, 299] */ - importMetadataTMLAsync(response) { + parameterizeMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportEPackAsyncTaskStatus", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -24885,7 +26733,7 @@ var MetadataApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportEPackAsyncTaskStatus", + "void", "" ); return body; @@ -24897,10 +26745,10 @@ var MetadataApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to parameterizeMetadata + * @params response Response returned by the server for a request to parameterizeMetadataFields * @throws ApiException if the response code was not in [200, 299] */ - parameterizeMetadata(response) { + parameterizeMetadataFields(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -25196,8 +27044,8 @@ var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25233,8 +27081,8 @@ var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/delete".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25261,8 +27109,8 @@ var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25302,8 +27150,8 @@ var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/update".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25579,8 +27427,8 @@ var ReportsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/report/answer"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25616,8 +27464,8 @@ var ReportsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/report/liveboard"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25773,8 +27621,8 @@ var RolesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25810,8 +27658,8 @@ var RolesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/{role_identifier}/delete".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25838,8 +27686,8 @@ var RolesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25879,8 +27727,8 @@ var RolesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/{role_identifier}/update".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26161,8 +28009,8 @@ var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26198,8 +28046,8 @@ var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/delete".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -26226,8 +28074,8 @@ var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26267,8 +28115,8 @@ var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/update".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26544,8 +28392,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/assign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26581,8 +28429,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/column/rules/fetch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26618,8 +28466,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/fetch-object-privileges"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26655,8 +28503,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/principals/fetch-permissions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26692,8 +28540,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/fetch-permissions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26729,8 +28577,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/manage-object-privilege"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26766,8 +28614,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/publish"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26803,8 +28651,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/share"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26840,8 +28688,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/unpublish"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26877,8 +28725,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/column/rules/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27500,8 +29348,8 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/configure"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27537,8 +29385,8 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/security-settings/configure"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27570,8 +29418,8 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -27594,8 +29442,8 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -27618,8 +29466,8 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config-overrides"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -27646,8 +29494,8 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27683,8 +29531,8 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/security-settings/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27720,8 +29568,8 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config-update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27743,6 +29591,43 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (validateCommunicationChannelRequest === null || validateCommunicationChannelRequest === void 0) { + throw new RequiredError("SystemApi", "validateCommunicationChannel", "validateCommunicationChannelRequest"); + } + const localVarPath = "/api/rest/2.0/system/communication-channels/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateCommunicationChannelRequest, "ValidateCommunicationChannelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } }; var SystemApiResponseProcessor = class { /** @@ -28218,6 +30103,67 @@ var SystemApiResponseProcessor = class { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + validateCommunicationChannel(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelValidateResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelValidateResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } }; // apis/TagsApi.ts @@ -28236,8 +30182,8 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/assign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28273,8 +30219,8 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28310,8 +30256,8 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/delete".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -28338,8 +30284,8 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28375,8 +30321,8 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/unassign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28416,8 +30362,8 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/update".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28805,8 +30751,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/activate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28842,8 +30788,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/assign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28879,8 +30825,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/assign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28916,8 +30862,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/change-password"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28953,8 +30899,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/branches/commit"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28990,8 +30936,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/configure"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29027,8 +30973,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/security-settings/configure"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29064,8 +31010,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection-configurations/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29101,8 +31047,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/worksheets/convert"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29138,8 +31084,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/copyobject"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29162,7 +31108,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest, _options) { @@ -29175,8 +31121,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/agent/conversation/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29212,8 +31158,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29235,6 +31181,43 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createCollectionRequest === null || createCollectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createCollection", "createCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCollectionRequest, "CreateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. * @param createConfigRequest @@ -29249,8 +31232,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29273,7 +31256,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest, _options) { @@ -29286,8 +31269,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29323,8 +31306,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection-configurations/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29347,7 +31330,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest, _options) { @@ -29360,8 +31343,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/conversation/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29397,8 +31380,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29434,8 +31417,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29471,8 +31454,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29508,8 +31491,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29545,8 +31528,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29582,8 +31565,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29619,8 +31602,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29656,8 +31639,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29693,8 +31676,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29730,8 +31713,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/webhooks/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29779,8 +31762,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/dbt-connection"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -29856,8 +31839,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/generate-sync-tml"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -29918,8 +31901,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/generate-tml"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -29975,8 +31958,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30003,8 +31986,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/deactivate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30040,8 +32023,45 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/delete".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteCollectionRequest === null || deleteCollectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteCollection", "deleteCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteCollectionRequest, "DeleteCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30068,8 +32088,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30105,8 +32125,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30142,8 +32162,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection-configurations/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30179,8 +32199,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/delete".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30207,8 +32227,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30235,8 +32255,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete".replace("{dbt_connection_identifier}", encodeURIComponent(String(dbtConnectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30263,8 +32283,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/{template_identifier}/delete".replace("{template_identifier}", encodeURIComponent(String(templateIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30291,8 +32311,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30328,8 +32348,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/delete".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30356,8 +32376,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30393,8 +32413,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/{role_identifier}/delete".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30421,8 +32441,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/delete".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30449,8 +32469,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/delete".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30477,8 +32497,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/{user_identifier}/delete".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30505,8 +32525,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/{group_identifier}/delete".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30520,7 +32540,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier, _options) { @@ -30533,8 +32553,45 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/{identifier}/delete".replace("{identifier}", encodeURIComponent(String(identifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteVariablesRequest === null || deleteVariablesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteVariables", "deleteVariablesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteVariablesRequest, "DeleteVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30561,8 +32618,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/webhooks/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30598,8 +32655,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/deploy"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30635,8 +32692,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30663,8 +32720,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/report/answer"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30700,8 +32757,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/report/liveboard"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30737,8 +32794,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/export"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30774,8 +32831,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/export/batch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30811,8 +32868,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/answer/data"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30848,8 +32905,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/answer/sql"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30885,8 +32942,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/async/status"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30922,8 +32979,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/column/rules/fetch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30959,8 +33016,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30987,8 +33044,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/liveboard/data"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31024,8 +33081,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/liveboard/sql"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31061,8 +33118,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/logs/fetch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31098,8 +33155,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/fetch-object-privileges"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31135,8 +33192,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/principals/fetch-permissions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31172,8 +33229,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/fetch-permissions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31209,8 +33266,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/force-logout"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31246,8 +33303,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/generate-csv"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31279,8 +33336,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/user"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -31303,8 +33360,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/token"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -31331,8 +33388,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/custom"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31350,7 +33407,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { @@ -31363,8 +33420,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/data-source-suggestions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31400,8 +33457,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/full"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31419,7 +33476,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest, _options) { @@ -31432,8 +33489,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/instructions/get"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31469,8 +33526,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/object"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31488,7 +33545,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest, _options) { @@ -31501,8 +33558,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/relevant-questions/"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31534,8 +33591,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -31558,8 +33615,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -31582,8 +33639,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config-overrides"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -31610,8 +33667,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31647,8 +33704,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/async/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31684,8 +33741,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31721,8 +33778,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31758,8 +33815,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/login"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31791,8 +33848,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/logout"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -31819,8 +33876,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/manage-object-privilege"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31843,7 +33900,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest, _options) { @@ -31856,8 +33913,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/parameterize"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31879,6 +33936,43 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (parameterizeMetadataFieldsRequest === null || parameterizeMetadataFieldsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "parameterizeMetadataFields", "parameterizeMetadataFieldsRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/parameterize-fields"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataFieldsRequest, "ParameterizeMetadataFieldsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. * @param publishMetadataRequest @@ -31893,8 +33987,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/publish"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31917,7 +34011,48 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.7.0.cl or later + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (identifier === null || identifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "putVariableValues", "identifier"); + } + if (putVariableValuesRequest === null || putVariableValuesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "putVariableValues", "putVariableValuesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update-values".replace("{identifier}", encodeURIComponent(String(identifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(putVariableValuesRequest, "PutVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { @@ -31930,8 +34065,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/analytical-questions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31967,8 +34102,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/reset-password"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32008,8 +34143,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/{commit_id}/revert".replace("{commit_id}", encodeURIComponent(String(commitId))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32049,8 +34184,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32086,8 +34221,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/revoke"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32123,8 +34258,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32146,6 +34281,80 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchChannelHistoryRequest === null || searchChannelHistoryRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchChannelHistory", "searchChannelHistoryRequest"); + } + const localVarPath = "/api/rest/2.0/jobs/history/communication-channels/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchChannelHistoryRequest, "SearchChannelHistoryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCollectionsRequest === null || searchCollectionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchCollections", "searchCollectionsRequest"); + } + const localVarPath = "/api/rest/2.0/collections/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCollectionsRequest, "SearchCollectionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. * @param searchCommitsRequest @@ -32160,8 +34369,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32197,8 +34406,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32234,8 +34443,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32271,8 +34480,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32308,8 +34517,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32345,8 +34554,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/searchdata"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32382,8 +34591,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32419,8 +34628,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32456,8 +34665,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32493,8 +34702,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32530,8 +34739,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32567,8 +34776,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/security-settings/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32604,8 +34813,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32641,8 +34850,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32678,8 +34887,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32715,8 +34924,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32752,8 +34961,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/webhooks/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32776,7 +34985,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -32793,8 +35002,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/agent/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32817,7 +35026,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { @@ -32830,8 +35039,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/agent/converse/sse"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32854,7 +35063,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -32871,8 +35080,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32895,7 +35104,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest, _options) { @@ -32908,8 +35117,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/instructions/set"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32945,8 +35154,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/share"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32969,7 +35178,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest, _options) { @@ -32982,8 +35191,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/answer/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33019,8 +35228,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/unassign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33056,8 +35265,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/unparameterize"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33093,8 +35302,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/unpublish"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33134,8 +35343,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/update".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33157,6 +35366,47 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (collectionIdentifier === null || collectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateCollection", "collectionIdentifier"); + } + if (updateCollectionRequest === null || updateCollectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateCollection", "updateCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/{collection_identifier}/update".replace("{collection_identifier}", encodeURIComponent(String(collectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCollectionRequest, "UpdateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups * @param updateColumnSecurityRulesRequest @@ -33171,8 +35421,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/column/rules/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33208,8 +35458,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33245,8 +35495,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33286,8 +35536,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection-configurations/{configuration_identifier}/update".replace("{configuration_identifier}", encodeURIComponent(String(configurationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33327,8 +35577,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/update".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33368,8 +35618,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33415,8 +35665,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/update-dbt-connection"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -33494,8 +35744,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33531,8 +35781,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/headers/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33568,8 +35818,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/update-obj-id"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33609,8 +35859,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/update".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33650,8 +35900,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/{role_identifier}/update".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33691,8 +35941,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/update".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33728,8 +35978,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config-update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33769,8 +36019,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/update".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33810,8 +36060,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/{user_identifier}/update".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33851,8 +36101,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/{group_identifier}/update".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33892,8 +36142,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update".replace("{identifier}", encodeURIComponent(String(identifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33916,7 +36166,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -33929,8 +36179,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/update-values"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33970,8 +36220,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/webhooks/{webhook_identifier}/update".replace("{webhook_identifier}", encodeURIComponent(String(webhookIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33993,6 +36243,43 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (validateCommunicationChannelRequest === null || validateCommunicationChannelRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "validateCommunicationChannel", "validateCommunicationChannelRequest"); + } + const localVarPath = "/api/rest/2.0/system/communication-channels/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateCommunicationChannelRequest, "ValidateCommunicationChannelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -34003,8 +36290,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -34031,8 +36318,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/branches/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -34068,8 +36355,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -34720,6 +37007,22 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -34800,6 +37103,67 @@ var ThoughtSpotRestApiResponseProcessor = class { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + createCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Collection", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Collection", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -35017,6 +37381,22 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -35935,7 +38315,63 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseActivationURL", + "ResponseActivationURL", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCalendar(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", "" ); return body; @@ -35947,14 +38383,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteCalendar + * @params response Response returned by the server for a request to deleteCollection * @throws ApiException if the response code was not in [200, 299] */ - deleteCalendar(response) { + deleteCollection(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionDeleteResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -35980,6 +38421,14 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -35991,7 +38440,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "CollectionDeleteResponse", "" ); return body; @@ -36887,6 +39336,62 @@ var ThoughtSpotRestApiResponseProcessor = class { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariables(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -37416,7 +39921,190 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "SqlQueryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAsyncImportTaskStatus(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetAsyncImportStatusResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetAsyncImportStatusResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + fetchColumnSecurityRules(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Bad request - Table not found or invalid parameters", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden - User doesn't have permission to access security rules for this table", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchConnectionDiffStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchConnectionDiffStatus(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", "" ); return body; @@ -37428,16 +40116,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus + * @params response Response returned by the server for a request to fetchLiveboardData * @throws ApiException if the response code was not in [200, 299] */ - fetchAsyncImportTaskStatus(response) { + fetchLiveboardData(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "GetAsyncImportStatusResponse", + "LiveboardDataResponse", "" ); return body; @@ -37477,7 +40165,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "GetAsyncImportStatusResponse", + "LiveboardDataResponse", "" ); return body; @@ -37489,16 +40177,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchColumnSecurityRules + * @params response Response returned by the server for a request to fetchLiveboardSqlQuery * @throws ApiException if the response code was not in [200, 299] */ - fetchColumnSecurityRules(response) { + fetchLiveboardSqlQuery(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "SqlQueryResponse", "" ); return body; @@ -37509,7 +40197,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Bad request - Table not found or invalid parameters", body, response.headers); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -37525,7 +40213,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden - User doesn't have permission to access security rules for this table", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -37533,12 +40221,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "SqlQueryResponse", "" ); return body; @@ -37550,16 +40238,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchConnectionDiffStatus + * @params response Response returned by the server for a request to fetchLogs * @throws ApiException if the response code was not in [200, 299] */ - fetchConnectionDiffStatus(response) { + fetchLogs(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "FetchConnectionDiffStatusResponse", + "Array", "" ); return body; @@ -37599,7 +40287,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "FetchConnectionDiffStatusResponse", + "Array", "" ); return body; @@ -37611,16 +40299,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchLiveboardData + * @params response Response returned by the server for a request to fetchObjectPrivileges * @throws ApiException if the response code was not in [200, 299] */ - fetchLiveboardData(response) { + fetchObjectPrivileges(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "LiveboardDataResponse", + "ObjectPrivilegesOfMetadataResponse", "" ); return body; @@ -37660,7 +40348,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "LiveboardDataResponse", + "ObjectPrivilegesOfMetadataResponse", "" ); return body; @@ -37672,16 +40360,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals * @throws ApiException if the response code was not in [200, 299] */ - fetchLiveboardSqlQuery(response) { + fetchPermissionsOfPrincipals(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "PermissionOfPrincipalsResponse", "" ); return body; @@ -37721,7 +40409,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "PermissionOfPrincipalsResponse", "" ); return body; @@ -37733,16 +40421,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchLogs + * @params response Response returned by the server for a request to fetchPermissionsOnMetadata * @throws ApiException if the response code was not in [200, 299] */ - fetchLogs(response) { + fetchPermissionsOnMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "PermissionOfMetadataResponse", "" ); return body; @@ -37782,7 +40470,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "PermissionOfMetadataResponse", "" ); return body; @@ -37794,16 +40482,72 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchObjectPrivileges + * @params response Response returned by the server for a request to forceLogoutUsers * @throws ApiException if the response code was not in [200, 299] */ - fetchObjectPrivileges(response) { + forceLogoutUsers(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to generateCSV + * @throws ApiException if the response code was not in [200, 299] + */ + generateCSV(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ObjectPrivilegesOfMetadataResponse", + "any", "" ); return body; @@ -37843,7 +40587,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ObjectPrivilegesOfMetadataResponse", + "any", "" ); return body; @@ -37855,16 +40599,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals + * @params response Response returned by the server for a request to getCurrentUserInfo * @throws ApiException if the response code was not in [200, 299] */ - fetchPermissionsOfPrincipals(response) { + getCurrentUserInfo(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "PermissionOfPrincipalsResponse", + "User", "" ); return body; @@ -37904,7 +40648,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "PermissionOfPrincipalsResponse", + "User", "" ); return body; @@ -37916,16 +40660,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchPermissionsOnMetadata + * @params response Response returned by the server for a request to getCurrentUserToken * @throws ApiException if the response code was not in [200, 299] */ - fetchPermissionsOnMetadata(response) { + getCurrentUserToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "PermissionOfMetadataResponse", + "GetTokenResponse", "" ); return body; @@ -37965,7 +40709,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "PermissionOfMetadataResponse", + "GetTokenResponse", "" ); return body; @@ -37977,14 +40721,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to forceLogoutUsers + * @params response Response returned by the server for a request to getCustomAccessToken * @throws ApiException if the response code was not in [200, 299] */ - forceLogoutUsers(response) { + getCustomAccessToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AccessToken", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -37992,7 +40741,76 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Invalid request. This could be due to missing or incorrect parameters.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access. The request could not be authenticated.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access. The user does not have permission to access this resource.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "An unexpected error occurred on the server.", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AccessToken", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + getDataSourceSuggestions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38016,12 +40834,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "EurekaDataSourceSuggestionResponse", "" ); return body; @@ -38033,16 +40851,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to generateCSV + * @params response Response returned by the server for a request to getFullAccessToken * @throws ApiException if the response code was not in [200, 299] */ - generateCSV(response) { + getFullAccessToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "Token", "" ); return body; @@ -38082,7 +40900,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "Token", "" ); return body; @@ -38094,16 +40912,24 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getCurrentUserInfo + * @params response Response returned by the server for a request to getNLInstructions * @throws ApiException if the response code was not in [200, 299] */ - getCurrentUserInfo(response) { + getNLInstructions(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "User", + "EurekaGetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", "" ); return body; @@ -38114,7 +40940,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38138,12 +40964,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "User", + "EurekaGetNLInstructionsResponse", "" ); return body; @@ -38155,16 +40981,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getCurrentUserToken + * @params response Response returned by the server for a request to getObjectAccessToken * @throws ApiException if the response code was not in [200, 299] */ - getCurrentUserToken(response) { + getObjectAccessToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "GetTokenResponse", + "Token", "" ); return body; @@ -38204,7 +41030,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "GetTokenResponse", + "Token", "" ); return body; @@ -38216,16 +41042,24 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getCustomAccessToken + * @params response Response returned by the server for a request to getRelevantQuestions * @throws ApiException if the response code was not in [200, 299] */ - getCustomAccessToken(response) { + getRelevantQuestions(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "AccessToken", + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", "" ); return body; @@ -38236,7 +41070,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request. This could be due to missing or incorrect parameters.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38244,7 +41078,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access. The request could not be authenticated.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38252,7 +41086,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access. The user does not have permission to access this resource.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38260,12 +41094,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "An unexpected error occurred on the server.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "AccessToken", + "EurekaGetRelevantQuestionsResponse", "" ); return body; @@ -38277,35 +41111,43 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getDataSourceSuggestions + * @params response Response returned by the server for a request to getSystemConfig * @throws ApiException if the response code was not in [200, 299] */ - getDataSourceSuggestions(response) { + getSystemConfig(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDataSourceSuggestionResponse", + "SystemConfig", "" ); return body; } - if (isCodeInRange("201", response.httpStatusCode)) { + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDataSourceSuggestionResponse", + "ErrorResponse", "" ); - return body; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("400", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38313,12 +41155,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDataSourceSuggestionResponse", + "SystemConfig", "" ); return body; @@ -38330,16 +41172,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getFullAccessToken + * @params response Response returned by the server for a request to getSystemInformation * @throws ApiException if the response code was not in [200, 299] */ - getFullAccessToken(response) { + getSystemInformation(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Token", + "SystemInfo", "" ); return body; @@ -38379,7 +41221,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Token", + "SystemInfo", "" ); return body; @@ -38391,35 +41233,43 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getNLInstructions + * @params response Response returned by the server for a request to getSystemOverrideInfo * @throws ApiException if the response code was not in [200, 299] */ - getNLInstructions(response) { + getSystemOverrideInfo(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaGetNLInstructionsResponse", + "SystemOverrideInfo", "" ); return body; } - if (isCodeInRange("201", response.httpStatusCode)) { + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaGetNLInstructionsResponse", + "ErrorResponse", "" ); - return body; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("400", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38427,12 +41277,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaGetNLInstructionsResponse", + "SystemOverrideInfo", "" ); return body; @@ -38444,16 +41294,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getObjectAccessToken + * @params response Response returned by the server for a request to importMetadataTML * @throws ApiException if the response code was not in [200, 299] */ - getObjectAccessToken(response) { + importMetadataTML(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Token", + "Array", "" ); return body; @@ -38493,7 +41343,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Token", + "Array", "" ); return body; @@ -38505,35 +41355,43 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getRelevantQuestions + * @params response Response returned by the server for a request to importMetadataTMLAsync * @throws ApiException if the response code was not in [200, 299] */ - getRelevantQuestions(response) { + importMetadataTMLAsync(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaGetRelevantQuestionsResponse", + "ImportEPackAsyncTaskStatus", "" ); return body; } - if (isCodeInRange("201", response.httpStatusCode)) { + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaGetRelevantQuestionsResponse", + "ErrorResponse", "" ); - return body; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("400", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38541,12 +41399,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaGetRelevantQuestionsResponse", + "ImportEPackAsyncTaskStatus", "" ); return body; @@ -38558,16 +41416,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getSystemConfig + * @params response Response returned by the server for a request to importUserGroups * @throws ApiException if the response code was not in [200, 299] */ - getSystemConfig(response) { + importUserGroups(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemConfig", + "ImportUserGroupsResponse", "" ); return body; @@ -38607,7 +41465,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemConfig", + "ImportUserGroupsResponse", "" ); return body; @@ -38619,16 +41477,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getSystemInformation + * @params response Response returned by the server for a request to importUsers * @throws ApiException if the response code was not in [200, 299] */ - getSystemInformation(response) { + importUsers(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemInfo", + "ImportUsersResponse", "" ); return body; @@ -38668,7 +41526,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemInfo", + "ImportUsersResponse", "" ); return body; @@ -38680,19 +41538,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getSystemOverrideInfo + * @params response Response returned by the server for a request to login * @throws ApiException if the response code was not in [200, 299] */ - getSystemOverrideInfo(response) { + login(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemOverrideInfo", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38729,7 +41582,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemOverrideInfo", + "void", "" ); return body; @@ -38741,19 +41594,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importMetadataTML + * @params response Response returned by the server for a request to logout * @throws ApiException if the response code was not in [200, 299] */ - importMetadataTML(response) { + logout(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38790,7 +41638,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "void", "" ); return body; @@ -38802,19 +41650,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importMetadataTMLAsync + * @params response Response returned by the server for a request to manageObjectPrivilege * @throws ApiException if the response code was not in [200, 299] */ - importMetadataTMLAsync(response) { + manageObjectPrivilege(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportEPackAsyncTaskStatus", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38822,7 +41665,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Invalid request", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38830,7 +41673,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access", body, response.headers); } if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38838,7 +41681,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38851,7 +41694,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportEPackAsyncTaskStatus", + "void", "" ); return body; @@ -38863,19 +41706,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importUserGroups + * @params response Response returned by the server for a request to parameterizeMetadata * @throws ApiException if the response code was not in [200, 299] */ - importUserGroups(response) { + parameterizeMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportUserGroupsResponse", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38912,7 +41750,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportUserGroupsResponse", + "void", "" ); return body; @@ -38924,19 +41762,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importUsers + * @params response Response returned by the server for a request to parameterizeMetadataFields * @throws ApiException if the response code was not in [200, 299] */ - importUsers(response) { + parameterizeMetadataFields(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportUsersResponse", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38973,7 +41806,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportUsersResponse", + "void", "" ); return body; @@ -38985,10 +41818,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to login + * @params response Response returned by the server for a request to publishMetadata * @throws ApiException if the response code was not in [200, 299] */ - login(response) { + publishMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -39041,10 +41874,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to logout + * @params response Response returned by the server for a request to putVariableValues * @throws ApiException if the response code was not in [200, 299] */ - logout(response) { + putVariableValues(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -39097,14 +41930,27 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to manageObjectPrivilege + * @params response Response returned by the server for a request to queryGetDecomposedQuery * @throws ApiException if the response code was not in [200, 299] */ - manageObjectPrivilege(response) { + queryGetDecomposedQuery(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDecomposeQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDecomposeQueryResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -39112,7 +41958,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -39120,7 +41966,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -39128,7 +41974,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -39136,12 +41982,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "EurekaDecomposeQueryResponse", "" ); return body; @@ -39153,10 +41999,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to parameterizeMetadata + * @params response Response returned by the server for a request to resetUserPassword * @throws ApiException if the response code was not in [200, 299] */ - parameterizeMetadata(response) { + resetUserPassword(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -39209,14 +42055,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to publishMetadata + * @params response Response returned by the server for a request to revertCommit * @throws ApiException if the response code was not in [200, 299] */ - publishMetadata(response) { + revertCommit(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevertResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -39253,7 +42104,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "RevertResponse", "" ); return body; @@ -39265,24 +42116,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to queryGetDecomposedQuery + * @params response Response returned by the server for a request to revokeRefreshTokens * @throws ApiException if the response code was not in [200, 299] */ - queryGetDecomposedQuery(response) { + revokeRefreshTokens(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDecomposeQueryResponse", - "" - ); - return body; - } - if (isCodeInRange("201", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDecomposeQueryResponse", + "RevokeRefreshTokensResponse", "" ); return body; @@ -39293,63 +42136,39 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("500", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); - } - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDecomposeQueryResponse", - "" - ); - return body; - } - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); - }); - } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to resetUserPassword - * @throws ApiException if the response code was not in [200, 299] - */ - resetUserPassword(response) { - return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } - if (isCodeInRange("400", response.httpStatusCode)) { + if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } - if (isCodeInRange("401", response.httpStatusCode)) { + if (isCodeInRange("404", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); } - if (isCodeInRange("403", response.httpStatusCode)) { + if (isCodeInRange("409", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Conflict", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -39362,7 +42181,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "RevokeRefreshTokensResponse", "" ); return body; @@ -39374,19 +42193,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to revertCommit + * @params response Response returned by the server for a request to revokeToken * @throws ApiException if the response code was not in [200, 299] */ - revertCommit(response) { + revokeToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "RevertResponse", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -39423,7 +42237,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RevertResponse", + "void", "" ); return body; @@ -39435,16 +42249,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to revokeRefreshTokens + * @params response Response returned by the server for a request to searchCalendars * @throws ApiException if the response code was not in [200, 299] */ - revokeRefreshTokens(response) { + searchCalendars(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RevokeRefreshTokensResponse", + "Array", "" ); return body; @@ -39473,22 +42287,6 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } - if (isCodeInRange("404", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); - } - if (isCodeInRange("409", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Conflict", body, response.headers); - } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -39500,7 +42298,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RevokeRefreshTokensResponse", + "Array", "" ); return body; @@ -39512,14 +42310,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to revokeToken + * @params response Response returned by the server for a request to searchChannelHistory * @throws ApiException if the response code was not in [200, 299] */ - revokeToken(response) { + searchChannelHistory(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchChannelHistoryResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -39556,7 +42359,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "SearchChannelHistoryResponse", "" ); return body; @@ -39568,16 +42371,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchCalendars + * @params response Response returned by the server for a request to searchCollections * @throws ApiException if the response code was not in [200, 299] */ - searchCalendars(response) { + searchCollections(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "CollectionSearchResponse", "" ); return body; @@ -39617,7 +42420,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "CollectionSearchResponse", "" ); return body; @@ -40580,12 +43383,142 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + searchWebhookConfigurations(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookSearchResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookSearchResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessage(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "any", "" ); return body; @@ -40597,16 +43530,24 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchWebhookConfigurations + * @params response Response returned by the server for a request to sendAgentMessageStreaming * @throws ApiException if the response code was not in [200, 299] */ - searchWebhookConfigurations(response) { + sendAgentMessageStreaming(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "WebhookSearchResponse", + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", "" ); return body; @@ -40617,7 +43558,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -40641,12 +43582,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "WebhookSearchResponse", + "SendAgentMessageResponse", "" ); return body; @@ -40658,16 +43599,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to sendAgentMessage + * @params response Response returned by the server for a request to sendMessage * @throws ApiException if the response code was not in [200, 299] */ - sendAgentMessage(response) { + sendMessage(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "Array", "" ); return body; @@ -40675,7 +43616,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (isCodeInRange("201", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "Array", "" ); return body; @@ -40688,6 +43629,22 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -40699,7 +43656,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "Array", "" ); return body; @@ -40711,16 +43668,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @params response Response returned by the server for a request to setNLInstructions * @throws ApiException if the response code was not in [200, 299] */ - sendAgentMessageStreaming(response) { + setNLInstructions(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SendAgentMessageResponse", + "EurekaSetNLInstructionsResponse", "" ); return body; @@ -40728,7 +43685,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (isCodeInRange("201", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SendAgentMessageResponse", + "EurekaSetNLInstructionsResponse", "" ); return body; @@ -40741,6 +43698,22 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -40752,7 +43725,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SendAgentMessageResponse", + "EurekaSetNLInstructionsResponse", "" ); return body; @@ -40764,35 +43737,38 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to sendMessage + * @params response Response returned by the server for a request to shareMetadata * @throws ApiException if the response code was not in [200, 299] */ - sendMessage(response) { + shareMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "ErrorResponse", "" ); - return body; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("201", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "ErrorResponse", "" ); - return body; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } - if (isCodeInRange("400", response.httpStatusCode)) { + if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -40800,12 +43776,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "void", "" ); return body; @@ -40817,16 +43793,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to setNLInstructions + * @params response Response returned by the server for a request to singleAnswer * @throws ApiException if the response code was not in [200, 299] */ - setNLInstructions(response) { + singleAnswer(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaSetNLInstructionsResponse", + "ResponseMessage", "" ); return body; @@ -40834,7 +43810,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (isCodeInRange("201", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaSetNLInstructionsResponse", + "ResponseMessage", "" ); return body; @@ -40847,46 +43823,6 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } - if (isCodeInRange("500", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); - } - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaSetNLInstructionsResponse", - "" - ); - return body; - } - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); - }); - } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to shareMetadata - * @throws ApiException if the response code was not in [200, 299] - */ - shareMetadata(response) { - return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; - } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); - } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -40909,12 +43845,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "ResponseMessage", "" ); return body; @@ -40926,35 +43862,38 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to singleAnswer + * @params response Response returned by the server for a request to unassignTag * @throws ApiException if the response code was not in [200, 299] */ - singleAnswer(response) { + unassignTag(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseMessage", + "ErrorResponse", "" ); - return body; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("201", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseMessage", + "ErrorResponse", "" ); - return body; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } - if (isCodeInRange("400", response.httpStatusCode)) { + if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -40962,12 +43901,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseMessage", + "void", "" ); return body; @@ -40979,10 +43918,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to unassignTag + * @params response Response returned by the server for a request to unparameterizeMetadata * @throws ApiException if the response code was not in [200, 299] */ - unassignTag(response) { + unparameterizeMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -41035,10 +43974,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to unparameterizeMetadata + * @params response Response returned by the server for a request to unpublishMetadata * @throws ApiException if the response code was not in [200, 299] */ - unparameterizeMetadata(response) { + unpublishMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -41091,10 +44030,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to unpublishMetadata + * @params response Response returned by the server for a request to updateCalendar * @throws ApiException if the response code was not in [200, 299] */ - unpublishMetadata(response) { + updateCalendar(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -41147,10 +44086,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateCalendar + * @params response Response returned by the server for a request to updateCollection * @throws ApiException if the response code was not in [200, 299] */ - updateCalendar(response) { + updateCollection(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -41180,6 +44119,14 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -41946,10 +44893,66 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateSystemConfig + * @params response Response returned by the server for a request to updateSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateSystemConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateTag * @throws ApiException if the response code was not in [200, 299] */ - updateSystemConfig(response) { + updateTag(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -42002,10 +45005,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateTag + * @params response Response returned by the server for a request to updateUser * @throws ApiException if the response code was not in [200, 299] */ - updateTag(response) { + updateUser(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -42058,10 +45061,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateUser + * @params response Response returned by the server for a request to updateUserGroup * @throws ApiException if the response code was not in [200, 299] */ - updateUser(response) { + updateUserGroup(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -42114,10 +45117,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateUserGroup + * @params response Response returned by the server for a request to updateVariable * @throws ApiException if the response code was not in [200, 299] */ - updateUserGroup(response) { + updateVariable(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -42170,10 +45173,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateVariable + * @params response Response returned by the server for a request to updateVariableValues * @throws ApiException if the response code was not in [200, 299] */ - updateVariable(response) { + updateVariableValues(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -42226,10 +45229,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateVariableValues + * @params response Response returned by the server for a request to updateWebhookConfiguration * @throws ApiException if the response code was not in [200, 299] */ - updateVariableValues(response) { + updateWebhookConfiguration(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -42282,14 +45285,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateWebhookConfiguration + * @params response Response returned by the server for a request to validateCommunicationChannel * @throws ApiException if the response code was not in [200, 299] */ - updateWebhookConfiguration(response) { + validateCommunicationChannel(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelValidateResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -42326,7 +45334,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "CommunicationChannelValidateResponse", "" ); return body; @@ -42522,8 +45530,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/activate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -42559,8 +45567,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/change-password"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -42596,8 +45604,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -42633,8 +45641,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/deactivate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -42670,8 +45678,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/{user_identifier}/delete".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -42698,8 +45706,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/force-logout"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -42735,8 +45743,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -42772,8 +45780,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/reset-password"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -42809,8 +45817,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -42850,8 +45858,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/{user_identifier}/update".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43478,8 +46486,8 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43502,7 +46510,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier, _options) { @@ -43515,8 +46523,86 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/{identifier}/delete".replace("{identifier}", encodeURIComponent(String(identifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteVariablesRequest === null || deleteVariablesRequest === void 0) { + throw new RequiredError("VariableApi", "deleteVariables", "deleteVariablesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteVariablesRequest, "DeleteVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (identifier === null || identifier === void 0) { + throw new RequiredError("VariableApi", "putVariableValues", "identifier"); + } + if (putVariableValuesRequest === null || putVariableValuesRequest === void 0) { + throw new RequiredError("VariableApi", "putVariableValues", "putVariableValuesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update-values".replace("{identifier}", encodeURIComponent(String(identifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(putVariableValuesRequest, "PutVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -43543,8 +46629,8 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43584,8 +46670,8 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update".replace("{identifier}", encodeURIComponent(String(identifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43608,7 +46694,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -43621,8 +46707,8 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/update-values"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43763,6 +46849,118 @@ var VariableApiResponseProcessor = class { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariables(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to putVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + putVariableValues(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -43954,8 +47152,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/branches/commit"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43991,8 +47189,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -44028,8 +47226,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -44065,8 +47263,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/deploy"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -44106,8 +47304,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/{commit_id}/revert".replace("{commit_id}", encodeURIComponent(String(commitId))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -44143,8 +47341,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -44180,8 +47378,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -44217,8 +47415,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -44254,8 +47452,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/branches/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -44841,8 +48039,8 @@ var WebhooksApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/webhooks/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -44878,8 +48076,8 @@ var WebhooksApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/webhooks/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -44915,8 +48113,8 @@ var WebhooksApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/webhooks/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -44956,8 +48154,8 @@ var WebhooksApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/webhooks/{webhook_identifier}/update".replace("{webhook_identifier}", encodeURIComponent(String(webhookIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -45230,7 +48428,7 @@ var ObservableAIApi = class { this.responseProcessor = responseProcessor || new AIApiResponseProcessor(); } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest, _options) { @@ -45248,7 +48446,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest, _options) { @@ -45266,7 +48464,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { @@ -45284,7 +48482,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest, _options) { @@ -45302,7 +48500,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest, _options) { @@ -45320,7 +48518,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { @@ -45338,7 +48536,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -45357,7 +48555,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { @@ -45375,7 +48573,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -45394,7 +48592,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest, _options) { @@ -45412,7 +48610,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest, _options) { @@ -45596,6 +48794,86 @@ var ObservableAuthenticationApi = class { })); } }; +var ObservableCollectionsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new CollectionsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new CollectionsApiResponseProcessor(); + } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.createCollection(createCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCollection(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.deleteCollection(deleteCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCollection(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCollections(searchCollectionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCollections(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCollection(rsp))); + })); + } +}; var ObservableConnectionConfigurationsApi = class { constructor(configuration, requestFactory, responseProcessor) { this.configuration = configuration; @@ -45683,7 +48961,7 @@ var ObservableConnectionsApi = class { this.responseProcessor = responseProcessor || new ConnectionsApiResponseProcessor(); } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest, _options) { @@ -46436,6 +49714,31 @@ var ObservableGroupsApi = class { })); } }; +var ObservableJobsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new JobsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new JobsApiResponseProcessor(); + } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + const requestContextPromise = this.requestFactory.searchChannelHistory(searchChannelHistoryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchChannelHistory(rsp))); + })); + } +}; var ObservableLogApi = class { constructor(configuration, requestFactory, responseProcessor) { this.configuration = configuration; @@ -46648,7 +49951,7 @@ var ObservableMetadataApi = class { })); } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest, _options) { @@ -46665,6 +49968,24 @@ var ObservableMetadataApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.parameterizeMetadata(rsp))); })); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + const requestContextPromise = this.requestFactory.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.parameterizeMetadataFields(rsp))); + })); + } /** * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. * @param searchMetadataRequest @@ -47355,6 +50676,24 @@ var ObservableSystemApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateSystemConfig(rsp))); })); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + const requestContextPromise = this.requestFactory.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateCommunicationChannel(rsp))); + })); + } }; var ObservableTagsApi = class { constructor(configuration, requestFactory, responseProcessor) { @@ -47659,7 +50998,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest, _options) { @@ -47694,6 +51033,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCalendar(rsp))); })); } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.createCollection(createCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCollection(rsp))); + })); + } /** * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. * @param createConfigRequest @@ -47713,7 +51070,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest, _options) { @@ -47749,7 +51106,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest, _options) { @@ -48067,6 +51424,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCalendar(rsp))); })); } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.deleteCollection(deleteCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCollection(rsp))); + })); + } /** * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param deleteConfigRequest @@ -48338,7 +51713,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier, _options) { @@ -48355,6 +51730,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariable(rsp))); })); } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + const requestContextPromise = this.requestFactory.deleteVariables(deleteVariablesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariables(rsp))); + })); + } /** * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. * @param deleteWebhookConfigurationsRequest @@ -48768,7 +52161,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { @@ -48804,7 +52197,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest, _options) { @@ -48840,7 +52233,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest, _options) { @@ -49034,7 +52427,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest, _options) { @@ -49051,6 +52444,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.parameterizeMetadata(rsp))); })); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + const requestContextPromise = this.requestFactory.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.parameterizeMetadataFields(rsp))); + })); + } /** * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. * @param publishMetadataRequest @@ -49070,7 +52481,26 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.7.0.cl or later + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + const requestContextPromise = this.requestFactory.putVariableValues(identifier, putVariableValuesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.putVariableValues(rsp))); + })); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { @@ -49179,6 +52609,42 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCalendars(rsp))); })); } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + const requestContextPromise = this.requestFactory.searchChannelHistory(searchChannelHistoryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchChannelHistory(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCollections(searchCollectionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCollections(rsp))); + })); + } /** * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. * @param searchCommitsRequest @@ -49486,7 +52952,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -49505,7 +52971,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { @@ -49523,7 +52989,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -49542,7 +53008,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest, _options) { @@ -49578,7 +53044,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest, _options) { @@ -49668,6 +53134,25 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCalendar(rsp))); })); } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCollection(rsp))); + })); + } /** * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups * @param updateColumnSecurityRulesRequest @@ -50013,7 +53498,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -50049,6 +53534,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateWebhookConfiguration(rsp))); })); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + const requestContextPromise = this.requestFactory.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateCommunicationChannel(rsp))); + })); + } /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -50316,7 +53819,7 @@ var ObservableVariableApi = class { })); } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier, _options) { @@ -50333,6 +53836,43 @@ var ObservableVariableApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariable(rsp))); })); } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + const requestContextPromise = this.requestFactory.deleteVariables(deleteVariablesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariables(rsp))); + })); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + const requestContextPromise = this.requestFactory.putVariableValues(identifier, putVariableValuesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.putVariableValues(rsp))); + })); + } /** * Search variables Version: 10.14.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier * @param searchVariablesRequest @@ -50371,7 +53911,7 @@ var ObservableVariableApi = class { })); } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -50646,7 +54186,7 @@ var PromiseAIApi = class { this.api = new ObservableAIApi(configuration, requestFactory, responseProcessor); } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest, _options) { @@ -50654,7 +54194,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest, _options) { @@ -50662,7 +54202,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { @@ -50670,7 +54210,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest, _options) { @@ -50678,7 +54218,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest, _options) { @@ -50686,7 +54226,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { @@ -50694,7 +54234,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -50703,7 +54243,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { @@ -50711,7 +54251,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -50720,7 +54260,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest, _options) { @@ -50728,7 +54268,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest, _options) { @@ -50810,6 +54350,44 @@ var PromiseAuthenticationApi = class { return result.toPromise(); } }; +var PromiseCollectionsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableCollectionsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + const result = this.api.createCollection(createCollectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + const result = this.api.deleteCollection(deleteCollectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + const result = this.api.searchCollections(searchCollectionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + const result = this.api.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + return result.toPromise(); + } +}; var PromiseConnectionConfigurationsApi = class { constructor(configuration, requestFactory, responseProcessor) { this.api = new ObservableConnectionConfigurationsApi(configuration, requestFactory, responseProcessor); @@ -50853,7 +54431,7 @@ var PromiseConnectionsApi = class { this.api = new ObservableConnectionsApi(configuration, requestFactory, responseProcessor); } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest, _options) { @@ -51214,6 +54792,19 @@ var PromiseGroupsApi = class { return result.toPromise(); } }; +var PromiseJobsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableJobsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + const result = this.api.searchChannelHistory(searchChannelHistoryRequest, _options); + return result.toPromise(); + } +}; var PromiseLogApi = class { constructor(configuration, requestFactory, responseProcessor) { this.api = new ObservableLogApi(configuration, requestFactory, responseProcessor); @@ -51312,13 +54903,21 @@ var PromiseMetadataApi = class { return result.toPromise(); } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest, _options) { const result = this.api.parameterizeMetadata(parameterizeMetadataRequest, _options); return result.toPromise(); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + const result = this.api.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + return result.toPromise(); + } /** * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. * @param searchMetadataRequest @@ -51637,6 +55236,14 @@ var PromiseSystemApi = class { const result = this.api.updateSystemConfig(updateSystemConfigRequest, _options); return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + const result = this.api.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + return result.toPromise(); + } }; var PromiseTagsApi = class { constructor(configuration, requestFactory, responseProcessor) { @@ -51777,7 +55384,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest, _options) { @@ -51792,6 +55399,14 @@ var PromiseThoughtSpotRestApi = class { const result = this.api.createCalendar(createCalendarRequest, _options); return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + const result = this.api.createCollection(createCollectionRequest, _options); + return result.toPromise(); + } /** * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. * @param createConfigRequest @@ -51801,7 +55416,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest, _options) { @@ -51817,7 +55432,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest, _options) { @@ -51965,6 +55580,14 @@ var PromiseThoughtSpotRestApi = class { const result = this.api.deleteCalendar(calendarIdentifier, _options); return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + const result = this.api.deleteCollection(deleteCollectionRequest, _options); + return result.toPromise(); + } /** * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param deleteConfigRequest @@ -52086,13 +55709,21 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier, _options) { const result = this.api.deleteVariable(identifier, _options); return result.toPromise(); } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + const result = this.api.deleteVariables(deleteVariablesRequest, _options); + return result.toPromise(); + } /** * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. * @param deleteWebhookConfigurationsRequest @@ -52276,7 +55907,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { @@ -52292,7 +55923,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest, _options) { @@ -52308,7 +55939,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest, _options) { @@ -52392,13 +56023,21 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest, _options) { const result = this.api.parameterizeMetadata(parameterizeMetadataRequest, _options); return result.toPromise(); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + const result = this.api.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + return result.toPromise(); + } /** * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. * @param publishMetadataRequest @@ -52408,7 +56047,16 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.7.0.cl or later + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + const result = this.api.putVariableValues(identifier, putVariableValuesRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { @@ -52457,6 +56105,22 @@ var PromiseThoughtSpotRestApi = class { const result = this.api.searchCalendars(searchCalendarsRequest, _options); return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + const result = this.api.searchChannelHistory(searchChannelHistoryRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + const result = this.api.searchCollections(searchCollectionsRequest, _options); + return result.toPromise(); + } /** * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. * @param searchCommitsRequest @@ -52594,7 +56258,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -52603,7 +56267,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { @@ -52611,7 +56275,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -52620,7 +56284,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest, _options) { @@ -52636,7 +56300,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest, _options) { @@ -52676,6 +56340,15 @@ var PromiseThoughtSpotRestApi = class { const result = this.api.updateCalendar(calendarIdentifier, updateCalendarRequest, _options); return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + const result = this.api.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + return result.toPromise(); + } /** * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups * @param updateColumnSecurityRulesRequest @@ -52841,7 +56514,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -52857,6 +56530,14 @@ var PromiseThoughtSpotRestApi = class { const result = this.api.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + const result = this.api.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + return result.toPromise(); + } /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -52980,13 +56661,30 @@ var PromiseVariableApi = class { return result.toPromise(); } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier, _options) { const result = this.api.deleteVariable(identifier, _options); return result.toPromise(); } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + const result = this.api.deleteVariables(deleteVariablesRequest, _options); + return result.toPromise(); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + const result = this.api.putVariableValues(identifier, putVariableValuesRequest, _options); + return result.toPromise(); + } /** * Search variables Version: 10.14.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier * @param searchVariablesRequest @@ -53005,7 +56703,7 @@ var PromiseVariableApi = class { return result.toPromise(); } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -53244,8 +56942,21 @@ var createBasicConfig = (thoughtSpotHost, options) => { CALLBACKInputMandatory, CalendarResponse, ChangeUserPasswordRequest, + ChannelHistoryEventInfo, + ChannelHistoryEventInput, + ChannelHistoryJob, + ChannelValidationAwsS3Info, + ChannelValidationDetail, ClusterNonEmbedAccess, ClusterNonEmbedAccessInput, + Collection, + CollectionDeleteResponse, + CollectionDeleteTypeIdentifiers, + CollectionEntityIdentifier, + CollectionMetadataInput, + CollectionMetadataItem, + CollectionSearchResponse, + CollectionsApi, Column, ColumnSecurityRule, ColumnSecurityRuleColumn, @@ -53261,6 +56972,7 @@ var createBasicConfig = (thoughtSpotHost, options) => { CommitResponse, CommiterType, CommunicationChannelPreferencesResponse, + CommunicationChannelValidateResponse, ConfigureCommunicationChannelPreferencesRequest, ConfigureSecuritySettingsRequest, ConfigureSecuritySettingsRequestClusterPreferences, @@ -53279,6 +56991,7 @@ var createBasicConfig = (thoughtSpotHost, options) => { CreateAgentConversationRequestMetadataContext, CreateCalendarRequest, CreateCalendarRequestTableReference, + CreateCollectionRequest, CreateConfigRequest, CreateConnectionConfigurationRequest, CreateConnectionConfigurationRequestPolicyProcessOptions, @@ -53326,12 +57039,14 @@ var createBasicConfig = (thoughtSpotHost, options) => { DefaultActionConfigInput, DefaultActionConfigInputCreate, DefaultActionConfigSearchInput, + DeleteCollectionRequest, DeleteConfigRequest, DeleteConnectionConfigurationRequest, DeleteConnectionRequest, DeleteMetadataRequest, DeleteMetadataTypeInput, DeleteOrgEmailCustomizationRequest, + DeleteVariablesRequest, DeleteWebhookConfigurationsRequest, DeployCommitRequest, DeployResponse, @@ -53414,6 +57129,8 @@ var createBasicConfig = (thoughtSpotHost, options) => { JWTParameter, JWTUserOptions, JWTUserOptionsFull, + JobRecipient, + JobsApi, LBContextInput, LiveboardContent, LiveboardDataResponse, @@ -53450,6 +57167,7 @@ var createBasicConfig = (thoughtSpotHost, options) => { OrgType, OrgsApi, ParameterValues, + ParameterizeMetadataFieldsRequest, ParameterizeMetadataRequest, ParametersListItem, ParametersListItemInput, @@ -53467,6 +57185,7 @@ var createBasicConfig = (thoughtSpotHost, options) => { PrincipalsListItemInput, PublishMetadataListItem, PublishMetadataRequest, + PutVariableValuesRequest, QueryGetDecomposedQueryRequest, QueryGetDecomposedQueryRequestNlsRequest, RecipientDetails, @@ -53519,6 +57238,10 @@ var createBasicConfig = (thoughtSpotHost, options) => { ScriptSrcUrlsInput, SearchCalendarsRequest, SearchCalendarsRequestSortOptions, + SearchChannelHistoryRequest, + SearchChannelHistoryResponse, + SearchCollectionsRequest, + SearchCollectionsRequestSortOptions, SearchCommitsRequest, SearchCommunicationChannelPreferencesRequest, SearchConfigRequest, @@ -53544,7 +57267,6 @@ var createBasicConfig = (thoughtSpotHost, options) => { SearchUserGroupsRequest, SearchUserGroupsRequestSortOptions, SearchUsersRequest, - SearchUsersRequestSortOptions, SearchVariablesRequest, SearchWebhookConfigurationsRequest, SearchWebhookConfigurationsRequestSortOptions, @@ -53597,6 +57319,7 @@ var createBasicConfig = (thoughtSpotHost, options) => { UnpublishMetadataRequest, UpdateCalendarRequest, UpdateCalendarRequestTableReference, + UpdateCollectionRequest, UpdateColumnSecurityRulesRequest, UpdateConfigRequest, UpdateConnectionConfigurationRequest, @@ -53631,12 +57354,14 @@ var createBasicConfig = (thoughtSpotHost, options) => { UserParameterOptions, UserPrincipal, UsersApi, + ValidateCommunicationChannelRequest, ValidateMergeRequest, ValidateTokenRequest, ValueScopeInput, Variable, VariableApi, VariableDetailInput, + VariablePutAssignmentInput, VariableUpdateAssignmentInput, VariableUpdateScopeInput, VariableValue, @@ -53652,6 +57377,8 @@ var createBasicConfig = (thoughtSpotHost, options) => { WebhookAuthenticationInput, WebhookDeleteFailure, WebhookDeleteResponse, + WebhookKeyValuePair, + WebhookKeyValuePairInput, WebhookOrg, WebhookPagination, WebhookResponse, diff --git a/sdks/typescript/dist/index.d.cts b/sdks/typescript/dist/index.d.cts index 11c2f1b75..b8a940562 100644 --- a/sdks/typescript/dist/index.d.cts +++ b/sdks/typescript/dist/index.d.cts @@ -1827,6 +1827,294 @@ declare class ChangeUserPasswordRequest { constructor(); } +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Event metadata for the triggering event associated with a job. +*/ +declare class ChannelHistoryEventInfo { + /** + * Type of the event. + */ + 'type': ChannelHistoryEventInfoTypeEnum; + /** + * Unique ID of the event. + */ + 'id': string; + /** + * Name of the event. + */ + 'name'?: string | null; + /** + * Unique run ID for this event execution. + */ + 'run_id'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ChannelHistoryEventInfoTypeEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Event specification for channel history search. +*/ +declare class ChannelHistoryEventInput { + /** + * Type of the event. + */ + 'type': ChannelHistoryEventInputTypeEnum; + /** + * Unique ID or name of the event. + */ + 'identifier'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ChannelHistoryEventInputTypeEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* A recipient (user, group, or external) for a job execution. +*/ +declare class JobRecipient { + /** + * Type of the recipient. + */ + 'type': JobRecipientTypeEnum; + /** + * Unique ID of the recipient. + */ + 'id'?: string | null; + /** + * Name of the recipient. + */ + 'name'?: string | null; + /** + * Email of the recipient. + */ + 'email'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type JobRecipientTypeEnum = "USER" | "EXTERNAL"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* A single job execution record for a channel. +*/ +declare class ChannelHistoryJob { + /** + * Unique identifier for this job. + */ + 'id': string; + /** + * Delivery status of this job. + */ + 'status': ChannelHistoryJobStatusEnum; + /** + * Timestamp when this job was created (epoch milliseconds). + */ + 'creation_time_in_millis': number; + 'event'?: ChannelHistoryEventInfo; + /** + * The users, groups or external recipients for this job. + */ + 'recipients'?: Array | null; + /** + * Additional delivery details such as HTTP response code or error message. + */ + 'detail'?: string | null; + /** + * Number of attempts made. 1 indicates first attempt. + */ + 'try_count'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ChannelHistoryJobStatusEnum = "PENDING" | "RETRY" | "SUCCESS" | "FAILED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* AWS S3 storage information returned from a validation step. +*/ +declare class ChannelValidationAwsS3Info { + /** + * Name of the S3 bucket. + */ + 'bucket_name'?: string | null; + /** + * Name of the uploaded file. + */ + 'file_name'?: string | null; + /** + * Key of the object in S3 storage. + */ + 'object_key'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Validation detail result for a sub-step. +*/ +declare class ChannelValidationDetail { + /** + * The validation step that was performed. + */ + 'validation_step': ChannelValidationDetailValidationStepEnum; + /** + * Status of this validation step. + */ + 'status': ChannelValidationDetailStatusEnum; + /** + * HTTP status code returned by the channel (if applicable). + */ + 'http_status'?: number | null; + /** + * Error message from the channel or validation process. + */ + 'error_message'?: string | null; + 'aws_s3_info'?: ChannelValidationAwsS3Info; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ChannelValidationDetailValidationStepEnum = "HTTP_CONNECTION_CHECK" | "STORAGE_FILE_UPLOAD_CHECK"; +type ChannelValidationDetailStatusEnum = "SUCCESS" | "FAILED"; + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -1926,9 +2214,355 @@ declare class ClusterNonEmbedAccessInput { */ 'block_full_app_access'?: boolean | null; /** - * Group identifiers that are allowed non-embed full app access. Can only be set when orgs feature is disabled and block_full_app_access is true. + * Group identifiers that are allowed non-embed full app access. Can only be set when orgs feature is disabled and block_full_app_access is true. + */ + 'groups_identifiers_with_access'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Entity identifier with name. +*/ +declare class CollectionEntityIdentifier { + /** + * Unique identifier of the entity. + */ + 'identifier'?: string | null; + /** + * Name of the entity. + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Metadata item in a collection response. +*/ +declare class CollectionMetadataItem { + /** + * Type of the metadata object. + */ + 'type'?: string | null; + /** + * List of identifiers for this metadata type. + */ + 'identifiers'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response object for a collection. +*/ +declare class Collection { + /** + * Unique identifier of the collection. + */ + 'id': string; + /** + * Name of the collection. + */ + 'name': string; + /** + * Description of the collection. + */ + 'description'?: string | null; + /** + * Metadata objects in the collection. + */ + 'metadata'?: Array | null; + /** + * Creation timestamp in milliseconds. + */ + 'created_at'?: string | null; + /** + * Last updated timestamp in milliseconds. + */ + 'updated_at'?: string | null; + /** + * Name of the author who created the collection. + */ + 'author_name'?: string | null; + /** + * Unique identifier of the author. + */ + 'author_id'?: string | null; + 'org'?: CollectionEntityIdentifier; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class GenericInfo { + 'id'?: string | null; + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Group of metadata objects identified by type. +*/ +declare class CollectionDeleteTypeIdentifiers { + /** + * Type of the metadata object (e.g., Collection, Worksheet, Table). + */ + 'type'?: string | null; + /** + * List of metadata identifiers belonging to the given type. + */ + 'identifiers'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response object for delete collection operation. +*/ +declare class CollectionDeleteResponse { + /** + * List of metadata objects that were successfully deleted. + */ + 'metadata_deleted'?: Array | null; + /** + * List of metadata objects that were skipped during deletion. Objects may be skipped due to lack of permissions, dependencies, or other constraints. + */ + 'metadata_skipped'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input type for metadata to be added to a collection. +*/ +declare class CollectionMetadataInput { + /** + * Type of metadata object. + */ + 'type': CollectionMetadataInputTypeEnum; + /** + * List of unique IDs or names of metadata objects. + */ + 'identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CollectionMetadataInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "COLLECTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response object for search collections operation. +*/ +declare class CollectionSearchResponse { + /** + * List of collections matching the search criteria. + */ + 'collections': Array; + /** + * The starting record number from where the records are included. + */ + 'record_offset'?: number | null; + /** + * The number of records returned. + */ + 'record_size'?: number | null; + /** + * Indicates if this is the last batch of results. + */ + 'is_last_batch'?: boolean | null; + /** + * Total count of records returned. */ - 'groups_identifiers_with_access'?: Array | null; + 'count'?: number | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2696,6 +3330,69 @@ declare class CommunicationChannelPreferencesResponse { constructor(); } +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response containing validation results for communication channel configuration. +*/ +declare class CommunicationChannelValidateResponse { + /** + * Type of communication channel that was validated. + */ + 'channel_type': CommunicationChannelValidateResponseChannelTypeEnum; + /** + * ID of the communication channel (e.g., webhook_id). + */ + 'channel_id': string; + /** + * Name of the communication channel (e.g., webhook name). + */ + 'channel_name'?: string | null; + /** + * Event type that was validated. + */ + 'event_type': CommunicationChannelValidateResponseEventTypeEnum; + /** + * Unique Job Id of the validation. + */ + 'job_id': string; + /** + * Overall result of the validation. + */ + 'result_code': CommunicationChannelValidateResponseResultCodeEnum; + /** + * Detailed results of various validation sub-steps. + */ + 'details'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CommunicationChannelValidateResponseChannelTypeEnum = "WEBHOOK"; +type CommunicationChannelValidateResponseEventTypeEnum = "LIVEBOARD_SCHEDULE"; +type CommunicationChannelValidateResponseResultCodeEnum = "SUCCESS" | "FAILED" | "PARTIAL_SUCCESS"; + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -3800,6 +4497,47 @@ type CreateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | type CreateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; type CreateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateCollectionRequest { + /** + * Name of the collection. + */ + 'name': string; + /** + * Description of the collection. + */ + 'description'?: string; + /** + * Metadata objects to add to the collection. + */ + 'metadata'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -4326,6 +5064,10 @@ declare class CreateEmailCustomizationRequestTemplateProperties { * Whether to hide contact support url. Version: 26.2.0.cl or later */ 'hide_contact_support_url'?: boolean | null; + /** + * Whether to hide logo Version: 26.4.0.cl or later + */ + 'hide_logo_url'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5434,6 +6176,45 @@ declare class CreateWebhookConfigurationRequestStorageDestination { } type CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum = "AWS_S3"; +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Key-value pair input for additional webhook headers. +*/ +declare class WebhookKeyValuePairInput { + /** + * Header name. + */ + 'key': string; + /** + * Header value. + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -5470,6 +6251,10 @@ declare class CreateWebhookConfigurationRequest { 'authentication'?: CreateWebhookConfigurationRequestAuthentication; 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; 'storage_destination'?: CreateWebhookConfigurationRequestStorageDestination; + /** + * Additional headers as an array of key-value pairs. Example: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6135,6 +6920,46 @@ declare class DefaultActionConfigSearchInput { constructor(); } +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteCollectionRequest { + /** + * Unique GUIDs of collections to delete. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + */ + 'collection_identifiers': Array; + /** + * Flag to delete child objects of the collection that the user has access to. + */ + 'delete_children'?: boolean | null; + /** + * Preview deletion without actually deleting. When set to true, returns what would be deleted without performing the actual deletion. + */ + 'dry_run'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -6344,6 +7169,38 @@ declare class DeleteOrgEmailCustomizationRequest { constructor(); } +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteVariablesRequest { + /** + * Unique id(s) or name(s) of the variable(s) to delete + */ + 'identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -8361,36 +9218,6 @@ type GenerateCSVRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "F type GenerateCSVRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; type GenerateCSVRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; -/** - * ThoughtSpot Public REST API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -declare class GenericInfo { - 'id'?: string | null; - 'name'?: string | null; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} - /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -11063,6 +11890,56 @@ declare class OrgResponse { type OrgResponseStatusEnum = "ACTIVE" | "IN_ACTIVE"; type OrgResponseVisibilityEnum = "SHOW" | "HIDDEN"; +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ParameterizeMetadataFieldsRequest { + /** + * Type of metadata object to parameterize. + */ + 'metadata_type'?: ParameterizeMetadataFieldsRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object to parameterize. + */ + 'metadata_identifier': string; + /** + * Type of field in the metadata to parameterize. + */ + 'field_type': ParameterizeMetadataFieldsRequestFieldTypeEnum; + /** + * JSON array of field names to parameterize. Example: [schemaName, databaseName, tableName] + */ + 'field_names': Array; + /** + * Unique ID or name of the variable to use for parameterization of these fields. + */ + 'variable_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ParameterizeMetadataFieldsRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION" | "CONNECTION_CONFIG"; +type ParameterizeMetadataFieldsRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY"; + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -11529,6 +12406,100 @@ declare class PublishMetadataRequest { constructor(); } +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for variable value put operations +*/ +declare class VariablePutAssignmentInput { + /** + * Values of the variable + */ + 'assigned_values': Array; + /** + * The unique name of the org + */ + 'org_identifier'?: string | null; + /** + * Principal type + */ + 'principal_type'?: VariablePutAssignmentInputPrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Unique ID of the model + */ + 'model_identifier'?: string | null; + /** + * Priority level + */ + 'priority'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariablePutAssignmentInputPrincipalTypeEnum = "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class PutVariableValuesRequest { + /** + * Operation to perform + */ + 'operation'?: PutVariableValuesRequestOperationEnum; + /** + * Variable assignments + */ + 'variable_assignment': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type PutVariableValuesRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE" | "RESET"; + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -12944,9 +13915,186 @@ type RoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; */ declare class RuntimeFilter { /** - * Runtime filter parameter type in JWT. + * Runtime filter parameter type in JWT. + */ + 'runtime_filter'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* List of runtime parameters need to set during the session. +*/ +declare class RuntimeParamOverride { + /** + * Runtime param override type in JWT. + */ + 'runtime_param_override'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* List of runtime parameters need to set during the session. +*/ +declare class RuntimeSort { + /** + * Runtime sort parameter type in JWT. + */ + 'runtime_sort'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ScheduleHistoryRunsOptionsInput { + /** + * Indicates whether to fetch history runs for the scheduled notification. + */ + 'include_history_runs'?: boolean | null; + /** + * Indicates the max number of records that can be fetched as past runs of any scheduled job. + */ + 'record_size'?: number | null; + /** + * Indicates the starting record number from where history runs records should be fetched. + */ + 'record_offset'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for PDF export. +*/ +declare class SchedulesPdfOptionsInput { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. */ - 'runtime_filter'?: any; + 'page_size'?: SchedulesPdfOptionsInputPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12962,6 +14110,7 @@ declare class RuntimeFilter { }[]; constructor(); } +type SchedulesPdfOptionsInputPageSizeEnum = "A4"; /** * ThoughtSpot Public REST API @@ -12974,14 +14123,19 @@ declare class RuntimeFilter { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* List of runtime parameters need to set during the session. -*/ -declare class RuntimeParamOverride { +declare class Scope { /** - * Runtime param override type in JWT. + * Object access scope type. */ - 'runtime_param_override'?: any; + 'access_type': string; + /** + * Unique identifier of the metadata. + */ + 'org_id'?: number | null; + /** + * Unique identifier of the Org. + */ + 'metadata_id'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13010,13 +14164,17 @@ declare class RuntimeParamOverride { * Do not edit the class manually. */ /** -* List of runtime parameters need to set during the session. +* Sort options. */ -declare class RuntimeSort { +declare class SearchCalendarsRequestSortOptions { /** - * Runtime sort parameter type in JWT. + * Name of the field to apply the sort on. */ - 'runtime_sort'?: any; + 'field_name'?: SearchCalendarsRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchCalendarsRequestSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13032,6 +14190,8 @@ declare class RuntimeSort { }[]; constructor(); } +type SearchCalendarsRequestSortOptionsFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SearchCalendarsRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -13044,19 +14204,25 @@ declare class RuntimeSort { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ScheduleHistoryRunsOptionsInput { + +declare class SearchCalendarsRequest { /** - * Indicates whether to fetch history runs for the scheduled notification. + * Unique ID or name of the connection. */ - 'include_history_runs'?: boolean | null; + 'connection_identifier'?: string; /** - * Indicates the max number of records that can be fetched as past runs of any scheduled job. + * Pattern to match for calendar names (use \'%\' for wildcard match). */ - 'record_size'?: number | null; + 'name_pattern'?: string; /** - * Indicates the starting record number from where history runs records should be fetched. + * The starting record number from where the records should be included. */ - 'record_offset'?: number | null; + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchCalendarsRequestSortOptions; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13084,46 +14250,32 @@ declare class ScheduleHistoryRunsOptionsInput { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Options for PDF export. -*/ -declare class SchedulesPdfOptionsInput { - /** - * Indicates whether to include complete Liveboard. - */ - 'complete_liveboard'?: boolean | null; - /** - * Indicates whether to include cover page with the Liveboard title. - */ - 'include_cover_page'?: boolean | null; - /** - * Indicates whether to include customized wide logo in the footer if available. - */ - 'include_custom_logo'?: boolean | null; + +declare class SearchChannelHistoryRequest { /** - * Indicates whether to include a page with all applied filters. + * Type of communication channel to search history for. */ - 'include_filter_page'?: boolean | null; + 'channel_type': SearchChannelHistoryRequestChannelTypeEnum; /** - * Indicates whether to include page number in the footer of each page + * List of job execution record IDs to retrieve. */ - 'include_page_number'?: boolean | null; + 'job_ids'?: Array; /** - * Text to include in the footer of each page. + * List of channel IDs or names to filter by. */ - 'page_footer_text'?: string | null; + 'channel_identifiers'?: Array; /** - * Page orientation of the PDF. + * Filter by channel delivery status. */ - 'page_orientation'?: string | null; + 'channel_status'?: SearchChannelHistoryRequestChannelStatusEnum; /** - * Page size. + * Filter by events that triggered the channel. */ - 'page_size'?: SchedulesPdfOptionsInputPageSizeEnum | null; + 'events'?: Array; /** - * Indicates whether to include only first page of the tables. + * Filter records created on or after this time (epoch milliseconds). */ - 'truncate_table'?: boolean | null; + 'start_epoch_time_in_millis'?: number; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13139,7 +14291,8 @@ declare class SchedulesPdfOptionsInput { }[]; constructor(); } -type SchedulesPdfOptionsInputPageSizeEnum = "A4"; +type SearchChannelHistoryRequestChannelTypeEnum = "WEBHOOK"; +type SearchChannelHistoryRequestChannelStatusEnum = "PENDING" | "RETRY" | "SUCCESS" | "FAILED"; /** * ThoughtSpot Public REST API @@ -13152,19 +14305,15 @@ type SchedulesPdfOptionsInputPageSizeEnum = "A4"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class Scope { - /** - * Object access scope type. - */ - 'access_type': string; - /** - * Unique identifier of the metadata. - */ - 'org_id'?: number | null; + +/** +* Response wrapper for channel delivery history. +*/ +declare class SearchChannelHistoryResponse { /** - * Unique identifier of the Org. + * List of job execution records. */ - 'metadata_id'?: string | null; + 'jobs': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13195,15 +14344,15 @@ declare class Scope { /** * Sort options. */ -declare class SearchCalendarsRequestSortOptions { +declare class SearchCollectionsRequestSortOptions { /** * Name of the field to apply the sort on. */ - 'field_name'?: SearchCalendarsRequestSortOptionsFieldNameEnum | null; + 'field_name'?: SearchCollectionsRequestSortOptionsFieldNameEnum | null; /** * Sort order : ASC(Ascending) or DESC(Descending). */ - 'order'?: SearchCalendarsRequestSortOptionsOrderEnum | null; + 'order'?: SearchCollectionsRequestSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13219,8 +14368,8 @@ declare class SearchCalendarsRequestSortOptions { }[]; constructor(); } -type SearchCalendarsRequestSortOptionsFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; -type SearchCalendarsRequestSortOptionsOrderEnum = "ASC" | "DESC"; +type SearchCollectionsRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SearchCollectionsRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -13234,13 +14383,9 @@ type SearchCalendarsRequestSortOptionsOrderEnum = "ASC" | "DESC"; * Do not edit the class manually. */ -declare class SearchCalendarsRequest { +declare class SearchCollectionsRequest { /** - * Unique ID or name of the connection. - */ - 'connection_identifier'?: string; - /** - * Pattern to match for calendar names (use \'%\' for wildcard match). + * A pattern to match case-insensitive name of the Collection object. Use \'%\' for wildcard match. */ 'name_pattern'?: string; /** @@ -13248,10 +14393,22 @@ declare class SearchCalendarsRequest { */ 'record_offset'?: number; /** - * The number of records that should be included. + * The number of records that should be included. -1 implies no pagination. */ 'record_size'?: number; - 'sort_options'?: SearchCalendarsRequestSortOptions; + /** + * Unique GUIDs of collections to search. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + */ + 'collection_identifiers'?: Array; + /** + * Filter collections by author. Provide unique IDs or names of users who created the collections. + */ + 'created_by_user_identifiers'?: Array; + /** + * Include collection metadata items in the response. + */ + 'include_metadata'?: boolean | null; + 'sort_options'?: SearchCollectionsRequestSortOptions; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14530,47 +15687,6 @@ type SearchUserGroupsRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "U type SearchUserGroupsRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; type SearchUserGroupsRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; -/** - * ThoughtSpot Public REST API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -/** -* Sort options. -*/ -declare class SearchUsersRequestSortOptions { - /** - * Name of the field to apply the sort on. - */ - 'field_name'?: SearchUsersRequestSortOptionsFieldNameEnum | null; - /** - * Sort order : ASC(Ascending) or DESC(Descending). - */ - 'order'?: SearchUsersRequestSortOptionsOrderEnum | null; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} -type SearchUsersRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; -type SearchUsersRequestSortOptionsOrderEnum = "ASC" | "DESC"; - /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -14652,7 +15768,7 @@ declare class SearchUsersRequest { * The number of records that should be included. */ 'record_size'?: number; - 'sort_options'?: SearchUsersRequestSortOptions; + 'sort_options'?: SearchCollectionsRequestSortOptions; /** * Filters by the role assigned to the user. */ @@ -14697,7 +15813,7 @@ type SearchUsersRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | " * Do not edit the class manually. */ /** -* Input for variable scope in search +* Input for filtering variable values by scope in search operations */ declare class ValueScopeInput { /** @@ -14705,7 +15821,7 @@ declare class ValueScopeInput { */ 'org_identifier'?: string | null; /** - * Principal type + * Type of principal to filter by. Use USER to filter values assigned to specific users, or USER_GROUP to filter values assigned to groups. */ 'principal_type'?: ValueScopeInputPrincipalTypeEnum | null; /** @@ -14713,7 +15829,7 @@ declare class ValueScopeInput { */ 'principal_identifier'?: string | null; /** - * Model Identifier + * Unique ID or name of the model to filter by. Applicable only for FORMULA_VARIABLE type. */ 'model_identifier'?: string | null; static readonly discriminator: string | undefined; @@ -14775,7 +15891,7 @@ declare class VariableDetailInput { }[]; constructor(); } -type VariableDetailInputTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE"; +type VariableDetailInputTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE" | "USER_PROPERTY"; /** * ThoughtSpot Public REST API @@ -16171,6 +17287,10 @@ declare class TemplatePropertiesInputCreate { * Whether to hide contact support url. Version: 26.2.0.cl or later */ 'hide_contact_support_url'?: boolean | null; + /** + * Whether to hide logo Version: 26.4.0.cl or later + */ + 'hide_logo_url'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -16528,6 +17648,52 @@ type UpdateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | type UpdateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; type UpdateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateCollectionRequest { + /** + * Name of the collection. + */ + 'name'?: string; + /** + * Description of the collection. + */ + 'description'?: string; + /** + * Metadata objects to add, remove, or replace in the collection. + */ + 'metadata'?: Array; + /** + * Type of update operation. Default operation type is REPLACE. + */ + 'operation'?: UpdateCollectionRequestOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateCollectionRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -17736,7 +18902,7 @@ type VariableUpdateAssignmentInputOperationEnum = "ADD" | "REMOVE" | "REPLACE" | * Do not edit the class manually. */ /** -* Input for variable value update in batch operations +* Input for defining the scope of variable value assignments in batch update operations */ declare class VariableUpdateScopeInput { /** @@ -17744,7 +18910,7 @@ declare class VariableUpdateScopeInput { */ 'org_identifier': string; /** - * Principal type + * Type of principal to which the variable value applies. Use USER to assign values to a specific user, or USER_GROUP to assign values to a group. */ 'principal_type'?: VariableUpdateScopeInputPrincipalTypeEnum | null; /** @@ -17752,11 +18918,11 @@ declare class VariableUpdateScopeInput { */ 'principal_identifier'?: string | null; /** - * Unique ID of the model + * Unique ID or name of the model. Required for FORMULA_VARIABLE type to scope the variable value to a specific worksheet. */ 'model_identifier'?: string | null; /** - * Priority level + * The priority level for this scope assignment, used for conflict resolution when multiple values match. Higher priority values (larger numbers) take precedence. */ 'priority'?: number | null; static readonly discriminator: string | undefined; @@ -17790,11 +18956,11 @@ type VariableUpdateScopeInputPrincipalTypeEnum = "USER" | "USER_GROUP"; declare class UpdateVariableValuesRequest { /** - * Variables and values to update + * Array of variable assignment objects specifying the variable identifier, values to assign, and the operation type (ADD, REMOVE, REPLACE, or RESET) to perform on each variable. */ 'variable_assignment': Array; /** - * Variables and values to update + * Array of scope objects defining where the variable values apply, including organization context, optional principal constraints (user or group), model reference for formula variables, and priority for conflict resolution. */ 'variable_value_scope': Array; static readonly discriminator: string | undefined; @@ -17849,6 +19015,10 @@ declare class UpdateWebhookConfigurationRequest { 'authentication'?: CreateWebhookConfigurationRequestAuthentication; 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; 'storage_destination'?: CreateWebhookConfigurationRequestStorageDestination; + /** + * Additional headers as an array of key-value pairs. Example: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -18211,9 +19381,57 @@ declare class UserGroupResponse { */ 'visibility': UserGroupResponseVisibilityEnum; /** - * List of roles assgined to the user + * List of roles assgined to the user + */ + 'roles'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UserGroupResponseParentTypeEnum = "USER" | "GROUP"; +type UserGroupResponseTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type UserGroupResponseVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). +*/ +declare class UserParameterOptions { + 'objects'?: Array | null; + /** + * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` + */ + 'runtime_filters'?: Array | null; + /** + * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + */ + 'runtime_sorts'?: Array | null; + /** + * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` */ - 'roles'?: Array | null; + 'parameters'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -18229,9 +19447,6 @@ declare class UserGroupResponse { }[]; constructor(); } -type UserGroupResponseParentTypeEnum = "USER" | "GROUP"; -type UserGroupResponseTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; -type UserGroupResponseVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; /** * ThoughtSpot Public REST API @@ -18244,24 +19459,19 @@ type UserGroupResponseVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). -*/ -declare class UserParameterOptions { - 'objects'?: Array | null; +declare class ValidateCommunicationChannelRequest { /** - * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` + * Type of communication channel to validate (e.g., WEBHOOK). */ - 'runtime_filters'?: Array | null; + 'channel_type': ValidateCommunicationChannelRequestChannelTypeEnum; /** - * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + * Unique identifier or name for the communication channel. */ - 'runtime_sorts'?: Array | null; + 'channel_identifier': string; /** - * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` + * Event type to validate for this channel. */ - 'parameters'?: Array | null; + 'event_type': ValidateCommunicationChannelRequestEventTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -18277,6 +19487,8 @@ declare class UserParameterOptions { }[]; constructor(); } +type ValidateCommunicationChannelRequestChannelTypeEnum = "WEBHOOK"; +type ValidateCommunicationChannelRequestEventTypeEnum = "LIVEBOARD_SCHEDULE"; /** * ThoughtSpot Public REST API @@ -18368,7 +19580,7 @@ declare class VariableValue { */ 'org_identifier': string; /** - * Principal type + * Type of principal to which this value applies. Use USER to assign the value to a specific user, or USER_GROUP to assign it to a group. */ 'principal_type'?: VariableValuePrincipalTypeEnum | null; /** @@ -18451,7 +19663,7 @@ declare class Variable { }[]; constructor(); } -type VariableVariableTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE"; +type VariableVariableTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE" | "USER_PROPERTY"; /** * ThoughtSpot Public REST API @@ -18677,6 +19889,45 @@ declare class WebhookDeleteFailure { constructor(); } +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Key-value pair for additional webhook headers. +*/ +declare class WebhookKeyValuePair { + /** + * Header name. + */ + 'key': string; + /** + * Header value. + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -18836,6 +20087,10 @@ declare class WebhookResponse { 'authentication'?: WebhookAuthentication; 'signature_verification'?: WebhookSignatureVerification; /** + * Additional headers as an array of key-value pairs. Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array | null; + /** * Creation time of the webhook configuration in milliseconds. */ 'creation_time_in_millis': number; @@ -19267,59 +20522,59 @@ declare class RequiredError extends Error { */ declare class AIApiRequestFactory extends BaseAPIRequestFactory { /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; @@ -19537,6 +20792,67 @@ declare class AuthenticationApiResponseProcessor { validateToken(response: ResponseContext): Promise; } +/** + * no description + */ +declare class CollectionsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise; +} +declare class CollectionsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + createCollection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCollection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCollection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCollections + * @throws ApiException if the response code was not in [200, 299] + */ + searchCollections(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + updateCollection(response: ResponseContext): Promise; +} + /** * no description */ @@ -19603,7 +20919,7 @@ declare class ConnectionConfigurationsApiResponseProcessor { */ declare class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise; @@ -20175,6 +21491,27 @@ declare class GroupsApiResponseProcessor { updateUserGroup(response: ResponseContext): Promise; } +/** + * no description + */ +declare class JobsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise; +} +declare class JobsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + searchChannelHistory(response: ResponseContext): Promise; +} + /** * no description */ @@ -20251,10 +21588,15 @@ declare class MetadataApiRequestFactory extends BaseAPIRequestFactory { */ importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Promise; /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise; /** * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. * @param searchMetadataRequest @@ -20365,6 +21707,14 @@ declare class MetadataApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ parameterizeMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadataFields + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadataFields(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -20795,6 +22145,11 @@ declare class SystemApiRequestFactory extends BaseAPIRequestFactory { * @param updateSystemConfigRequest */ updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise; } declare class SystemApiResponseProcessor { /** @@ -20861,6 +22216,14 @@ declare class SystemApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ updateSystemConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + validateCommunicationChannel(response: ResponseContext): Promise; } /** @@ -21005,7 +22368,7 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; @@ -21014,13 +22377,18 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { * @param createCalendarRequest */ createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. * @param createConfigRequest */ createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Promise; /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise; @@ -21030,7 +22398,7 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; @@ -21127,6 +22495,11 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { * @param calendarIdentifier Unique ID or name of the Calendar. */ deleteCalendar(calendarIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param deleteConfigRequest @@ -21203,10 +22576,15 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise; /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise; /** * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. * @param deleteWebhookConfigurationsRequest @@ -21321,7 +22699,7 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; @@ -21331,7 +22709,7 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise; @@ -21341,7 +22719,7 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; @@ -21392,17 +22770,28 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Promise; /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise; /** * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. * @param publishMetadataRequest */ publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Promise; /** - * Version: 10.7.0.cl or later + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise; + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; @@ -21433,6 +22822,16 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { * @param searchCalendarsRequest */ searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. * @param searchCommitsRequest @@ -21519,24 +22918,24 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise; @@ -21546,7 +22945,7 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; @@ -21571,6 +22970,12 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { * @param updateCalendarRequest */ updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise; /** * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups * @param updateColumnSecurityRulesRequest @@ -21682,7 +23087,7 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; @@ -21692,6 +23097,11 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { * @param updateWebhookConfigurationRequest */ updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise; /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -21804,6 +23214,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ createCalendar(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + createCollection(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -21964,6 +23382,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ deleteCalendar(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCollection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCollection(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -22092,6 +23518,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ deleteVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariables(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -22404,6 +23838,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ parameterizeMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadataFields + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadataFields(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -22412,6 +23854,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ publishMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to putVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + putVariableValues(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -22460,6 +23910,22 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ searchCalendars(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + searchChannelHistory(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCollections + * @throws ApiException if the response code was not in [200, 299] + */ + searchCollections(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -22676,6 +24142,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ updateCalendar(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + updateCollection(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -22836,6 +24310,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ updateWebhookConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + validateCommunicationChannel(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -23011,10 +24493,21 @@ declare class VariableApiRequestFactory extends BaseAPIRequestFactory { */ createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise; + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise; /** * Search variables Version: 10.14.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier * @param searchVariablesRequest @@ -23027,7 +24520,7 @@ declare class VariableApiRequestFactory extends BaseAPIRequestFactory { */ updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; @@ -23049,6 +24542,22 @@ declare class VariableApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ deleteVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariables(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to putVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + putVariableValues(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -23266,59 +24775,59 @@ declare class PromiseAIApi { private api; constructor(configuration: Configuration, requestFactory?: AIApiRequestFactory, responseProcessor?: AIApiResponseProcessor); /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise>; /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; @@ -23371,6 +24880,32 @@ declare class PromiseAuthenticationApi { validateToken(validateTokenRequest: ValidateTokenRequest, _options?: Configuration): Promise; } +declare class PromiseCollectionsApi { + private api; + constructor(configuration: Configuration, requestFactory?: CollectionsApiRequestFactory, responseProcessor?: CollectionsApiResponseProcessor); + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise; +} + declare class PromiseConnectionConfigurationsApi { private api; constructor(configuration: Configuration, requestFactory?: ConnectionConfigurationsApiRequestFactory, responseProcessor?: ConnectionConfigurationsApiResponseProcessor); @@ -23401,7 +24936,7 @@ declare class PromiseConnectionsApi { private api; constructor(configuration: Configuration, requestFactory?: ConnectionsApiRequestFactory, responseProcessor?: ConnectionsApiResponseProcessor); /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise; @@ -23649,6 +25184,16 @@ declare class PromiseGroupsApi { updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise; } +declare class PromiseJobsApi { + private api; + constructor(configuration: Configuration, requestFactory?: JobsApiRequestFactory, responseProcessor?: JobsApiResponseProcessor); + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise; +} + declare class PromiseLogApi { private api; constructor(configuration: Configuration, requestFactory?: LogApiRequestFactory, responseProcessor?: LogApiResponseProcessor); @@ -23713,10 +25258,15 @@ declare class PromiseMetadataApi { */ importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Promise; /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise; /** * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. * @param searchMetadataRequest @@ -23927,6 +25477,11 @@ declare class PromiseSystemApi { * @param updateSystemConfigRequest */ updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise; } declare class PromiseTagsApi { @@ -24019,7 +25574,7 @@ declare class PromiseThoughtSpotRestApi { */ copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; @@ -24028,13 +25583,18 @@ declare class PromiseThoughtSpotRestApi { * @param createCalendarRequest */ createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. * @param createConfigRequest */ createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Promise; /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise; @@ -24044,7 +25604,7 @@ declare class PromiseThoughtSpotRestApi { */ createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; @@ -24141,6 +25701,11 @@ declare class PromiseThoughtSpotRestApi { * @param calendarIdentifier Unique ID or name of the Calendar. */ deleteCalendar(calendarIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param deleteConfigRequest @@ -24217,10 +25782,15 @@ declare class PromiseThoughtSpotRestApi { */ deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise; /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise; /** * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. * @param deleteWebhookConfigurationsRequest @@ -24335,7 +25905,7 @@ declare class PromiseThoughtSpotRestApi { */ getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; @@ -24345,7 +25915,7 @@ declare class PromiseThoughtSpotRestApi { */ getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise; @@ -24355,7 +25925,7 @@ declare class PromiseThoughtSpotRestApi { */ getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; @@ -24406,17 +25976,28 @@ declare class PromiseThoughtSpotRestApi { */ manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Promise; /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise; /** * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. * @param publishMetadataRequest */ publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Promise; /** - * Version: 10.7.0.cl or later + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise; + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; @@ -24447,6 +26028,16 @@ declare class PromiseThoughtSpotRestApi { * @param searchCalendarsRequest */ searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Promise>; + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. * @param searchCommitsRequest @@ -24533,24 +26124,24 @@ declare class PromiseThoughtSpotRestApi { */ searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise>; /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise; @@ -24560,7 +26151,7 @@ declare class PromiseThoughtSpotRestApi { */ shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; @@ -24585,6 +26176,12 @@ declare class PromiseThoughtSpotRestApi { * @param updateCalendarRequest */ updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise; /** * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups * @param updateColumnSecurityRulesRequest @@ -24696,7 +26293,7 @@ declare class PromiseThoughtSpotRestApi { */ updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; @@ -24706,6 +26303,11 @@ declare class PromiseThoughtSpotRestApi { * @param updateWebhookConfigurationRequest */ updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise; /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -24787,10 +26389,21 @@ declare class PromiseVariableApi { */ createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise; + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise; /** * Search variables Version: 10.14.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier * @param searchVariablesRequest @@ -24803,7 +26416,7 @@ declare class PromiseVariableApi { */ updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; @@ -24932,4 +26545,4 @@ declare const createBearerAuthenticationConfig: (thoughtSpotHost: string, paramO */ declare const createBasicConfig: (thoughtSpotHost: string, options?: ConfigurationOptions) => Configuration; -export { PromiseAIApi as AIApi, AIContext, APIKey, APIKeyInput, AccessToken, ActionConfig, ActionConfigInput, ActionConfigInputCreate, ActionConfigInputCreatePositionEnum, ActionConfigInputPositionEnum, ActionDetails, ActionDetailsInput, ActionDetailsInputCreate, ActivateUserRequest, AgentConversation, AnswerContent, AnswerContextInput, AnswerDataResponse, ApiException, ApiKeyConfiguration, AssignChangeAuthorRequest, AssignTagRequest, AssociateMetadataInput, AssociateMetadataInputCreate, AssociateMetadataInputCreateTypeEnum, AssociateMetadataInputTypeEnum, AuthMethods, AuthMethodsConfiguration, Authentication, PromiseAuthenticationApi as AuthenticationApi, AuthenticationInput, Author, AuthorMetadataTypeInput, AuthorMetadataTypeInputTypeEnum, AuthorType, AwsS3Config, AwsS3ConfigInput, BaseServerConfiguration, BasicAuth, BasicAuthInput, BearerAuthAuthentication, CALLBACK, CALLBACKInput, CALLBACKInputMandatory, CalendarResponse, ChangeUserPasswordRequest, ClusterNonEmbedAccess, ClusterNonEmbedAccessInput, Column, ColumnSecurityRule, ColumnSecurityRuleColumn, ColumnSecurityRuleGroup, ColumnSecurityRuleGroupOperation, ColumnSecurityRuleGroupOperationOperationEnum, ColumnSecurityRuleResponse, ColumnSecurityRuleSourceTable, ColumnSecurityRuleTableInput, ColumnSecurityRuleUpdate, CommitBranchRequest, CommitFileType, CommitHistoryResponse, CommitResponse, CommiterType, CommunicationChannelPreferencesResponse, Configuration, ConfigureCommunicationChannelPreferencesRequest, ConfigureSecuritySettingsRequest, ConfigureSecuritySettingsRequestClusterPreferences, ConnectionConfigurationResponse, ConnectionConfigurationResponseDataWarehouseTypeEnum, ConnectionConfigurationResponsePolicyProcessesEnum, ConnectionConfigurationResponsePolicyTypeEnum, ConnectionConfigurationSearchRequest, ConnectionConfigurationSearchRequestPolicyTypeEnum, PromiseConnectionConfigurationsApi as ConnectionConfigurationsApi, ConnectionInput, PromiseConnectionsApi as ConnectionsApi, ContextPayloadV2Input, ContextPayloadV2InputTypeEnum, Conversation, ConversationSettingsInput, ConvertWorksheetToModelRequest, CopyObjectRequest, CopyObjectRequestTypeEnum, CreateAgentConversationRequest, CreateAgentConversationRequestConversationSettings, CreateAgentConversationRequestMetadataContext, CreateAgentConversationRequestMetadataContextTypeEnum, CreateCalendarRequest, CreateCalendarRequestCalendarTypeEnum, CreateCalendarRequestCreationMethodEnum, CreateCalendarRequestMonthOffsetEnum, CreateCalendarRequestStartDayOfWeekEnum, CreateCalendarRequestTableReference, CreateConfigRequest, CreateConnectionConfigurationRequest, CreateConnectionConfigurationRequestAuthenticationTypeEnum, CreateConnectionConfigurationRequestPolicyProcessOptions, CreateConnectionConfigurationRequestPolicyProcessesEnum, CreateConnectionConfigurationRequestPolicyTypeEnum, CreateConnectionRequest, CreateConnectionRequestDataWarehouseTypeEnum, CreateConnectionResponse, CreateConnectionResponseDataWarehouseTypeEnum, CreateConversationRequest, CreateCustomActionRequest, CreateCustomActionRequestActionDetails, CreateCustomActionRequestDefaultActionConfig, CreateEmailCustomizationRequest, CreateEmailCustomizationRequestTemplateProperties, CreateEmailCustomizationResponse, CreateOrgRequest, CreateRoleRequest, CreateRoleRequestPrivilegesEnum, CreateScheduleRequest, CreateScheduleRequestFileFormatEnum, CreateScheduleRequestFrequency, CreateScheduleRequestLiveboardOptions, CreateScheduleRequestMetadataTypeEnum, CreateScheduleRequestPdfOptions, CreateScheduleRequestPdfOptionsPageSizeEnum, CreateScheduleRequestRecipientDetails, CreateScheduleRequestTimeZoneEnum, CreateTagRequest, CreateUserGroupRequest, CreateUserGroupRequestPrivilegesEnum, CreateUserGroupRequestTypeEnum, CreateUserGroupRequestVisibilityEnum, CreateUserRequest, CreateUserRequestAccountStatusEnum, CreateUserRequestAccountTypeEnum, CreateUserRequestPreferredLocaleEnum, CreateUserRequestVisibilityEnum, CreateVariableRequest, CreateVariableRequestDataTypeEnum, CreateVariableRequestTypeEnum, CreateWebhookConfigurationRequest, CreateWebhookConfigurationRequestAuthentication, CreateWebhookConfigurationRequestEventsEnum, CreateWebhookConfigurationRequestSignatureVerification, CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum, CreateWebhookConfigurationRequestSignatureVerificationTypeEnum, CreateWebhookConfigurationRequestStorageDestination, CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum, CronExpression, CronExpressionInput, CspSettings, CspSettingsInput, PromiseCustomActionApi as CustomActionApi, CustomActionMetadataTypeInput, CustomActionMetadataTypeInputTypeEnum, PromiseCustomCalendarsApi as CustomCalendarsApi, PromiseDBTApi as DBTApi, PromiseDataApi as DataApi, DataSource, DataSourceContextInput, DataWarehouseObjectInput, DataWarehouseObjects, Database, DbtSearchResponse, DeactivateUserRequest, DefaultActionConfig, DefaultActionConfigInput, DefaultActionConfigInputCreate, DefaultActionConfigSearchInput, DeleteConfigRequest, DeleteConnectionConfigurationRequest, DeleteConnectionRequest, DeleteMetadataRequest, DeleteMetadataTypeInput, DeleteMetadataTypeInputTypeEnum, DeleteOrgEmailCustomizationRequest, DeleteWebhookConfigurationsRequest, DeployCommitRequest, DeployCommitRequestDeployPolicyEnum, DeployCommitRequestDeployTypeEnum, DeployResponse, PromiseEmailCustomizationApi as EmailCustomizationApi, EntityHeader, ErrorResponse, EurekaDataSourceSuggestionResponse, EurekaDecomposeQueryResponse, EurekaGetNLInstructionsResponse, EurekaGetRelevantQuestionsResponse, EurekaLLMDecomposeQueryResponse, EurekaLLMSuggestedQuery, EurekaRelevantQuestion, EurekaSetNLInstructionsResponse, EventChannelConfig, EventChannelConfigChannelsEnum, EventChannelConfigEventTypeEnum, EventChannelConfigInput, EventChannelConfigInputChannelsEnum, EventChannelConfigInputEventTypeEnum, ExcludeMetadataListItemInput, ExcludeMetadataListItemInputTypeEnum, ExportAnswerReportRequest, ExportAnswerReportRequestFileFormatEnum, ExportAnswerReportRequestRegionalSettings, ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum, ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsUserLocaleEnum, ExportLiveboardReportRequest, ExportLiveboardReportRequestFileFormatEnum, ExportLiveboardReportRequestPdfOptions, ExportLiveboardReportRequestPdfOptionsPageOrientationEnum, ExportLiveboardReportRequestPngOptions, ExportMetadataTMLBatchedRequest, ExportMetadataTMLBatchedRequestEdocFormatEnum, ExportMetadataTMLBatchedRequestMetadataTypeEnum, ExportMetadataTMLRequest, ExportMetadataTMLRequestEdocFormatEnum, ExportMetadataTMLRequestExportOptions, ExportMetadataTMLRequestExportSchemaVersionEnum, ExportMetadataTypeInput, ExportMetadataTypeInputTypeEnum, ExportOptions, ExternalTableInput, FavoriteMetadataInput, FavoriteMetadataInputTypeEnum, FavoriteMetadataItem, FavoriteMetadataItemTypeEnum, FavoriteObjectOptionsInput, FetchAnswerDataRequest, FetchAnswerDataRequestDataFormatEnum, FetchAnswerSqlQueryRequest, FetchAsyncImportTaskStatusRequest, FetchAsyncImportTaskStatusRequestTaskStatusEnum, FetchColumnSecurityRulesRequest, FetchConnectionDiffStatusResponse, FetchLiveboardDataRequest, FetchLiveboardDataRequestDataFormatEnum, FetchLiveboardSqlQueryRequest, FetchLogsRequest, FetchLogsRequestLogTypeEnum, FetchObjectPrivilegesRequest, FetchPermissionsOfPrincipalsRequest, FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum, FetchPermissionsOnMetadataRequest, FilterRules, FilterRulesOperatorEnum, ForceLogoutUsersRequest, Frequency, FrequencyInput, GenerateCSVRequest, GenerateCSVRequestCalendarTypeEnum, GenerateCSVRequestMonthOffsetEnum, GenerateCSVRequestStartDayOfWeekEnum, GenericInfo, GetAsyncImportStatusResponse, GetCustomAccessTokenRequest, GetCustomAccessTokenRequestPersistOptionEnum, GetDataSourceSuggestionsRequest, GetFullAccessTokenRequest, GetFullAccessTokenRequestUserParameters, GetNLInstructionsRequest, GetObjectAccessTokenRequest, GetRelevantQuestionsRequest, GetRelevantQuestionsRequestAiContext, GetRelevantQuestionsRequestMetadataContext, GetTokenResponse, GroupInfo, GroupObject, PromiseGroupsApi as GroupsApi, GroupsImportListInput, GroupsImportListInputPrivilegesEnum, GroupsImportListInputTypeEnum, GroupsImportListInputVisibilityEnum, HeaderAttributeInput, HeaderUpdateInput, HeaderUpdateInputTypeEnum, HttpBasicConfiguration, HttpBearerConfiguration, HttpException, HttpFile, HttpLibrary, HttpMethod, ImportEPackAsyncTaskStatus, ImportEPackAsyncTaskStatusImportPolicyEnum, ImportEPackAsyncTaskStatusTaskStatusEnum, ImportMetadataTMLAsyncRequest, ImportMetadataTMLAsyncRequestImportPolicyEnum, ImportMetadataTMLRequest, ImportMetadataTMLRequestImportPolicyEnum, ImportUser, ImportUserAccountStatusEnum, ImportUserAccountTypeEnum, ImportUserGroupsRequest, ImportUserGroupsResponse, ImportUserPreferredLocaleEnum, ImportUserType, ImportUserVisibilityEnum, ImportUsersRequest, ImportUsersResponse, InputEurekaNLSRequest, IsomorphicFetchHttpLibrary, JWTMetadataObject, JWTMetadataObjectTypeEnum, JWTParameter, JWTUserOptions, JWTUserOptionsFull, LBContextInput, LiveboardContent, LiveboardDataResponse, LiveboardOptions, LiveboardOptionsInput, PromiseLogApi as LogApi, LogResponse, LoginRequest, ManageObjectPrivilegeRequest, ManageObjectPrivilegeRequestMetadataTypeEnum, ManageObjectPrivilegeRequestObjectPrivilegeTypesEnum, ManageObjectPrivilegeRequestOperationEnum, PromiseMetadataApi as MetadataApi, MetadataAssociationItem, MetadataContext, MetadataInput, MetadataInputTypeEnum, MetadataListItemInput, MetadataListItemInputSubtypesEnum, MetadataListItemInputTypeEnum, MetadataObject, MetadataObjectTypeEnum, MetadataResponse, MetadataResponseTypeEnum, MetadataSearchResponse, MetadataSearchResponseMetadataTypeEnum, MetadataSearchSortOptions, MetadataSearchSortOptionsFieldNameEnum, MetadataSearchSortOptionsOrderEnum, PromiseMiddleware as Middleware, ModelTableList, NLInstructionsInfo, NLInstructionsInfoInput, NLInstructionsInfoInputScopeEnum, NLInstructionsInfoScopeEnum, OAuth2Configuration, ObjectIDAndName, ObjectPrivilegesMetadataInput, ObjectPrivilegesMetadataInputTypeEnum, ObjectPrivilegesOfMetadataResponse, Org, OrgChannelConfigInput, OrgChannelConfigInputOperationEnum, OrgChannelConfigInputResetEventsEnum, OrgChannelConfigResponse, OrgDetails, OrgInfo, OrgNonEmbedAccess, OrgNonEmbedAccessInput, OrgPreferenceSearchCriteriaInput, OrgPreferenceSearchCriteriaInputEventTypesEnum, OrgResponse, OrgResponseStatusEnum, OrgResponseVisibilityEnum, OrgType, PromiseOrgsApi as OrgsApi, ParameterValues, ParameterizeMetadataRequest, ParameterizeMetadataRequestFieldTypeEnum, ParameterizeMetadataRequestMetadataTypeEnum, ParametersListItem, ParametersListItemInput, PdfOptions, PdfOptionsInput, PdfOptionsInputPageOrientationEnum, PdfOptionsPageSizeEnum, PermissionInput, PermissionInputShareModeEnum, PermissionOfMetadataResponse, PermissionOfPrincipalsResponse, PermissionsMetadataTypeInput, PermissionsMetadataTypeInputTypeEnum, PngOptionsInput, PolicyProcessOptions, PolicyProcessOptionsInput, PrincipalsInput, PrincipalsInputTypeEnum, PrincipalsListItem, PrincipalsListItemInput, PromiseHttpLibrary, PublishMetadataListItem, PublishMetadataListItemTypeEnum, PublishMetadataRequest, QueryGetDecomposedQueryRequest, QueryGetDecomposedQueryRequestNlsRequest, RecipientDetails, RecipientDetailsInput, RegionalSettingsInput, RegionalSettingsInputCurrencyFormatEnum, RegionalSettingsInputDateFormatLocaleEnum, RegionalSettingsInputNumberFormatLocaleEnum, RegionalSettingsInputUserLocaleEnum, RepoConfigObject, PromiseReportsApi as ReportsApi, RequestBody, RequestContext, RequiredError, ResetUserPasswordRequest, ResponseActivationURL, ResponseBody, ResponseContext, ResponseCopyObject, ResponseCustomAction, ResponseFailedEntities, ResponseFailedEntity, ResponseIncompleteEntities, ResponseIncompleteEntity, ResponseMessage, ResponseMessageMessageTypeEnum, ResponseMessageVisualizationTypeEnum, ResponsePostUpgradeFailedEntities, ResponsePostUpgradeFailedEntity, ResponseSchedule, ResponseScheduleRun, ResponseSuccessfulEntities, ResponseSuccessfulEntity, ResponseWorksheetToModelConversion, RevertCommitRequest, RevertCommitRequestRevertPolicyEnum, RevertResponse, RevertedMetadata, RevokeRefreshTokensRequest, RevokeRefreshTokensResponse, RevokeTokenRequest, RiseGQLArgWrapper, RiseSetter, Role, RoleResponse, RoleResponsePermissionEnum, RoleResponsePrivilegesEnum, PromiseRolesApi as RolesApi, RuntimeFilter, RuntimeFilters, RuntimeFiltersOperatorEnum, RuntimeParamOverride, RuntimeParameters, RuntimeSort, RuntimeSorts, RuntimeSortsOrderEnum, ScheduleHistoryRunsOptionsInput, PromiseSchedulesApi as SchedulesApi, SchedulesPdfOptionsInput, SchedulesPdfOptionsInputPageSizeEnum, SchemaObject, Scope, ScriptSrcUrls, ScriptSrcUrlsInput, SearchCalendarsRequest, SearchCalendarsRequestSortOptions, SearchCalendarsRequestSortOptionsFieldNameEnum, SearchCalendarsRequestSortOptionsOrderEnum, SearchCommitsRequest, SearchCommitsRequestMetadataTypeEnum, SearchCommunicationChannelPreferencesRequest, SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum, SearchConfigRequest, SearchConnectionRequest, SearchConnectionRequestAuthenticationTypeEnum, SearchConnectionRequestDataWarehouseObjectTypeEnum, SearchConnectionRequestDataWarehouseTypesEnum, SearchConnectionRequestSortOptions, SearchConnectionRequestSortOptionsFieldNameEnum, SearchConnectionRequestSortOptionsOrderEnum, SearchConnectionResponse, SearchConnectionResponseDataWarehouseTypeEnum, SearchCustomActionsRequest, SearchCustomActionsRequestDefaultActionConfig, SearchCustomActionsRequestTypeEnum, SearchDataRequest, SearchDataRequestDataFormatEnum, SearchDataResponse, SearchEmailCustomizationRequest, SearchMetadataRequest, SearchMetadataRequestDependentObjectVersionEnum, SearchMetadataRequestFavoriteObjectOptions, SearchMetadataRequestLiveboardResponseVersionEnum, SearchMetadataRequestSortOptions, SearchMetadataRequestSortOptionsFieldNameEnum, SearchMetadataRequestSortOptionsOrderEnum, SearchOrgsRequest, SearchOrgsRequestStatusEnum, SearchOrgsRequestVisibilityEnum, SearchRoleResponse, SearchRoleResponsePermissionEnum, SearchRoleResponsePrivilegesEnum, SearchRolesRequest, SearchRolesRequestPermissionsEnum, SearchRolesRequestPrivilegesEnum, SearchSchedulesRequest, SearchSchedulesRequestHistoryRunsOptions, SearchSchedulesRequestSortOptions, SearchSecuritySettingsRequest, SearchSecuritySettingsRequestScopeEnum, SearchTagsRequest, SearchUserGroupsRequest, SearchUserGroupsRequestPrivilegesEnum, SearchUserGroupsRequestSortOptions, SearchUserGroupsRequestSortOptionsFieldNameEnum, SearchUserGroupsRequestSortOptionsOrderEnum, SearchUserGroupsRequestTypeEnum, SearchUserGroupsRequestVisibilityEnum, SearchUsersRequest, SearchUsersRequestAccountStatusEnum, SearchUsersRequestAccountTypeEnum, SearchUsersRequestPrivilegesEnum, SearchUsersRequestSortOptions, SearchUsersRequestSortOptionsFieldNameEnum, SearchUsersRequestSortOptionsOrderEnum, SearchUsersRequestVisibilityEnum, SearchVariablesRequest, SearchVariablesRequestResponseContentEnum, SearchWebhookConfigurationsRequest, SearchWebhookConfigurationsRequestEventTypeEnum, SearchWebhookConfigurationsRequestSortOptions, SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum, SearchWebhookConfigurationsRequestSortOptionsOrderEnum, PromiseSecurityApi as SecurityApi, SecurityAuthentication, SecuritySettingsClusterPreferences, SecuritySettingsClusterPreferencesInput, SecuritySettingsOrgDetails, SecuritySettingsOrgPreferences, SecuritySettingsOrgPreferencesInput, SecuritySettingsResponse, SelfDecodingBody, SendAgentMessageRequest, SendAgentMessageResponse, SendAgentMessageStreamingRequest, SendMessageRequest, ServerConfiguration, SetNLInstructionsRequest, ShareMetadataRequest, ShareMetadataRequestMetadataTypeEnum, ShareMetadataTypeInput, ShareMetadataTypeInputTypeEnum, SharePermissionsInput, SharePermissionsInputShareModeEnum, SingleAnswerRequest, SortOption, SortOptionFieldNameEnum, SortOptionInput, SortOptionInputFieldNameEnum, SortOptionInputOrderEnum, SortOptionOrderEnum, SortOptions, SortOptionsFieldNameEnum, SortOptionsOrderEnum, SortingOptions, SqlQuery, SqlQueryResponse, SqlQueryResponseMetadataTypeEnum, StorageConfig, StorageConfigInput, StorageDestination, StorageDestinationInput, StorageDestinationInputStorageTypeEnum, StorageDestinationStorageTypeEnum, PromiseSystemApi as SystemApi, SystemConfig, SystemInfo, SystemOverrideInfo, Table, Tag, TagMetadataTypeInput, TagMetadataTypeInputTypeEnum, PromiseTagsApi as TagsApi, TemplatePropertiesInputCreate, PromiseThoughtSpotRestApi as ThoughtSpotRestApi, Token, TokenAccessScopeObject, TokenAccessScopeObjectTypeEnum, TokenProvider, TokenValidationResponse, URL, URLInput, URLInputMandatory, UnassignTagRequest, UnparameterizeMetadataRequest, UnparameterizeMetadataRequestFieldTypeEnum, UnparameterizeMetadataRequestMetadataTypeEnum, UnpublishMetadataRequest, UpdateCalendarRequest, UpdateCalendarRequestCalendarTypeEnum, UpdateCalendarRequestMonthOffsetEnum, UpdateCalendarRequestStartDayOfWeekEnum, UpdateCalendarRequestTableReference, UpdateCalendarRequestUpdateMethodEnum, UpdateColumnSecurityRulesRequest, UpdateConfigRequest, UpdateConnectionConfigurationRequest, UpdateConnectionConfigurationRequestAuthenticationTypeEnum, UpdateConnectionConfigurationRequestPolicyProcessesEnum, UpdateConnectionConfigurationRequestPolicyTypeEnum, UpdateConnectionRequest, UpdateConnectionV2Request, UpdateCustomActionRequest, UpdateCustomActionRequestActionDetails, UpdateCustomActionRequestDefaultActionConfig, UpdateCustomActionRequestOperationEnum, UpdateEmailCustomizationRequest, UpdateMetadataHeaderRequest, UpdateMetadataObjIdRequest, UpdateObjIdInput, UpdateObjIdInputTypeEnum, UpdateOrgRequest, UpdateOrgRequestOperationEnum, UpdateRoleRequest, UpdateRoleRequestPrivilegesEnum, UpdateScheduleRequest, UpdateScheduleRequestFileFormatEnum, UpdateScheduleRequestFrequency, UpdateScheduleRequestLiveboardOptions, UpdateScheduleRequestMetadataTypeEnum, UpdateScheduleRequestPdfOptions, UpdateScheduleRequestPdfOptionsPageSizeEnum, UpdateScheduleRequestRecipientDetails, UpdateScheduleRequestStatusEnum, UpdateScheduleRequestTimeZoneEnum, UpdateSystemConfigRequest, UpdateTagRequest, UpdateUserGroupRequest, UpdateUserGroupRequestOperationEnum, UpdateUserGroupRequestPrivilegesEnum, UpdateUserGroupRequestTypeEnum, UpdateUserGroupRequestVisibilityEnum, UpdateUserRequest, UpdateUserRequestAccountStatusEnum, UpdateUserRequestAccountTypeEnum, UpdateUserRequestOperationEnum, UpdateUserRequestPreferredLocaleEnum, UpdateUserRequestVisibilityEnum, UpdateVariableRequest, UpdateVariableValuesRequest, UpdateWebhookConfigurationRequest, UpdateWebhookConfigurationRequestEventsEnum, User, UserAccountStatusEnum, UserAccountTypeEnum, UserGroup, UserGroupResponse, UserGroupResponseParentTypeEnum, UserGroupResponseTypeEnum, UserGroupResponseVisibilityEnum, UserInfo, UserObject, UserObjectTypeEnum, UserParameterOptions, UserParentTypeEnum, UserPrincipal, UserVisibilityEnum, PromiseUsersApi as UsersApi, ValidateMergeRequest, ValidateTokenRequest, ValueScopeInput, ValueScopeInputPrincipalTypeEnum, Variable, PromiseVariableApi as VariableApi, VariableDetailInput, VariableDetailInputTypeEnum, VariableUpdateAssignmentInput, VariableUpdateAssignmentInputOperationEnum, VariableUpdateScopeInput, VariableUpdateScopeInputPrincipalTypeEnum, VariableValue, VariableValuePrincipalTypeEnum, VariableValues, VariableVariableTypeEnum, PromiseVersionControlApi as VersionControlApi, WebhookAuthApiKey, WebhookAuthApiKeyInput, WebhookAuthBasicAuth, WebhookAuthBasicAuthInput, WebhookAuthOAuth2, WebhookAuthOAuth2Input, WebhookAuthentication, WebhookAuthenticationInput, WebhookDeleteFailure, WebhookDeleteResponse, WebhookOrg, WebhookPagination, WebhookResponse, WebhookResponseEventsEnum, WebhookSearchResponse, WebhookSignatureVerification, WebhookSignatureVerificationAlgorithmEnum, WebhookSignatureVerificationInput, WebhookSignatureVerificationInputAlgorithmEnum, WebhookSignatureVerificationInputTypeEnum, WebhookSignatureVerificationTypeEnum, WebhookSortOptionsInput, WebhookSortOptionsInputFieldNameEnum, WebhookSortOptionsInputOrderEnum, WebhookUser, PromiseWebhooksApi as WebhooksApi, configureAuthMethods, createBasicConfig, createBearerAuthenticationConfig, createConfiguration, server1, servers, wrapHttpLibrary }; +export { PromiseAIApi as AIApi, AIContext, APIKey, APIKeyInput, AccessToken, ActionConfig, ActionConfigInput, ActionConfigInputCreate, ActionConfigInputCreatePositionEnum, ActionConfigInputPositionEnum, ActionDetails, ActionDetailsInput, ActionDetailsInputCreate, ActivateUserRequest, AgentConversation, AnswerContent, AnswerContextInput, AnswerDataResponse, ApiException, ApiKeyConfiguration, AssignChangeAuthorRequest, AssignTagRequest, AssociateMetadataInput, AssociateMetadataInputCreate, AssociateMetadataInputCreateTypeEnum, AssociateMetadataInputTypeEnum, AuthMethods, AuthMethodsConfiguration, Authentication, PromiseAuthenticationApi as AuthenticationApi, AuthenticationInput, Author, AuthorMetadataTypeInput, AuthorMetadataTypeInputTypeEnum, AuthorType, AwsS3Config, AwsS3ConfigInput, BaseServerConfiguration, BasicAuth, BasicAuthInput, BearerAuthAuthentication, CALLBACK, CALLBACKInput, CALLBACKInputMandatory, CalendarResponse, ChangeUserPasswordRequest, ChannelHistoryEventInfo, ChannelHistoryEventInfoTypeEnum, ChannelHistoryEventInput, ChannelHistoryEventInputTypeEnum, ChannelHistoryJob, ChannelHistoryJobStatusEnum, ChannelValidationAwsS3Info, ChannelValidationDetail, ChannelValidationDetailStatusEnum, ChannelValidationDetailValidationStepEnum, ClusterNonEmbedAccess, ClusterNonEmbedAccessInput, Collection, CollectionDeleteResponse, CollectionDeleteTypeIdentifiers, CollectionEntityIdentifier, CollectionMetadataInput, CollectionMetadataInputTypeEnum, CollectionMetadataItem, CollectionSearchResponse, PromiseCollectionsApi as CollectionsApi, Column, ColumnSecurityRule, ColumnSecurityRuleColumn, ColumnSecurityRuleGroup, ColumnSecurityRuleGroupOperation, ColumnSecurityRuleGroupOperationOperationEnum, ColumnSecurityRuleResponse, ColumnSecurityRuleSourceTable, ColumnSecurityRuleTableInput, ColumnSecurityRuleUpdate, CommitBranchRequest, CommitFileType, CommitHistoryResponse, CommitResponse, CommiterType, CommunicationChannelPreferencesResponse, CommunicationChannelValidateResponse, CommunicationChannelValidateResponseChannelTypeEnum, CommunicationChannelValidateResponseEventTypeEnum, CommunicationChannelValidateResponseResultCodeEnum, Configuration, ConfigureCommunicationChannelPreferencesRequest, ConfigureSecuritySettingsRequest, ConfigureSecuritySettingsRequestClusterPreferences, ConnectionConfigurationResponse, ConnectionConfigurationResponseDataWarehouseTypeEnum, ConnectionConfigurationResponsePolicyProcessesEnum, ConnectionConfigurationResponsePolicyTypeEnum, ConnectionConfigurationSearchRequest, ConnectionConfigurationSearchRequestPolicyTypeEnum, PromiseConnectionConfigurationsApi as ConnectionConfigurationsApi, ConnectionInput, PromiseConnectionsApi as ConnectionsApi, ContextPayloadV2Input, ContextPayloadV2InputTypeEnum, Conversation, ConversationSettingsInput, ConvertWorksheetToModelRequest, CopyObjectRequest, CopyObjectRequestTypeEnum, CreateAgentConversationRequest, CreateAgentConversationRequestConversationSettings, CreateAgentConversationRequestMetadataContext, CreateAgentConversationRequestMetadataContextTypeEnum, CreateCalendarRequest, CreateCalendarRequestCalendarTypeEnum, CreateCalendarRequestCreationMethodEnum, CreateCalendarRequestMonthOffsetEnum, CreateCalendarRequestStartDayOfWeekEnum, CreateCalendarRequestTableReference, CreateCollectionRequest, CreateConfigRequest, CreateConnectionConfigurationRequest, CreateConnectionConfigurationRequestAuthenticationTypeEnum, CreateConnectionConfigurationRequestPolicyProcessOptions, CreateConnectionConfigurationRequestPolicyProcessesEnum, CreateConnectionConfigurationRequestPolicyTypeEnum, CreateConnectionRequest, CreateConnectionRequestDataWarehouseTypeEnum, CreateConnectionResponse, CreateConnectionResponseDataWarehouseTypeEnum, CreateConversationRequest, CreateCustomActionRequest, CreateCustomActionRequestActionDetails, CreateCustomActionRequestDefaultActionConfig, CreateEmailCustomizationRequest, CreateEmailCustomizationRequestTemplateProperties, CreateEmailCustomizationResponse, CreateOrgRequest, CreateRoleRequest, CreateRoleRequestPrivilegesEnum, CreateScheduleRequest, CreateScheduleRequestFileFormatEnum, CreateScheduleRequestFrequency, CreateScheduleRequestLiveboardOptions, CreateScheduleRequestMetadataTypeEnum, CreateScheduleRequestPdfOptions, CreateScheduleRequestPdfOptionsPageSizeEnum, CreateScheduleRequestRecipientDetails, CreateScheduleRequestTimeZoneEnum, CreateTagRequest, CreateUserGroupRequest, CreateUserGroupRequestPrivilegesEnum, CreateUserGroupRequestTypeEnum, CreateUserGroupRequestVisibilityEnum, CreateUserRequest, CreateUserRequestAccountStatusEnum, CreateUserRequestAccountTypeEnum, CreateUserRequestPreferredLocaleEnum, CreateUserRequestVisibilityEnum, CreateVariableRequest, CreateVariableRequestDataTypeEnum, CreateVariableRequestTypeEnum, CreateWebhookConfigurationRequest, CreateWebhookConfigurationRequestAuthentication, CreateWebhookConfigurationRequestEventsEnum, CreateWebhookConfigurationRequestSignatureVerification, CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum, CreateWebhookConfigurationRequestSignatureVerificationTypeEnum, CreateWebhookConfigurationRequestStorageDestination, CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum, CronExpression, CronExpressionInput, CspSettings, CspSettingsInput, PromiseCustomActionApi as CustomActionApi, CustomActionMetadataTypeInput, CustomActionMetadataTypeInputTypeEnum, PromiseCustomCalendarsApi as CustomCalendarsApi, PromiseDBTApi as DBTApi, PromiseDataApi as DataApi, DataSource, DataSourceContextInput, DataWarehouseObjectInput, DataWarehouseObjects, Database, DbtSearchResponse, DeactivateUserRequest, DefaultActionConfig, DefaultActionConfigInput, DefaultActionConfigInputCreate, DefaultActionConfigSearchInput, DeleteCollectionRequest, DeleteConfigRequest, DeleteConnectionConfigurationRequest, DeleteConnectionRequest, DeleteMetadataRequest, DeleteMetadataTypeInput, DeleteMetadataTypeInputTypeEnum, DeleteOrgEmailCustomizationRequest, DeleteVariablesRequest, DeleteWebhookConfigurationsRequest, DeployCommitRequest, DeployCommitRequestDeployPolicyEnum, DeployCommitRequestDeployTypeEnum, DeployResponse, PromiseEmailCustomizationApi as EmailCustomizationApi, EntityHeader, ErrorResponse, EurekaDataSourceSuggestionResponse, EurekaDecomposeQueryResponse, EurekaGetNLInstructionsResponse, EurekaGetRelevantQuestionsResponse, EurekaLLMDecomposeQueryResponse, EurekaLLMSuggestedQuery, EurekaRelevantQuestion, EurekaSetNLInstructionsResponse, EventChannelConfig, EventChannelConfigChannelsEnum, EventChannelConfigEventTypeEnum, EventChannelConfigInput, EventChannelConfigInputChannelsEnum, EventChannelConfigInputEventTypeEnum, ExcludeMetadataListItemInput, ExcludeMetadataListItemInputTypeEnum, ExportAnswerReportRequest, ExportAnswerReportRequestFileFormatEnum, ExportAnswerReportRequestRegionalSettings, ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum, ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsUserLocaleEnum, ExportLiveboardReportRequest, ExportLiveboardReportRequestFileFormatEnum, ExportLiveboardReportRequestPdfOptions, ExportLiveboardReportRequestPdfOptionsPageOrientationEnum, ExportLiveboardReportRequestPngOptions, ExportMetadataTMLBatchedRequest, ExportMetadataTMLBatchedRequestEdocFormatEnum, ExportMetadataTMLBatchedRequestMetadataTypeEnum, ExportMetadataTMLRequest, ExportMetadataTMLRequestEdocFormatEnum, ExportMetadataTMLRequestExportOptions, ExportMetadataTMLRequestExportSchemaVersionEnum, ExportMetadataTypeInput, ExportMetadataTypeInputTypeEnum, ExportOptions, ExternalTableInput, FavoriteMetadataInput, FavoriteMetadataInputTypeEnum, FavoriteMetadataItem, FavoriteMetadataItemTypeEnum, FavoriteObjectOptionsInput, FetchAnswerDataRequest, FetchAnswerDataRequestDataFormatEnum, FetchAnswerSqlQueryRequest, FetchAsyncImportTaskStatusRequest, FetchAsyncImportTaskStatusRequestTaskStatusEnum, FetchColumnSecurityRulesRequest, FetchConnectionDiffStatusResponse, FetchLiveboardDataRequest, FetchLiveboardDataRequestDataFormatEnum, FetchLiveboardSqlQueryRequest, FetchLogsRequest, FetchLogsRequestLogTypeEnum, FetchObjectPrivilegesRequest, FetchPermissionsOfPrincipalsRequest, FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum, FetchPermissionsOnMetadataRequest, FilterRules, FilterRulesOperatorEnum, ForceLogoutUsersRequest, Frequency, FrequencyInput, GenerateCSVRequest, GenerateCSVRequestCalendarTypeEnum, GenerateCSVRequestMonthOffsetEnum, GenerateCSVRequestStartDayOfWeekEnum, GenericInfo, GetAsyncImportStatusResponse, GetCustomAccessTokenRequest, GetCustomAccessTokenRequestPersistOptionEnum, GetDataSourceSuggestionsRequest, GetFullAccessTokenRequest, GetFullAccessTokenRequestUserParameters, GetNLInstructionsRequest, GetObjectAccessTokenRequest, GetRelevantQuestionsRequest, GetRelevantQuestionsRequestAiContext, GetRelevantQuestionsRequestMetadataContext, GetTokenResponse, GroupInfo, GroupObject, PromiseGroupsApi as GroupsApi, GroupsImportListInput, GroupsImportListInputPrivilegesEnum, GroupsImportListInputTypeEnum, GroupsImportListInputVisibilityEnum, HeaderAttributeInput, HeaderUpdateInput, HeaderUpdateInputTypeEnum, HttpBasicConfiguration, HttpBearerConfiguration, HttpException, HttpFile, HttpLibrary, HttpMethod, ImportEPackAsyncTaskStatus, ImportEPackAsyncTaskStatusImportPolicyEnum, ImportEPackAsyncTaskStatusTaskStatusEnum, ImportMetadataTMLAsyncRequest, ImportMetadataTMLAsyncRequestImportPolicyEnum, ImportMetadataTMLRequest, ImportMetadataTMLRequestImportPolicyEnum, ImportUser, ImportUserAccountStatusEnum, ImportUserAccountTypeEnum, ImportUserGroupsRequest, ImportUserGroupsResponse, ImportUserPreferredLocaleEnum, ImportUserType, ImportUserVisibilityEnum, ImportUsersRequest, ImportUsersResponse, InputEurekaNLSRequest, IsomorphicFetchHttpLibrary, JWTMetadataObject, JWTMetadataObjectTypeEnum, JWTParameter, JWTUserOptions, JWTUserOptionsFull, JobRecipient, JobRecipientTypeEnum, PromiseJobsApi as JobsApi, LBContextInput, LiveboardContent, LiveboardDataResponse, LiveboardOptions, LiveboardOptionsInput, PromiseLogApi as LogApi, LogResponse, LoginRequest, ManageObjectPrivilegeRequest, ManageObjectPrivilegeRequestMetadataTypeEnum, ManageObjectPrivilegeRequestObjectPrivilegeTypesEnum, ManageObjectPrivilegeRequestOperationEnum, PromiseMetadataApi as MetadataApi, MetadataAssociationItem, MetadataContext, MetadataInput, MetadataInputTypeEnum, MetadataListItemInput, MetadataListItemInputSubtypesEnum, MetadataListItemInputTypeEnum, MetadataObject, MetadataObjectTypeEnum, MetadataResponse, MetadataResponseTypeEnum, MetadataSearchResponse, MetadataSearchResponseMetadataTypeEnum, MetadataSearchSortOptions, MetadataSearchSortOptionsFieldNameEnum, MetadataSearchSortOptionsOrderEnum, PromiseMiddleware as Middleware, ModelTableList, NLInstructionsInfo, NLInstructionsInfoInput, NLInstructionsInfoInputScopeEnum, NLInstructionsInfoScopeEnum, OAuth2Configuration, ObjectIDAndName, ObjectPrivilegesMetadataInput, ObjectPrivilegesMetadataInputTypeEnum, ObjectPrivilegesOfMetadataResponse, Org, OrgChannelConfigInput, OrgChannelConfigInputOperationEnum, OrgChannelConfigInputResetEventsEnum, OrgChannelConfigResponse, OrgDetails, OrgInfo, OrgNonEmbedAccess, OrgNonEmbedAccessInput, OrgPreferenceSearchCriteriaInput, OrgPreferenceSearchCriteriaInputEventTypesEnum, OrgResponse, OrgResponseStatusEnum, OrgResponseVisibilityEnum, OrgType, PromiseOrgsApi as OrgsApi, ParameterValues, ParameterizeMetadataFieldsRequest, ParameterizeMetadataFieldsRequestFieldTypeEnum, ParameterizeMetadataFieldsRequestMetadataTypeEnum, ParameterizeMetadataRequest, ParameterizeMetadataRequestFieldTypeEnum, ParameterizeMetadataRequestMetadataTypeEnum, ParametersListItem, ParametersListItemInput, PdfOptions, PdfOptionsInput, PdfOptionsInputPageOrientationEnum, PdfOptionsPageSizeEnum, PermissionInput, PermissionInputShareModeEnum, PermissionOfMetadataResponse, PermissionOfPrincipalsResponse, PermissionsMetadataTypeInput, PermissionsMetadataTypeInputTypeEnum, PngOptionsInput, PolicyProcessOptions, PolicyProcessOptionsInput, PrincipalsInput, PrincipalsInputTypeEnum, PrincipalsListItem, PrincipalsListItemInput, PromiseHttpLibrary, PublishMetadataListItem, PublishMetadataListItemTypeEnum, PublishMetadataRequest, PutVariableValuesRequest, PutVariableValuesRequestOperationEnum, QueryGetDecomposedQueryRequest, QueryGetDecomposedQueryRequestNlsRequest, RecipientDetails, RecipientDetailsInput, RegionalSettingsInput, RegionalSettingsInputCurrencyFormatEnum, RegionalSettingsInputDateFormatLocaleEnum, RegionalSettingsInputNumberFormatLocaleEnum, RegionalSettingsInputUserLocaleEnum, RepoConfigObject, PromiseReportsApi as ReportsApi, RequestBody, RequestContext, RequiredError, ResetUserPasswordRequest, ResponseActivationURL, ResponseBody, ResponseContext, ResponseCopyObject, ResponseCustomAction, ResponseFailedEntities, ResponseFailedEntity, ResponseIncompleteEntities, ResponseIncompleteEntity, ResponseMessage, ResponseMessageMessageTypeEnum, ResponseMessageVisualizationTypeEnum, ResponsePostUpgradeFailedEntities, ResponsePostUpgradeFailedEntity, ResponseSchedule, ResponseScheduleRun, ResponseSuccessfulEntities, ResponseSuccessfulEntity, ResponseWorksheetToModelConversion, RevertCommitRequest, RevertCommitRequestRevertPolicyEnum, RevertResponse, RevertedMetadata, RevokeRefreshTokensRequest, RevokeRefreshTokensResponse, RevokeTokenRequest, RiseGQLArgWrapper, RiseSetter, Role, RoleResponse, RoleResponsePermissionEnum, RoleResponsePrivilegesEnum, PromiseRolesApi as RolesApi, RuntimeFilter, RuntimeFilters, RuntimeFiltersOperatorEnum, RuntimeParamOverride, RuntimeParameters, RuntimeSort, RuntimeSorts, RuntimeSortsOrderEnum, ScheduleHistoryRunsOptionsInput, PromiseSchedulesApi as SchedulesApi, SchedulesPdfOptionsInput, SchedulesPdfOptionsInputPageSizeEnum, SchemaObject, Scope, ScriptSrcUrls, ScriptSrcUrlsInput, SearchCalendarsRequest, SearchCalendarsRequestSortOptions, SearchCalendarsRequestSortOptionsFieldNameEnum, SearchCalendarsRequestSortOptionsOrderEnum, SearchChannelHistoryRequest, SearchChannelHistoryRequestChannelStatusEnum, SearchChannelHistoryRequestChannelTypeEnum, SearchChannelHistoryResponse, SearchCollectionsRequest, SearchCollectionsRequestSortOptions, SearchCollectionsRequestSortOptionsFieldNameEnum, SearchCollectionsRequestSortOptionsOrderEnum, SearchCommitsRequest, SearchCommitsRequestMetadataTypeEnum, SearchCommunicationChannelPreferencesRequest, SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum, SearchConfigRequest, SearchConnectionRequest, SearchConnectionRequestAuthenticationTypeEnum, SearchConnectionRequestDataWarehouseObjectTypeEnum, SearchConnectionRequestDataWarehouseTypesEnum, SearchConnectionRequestSortOptions, SearchConnectionRequestSortOptionsFieldNameEnum, SearchConnectionRequestSortOptionsOrderEnum, SearchConnectionResponse, SearchConnectionResponseDataWarehouseTypeEnum, SearchCustomActionsRequest, SearchCustomActionsRequestDefaultActionConfig, SearchCustomActionsRequestTypeEnum, SearchDataRequest, SearchDataRequestDataFormatEnum, SearchDataResponse, SearchEmailCustomizationRequest, SearchMetadataRequest, SearchMetadataRequestDependentObjectVersionEnum, SearchMetadataRequestFavoriteObjectOptions, SearchMetadataRequestLiveboardResponseVersionEnum, SearchMetadataRequestSortOptions, SearchMetadataRequestSortOptionsFieldNameEnum, SearchMetadataRequestSortOptionsOrderEnum, SearchOrgsRequest, SearchOrgsRequestStatusEnum, SearchOrgsRequestVisibilityEnum, SearchRoleResponse, SearchRoleResponsePermissionEnum, SearchRoleResponsePrivilegesEnum, SearchRolesRequest, SearchRolesRequestPermissionsEnum, SearchRolesRequestPrivilegesEnum, SearchSchedulesRequest, SearchSchedulesRequestHistoryRunsOptions, SearchSchedulesRequestSortOptions, SearchSecuritySettingsRequest, SearchSecuritySettingsRequestScopeEnum, SearchTagsRequest, SearchUserGroupsRequest, SearchUserGroupsRequestPrivilegesEnum, SearchUserGroupsRequestSortOptions, SearchUserGroupsRequestSortOptionsFieldNameEnum, SearchUserGroupsRequestSortOptionsOrderEnum, SearchUserGroupsRequestTypeEnum, SearchUserGroupsRequestVisibilityEnum, SearchUsersRequest, SearchUsersRequestAccountStatusEnum, SearchUsersRequestAccountTypeEnum, SearchUsersRequestPrivilegesEnum, SearchUsersRequestVisibilityEnum, SearchVariablesRequest, SearchVariablesRequestResponseContentEnum, SearchWebhookConfigurationsRequest, SearchWebhookConfigurationsRequestEventTypeEnum, SearchWebhookConfigurationsRequestSortOptions, SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum, SearchWebhookConfigurationsRequestSortOptionsOrderEnum, PromiseSecurityApi as SecurityApi, SecurityAuthentication, SecuritySettingsClusterPreferences, SecuritySettingsClusterPreferencesInput, SecuritySettingsOrgDetails, SecuritySettingsOrgPreferences, SecuritySettingsOrgPreferencesInput, SecuritySettingsResponse, SelfDecodingBody, SendAgentMessageRequest, SendAgentMessageResponse, SendAgentMessageStreamingRequest, SendMessageRequest, ServerConfiguration, SetNLInstructionsRequest, ShareMetadataRequest, ShareMetadataRequestMetadataTypeEnum, ShareMetadataTypeInput, ShareMetadataTypeInputTypeEnum, SharePermissionsInput, SharePermissionsInputShareModeEnum, SingleAnswerRequest, SortOption, SortOptionFieldNameEnum, SortOptionInput, SortOptionInputFieldNameEnum, SortOptionInputOrderEnum, SortOptionOrderEnum, SortOptions, SortOptionsFieldNameEnum, SortOptionsOrderEnum, SortingOptions, SqlQuery, SqlQueryResponse, SqlQueryResponseMetadataTypeEnum, StorageConfig, StorageConfigInput, StorageDestination, StorageDestinationInput, StorageDestinationInputStorageTypeEnum, StorageDestinationStorageTypeEnum, PromiseSystemApi as SystemApi, SystemConfig, SystemInfo, SystemOverrideInfo, Table, Tag, TagMetadataTypeInput, TagMetadataTypeInputTypeEnum, PromiseTagsApi as TagsApi, TemplatePropertiesInputCreate, PromiseThoughtSpotRestApi as ThoughtSpotRestApi, Token, TokenAccessScopeObject, TokenAccessScopeObjectTypeEnum, TokenProvider, TokenValidationResponse, URL, URLInput, URLInputMandatory, UnassignTagRequest, UnparameterizeMetadataRequest, UnparameterizeMetadataRequestFieldTypeEnum, UnparameterizeMetadataRequestMetadataTypeEnum, UnpublishMetadataRequest, UpdateCalendarRequest, UpdateCalendarRequestCalendarTypeEnum, UpdateCalendarRequestMonthOffsetEnum, UpdateCalendarRequestStartDayOfWeekEnum, UpdateCalendarRequestTableReference, UpdateCalendarRequestUpdateMethodEnum, UpdateCollectionRequest, UpdateCollectionRequestOperationEnum, UpdateColumnSecurityRulesRequest, UpdateConfigRequest, UpdateConnectionConfigurationRequest, UpdateConnectionConfigurationRequestAuthenticationTypeEnum, UpdateConnectionConfigurationRequestPolicyProcessesEnum, UpdateConnectionConfigurationRequestPolicyTypeEnum, UpdateConnectionRequest, UpdateConnectionV2Request, UpdateCustomActionRequest, UpdateCustomActionRequestActionDetails, UpdateCustomActionRequestDefaultActionConfig, UpdateCustomActionRequestOperationEnum, UpdateEmailCustomizationRequest, UpdateMetadataHeaderRequest, UpdateMetadataObjIdRequest, UpdateObjIdInput, UpdateObjIdInputTypeEnum, UpdateOrgRequest, UpdateOrgRequestOperationEnum, UpdateRoleRequest, UpdateRoleRequestPrivilegesEnum, UpdateScheduleRequest, UpdateScheduleRequestFileFormatEnum, UpdateScheduleRequestFrequency, UpdateScheduleRequestLiveboardOptions, UpdateScheduleRequestMetadataTypeEnum, UpdateScheduleRequestPdfOptions, UpdateScheduleRequestPdfOptionsPageSizeEnum, UpdateScheduleRequestRecipientDetails, UpdateScheduleRequestStatusEnum, UpdateScheduleRequestTimeZoneEnum, UpdateSystemConfigRequest, UpdateTagRequest, UpdateUserGroupRequest, UpdateUserGroupRequestOperationEnum, UpdateUserGroupRequestPrivilegesEnum, UpdateUserGroupRequestTypeEnum, UpdateUserGroupRequestVisibilityEnum, UpdateUserRequest, UpdateUserRequestAccountStatusEnum, UpdateUserRequestAccountTypeEnum, UpdateUserRequestOperationEnum, UpdateUserRequestPreferredLocaleEnum, UpdateUserRequestVisibilityEnum, UpdateVariableRequest, UpdateVariableValuesRequest, UpdateWebhookConfigurationRequest, UpdateWebhookConfigurationRequestEventsEnum, User, UserAccountStatusEnum, UserAccountTypeEnum, UserGroup, UserGroupResponse, UserGroupResponseParentTypeEnum, UserGroupResponseTypeEnum, UserGroupResponseVisibilityEnum, UserInfo, UserObject, UserObjectTypeEnum, UserParameterOptions, UserParentTypeEnum, UserPrincipal, UserVisibilityEnum, PromiseUsersApi as UsersApi, ValidateCommunicationChannelRequest, ValidateCommunicationChannelRequestChannelTypeEnum, ValidateCommunicationChannelRequestEventTypeEnum, ValidateMergeRequest, ValidateTokenRequest, ValueScopeInput, ValueScopeInputPrincipalTypeEnum, Variable, PromiseVariableApi as VariableApi, VariableDetailInput, VariableDetailInputTypeEnum, VariablePutAssignmentInput, VariablePutAssignmentInputPrincipalTypeEnum, VariableUpdateAssignmentInput, VariableUpdateAssignmentInputOperationEnum, VariableUpdateScopeInput, VariableUpdateScopeInputPrincipalTypeEnum, VariableValue, VariableValuePrincipalTypeEnum, VariableValues, VariableVariableTypeEnum, PromiseVersionControlApi as VersionControlApi, WebhookAuthApiKey, WebhookAuthApiKeyInput, WebhookAuthBasicAuth, WebhookAuthBasicAuthInput, WebhookAuthOAuth2, WebhookAuthOAuth2Input, WebhookAuthentication, WebhookAuthenticationInput, WebhookDeleteFailure, WebhookDeleteResponse, WebhookKeyValuePair, WebhookKeyValuePairInput, WebhookOrg, WebhookPagination, WebhookResponse, WebhookResponseEventsEnum, WebhookSearchResponse, WebhookSignatureVerification, WebhookSignatureVerificationAlgorithmEnum, WebhookSignatureVerificationInput, WebhookSignatureVerificationInputAlgorithmEnum, WebhookSignatureVerificationInputTypeEnum, WebhookSignatureVerificationTypeEnum, WebhookSortOptionsInput, WebhookSortOptionsInputFieldNameEnum, WebhookSortOptionsInputOrderEnum, WebhookUser, PromiseWebhooksApi as WebhooksApi, configureAuthMethods, createBasicConfig, createBearerAuthenticationConfig, createConfiguration, server1, servers, wrapHttpLibrary }; diff --git a/sdks/typescript/dist/index.d.ts b/sdks/typescript/dist/index.d.ts index 11c2f1b75..b8a940562 100644 --- a/sdks/typescript/dist/index.d.ts +++ b/sdks/typescript/dist/index.d.ts @@ -1827,6 +1827,294 @@ declare class ChangeUserPasswordRequest { constructor(); } +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Event metadata for the triggering event associated with a job. +*/ +declare class ChannelHistoryEventInfo { + /** + * Type of the event. + */ + 'type': ChannelHistoryEventInfoTypeEnum; + /** + * Unique ID of the event. + */ + 'id': string; + /** + * Name of the event. + */ + 'name'?: string | null; + /** + * Unique run ID for this event execution. + */ + 'run_id'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ChannelHistoryEventInfoTypeEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Event specification for channel history search. +*/ +declare class ChannelHistoryEventInput { + /** + * Type of the event. + */ + 'type': ChannelHistoryEventInputTypeEnum; + /** + * Unique ID or name of the event. + */ + 'identifier'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ChannelHistoryEventInputTypeEnum = "LIVEBOARD_SCHEDULE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* A recipient (user, group, or external) for a job execution. +*/ +declare class JobRecipient { + /** + * Type of the recipient. + */ + 'type': JobRecipientTypeEnum; + /** + * Unique ID of the recipient. + */ + 'id'?: string | null; + /** + * Name of the recipient. + */ + 'name'?: string | null; + /** + * Email of the recipient. + */ + 'email'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type JobRecipientTypeEnum = "USER" | "EXTERNAL"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* A single job execution record for a channel. +*/ +declare class ChannelHistoryJob { + /** + * Unique identifier for this job. + */ + 'id': string; + /** + * Delivery status of this job. + */ + 'status': ChannelHistoryJobStatusEnum; + /** + * Timestamp when this job was created (epoch milliseconds). + */ + 'creation_time_in_millis': number; + 'event'?: ChannelHistoryEventInfo; + /** + * The users, groups or external recipients for this job. + */ + 'recipients'?: Array | null; + /** + * Additional delivery details such as HTTP response code or error message. + */ + 'detail'?: string | null; + /** + * Number of attempts made. 1 indicates first attempt. + */ + 'try_count'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ChannelHistoryJobStatusEnum = "PENDING" | "RETRY" | "SUCCESS" | "FAILED"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* AWS S3 storage information returned from a validation step. +*/ +declare class ChannelValidationAwsS3Info { + /** + * Name of the S3 bucket. + */ + 'bucket_name'?: string | null; + /** + * Name of the uploaded file. + */ + 'file_name'?: string | null; + /** + * Key of the object in S3 storage. + */ + 'object_key'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Validation detail result for a sub-step. +*/ +declare class ChannelValidationDetail { + /** + * The validation step that was performed. + */ + 'validation_step': ChannelValidationDetailValidationStepEnum; + /** + * Status of this validation step. + */ + 'status': ChannelValidationDetailStatusEnum; + /** + * HTTP status code returned by the channel (if applicable). + */ + 'http_status'?: number | null; + /** + * Error message from the channel or validation process. + */ + 'error_message'?: string | null; + 'aws_s3_info'?: ChannelValidationAwsS3Info; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ChannelValidationDetailValidationStepEnum = "HTTP_CONNECTION_CHECK" | "STORAGE_FILE_UPLOAD_CHECK"; +type ChannelValidationDetailStatusEnum = "SUCCESS" | "FAILED"; + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -1926,9 +2214,355 @@ declare class ClusterNonEmbedAccessInput { */ 'block_full_app_access'?: boolean | null; /** - * Group identifiers that are allowed non-embed full app access. Can only be set when orgs feature is disabled and block_full_app_access is true. + * Group identifiers that are allowed non-embed full app access. Can only be set when orgs feature is disabled and block_full_app_access is true. + */ + 'groups_identifiers_with_access'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Entity identifier with name. +*/ +declare class CollectionEntityIdentifier { + /** + * Unique identifier of the entity. + */ + 'identifier'?: string | null; + /** + * Name of the entity. + */ + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Metadata item in a collection response. +*/ +declare class CollectionMetadataItem { + /** + * Type of the metadata object. + */ + 'type'?: string | null; + /** + * List of identifiers for this metadata type. + */ + 'identifiers'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response object for a collection. +*/ +declare class Collection { + /** + * Unique identifier of the collection. + */ + 'id': string; + /** + * Name of the collection. + */ + 'name': string; + /** + * Description of the collection. + */ + 'description'?: string | null; + /** + * Metadata objects in the collection. + */ + 'metadata'?: Array | null; + /** + * Creation timestamp in milliseconds. + */ + 'created_at'?: string | null; + /** + * Last updated timestamp in milliseconds. + */ + 'updated_at'?: string | null; + /** + * Name of the author who created the collection. + */ + 'author_name'?: string | null; + /** + * Unique identifier of the author. + */ + 'author_id'?: string | null; + 'org'?: CollectionEntityIdentifier; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class GenericInfo { + 'id'?: string | null; + 'name'?: string | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Group of metadata objects identified by type. +*/ +declare class CollectionDeleteTypeIdentifiers { + /** + * Type of the metadata object (e.g., Collection, Worksheet, Table). + */ + 'type'?: string | null; + /** + * List of metadata identifiers belonging to the given type. + */ + 'identifiers'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response object for delete collection operation. +*/ +declare class CollectionDeleteResponse { + /** + * List of metadata objects that were successfully deleted. + */ + 'metadata_deleted'?: Array | null; + /** + * List of metadata objects that were skipped during deletion. Objects may be skipped due to lack of permissions, dependencies, or other constraints. + */ + 'metadata_skipped'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input type for metadata to be added to a collection. +*/ +declare class CollectionMetadataInput { + /** + * Type of metadata object. + */ + 'type': CollectionMetadataInputTypeEnum; + /** + * List of unique IDs or names of metadata objects. + */ + 'identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CollectionMetadataInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "COLLECTION"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response object for search collections operation. +*/ +declare class CollectionSearchResponse { + /** + * List of collections matching the search criteria. + */ + 'collections': Array; + /** + * The starting record number from where the records are included. + */ + 'record_offset'?: number | null; + /** + * The number of records returned. + */ + 'record_size'?: number | null; + /** + * Indicates if this is the last batch of results. + */ + 'is_last_batch'?: boolean | null; + /** + * Total count of records returned. */ - 'groups_identifiers_with_access'?: Array | null; + 'count'?: number | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -2696,6 +3330,69 @@ declare class CommunicationChannelPreferencesResponse { constructor(); } +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Response containing validation results for communication channel configuration. +*/ +declare class CommunicationChannelValidateResponse { + /** + * Type of communication channel that was validated. + */ + 'channel_type': CommunicationChannelValidateResponseChannelTypeEnum; + /** + * ID of the communication channel (e.g., webhook_id). + */ + 'channel_id': string; + /** + * Name of the communication channel (e.g., webhook name). + */ + 'channel_name'?: string | null; + /** + * Event type that was validated. + */ + 'event_type': CommunicationChannelValidateResponseEventTypeEnum; + /** + * Unique Job Id of the validation. + */ + 'job_id': string; + /** + * Overall result of the validation. + */ + 'result_code': CommunicationChannelValidateResponseResultCodeEnum; + /** + * Detailed results of various validation sub-steps. + */ + 'details'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type CommunicationChannelValidateResponseChannelTypeEnum = "WEBHOOK"; +type CommunicationChannelValidateResponseEventTypeEnum = "LIVEBOARD_SCHEDULE"; +type CommunicationChannelValidateResponseResultCodeEnum = "SUCCESS" | "FAILED" | "PARTIAL_SUCCESS"; + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -3800,6 +4497,47 @@ type CreateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | type CreateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; type CreateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class CreateCollectionRequest { + /** + * Name of the collection. + */ + 'name': string; + /** + * Description of the collection. + */ + 'description'?: string; + /** + * Metadata objects to add to the collection. + */ + 'metadata'?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -4326,6 +5064,10 @@ declare class CreateEmailCustomizationRequestTemplateProperties { * Whether to hide contact support url. Version: 26.2.0.cl or later */ 'hide_contact_support_url'?: boolean | null; + /** + * Whether to hide logo Version: 26.4.0.cl or later + */ + 'hide_logo_url'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5434,6 +6176,45 @@ declare class CreateWebhookConfigurationRequestStorageDestination { } type CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum = "AWS_S3"; +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Key-value pair input for additional webhook headers. +*/ +declare class WebhookKeyValuePairInput { + /** + * Header name. + */ + 'key': string; + /** + * Header value. + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -5470,6 +6251,10 @@ declare class CreateWebhookConfigurationRequest { 'authentication'?: CreateWebhookConfigurationRequestAuthentication; 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; 'storage_destination'?: CreateWebhookConfigurationRequestStorageDestination; + /** + * Additional headers as an array of key-value pairs. Example: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6135,6 +6920,46 @@ declare class DefaultActionConfigSearchInput { constructor(); } +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteCollectionRequest { + /** + * Unique GUIDs of collections to delete. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + */ + 'collection_identifiers': Array; + /** + * Flag to delete child objects of the collection that the user has access to. + */ + 'delete_children'?: boolean | null; + /** + * Preview deletion without actually deleting. When set to true, returns what would be deleted without performing the actual deletion. + */ + 'dry_run'?: boolean | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -6344,6 +7169,38 @@ declare class DeleteOrgEmailCustomizationRequest { constructor(); } +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class DeleteVariablesRequest { + /** + * Unique id(s) or name(s) of the variable(s) to delete + */ + 'identifiers': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -8361,36 +9218,6 @@ type GenerateCSVRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | "F type GenerateCSVRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; type GenerateCSVRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; -/** - * ThoughtSpot Public REST API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -declare class GenericInfo { - 'id'?: string | null; - 'name'?: string | null; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} - /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -11063,6 +11890,56 @@ declare class OrgResponse { type OrgResponseStatusEnum = "ACTIVE" | "IN_ACTIVE"; type OrgResponseVisibilityEnum = "SHOW" | "HIDDEN"; +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ParameterizeMetadataFieldsRequest { + /** + * Type of metadata object to parameterize. + */ + 'metadata_type'?: ParameterizeMetadataFieldsRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object to parameterize. + */ + 'metadata_identifier': string; + /** + * Type of field in the metadata to parameterize. + */ + 'field_type': ParameterizeMetadataFieldsRequestFieldTypeEnum; + /** + * JSON array of field names to parameterize. Example: [schemaName, databaseName, tableName] + */ + 'field_names': Array; + /** + * Unique ID or name of the variable to use for parameterization of these fields. + */ + 'variable_identifier': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type ParameterizeMetadataFieldsRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION" | "CONNECTION_CONFIG"; +type ParameterizeMetadataFieldsRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY"; + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -11529,6 +12406,100 @@ declare class PublishMetadataRequest { constructor(); } +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Input for variable value put operations +*/ +declare class VariablePutAssignmentInput { + /** + * Values of the variable + */ + 'assigned_values': Array; + /** + * The unique name of the org + */ + 'org_identifier'?: string | null; + /** + * Principal type + */ + 'principal_type'?: VariablePutAssignmentInputPrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Unique ID of the model + */ + 'model_identifier'?: string | null; + /** + * Priority level + */ + 'priority'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type VariablePutAssignmentInputPrincipalTypeEnum = "USER" | "USER_GROUP"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class PutVariableValuesRequest { + /** + * Operation to perform + */ + 'operation'?: PutVariableValuesRequestOperationEnum; + /** + * Variable assignments + */ + 'variable_assignment': Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type PutVariableValuesRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE" | "RESET"; + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -12944,9 +13915,186 @@ type RoleResponsePermissionEnum = "READ_ONLY" | "MODIFY" | "NO_ACCESS"; */ declare class RuntimeFilter { /** - * Runtime filter parameter type in JWT. + * Runtime filter parameter type in JWT. + */ + 'runtime_filter'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* List of runtime parameters need to set during the session. +*/ +declare class RuntimeParamOverride { + /** + * Runtime param override type in JWT. + */ + 'runtime_param_override'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* List of runtime parameters need to set during the session. +*/ +declare class RuntimeSort { + /** + * Runtime sort parameter type in JWT. + */ + 'runtime_sort'?: any; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +declare class ScheduleHistoryRunsOptionsInput { + /** + * Indicates whether to fetch history runs for the scheduled notification. + */ + 'include_history_runs'?: boolean | null; + /** + * Indicates the max number of records that can be fetched as past runs of any scheduled job. + */ + 'record_size'?: number | null; + /** + * Indicates the starting record number from where history runs records should be fetched. + */ + 'record_offset'?: number | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Options for PDF export. +*/ +declare class SchedulesPdfOptionsInput { + /** + * Indicates whether to include complete Liveboard. + */ + 'complete_liveboard'?: boolean | null; + /** + * Indicates whether to include cover page with the Liveboard title. + */ + 'include_cover_page'?: boolean | null; + /** + * Indicates whether to include customized wide logo in the footer if available. + */ + 'include_custom_logo'?: boolean | null; + /** + * Indicates whether to include a page with all applied filters. + */ + 'include_filter_page'?: boolean | null; + /** + * Indicates whether to include page number in the footer of each page + */ + 'include_page_number'?: boolean | null; + /** + * Text to include in the footer of each page. + */ + 'page_footer_text'?: string | null; + /** + * Page orientation of the PDF. + */ + 'page_orientation'?: string | null; + /** + * Page size. */ - 'runtime_filter'?: any; + 'page_size'?: SchedulesPdfOptionsInputPageSizeEnum | null; + /** + * Indicates whether to include only first page of the tables. + */ + 'truncate_table'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12962,6 +14110,7 @@ declare class RuntimeFilter { }[]; constructor(); } +type SchedulesPdfOptionsInputPageSizeEnum = "A4"; /** * ThoughtSpot Public REST API @@ -12974,14 +14123,19 @@ declare class RuntimeFilter { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* List of runtime parameters need to set during the session. -*/ -declare class RuntimeParamOverride { +declare class Scope { /** - * Runtime param override type in JWT. + * Object access scope type. */ - 'runtime_param_override'?: any; + 'access_type': string; + /** + * Unique identifier of the metadata. + */ + 'org_id'?: number | null; + /** + * Unique identifier of the Org. + */ + 'metadata_id'?: string | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13010,13 +14164,17 @@ declare class RuntimeParamOverride { * Do not edit the class manually. */ /** -* List of runtime parameters need to set during the session. +* Sort options. */ -declare class RuntimeSort { +declare class SearchCalendarsRequestSortOptions { /** - * Runtime sort parameter type in JWT. + * Name of the field to apply the sort on. */ - 'runtime_sort'?: any; + 'field_name'?: SearchCalendarsRequestSortOptionsFieldNameEnum | null; + /** + * Sort order : ASC(Ascending) or DESC(Descending). + */ + 'order'?: SearchCalendarsRequestSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13032,6 +14190,8 @@ declare class RuntimeSort { }[]; constructor(); } +type SearchCalendarsRequestSortOptionsFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SearchCalendarsRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -13044,19 +14204,25 @@ declare class RuntimeSort { * https://openapi-generator.tech * Do not edit the class manually. */ -declare class ScheduleHistoryRunsOptionsInput { + +declare class SearchCalendarsRequest { /** - * Indicates whether to fetch history runs for the scheduled notification. + * Unique ID or name of the connection. */ - 'include_history_runs'?: boolean | null; + 'connection_identifier'?: string; /** - * Indicates the max number of records that can be fetched as past runs of any scheduled job. + * Pattern to match for calendar names (use \'%\' for wildcard match). */ - 'record_size'?: number | null; + 'name_pattern'?: string; /** - * Indicates the starting record number from where history runs records should be fetched. + * The starting record number from where the records should be included. */ - 'record_offset'?: number | null; + 'record_offset'?: number; + /** + * The number of records that should be included. + */ + 'record_size'?: number; + 'sort_options'?: SearchCalendarsRequestSortOptions; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13084,46 +14250,32 @@ declare class ScheduleHistoryRunsOptionsInput { * https://openapi-generator.tech * Do not edit the class manually. */ -/** -* Options for PDF export. -*/ -declare class SchedulesPdfOptionsInput { - /** - * Indicates whether to include complete Liveboard. - */ - 'complete_liveboard'?: boolean | null; - /** - * Indicates whether to include cover page with the Liveboard title. - */ - 'include_cover_page'?: boolean | null; - /** - * Indicates whether to include customized wide logo in the footer if available. - */ - 'include_custom_logo'?: boolean | null; + +declare class SearchChannelHistoryRequest { /** - * Indicates whether to include a page with all applied filters. + * Type of communication channel to search history for. */ - 'include_filter_page'?: boolean | null; + 'channel_type': SearchChannelHistoryRequestChannelTypeEnum; /** - * Indicates whether to include page number in the footer of each page + * List of job execution record IDs to retrieve. */ - 'include_page_number'?: boolean | null; + 'job_ids'?: Array; /** - * Text to include in the footer of each page. + * List of channel IDs or names to filter by. */ - 'page_footer_text'?: string | null; + 'channel_identifiers'?: Array; /** - * Page orientation of the PDF. + * Filter by channel delivery status. */ - 'page_orientation'?: string | null; + 'channel_status'?: SearchChannelHistoryRequestChannelStatusEnum; /** - * Page size. + * Filter by events that triggered the channel. */ - 'page_size'?: SchedulesPdfOptionsInputPageSizeEnum | null; + 'events'?: Array; /** - * Indicates whether to include only first page of the tables. + * Filter records created on or after this time (epoch milliseconds). */ - 'truncate_table'?: boolean | null; + 'start_epoch_time_in_millis'?: number; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13139,7 +14291,8 @@ declare class SchedulesPdfOptionsInput { }[]; constructor(); } -type SchedulesPdfOptionsInputPageSizeEnum = "A4"; +type SearchChannelHistoryRequestChannelTypeEnum = "WEBHOOK"; +type SearchChannelHistoryRequestChannelStatusEnum = "PENDING" | "RETRY" | "SUCCESS" | "FAILED"; /** * ThoughtSpot Public REST API @@ -13152,19 +14305,15 @@ type SchedulesPdfOptionsInputPageSizeEnum = "A4"; * https://openapi-generator.tech * Do not edit the class manually. */ -declare class Scope { - /** - * Object access scope type. - */ - 'access_type': string; - /** - * Unique identifier of the metadata. - */ - 'org_id'?: number | null; + +/** +* Response wrapper for channel delivery history. +*/ +declare class SearchChannelHistoryResponse { /** - * Unique identifier of the Org. + * List of job execution records. */ - 'metadata_id'?: string | null; + 'jobs': Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13195,15 +14344,15 @@ declare class Scope { /** * Sort options. */ -declare class SearchCalendarsRequestSortOptions { +declare class SearchCollectionsRequestSortOptions { /** * Name of the field to apply the sort on. */ - 'field_name'?: SearchCalendarsRequestSortOptionsFieldNameEnum | null; + 'field_name'?: SearchCollectionsRequestSortOptionsFieldNameEnum | null; /** * Sort order : ASC(Ascending) or DESC(Descending). */ - 'order'?: SearchCalendarsRequestSortOptionsOrderEnum | null; + 'order'?: SearchCollectionsRequestSortOptionsOrderEnum | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13219,8 +14368,8 @@ declare class SearchCalendarsRequestSortOptions { }[]; constructor(); } -type SearchCalendarsRequestSortOptionsFieldNameEnum = "DEFAULT" | "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; -type SearchCalendarsRequestSortOptionsOrderEnum = "ASC" | "DESC"; +type SearchCollectionsRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; +type SearchCollectionsRequestSortOptionsOrderEnum = "ASC" | "DESC"; /** * ThoughtSpot Public REST API @@ -13234,13 +14383,9 @@ type SearchCalendarsRequestSortOptionsOrderEnum = "ASC" | "DESC"; * Do not edit the class manually. */ -declare class SearchCalendarsRequest { +declare class SearchCollectionsRequest { /** - * Unique ID or name of the connection. - */ - 'connection_identifier'?: string; - /** - * Pattern to match for calendar names (use \'%\' for wildcard match). + * A pattern to match case-insensitive name of the Collection object. Use \'%\' for wildcard match. */ 'name_pattern'?: string; /** @@ -13248,10 +14393,22 @@ declare class SearchCalendarsRequest { */ 'record_offset'?: number; /** - * The number of records that should be included. + * The number of records that should be included. -1 implies no pagination. */ 'record_size'?: number; - 'sort_options'?: SearchCalendarsRequestSortOptions; + /** + * Unique GUIDs of collections to search. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + */ + 'collection_identifiers'?: Array; + /** + * Filter collections by author. Provide unique IDs or names of users who created the collections. + */ + 'created_by_user_identifiers'?: Array; + /** + * Include collection metadata items in the response. + */ + 'include_metadata'?: boolean | null; + 'sort_options'?: SearchCollectionsRequestSortOptions; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -14530,47 +15687,6 @@ type SearchUserGroupsRequestPrivilegesEnum = "ADMINISTRATION" | "AUTHORING" | "U type SearchUserGroupsRequestTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; type SearchUserGroupsRequestVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; -/** - * ThoughtSpot Public REST API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * OpenAPI spec version: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -/** -* Sort options. -*/ -declare class SearchUsersRequestSortOptions { - /** - * Name of the field to apply the sort on. - */ - 'field_name'?: SearchUsersRequestSortOptionsFieldNameEnum | null; - /** - * Sort order : ASC(Ascending) or DESC(Descending). - */ - 'order'?: SearchUsersRequestSortOptionsOrderEnum | null; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} -type SearchUsersRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED"; -type SearchUsersRequestSortOptionsOrderEnum = "ASC" | "DESC"; - /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -14652,7 +15768,7 @@ declare class SearchUsersRequest { * The number of records that should be included. */ 'record_size'?: number; - 'sort_options'?: SearchUsersRequestSortOptions; + 'sort_options'?: SearchCollectionsRequestSortOptions; /** * Filters by the role assigned to the user. */ @@ -14697,7 +15813,7 @@ type SearchUsersRequestAccountStatusEnum = "ACTIVE" | "INACTIVE" | "EXPIRED" | " * Do not edit the class manually. */ /** -* Input for variable scope in search +* Input for filtering variable values by scope in search operations */ declare class ValueScopeInput { /** @@ -14705,7 +15821,7 @@ declare class ValueScopeInput { */ 'org_identifier'?: string | null; /** - * Principal type + * Type of principal to filter by. Use USER to filter values assigned to specific users, or USER_GROUP to filter values assigned to groups. */ 'principal_type'?: ValueScopeInputPrincipalTypeEnum | null; /** @@ -14713,7 +15829,7 @@ declare class ValueScopeInput { */ 'principal_identifier'?: string | null; /** - * Model Identifier + * Unique ID or name of the model to filter by. Applicable only for FORMULA_VARIABLE type. */ 'model_identifier'?: string | null; static readonly discriminator: string | undefined; @@ -14775,7 +15891,7 @@ declare class VariableDetailInput { }[]; constructor(); } -type VariableDetailInputTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE"; +type VariableDetailInputTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE" | "USER_PROPERTY"; /** * ThoughtSpot Public REST API @@ -16171,6 +17287,10 @@ declare class TemplatePropertiesInputCreate { * Whether to hide contact support url. Version: 26.2.0.cl or later */ 'hide_contact_support_url'?: boolean | null; + /** + * Whether to hide logo Version: 26.4.0.cl or later + */ + 'hide_logo_url'?: boolean | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -16528,6 +17648,52 @@ type UpdateCalendarRequestCalendarTypeEnum = "MONTH_OFFSET" | "FOUR_FOUR_FIVE" | type UpdateCalendarRequestMonthOffsetEnum = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December"; type UpdateCalendarRequestStartDayOfWeekEnum = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +declare class UpdateCollectionRequest { + /** + * Name of the collection. + */ + 'name'?: string; + /** + * Description of the collection. + */ + 'description'?: string; + /** + * Metadata objects to add, remove, or replace in the collection. + */ + 'metadata'?: Array; + /** + * Type of update operation. Default operation type is REPLACE. + */ + 'operation'?: UpdateCollectionRequestOperationEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UpdateCollectionRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE"; + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -17736,7 +18902,7 @@ type VariableUpdateAssignmentInputOperationEnum = "ADD" | "REMOVE" | "REPLACE" | * Do not edit the class manually. */ /** -* Input for variable value update in batch operations +* Input for defining the scope of variable value assignments in batch update operations */ declare class VariableUpdateScopeInput { /** @@ -17744,7 +18910,7 @@ declare class VariableUpdateScopeInput { */ 'org_identifier': string; /** - * Principal type + * Type of principal to which the variable value applies. Use USER to assign values to a specific user, or USER_GROUP to assign values to a group. */ 'principal_type'?: VariableUpdateScopeInputPrincipalTypeEnum | null; /** @@ -17752,11 +18918,11 @@ declare class VariableUpdateScopeInput { */ 'principal_identifier'?: string | null; /** - * Unique ID of the model + * Unique ID or name of the model. Required for FORMULA_VARIABLE type to scope the variable value to a specific worksheet. */ 'model_identifier'?: string | null; /** - * Priority level + * The priority level for this scope assignment, used for conflict resolution when multiple values match. Higher priority values (larger numbers) take precedence. */ 'priority'?: number | null; static readonly discriminator: string | undefined; @@ -17790,11 +18956,11 @@ type VariableUpdateScopeInputPrincipalTypeEnum = "USER" | "USER_GROUP"; declare class UpdateVariableValuesRequest { /** - * Variables and values to update + * Array of variable assignment objects specifying the variable identifier, values to assign, and the operation type (ADD, REMOVE, REPLACE, or RESET) to perform on each variable. */ 'variable_assignment': Array; /** - * Variables and values to update + * Array of scope objects defining where the variable values apply, including organization context, optional principal constraints (user or group), model reference for formula variables, and priority for conflict resolution. */ 'variable_value_scope': Array; static readonly discriminator: string | undefined; @@ -17849,6 +19015,10 @@ declare class UpdateWebhookConfigurationRequest { 'authentication'?: CreateWebhookConfigurationRequestAuthentication; 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; 'storage_destination'?: CreateWebhookConfigurationRequestStorageDestination; + /** + * Additional headers as an array of key-value pairs. Example: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -18211,9 +19381,57 @@ declare class UserGroupResponse { */ 'visibility': UserGroupResponseVisibilityEnum; /** - * List of roles assgined to the user + * List of roles assgined to the user + */ + 'roles'?: Array | null; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +type UserGroupResponseParentTypeEnum = "USER" | "GROUP"; +type UserGroupResponseTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; +type UserGroupResponseVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; + +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** +* Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). +*/ +declare class UserParameterOptions { + 'objects'?: Array | null; + /** + * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` + */ + 'runtime_filters'?: Array | null; + /** + * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + */ + 'runtime_sorts'?: Array | null; + /** + * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` */ - 'roles'?: Array | null; + 'parameters'?: Array | null; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -18229,9 +19447,6 @@ declare class UserGroupResponse { }[]; constructor(); } -type UserGroupResponseParentTypeEnum = "USER" | "GROUP"; -type UserGroupResponseTypeEnum = "LOCAL_GROUP" | "LDAP_GROUP" | "TEAM_GROUP" | "TENANT_GROUP"; -type UserGroupResponseVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; /** * ThoughtSpot Public REST API @@ -18244,24 +19459,19 @@ type UserGroupResponseVisibilityEnum = "SHARABLE" | "NON_SHARABLE"; * https://openapi-generator.tech * Do not edit the class manually. */ - -/** -* Define attributes such as Runtime filters and Runtime parameters to send security entitlements to a user session. For more information, see [Documentation](https://developers.thoughtspot.com/docs/abac-user-parameters). -*/ -declare class UserParameterOptions { - 'objects'?: Array | null; +declare class ValidateCommunicationChannelRequest { /** - * Objects to apply the User_Runtime_Filters. Examples to set the `runtime_filters` : ```json { \"column_name\": \"Color\", \"operator\": \"EQ\", \"values\": [\"red\"], \"persist\": false } ``` + * Type of communication channel to validate (e.g., WEBHOOK). */ - 'runtime_filters'?: Array | null; + 'channel_type': ValidateCommunicationChannelRequestChannelTypeEnum; /** - * Objects to apply the User_Runtime_Sorts. Examples to set the `runtime_sorts` : ```json { \"column_name\": \"Color\", \"order\": \"ASC\", \"persist\": false } ``` + * Unique identifier or name for the communication channel. */ - 'runtime_sorts'?: Array | null; + 'channel_identifier': string; /** - * Objects to apply the Runtime_Parameters. Examples to set the `parameters` : ```json { \"name\": \"Color\", \"values\": [\"Blue\"], \"persist\": false } ``` + * Event type to validate for this channel. */ - 'parameters'?: Array | null; + 'event_type': ValidateCommunicationChannelRequestEventTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -18277,6 +19487,8 @@ declare class UserParameterOptions { }[]; constructor(); } +type ValidateCommunicationChannelRequestChannelTypeEnum = "WEBHOOK"; +type ValidateCommunicationChannelRequestEventTypeEnum = "LIVEBOARD_SCHEDULE"; /** * ThoughtSpot Public REST API @@ -18368,7 +19580,7 @@ declare class VariableValue { */ 'org_identifier': string; /** - * Principal type + * Type of principal to which this value applies. Use USER to assign the value to a specific user, or USER_GROUP to assign it to a group. */ 'principal_type'?: VariableValuePrincipalTypeEnum | null; /** @@ -18451,7 +19663,7 @@ declare class Variable { }[]; constructor(); } -type VariableVariableTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE"; +type VariableVariableTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE" | "USER_PROPERTY"; /** * ThoughtSpot Public REST API @@ -18677,6 +19889,45 @@ declare class WebhookDeleteFailure { constructor(); } +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** +* Key-value pair for additional webhook headers. +*/ +declare class WebhookKeyValuePair { + /** + * Header name. + */ + 'key': string; + /** + * Header value. + */ + 'value': string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} + /** * ThoughtSpot Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) @@ -18836,6 +20087,10 @@ declare class WebhookResponse { 'authentication'?: WebhookAuthentication; 'signature_verification'?: WebhookSignatureVerification; /** + * Additional headers as an array of key-value pairs. Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array | null; + /** * Creation time of the webhook configuration in milliseconds. */ 'creation_time_in_millis': number; @@ -19267,59 +20522,59 @@ declare class RequiredError extends Error { */ declare class AIApiRequestFactory extends BaseAPIRequestFactory { /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; @@ -19537,6 +20792,67 @@ declare class AuthenticationApiResponseProcessor { validateToken(response: ResponseContext): Promise; } +/** + * no description + */ +declare class CollectionsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise; +} +declare class CollectionsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + createCollection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCollection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCollection(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCollections + * @throws ApiException if the response code was not in [200, 299] + */ + searchCollections(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + updateCollection(response: ResponseContext): Promise; +} + /** * no description */ @@ -19603,7 +20919,7 @@ declare class ConnectionConfigurationsApiResponseProcessor { */ declare class ConnectionsApiRequestFactory extends BaseAPIRequestFactory { /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise; @@ -20175,6 +21491,27 @@ declare class GroupsApiResponseProcessor { updateUserGroup(response: ResponseContext): Promise; } +/** + * no description + */ +declare class JobsApiRequestFactory extends BaseAPIRequestFactory { + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise; +} +declare class JobsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + searchChannelHistory(response: ResponseContext): Promise; +} + /** * no description */ @@ -20251,10 +21588,15 @@ declare class MetadataApiRequestFactory extends BaseAPIRequestFactory { */ importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Promise; /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise; /** * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. * @param searchMetadataRequest @@ -20365,6 +21707,14 @@ declare class MetadataApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ parameterizeMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadataFields + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadataFields(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -20795,6 +22145,11 @@ declare class SystemApiRequestFactory extends BaseAPIRequestFactory { * @param updateSystemConfigRequest */ updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise; } declare class SystemApiResponseProcessor { /** @@ -20861,6 +22216,14 @@ declare class SystemApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ updateSystemConfig(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + validateCommunicationChannel(response: ResponseContext): Promise; } /** @@ -21005,7 +22368,7 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; @@ -21014,13 +22377,18 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { * @param createCalendarRequest */ createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. * @param createConfigRequest */ createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Promise; /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise; @@ -21030,7 +22398,7 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; @@ -21127,6 +22495,11 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { * @param calendarIdentifier Unique ID or name of the Calendar. */ deleteCalendar(calendarIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param deleteConfigRequest @@ -21203,10 +22576,15 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise; /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise; /** * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. * @param deleteWebhookConfigurationsRequest @@ -21321,7 +22699,7 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; @@ -21331,7 +22709,7 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise; @@ -21341,7 +22719,7 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; @@ -21392,17 +22770,28 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Promise; /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise; /** * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. * @param publishMetadataRequest */ publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Promise; /** - * Version: 10.7.0.cl or later + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise; + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; @@ -21433,6 +22822,16 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { * @param searchCalendarsRequest */ searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. * @param searchCommitsRequest @@ -21519,24 +22918,24 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise; @@ -21546,7 +22945,7 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; @@ -21571,6 +22970,12 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { * @param updateCalendarRequest */ updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise; /** * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups * @param updateColumnSecurityRulesRequest @@ -21682,7 +23087,7 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { */ updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; @@ -21692,6 +23097,11 @@ declare class ThoughtSpotRestApiRequestFactory extends BaseAPIRequestFactory { * @param updateWebhookConfigurationRequest */ updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise; /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -21804,6 +23214,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ createCalendar(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + createCollection(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -21964,6 +23382,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ deleteCalendar(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCollection + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCollection(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -22092,6 +23518,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ deleteVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariables(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -22404,6 +23838,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ parameterizeMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to parameterizeMetadataFields + * @throws ApiException if the response code was not in [200, 299] + */ + parameterizeMetadataFields(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -22412,6 +23854,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ publishMetadata(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to putVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + putVariableValues(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -22460,6 +23910,22 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ searchCalendars(response: ResponseContext): Promise>; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + searchChannelHistory(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchCollections + * @throws ApiException if the response code was not in [200, 299] + */ + searchCollections(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -22676,6 +24142,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ updateCalendar(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + updateCollection(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -22836,6 +24310,14 @@ declare class ThoughtSpotRestApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ updateWebhookConfiguration(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + validateCommunicationChannel(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -23011,10 +24493,21 @@ declare class VariableApiRequestFactory extends BaseAPIRequestFactory { */ createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise; + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise; /** * Search variables Version: 10.14.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier * @param searchVariablesRequest @@ -23027,7 +24520,7 @@ declare class VariableApiRequestFactory extends BaseAPIRequestFactory { */ updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; @@ -23049,6 +24542,22 @@ declare class VariableApiResponseProcessor { * @throws ApiException if the response code was not in [200, 299] */ deleteVariable(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariables(response: ResponseContext): Promise; + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to putVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + putVariableValues(response: ResponseContext): Promise; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -23266,59 +24775,59 @@ declare class PromiseAIApi { private api; constructor(configuration: Configuration, requestFactory?: AIApiRequestFactory, responseProcessor?: AIApiResponseProcessor); /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise>; /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; @@ -23371,6 +24880,32 @@ declare class PromiseAuthenticationApi { validateToken(validateTokenRequest: ValidateTokenRequest, _options?: Configuration): Promise; } +declare class PromiseCollectionsApi { + private api; + constructor(configuration: Configuration, requestFactory?: CollectionsApiRequestFactory, responseProcessor?: CollectionsApiResponseProcessor); + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise; +} + declare class PromiseConnectionConfigurationsApi { private api; constructor(configuration: Configuration, requestFactory?: ConnectionConfigurationsApiRequestFactory, responseProcessor?: ConnectionConfigurationsApiResponseProcessor); @@ -23401,7 +24936,7 @@ declare class PromiseConnectionsApi { private api; constructor(configuration: Configuration, requestFactory?: ConnectionsApiRequestFactory, responseProcessor?: ConnectionsApiResponseProcessor); /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise; @@ -23649,6 +25184,16 @@ declare class PromiseGroupsApi { updateUserGroup(groupIdentifier: string, updateUserGroupRequest: UpdateUserGroupRequest, _options?: Configuration): Promise; } +declare class PromiseJobsApi { + private api; + constructor(configuration: Configuration, requestFactory?: JobsApiRequestFactory, responseProcessor?: JobsApiResponseProcessor); + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise; +} + declare class PromiseLogApi { private api; constructor(configuration: Configuration, requestFactory?: LogApiRequestFactory, responseProcessor?: LogApiResponseProcessor); @@ -23713,10 +25258,15 @@ declare class PromiseMetadataApi { */ importMetadataTMLAsync(importMetadataTMLAsyncRequest: ImportMetadataTMLAsyncRequest, _options?: Configuration): Promise; /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise; /** * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. * @param searchMetadataRequest @@ -23927,6 +25477,11 @@ declare class PromiseSystemApi { * @param updateSystemConfigRequest */ updateSystemConfig(updateSystemConfigRequest: UpdateSystemConfigRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise; } declare class PromiseTagsApi { @@ -24019,7 +25574,7 @@ declare class PromiseThoughtSpotRestApi { */ copyObject(copyObjectRequest: CopyObjectRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise; @@ -24028,13 +25583,18 @@ declare class PromiseThoughtSpotRestApi { * @param createCalendarRequest */ createCalendar(createCalendarRequest: CreateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. * @param createConfigRequest */ createConfig(createConfigRequest: CreateConfigRequest, _options?: Configuration): Promise; /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise; @@ -24044,7 +25604,7 @@ declare class PromiseThoughtSpotRestApi { */ createConnectionConfiguration(createConnectionConfigurationRequest: CreateConnectionConfigurationRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise; @@ -24141,6 +25701,11 @@ declare class PromiseThoughtSpotRestApi { * @param calendarIdentifier Unique ID or name of the Calendar. */ deleteCalendar(calendarIdentifier: string, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param deleteConfigRequest @@ -24217,10 +25782,15 @@ declare class PromiseThoughtSpotRestApi { */ deleteUserGroup(groupIdentifier: string, _options?: Configuration): Promise; /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise; /** * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. * @param deleteWebhookConfigurationsRequest @@ -24335,7 +25905,7 @@ declare class PromiseThoughtSpotRestApi { */ getCustomAccessToken(getCustomAccessTokenRequest: GetCustomAccessTokenRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise; @@ -24345,7 +25915,7 @@ declare class PromiseThoughtSpotRestApi { */ getFullAccessToken(getFullAccessTokenRequest: GetFullAccessTokenRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise; @@ -24355,7 +25925,7 @@ declare class PromiseThoughtSpotRestApi { */ getObjectAccessToken(getObjectAccessTokenRequest: GetObjectAccessTokenRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise; @@ -24406,17 +25976,28 @@ declare class PromiseThoughtSpotRestApi { */ manageObjectPrivilege(manageObjectPrivilegeRequest: ManageObjectPrivilegeRequest, _options?: Configuration): Promise; /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise; + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise; /** * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. * @param publishMetadataRequest */ publishMetadata(publishMetadataRequest: PublishMetadataRequest, _options?: Configuration): Promise; /** - * Version: 10.7.0.cl or later + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise; + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise; @@ -24447,6 +26028,16 @@ declare class PromiseThoughtSpotRestApi { * @param searchCalendarsRequest */ searchCalendars(searchCalendarsRequest: SearchCalendarsRequest, _options?: Configuration): Promise>; + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise; /** * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. * @param searchCommitsRequest @@ -24533,24 +26124,24 @@ declare class PromiseThoughtSpotRestApi { */ searchWebhookConfigurations(searchWebhookConfigurationsRequest: SearchWebhookConfigurationsRequest, _options?: Configuration): Promise; /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ sendAgentMessage(conversationIdentifier: string, sendAgentMessageRequest: SendAgentMessageRequest, _options?: Configuration): Promise; /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ sendMessage(conversationIdentifier: string, sendMessageRequest: SendMessageRequest, _options?: Configuration): Promise>; /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise; @@ -24560,7 +26151,7 @@ declare class PromiseThoughtSpotRestApi { */ shareMetadata(shareMetadataRequest: ShareMetadataRequest, _options?: Configuration): Promise; /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise; @@ -24585,6 +26176,12 @@ declare class PromiseThoughtSpotRestApi { * @param updateCalendarRequest */ updateCalendar(calendarIdentifier: string, updateCalendarRequest: UpdateCalendarRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise; /** * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups * @param updateColumnSecurityRulesRequest @@ -24696,7 +26293,7 @@ declare class PromiseThoughtSpotRestApi { */ updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; @@ -24706,6 +26303,11 @@ declare class PromiseThoughtSpotRestApi { * @param updateWebhookConfigurationRequest */ updateWebhookConfiguration(webhookIdentifier: string, updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest, _options?: Configuration): Promise; + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise; /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -24787,10 +26389,21 @@ declare class PromiseVariableApi { */ createVariable(createVariableRequest: CreateVariableRequest, _options?: Configuration): Promise; /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier: string, _options?: Configuration): Promise; + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise; + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise; /** * Search variables Version: 10.14.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier * @param searchVariablesRequest @@ -24803,7 +26416,7 @@ declare class PromiseVariableApi { */ updateVariable(identifier: string, updateVariableRequest: UpdateVariableRequest, _options?: Configuration): Promise; /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise; @@ -24932,4 +26545,4 @@ declare const createBearerAuthenticationConfig: (thoughtSpotHost: string, paramO */ declare const createBasicConfig: (thoughtSpotHost: string, options?: ConfigurationOptions) => Configuration; -export { PromiseAIApi as AIApi, AIContext, APIKey, APIKeyInput, AccessToken, ActionConfig, ActionConfigInput, ActionConfigInputCreate, ActionConfigInputCreatePositionEnum, ActionConfigInputPositionEnum, ActionDetails, ActionDetailsInput, ActionDetailsInputCreate, ActivateUserRequest, AgentConversation, AnswerContent, AnswerContextInput, AnswerDataResponse, ApiException, ApiKeyConfiguration, AssignChangeAuthorRequest, AssignTagRequest, AssociateMetadataInput, AssociateMetadataInputCreate, AssociateMetadataInputCreateTypeEnum, AssociateMetadataInputTypeEnum, AuthMethods, AuthMethodsConfiguration, Authentication, PromiseAuthenticationApi as AuthenticationApi, AuthenticationInput, Author, AuthorMetadataTypeInput, AuthorMetadataTypeInputTypeEnum, AuthorType, AwsS3Config, AwsS3ConfigInput, BaseServerConfiguration, BasicAuth, BasicAuthInput, BearerAuthAuthentication, CALLBACK, CALLBACKInput, CALLBACKInputMandatory, CalendarResponse, ChangeUserPasswordRequest, ClusterNonEmbedAccess, ClusterNonEmbedAccessInput, Column, ColumnSecurityRule, ColumnSecurityRuleColumn, ColumnSecurityRuleGroup, ColumnSecurityRuleGroupOperation, ColumnSecurityRuleGroupOperationOperationEnum, ColumnSecurityRuleResponse, ColumnSecurityRuleSourceTable, ColumnSecurityRuleTableInput, ColumnSecurityRuleUpdate, CommitBranchRequest, CommitFileType, CommitHistoryResponse, CommitResponse, CommiterType, CommunicationChannelPreferencesResponse, Configuration, ConfigureCommunicationChannelPreferencesRequest, ConfigureSecuritySettingsRequest, ConfigureSecuritySettingsRequestClusterPreferences, ConnectionConfigurationResponse, ConnectionConfigurationResponseDataWarehouseTypeEnum, ConnectionConfigurationResponsePolicyProcessesEnum, ConnectionConfigurationResponsePolicyTypeEnum, ConnectionConfigurationSearchRequest, ConnectionConfigurationSearchRequestPolicyTypeEnum, PromiseConnectionConfigurationsApi as ConnectionConfigurationsApi, ConnectionInput, PromiseConnectionsApi as ConnectionsApi, ContextPayloadV2Input, ContextPayloadV2InputTypeEnum, Conversation, ConversationSettingsInput, ConvertWorksheetToModelRequest, CopyObjectRequest, CopyObjectRequestTypeEnum, CreateAgentConversationRequest, CreateAgentConversationRequestConversationSettings, CreateAgentConversationRequestMetadataContext, CreateAgentConversationRequestMetadataContextTypeEnum, CreateCalendarRequest, CreateCalendarRequestCalendarTypeEnum, CreateCalendarRequestCreationMethodEnum, CreateCalendarRequestMonthOffsetEnum, CreateCalendarRequestStartDayOfWeekEnum, CreateCalendarRequestTableReference, CreateConfigRequest, CreateConnectionConfigurationRequest, CreateConnectionConfigurationRequestAuthenticationTypeEnum, CreateConnectionConfigurationRequestPolicyProcessOptions, CreateConnectionConfigurationRequestPolicyProcessesEnum, CreateConnectionConfigurationRequestPolicyTypeEnum, CreateConnectionRequest, CreateConnectionRequestDataWarehouseTypeEnum, CreateConnectionResponse, CreateConnectionResponseDataWarehouseTypeEnum, CreateConversationRequest, CreateCustomActionRequest, CreateCustomActionRequestActionDetails, CreateCustomActionRequestDefaultActionConfig, CreateEmailCustomizationRequest, CreateEmailCustomizationRequestTemplateProperties, CreateEmailCustomizationResponse, CreateOrgRequest, CreateRoleRequest, CreateRoleRequestPrivilegesEnum, CreateScheduleRequest, CreateScheduleRequestFileFormatEnum, CreateScheduleRequestFrequency, CreateScheduleRequestLiveboardOptions, CreateScheduleRequestMetadataTypeEnum, CreateScheduleRequestPdfOptions, CreateScheduleRequestPdfOptionsPageSizeEnum, CreateScheduleRequestRecipientDetails, CreateScheduleRequestTimeZoneEnum, CreateTagRequest, CreateUserGroupRequest, CreateUserGroupRequestPrivilegesEnum, CreateUserGroupRequestTypeEnum, CreateUserGroupRequestVisibilityEnum, CreateUserRequest, CreateUserRequestAccountStatusEnum, CreateUserRequestAccountTypeEnum, CreateUserRequestPreferredLocaleEnum, CreateUserRequestVisibilityEnum, CreateVariableRequest, CreateVariableRequestDataTypeEnum, CreateVariableRequestTypeEnum, CreateWebhookConfigurationRequest, CreateWebhookConfigurationRequestAuthentication, CreateWebhookConfigurationRequestEventsEnum, CreateWebhookConfigurationRequestSignatureVerification, CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum, CreateWebhookConfigurationRequestSignatureVerificationTypeEnum, CreateWebhookConfigurationRequestStorageDestination, CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum, CronExpression, CronExpressionInput, CspSettings, CspSettingsInput, PromiseCustomActionApi as CustomActionApi, CustomActionMetadataTypeInput, CustomActionMetadataTypeInputTypeEnum, PromiseCustomCalendarsApi as CustomCalendarsApi, PromiseDBTApi as DBTApi, PromiseDataApi as DataApi, DataSource, DataSourceContextInput, DataWarehouseObjectInput, DataWarehouseObjects, Database, DbtSearchResponse, DeactivateUserRequest, DefaultActionConfig, DefaultActionConfigInput, DefaultActionConfigInputCreate, DefaultActionConfigSearchInput, DeleteConfigRequest, DeleteConnectionConfigurationRequest, DeleteConnectionRequest, DeleteMetadataRequest, DeleteMetadataTypeInput, DeleteMetadataTypeInputTypeEnum, DeleteOrgEmailCustomizationRequest, DeleteWebhookConfigurationsRequest, DeployCommitRequest, DeployCommitRequestDeployPolicyEnum, DeployCommitRequestDeployTypeEnum, DeployResponse, PromiseEmailCustomizationApi as EmailCustomizationApi, EntityHeader, ErrorResponse, EurekaDataSourceSuggestionResponse, EurekaDecomposeQueryResponse, EurekaGetNLInstructionsResponse, EurekaGetRelevantQuestionsResponse, EurekaLLMDecomposeQueryResponse, EurekaLLMSuggestedQuery, EurekaRelevantQuestion, EurekaSetNLInstructionsResponse, EventChannelConfig, EventChannelConfigChannelsEnum, EventChannelConfigEventTypeEnum, EventChannelConfigInput, EventChannelConfigInputChannelsEnum, EventChannelConfigInputEventTypeEnum, ExcludeMetadataListItemInput, ExcludeMetadataListItemInputTypeEnum, ExportAnswerReportRequest, ExportAnswerReportRequestFileFormatEnum, ExportAnswerReportRequestRegionalSettings, ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum, ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsUserLocaleEnum, ExportLiveboardReportRequest, ExportLiveboardReportRequestFileFormatEnum, ExportLiveboardReportRequestPdfOptions, ExportLiveboardReportRequestPdfOptionsPageOrientationEnum, ExportLiveboardReportRequestPngOptions, ExportMetadataTMLBatchedRequest, ExportMetadataTMLBatchedRequestEdocFormatEnum, ExportMetadataTMLBatchedRequestMetadataTypeEnum, ExportMetadataTMLRequest, ExportMetadataTMLRequestEdocFormatEnum, ExportMetadataTMLRequestExportOptions, ExportMetadataTMLRequestExportSchemaVersionEnum, ExportMetadataTypeInput, ExportMetadataTypeInputTypeEnum, ExportOptions, ExternalTableInput, FavoriteMetadataInput, FavoriteMetadataInputTypeEnum, FavoriteMetadataItem, FavoriteMetadataItemTypeEnum, FavoriteObjectOptionsInput, FetchAnswerDataRequest, FetchAnswerDataRequestDataFormatEnum, FetchAnswerSqlQueryRequest, FetchAsyncImportTaskStatusRequest, FetchAsyncImportTaskStatusRequestTaskStatusEnum, FetchColumnSecurityRulesRequest, FetchConnectionDiffStatusResponse, FetchLiveboardDataRequest, FetchLiveboardDataRequestDataFormatEnum, FetchLiveboardSqlQueryRequest, FetchLogsRequest, FetchLogsRequestLogTypeEnum, FetchObjectPrivilegesRequest, FetchPermissionsOfPrincipalsRequest, FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum, FetchPermissionsOnMetadataRequest, FilterRules, FilterRulesOperatorEnum, ForceLogoutUsersRequest, Frequency, FrequencyInput, GenerateCSVRequest, GenerateCSVRequestCalendarTypeEnum, GenerateCSVRequestMonthOffsetEnum, GenerateCSVRequestStartDayOfWeekEnum, GenericInfo, GetAsyncImportStatusResponse, GetCustomAccessTokenRequest, GetCustomAccessTokenRequestPersistOptionEnum, GetDataSourceSuggestionsRequest, GetFullAccessTokenRequest, GetFullAccessTokenRequestUserParameters, GetNLInstructionsRequest, GetObjectAccessTokenRequest, GetRelevantQuestionsRequest, GetRelevantQuestionsRequestAiContext, GetRelevantQuestionsRequestMetadataContext, GetTokenResponse, GroupInfo, GroupObject, PromiseGroupsApi as GroupsApi, GroupsImportListInput, GroupsImportListInputPrivilegesEnum, GroupsImportListInputTypeEnum, GroupsImportListInputVisibilityEnum, HeaderAttributeInput, HeaderUpdateInput, HeaderUpdateInputTypeEnum, HttpBasicConfiguration, HttpBearerConfiguration, HttpException, HttpFile, HttpLibrary, HttpMethod, ImportEPackAsyncTaskStatus, ImportEPackAsyncTaskStatusImportPolicyEnum, ImportEPackAsyncTaskStatusTaskStatusEnum, ImportMetadataTMLAsyncRequest, ImportMetadataTMLAsyncRequestImportPolicyEnum, ImportMetadataTMLRequest, ImportMetadataTMLRequestImportPolicyEnum, ImportUser, ImportUserAccountStatusEnum, ImportUserAccountTypeEnum, ImportUserGroupsRequest, ImportUserGroupsResponse, ImportUserPreferredLocaleEnum, ImportUserType, ImportUserVisibilityEnum, ImportUsersRequest, ImportUsersResponse, InputEurekaNLSRequest, IsomorphicFetchHttpLibrary, JWTMetadataObject, JWTMetadataObjectTypeEnum, JWTParameter, JWTUserOptions, JWTUserOptionsFull, LBContextInput, LiveboardContent, LiveboardDataResponse, LiveboardOptions, LiveboardOptionsInput, PromiseLogApi as LogApi, LogResponse, LoginRequest, ManageObjectPrivilegeRequest, ManageObjectPrivilegeRequestMetadataTypeEnum, ManageObjectPrivilegeRequestObjectPrivilegeTypesEnum, ManageObjectPrivilegeRequestOperationEnum, PromiseMetadataApi as MetadataApi, MetadataAssociationItem, MetadataContext, MetadataInput, MetadataInputTypeEnum, MetadataListItemInput, MetadataListItemInputSubtypesEnum, MetadataListItemInputTypeEnum, MetadataObject, MetadataObjectTypeEnum, MetadataResponse, MetadataResponseTypeEnum, MetadataSearchResponse, MetadataSearchResponseMetadataTypeEnum, MetadataSearchSortOptions, MetadataSearchSortOptionsFieldNameEnum, MetadataSearchSortOptionsOrderEnum, PromiseMiddleware as Middleware, ModelTableList, NLInstructionsInfo, NLInstructionsInfoInput, NLInstructionsInfoInputScopeEnum, NLInstructionsInfoScopeEnum, OAuth2Configuration, ObjectIDAndName, ObjectPrivilegesMetadataInput, ObjectPrivilegesMetadataInputTypeEnum, ObjectPrivilegesOfMetadataResponse, Org, OrgChannelConfigInput, OrgChannelConfigInputOperationEnum, OrgChannelConfigInputResetEventsEnum, OrgChannelConfigResponse, OrgDetails, OrgInfo, OrgNonEmbedAccess, OrgNonEmbedAccessInput, OrgPreferenceSearchCriteriaInput, OrgPreferenceSearchCriteriaInputEventTypesEnum, OrgResponse, OrgResponseStatusEnum, OrgResponseVisibilityEnum, OrgType, PromiseOrgsApi as OrgsApi, ParameterValues, ParameterizeMetadataRequest, ParameterizeMetadataRequestFieldTypeEnum, ParameterizeMetadataRequestMetadataTypeEnum, ParametersListItem, ParametersListItemInput, PdfOptions, PdfOptionsInput, PdfOptionsInputPageOrientationEnum, PdfOptionsPageSizeEnum, PermissionInput, PermissionInputShareModeEnum, PermissionOfMetadataResponse, PermissionOfPrincipalsResponse, PermissionsMetadataTypeInput, PermissionsMetadataTypeInputTypeEnum, PngOptionsInput, PolicyProcessOptions, PolicyProcessOptionsInput, PrincipalsInput, PrincipalsInputTypeEnum, PrincipalsListItem, PrincipalsListItemInput, PromiseHttpLibrary, PublishMetadataListItem, PublishMetadataListItemTypeEnum, PublishMetadataRequest, QueryGetDecomposedQueryRequest, QueryGetDecomposedQueryRequestNlsRequest, RecipientDetails, RecipientDetailsInput, RegionalSettingsInput, RegionalSettingsInputCurrencyFormatEnum, RegionalSettingsInputDateFormatLocaleEnum, RegionalSettingsInputNumberFormatLocaleEnum, RegionalSettingsInputUserLocaleEnum, RepoConfigObject, PromiseReportsApi as ReportsApi, RequestBody, RequestContext, RequiredError, ResetUserPasswordRequest, ResponseActivationURL, ResponseBody, ResponseContext, ResponseCopyObject, ResponseCustomAction, ResponseFailedEntities, ResponseFailedEntity, ResponseIncompleteEntities, ResponseIncompleteEntity, ResponseMessage, ResponseMessageMessageTypeEnum, ResponseMessageVisualizationTypeEnum, ResponsePostUpgradeFailedEntities, ResponsePostUpgradeFailedEntity, ResponseSchedule, ResponseScheduleRun, ResponseSuccessfulEntities, ResponseSuccessfulEntity, ResponseWorksheetToModelConversion, RevertCommitRequest, RevertCommitRequestRevertPolicyEnum, RevertResponse, RevertedMetadata, RevokeRefreshTokensRequest, RevokeRefreshTokensResponse, RevokeTokenRequest, RiseGQLArgWrapper, RiseSetter, Role, RoleResponse, RoleResponsePermissionEnum, RoleResponsePrivilegesEnum, PromiseRolesApi as RolesApi, RuntimeFilter, RuntimeFilters, RuntimeFiltersOperatorEnum, RuntimeParamOverride, RuntimeParameters, RuntimeSort, RuntimeSorts, RuntimeSortsOrderEnum, ScheduleHistoryRunsOptionsInput, PromiseSchedulesApi as SchedulesApi, SchedulesPdfOptionsInput, SchedulesPdfOptionsInputPageSizeEnum, SchemaObject, Scope, ScriptSrcUrls, ScriptSrcUrlsInput, SearchCalendarsRequest, SearchCalendarsRequestSortOptions, SearchCalendarsRequestSortOptionsFieldNameEnum, SearchCalendarsRequestSortOptionsOrderEnum, SearchCommitsRequest, SearchCommitsRequestMetadataTypeEnum, SearchCommunicationChannelPreferencesRequest, SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum, SearchConfigRequest, SearchConnectionRequest, SearchConnectionRequestAuthenticationTypeEnum, SearchConnectionRequestDataWarehouseObjectTypeEnum, SearchConnectionRequestDataWarehouseTypesEnum, SearchConnectionRequestSortOptions, SearchConnectionRequestSortOptionsFieldNameEnum, SearchConnectionRequestSortOptionsOrderEnum, SearchConnectionResponse, SearchConnectionResponseDataWarehouseTypeEnum, SearchCustomActionsRequest, SearchCustomActionsRequestDefaultActionConfig, SearchCustomActionsRequestTypeEnum, SearchDataRequest, SearchDataRequestDataFormatEnum, SearchDataResponse, SearchEmailCustomizationRequest, SearchMetadataRequest, SearchMetadataRequestDependentObjectVersionEnum, SearchMetadataRequestFavoriteObjectOptions, SearchMetadataRequestLiveboardResponseVersionEnum, SearchMetadataRequestSortOptions, SearchMetadataRequestSortOptionsFieldNameEnum, SearchMetadataRequestSortOptionsOrderEnum, SearchOrgsRequest, SearchOrgsRequestStatusEnum, SearchOrgsRequestVisibilityEnum, SearchRoleResponse, SearchRoleResponsePermissionEnum, SearchRoleResponsePrivilegesEnum, SearchRolesRequest, SearchRolesRequestPermissionsEnum, SearchRolesRequestPrivilegesEnum, SearchSchedulesRequest, SearchSchedulesRequestHistoryRunsOptions, SearchSchedulesRequestSortOptions, SearchSecuritySettingsRequest, SearchSecuritySettingsRequestScopeEnum, SearchTagsRequest, SearchUserGroupsRequest, SearchUserGroupsRequestPrivilegesEnum, SearchUserGroupsRequestSortOptions, SearchUserGroupsRequestSortOptionsFieldNameEnum, SearchUserGroupsRequestSortOptionsOrderEnum, SearchUserGroupsRequestTypeEnum, SearchUserGroupsRequestVisibilityEnum, SearchUsersRequest, SearchUsersRequestAccountStatusEnum, SearchUsersRequestAccountTypeEnum, SearchUsersRequestPrivilegesEnum, SearchUsersRequestSortOptions, SearchUsersRequestSortOptionsFieldNameEnum, SearchUsersRequestSortOptionsOrderEnum, SearchUsersRequestVisibilityEnum, SearchVariablesRequest, SearchVariablesRequestResponseContentEnum, SearchWebhookConfigurationsRequest, SearchWebhookConfigurationsRequestEventTypeEnum, SearchWebhookConfigurationsRequestSortOptions, SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum, SearchWebhookConfigurationsRequestSortOptionsOrderEnum, PromiseSecurityApi as SecurityApi, SecurityAuthentication, SecuritySettingsClusterPreferences, SecuritySettingsClusterPreferencesInput, SecuritySettingsOrgDetails, SecuritySettingsOrgPreferences, SecuritySettingsOrgPreferencesInput, SecuritySettingsResponse, SelfDecodingBody, SendAgentMessageRequest, SendAgentMessageResponse, SendAgentMessageStreamingRequest, SendMessageRequest, ServerConfiguration, SetNLInstructionsRequest, ShareMetadataRequest, ShareMetadataRequestMetadataTypeEnum, ShareMetadataTypeInput, ShareMetadataTypeInputTypeEnum, SharePermissionsInput, SharePermissionsInputShareModeEnum, SingleAnswerRequest, SortOption, SortOptionFieldNameEnum, SortOptionInput, SortOptionInputFieldNameEnum, SortOptionInputOrderEnum, SortOptionOrderEnum, SortOptions, SortOptionsFieldNameEnum, SortOptionsOrderEnum, SortingOptions, SqlQuery, SqlQueryResponse, SqlQueryResponseMetadataTypeEnum, StorageConfig, StorageConfigInput, StorageDestination, StorageDestinationInput, StorageDestinationInputStorageTypeEnum, StorageDestinationStorageTypeEnum, PromiseSystemApi as SystemApi, SystemConfig, SystemInfo, SystemOverrideInfo, Table, Tag, TagMetadataTypeInput, TagMetadataTypeInputTypeEnum, PromiseTagsApi as TagsApi, TemplatePropertiesInputCreate, PromiseThoughtSpotRestApi as ThoughtSpotRestApi, Token, TokenAccessScopeObject, TokenAccessScopeObjectTypeEnum, TokenProvider, TokenValidationResponse, URL, URLInput, URLInputMandatory, UnassignTagRequest, UnparameterizeMetadataRequest, UnparameterizeMetadataRequestFieldTypeEnum, UnparameterizeMetadataRequestMetadataTypeEnum, UnpublishMetadataRequest, UpdateCalendarRequest, UpdateCalendarRequestCalendarTypeEnum, UpdateCalendarRequestMonthOffsetEnum, UpdateCalendarRequestStartDayOfWeekEnum, UpdateCalendarRequestTableReference, UpdateCalendarRequestUpdateMethodEnum, UpdateColumnSecurityRulesRequest, UpdateConfigRequest, UpdateConnectionConfigurationRequest, UpdateConnectionConfigurationRequestAuthenticationTypeEnum, UpdateConnectionConfigurationRequestPolicyProcessesEnum, UpdateConnectionConfigurationRequestPolicyTypeEnum, UpdateConnectionRequest, UpdateConnectionV2Request, UpdateCustomActionRequest, UpdateCustomActionRequestActionDetails, UpdateCustomActionRequestDefaultActionConfig, UpdateCustomActionRequestOperationEnum, UpdateEmailCustomizationRequest, UpdateMetadataHeaderRequest, UpdateMetadataObjIdRequest, UpdateObjIdInput, UpdateObjIdInputTypeEnum, UpdateOrgRequest, UpdateOrgRequestOperationEnum, UpdateRoleRequest, UpdateRoleRequestPrivilegesEnum, UpdateScheduleRequest, UpdateScheduleRequestFileFormatEnum, UpdateScheduleRequestFrequency, UpdateScheduleRequestLiveboardOptions, UpdateScheduleRequestMetadataTypeEnum, UpdateScheduleRequestPdfOptions, UpdateScheduleRequestPdfOptionsPageSizeEnum, UpdateScheduleRequestRecipientDetails, UpdateScheduleRequestStatusEnum, UpdateScheduleRequestTimeZoneEnum, UpdateSystemConfigRequest, UpdateTagRequest, UpdateUserGroupRequest, UpdateUserGroupRequestOperationEnum, UpdateUserGroupRequestPrivilegesEnum, UpdateUserGroupRequestTypeEnum, UpdateUserGroupRequestVisibilityEnum, UpdateUserRequest, UpdateUserRequestAccountStatusEnum, UpdateUserRequestAccountTypeEnum, UpdateUserRequestOperationEnum, UpdateUserRequestPreferredLocaleEnum, UpdateUserRequestVisibilityEnum, UpdateVariableRequest, UpdateVariableValuesRequest, UpdateWebhookConfigurationRequest, UpdateWebhookConfigurationRequestEventsEnum, User, UserAccountStatusEnum, UserAccountTypeEnum, UserGroup, UserGroupResponse, UserGroupResponseParentTypeEnum, UserGroupResponseTypeEnum, UserGroupResponseVisibilityEnum, UserInfo, UserObject, UserObjectTypeEnum, UserParameterOptions, UserParentTypeEnum, UserPrincipal, UserVisibilityEnum, PromiseUsersApi as UsersApi, ValidateMergeRequest, ValidateTokenRequest, ValueScopeInput, ValueScopeInputPrincipalTypeEnum, Variable, PromiseVariableApi as VariableApi, VariableDetailInput, VariableDetailInputTypeEnum, VariableUpdateAssignmentInput, VariableUpdateAssignmentInputOperationEnum, VariableUpdateScopeInput, VariableUpdateScopeInputPrincipalTypeEnum, VariableValue, VariableValuePrincipalTypeEnum, VariableValues, VariableVariableTypeEnum, PromiseVersionControlApi as VersionControlApi, WebhookAuthApiKey, WebhookAuthApiKeyInput, WebhookAuthBasicAuth, WebhookAuthBasicAuthInput, WebhookAuthOAuth2, WebhookAuthOAuth2Input, WebhookAuthentication, WebhookAuthenticationInput, WebhookDeleteFailure, WebhookDeleteResponse, WebhookOrg, WebhookPagination, WebhookResponse, WebhookResponseEventsEnum, WebhookSearchResponse, WebhookSignatureVerification, WebhookSignatureVerificationAlgorithmEnum, WebhookSignatureVerificationInput, WebhookSignatureVerificationInputAlgorithmEnum, WebhookSignatureVerificationInputTypeEnum, WebhookSignatureVerificationTypeEnum, WebhookSortOptionsInput, WebhookSortOptionsInputFieldNameEnum, WebhookSortOptionsInputOrderEnum, WebhookUser, PromiseWebhooksApi as WebhooksApi, configureAuthMethods, createBasicConfig, createBearerAuthenticationConfig, createConfiguration, server1, servers, wrapHttpLibrary }; +export { PromiseAIApi as AIApi, AIContext, APIKey, APIKeyInput, AccessToken, ActionConfig, ActionConfigInput, ActionConfigInputCreate, ActionConfigInputCreatePositionEnum, ActionConfigInputPositionEnum, ActionDetails, ActionDetailsInput, ActionDetailsInputCreate, ActivateUserRequest, AgentConversation, AnswerContent, AnswerContextInput, AnswerDataResponse, ApiException, ApiKeyConfiguration, AssignChangeAuthorRequest, AssignTagRequest, AssociateMetadataInput, AssociateMetadataInputCreate, AssociateMetadataInputCreateTypeEnum, AssociateMetadataInputTypeEnum, AuthMethods, AuthMethodsConfiguration, Authentication, PromiseAuthenticationApi as AuthenticationApi, AuthenticationInput, Author, AuthorMetadataTypeInput, AuthorMetadataTypeInputTypeEnum, AuthorType, AwsS3Config, AwsS3ConfigInput, BaseServerConfiguration, BasicAuth, BasicAuthInput, BearerAuthAuthentication, CALLBACK, CALLBACKInput, CALLBACKInputMandatory, CalendarResponse, ChangeUserPasswordRequest, ChannelHistoryEventInfo, ChannelHistoryEventInfoTypeEnum, ChannelHistoryEventInput, ChannelHistoryEventInputTypeEnum, ChannelHistoryJob, ChannelHistoryJobStatusEnum, ChannelValidationAwsS3Info, ChannelValidationDetail, ChannelValidationDetailStatusEnum, ChannelValidationDetailValidationStepEnum, ClusterNonEmbedAccess, ClusterNonEmbedAccessInput, Collection, CollectionDeleteResponse, CollectionDeleteTypeIdentifiers, CollectionEntityIdentifier, CollectionMetadataInput, CollectionMetadataInputTypeEnum, CollectionMetadataItem, CollectionSearchResponse, PromiseCollectionsApi as CollectionsApi, Column, ColumnSecurityRule, ColumnSecurityRuleColumn, ColumnSecurityRuleGroup, ColumnSecurityRuleGroupOperation, ColumnSecurityRuleGroupOperationOperationEnum, ColumnSecurityRuleResponse, ColumnSecurityRuleSourceTable, ColumnSecurityRuleTableInput, ColumnSecurityRuleUpdate, CommitBranchRequest, CommitFileType, CommitHistoryResponse, CommitResponse, CommiterType, CommunicationChannelPreferencesResponse, CommunicationChannelValidateResponse, CommunicationChannelValidateResponseChannelTypeEnum, CommunicationChannelValidateResponseEventTypeEnum, CommunicationChannelValidateResponseResultCodeEnum, Configuration, ConfigureCommunicationChannelPreferencesRequest, ConfigureSecuritySettingsRequest, ConfigureSecuritySettingsRequestClusterPreferences, ConnectionConfigurationResponse, ConnectionConfigurationResponseDataWarehouseTypeEnum, ConnectionConfigurationResponsePolicyProcessesEnum, ConnectionConfigurationResponsePolicyTypeEnum, ConnectionConfigurationSearchRequest, ConnectionConfigurationSearchRequestPolicyTypeEnum, PromiseConnectionConfigurationsApi as ConnectionConfigurationsApi, ConnectionInput, PromiseConnectionsApi as ConnectionsApi, ContextPayloadV2Input, ContextPayloadV2InputTypeEnum, Conversation, ConversationSettingsInput, ConvertWorksheetToModelRequest, CopyObjectRequest, CopyObjectRequestTypeEnum, CreateAgentConversationRequest, CreateAgentConversationRequestConversationSettings, CreateAgentConversationRequestMetadataContext, CreateAgentConversationRequestMetadataContextTypeEnum, CreateCalendarRequest, CreateCalendarRequestCalendarTypeEnum, CreateCalendarRequestCreationMethodEnum, CreateCalendarRequestMonthOffsetEnum, CreateCalendarRequestStartDayOfWeekEnum, CreateCalendarRequestTableReference, CreateCollectionRequest, CreateConfigRequest, CreateConnectionConfigurationRequest, CreateConnectionConfigurationRequestAuthenticationTypeEnum, CreateConnectionConfigurationRequestPolicyProcessOptions, CreateConnectionConfigurationRequestPolicyProcessesEnum, CreateConnectionConfigurationRequestPolicyTypeEnum, CreateConnectionRequest, CreateConnectionRequestDataWarehouseTypeEnum, CreateConnectionResponse, CreateConnectionResponseDataWarehouseTypeEnum, CreateConversationRequest, CreateCustomActionRequest, CreateCustomActionRequestActionDetails, CreateCustomActionRequestDefaultActionConfig, CreateEmailCustomizationRequest, CreateEmailCustomizationRequestTemplateProperties, CreateEmailCustomizationResponse, CreateOrgRequest, CreateRoleRequest, CreateRoleRequestPrivilegesEnum, CreateScheduleRequest, CreateScheduleRequestFileFormatEnum, CreateScheduleRequestFrequency, CreateScheduleRequestLiveboardOptions, CreateScheduleRequestMetadataTypeEnum, CreateScheduleRequestPdfOptions, CreateScheduleRequestPdfOptionsPageSizeEnum, CreateScheduleRequestRecipientDetails, CreateScheduleRequestTimeZoneEnum, CreateTagRequest, CreateUserGroupRequest, CreateUserGroupRequestPrivilegesEnum, CreateUserGroupRequestTypeEnum, CreateUserGroupRequestVisibilityEnum, CreateUserRequest, CreateUserRequestAccountStatusEnum, CreateUserRequestAccountTypeEnum, CreateUserRequestPreferredLocaleEnum, CreateUserRequestVisibilityEnum, CreateVariableRequest, CreateVariableRequestDataTypeEnum, CreateVariableRequestTypeEnum, CreateWebhookConfigurationRequest, CreateWebhookConfigurationRequestAuthentication, CreateWebhookConfigurationRequestEventsEnum, CreateWebhookConfigurationRequestSignatureVerification, CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum, CreateWebhookConfigurationRequestSignatureVerificationTypeEnum, CreateWebhookConfigurationRequestStorageDestination, CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum, CronExpression, CronExpressionInput, CspSettings, CspSettingsInput, PromiseCustomActionApi as CustomActionApi, CustomActionMetadataTypeInput, CustomActionMetadataTypeInputTypeEnum, PromiseCustomCalendarsApi as CustomCalendarsApi, PromiseDBTApi as DBTApi, PromiseDataApi as DataApi, DataSource, DataSourceContextInput, DataWarehouseObjectInput, DataWarehouseObjects, Database, DbtSearchResponse, DeactivateUserRequest, DefaultActionConfig, DefaultActionConfigInput, DefaultActionConfigInputCreate, DefaultActionConfigSearchInput, DeleteCollectionRequest, DeleteConfigRequest, DeleteConnectionConfigurationRequest, DeleteConnectionRequest, DeleteMetadataRequest, DeleteMetadataTypeInput, DeleteMetadataTypeInputTypeEnum, DeleteOrgEmailCustomizationRequest, DeleteVariablesRequest, DeleteWebhookConfigurationsRequest, DeployCommitRequest, DeployCommitRequestDeployPolicyEnum, DeployCommitRequestDeployTypeEnum, DeployResponse, PromiseEmailCustomizationApi as EmailCustomizationApi, EntityHeader, ErrorResponse, EurekaDataSourceSuggestionResponse, EurekaDecomposeQueryResponse, EurekaGetNLInstructionsResponse, EurekaGetRelevantQuestionsResponse, EurekaLLMDecomposeQueryResponse, EurekaLLMSuggestedQuery, EurekaRelevantQuestion, EurekaSetNLInstructionsResponse, EventChannelConfig, EventChannelConfigChannelsEnum, EventChannelConfigEventTypeEnum, EventChannelConfigInput, EventChannelConfigInputChannelsEnum, EventChannelConfigInputEventTypeEnum, ExcludeMetadataListItemInput, ExcludeMetadataListItemInputTypeEnum, ExportAnswerReportRequest, ExportAnswerReportRequestFileFormatEnum, ExportAnswerReportRequestRegionalSettings, ExportAnswerReportRequestRegionalSettingsCurrencyFormatEnum, ExportAnswerReportRequestRegionalSettingsDateFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsNumberFormatLocaleEnum, ExportAnswerReportRequestRegionalSettingsUserLocaleEnum, ExportLiveboardReportRequest, ExportLiveboardReportRequestFileFormatEnum, ExportLiveboardReportRequestPdfOptions, ExportLiveboardReportRequestPdfOptionsPageOrientationEnum, ExportLiveboardReportRequestPngOptions, ExportMetadataTMLBatchedRequest, ExportMetadataTMLBatchedRequestEdocFormatEnum, ExportMetadataTMLBatchedRequestMetadataTypeEnum, ExportMetadataTMLRequest, ExportMetadataTMLRequestEdocFormatEnum, ExportMetadataTMLRequestExportOptions, ExportMetadataTMLRequestExportSchemaVersionEnum, ExportMetadataTypeInput, ExportMetadataTypeInputTypeEnum, ExportOptions, ExternalTableInput, FavoriteMetadataInput, FavoriteMetadataInputTypeEnum, FavoriteMetadataItem, FavoriteMetadataItemTypeEnum, FavoriteObjectOptionsInput, FetchAnswerDataRequest, FetchAnswerDataRequestDataFormatEnum, FetchAnswerSqlQueryRequest, FetchAsyncImportTaskStatusRequest, FetchAsyncImportTaskStatusRequestTaskStatusEnum, FetchColumnSecurityRulesRequest, FetchConnectionDiffStatusResponse, FetchLiveboardDataRequest, FetchLiveboardDataRequestDataFormatEnum, FetchLiveboardSqlQueryRequest, FetchLogsRequest, FetchLogsRequestLogTypeEnum, FetchObjectPrivilegesRequest, FetchPermissionsOfPrincipalsRequest, FetchPermissionsOfPrincipalsRequestDefaultMetadataTypeEnum, FetchPermissionsOnMetadataRequest, FilterRules, FilterRulesOperatorEnum, ForceLogoutUsersRequest, Frequency, FrequencyInput, GenerateCSVRequest, GenerateCSVRequestCalendarTypeEnum, GenerateCSVRequestMonthOffsetEnum, GenerateCSVRequestStartDayOfWeekEnum, GenericInfo, GetAsyncImportStatusResponse, GetCustomAccessTokenRequest, GetCustomAccessTokenRequestPersistOptionEnum, GetDataSourceSuggestionsRequest, GetFullAccessTokenRequest, GetFullAccessTokenRequestUserParameters, GetNLInstructionsRequest, GetObjectAccessTokenRequest, GetRelevantQuestionsRequest, GetRelevantQuestionsRequestAiContext, GetRelevantQuestionsRequestMetadataContext, GetTokenResponse, GroupInfo, GroupObject, PromiseGroupsApi as GroupsApi, GroupsImportListInput, GroupsImportListInputPrivilegesEnum, GroupsImportListInputTypeEnum, GroupsImportListInputVisibilityEnum, HeaderAttributeInput, HeaderUpdateInput, HeaderUpdateInputTypeEnum, HttpBasicConfiguration, HttpBearerConfiguration, HttpException, HttpFile, HttpLibrary, HttpMethod, ImportEPackAsyncTaskStatus, ImportEPackAsyncTaskStatusImportPolicyEnum, ImportEPackAsyncTaskStatusTaskStatusEnum, ImportMetadataTMLAsyncRequest, ImportMetadataTMLAsyncRequestImportPolicyEnum, ImportMetadataTMLRequest, ImportMetadataTMLRequestImportPolicyEnum, ImportUser, ImportUserAccountStatusEnum, ImportUserAccountTypeEnum, ImportUserGroupsRequest, ImportUserGroupsResponse, ImportUserPreferredLocaleEnum, ImportUserType, ImportUserVisibilityEnum, ImportUsersRequest, ImportUsersResponse, InputEurekaNLSRequest, IsomorphicFetchHttpLibrary, JWTMetadataObject, JWTMetadataObjectTypeEnum, JWTParameter, JWTUserOptions, JWTUserOptionsFull, JobRecipient, JobRecipientTypeEnum, PromiseJobsApi as JobsApi, LBContextInput, LiveboardContent, LiveboardDataResponse, LiveboardOptions, LiveboardOptionsInput, PromiseLogApi as LogApi, LogResponse, LoginRequest, ManageObjectPrivilegeRequest, ManageObjectPrivilegeRequestMetadataTypeEnum, ManageObjectPrivilegeRequestObjectPrivilegeTypesEnum, ManageObjectPrivilegeRequestOperationEnum, PromiseMetadataApi as MetadataApi, MetadataAssociationItem, MetadataContext, MetadataInput, MetadataInputTypeEnum, MetadataListItemInput, MetadataListItemInputSubtypesEnum, MetadataListItemInputTypeEnum, MetadataObject, MetadataObjectTypeEnum, MetadataResponse, MetadataResponseTypeEnum, MetadataSearchResponse, MetadataSearchResponseMetadataTypeEnum, MetadataSearchSortOptions, MetadataSearchSortOptionsFieldNameEnum, MetadataSearchSortOptionsOrderEnum, PromiseMiddleware as Middleware, ModelTableList, NLInstructionsInfo, NLInstructionsInfoInput, NLInstructionsInfoInputScopeEnum, NLInstructionsInfoScopeEnum, OAuth2Configuration, ObjectIDAndName, ObjectPrivilegesMetadataInput, ObjectPrivilegesMetadataInputTypeEnum, ObjectPrivilegesOfMetadataResponse, Org, OrgChannelConfigInput, OrgChannelConfigInputOperationEnum, OrgChannelConfigInputResetEventsEnum, OrgChannelConfigResponse, OrgDetails, OrgInfo, OrgNonEmbedAccess, OrgNonEmbedAccessInput, OrgPreferenceSearchCriteriaInput, OrgPreferenceSearchCriteriaInputEventTypesEnum, OrgResponse, OrgResponseStatusEnum, OrgResponseVisibilityEnum, OrgType, PromiseOrgsApi as OrgsApi, ParameterValues, ParameterizeMetadataFieldsRequest, ParameterizeMetadataFieldsRequestFieldTypeEnum, ParameterizeMetadataFieldsRequestMetadataTypeEnum, ParameterizeMetadataRequest, ParameterizeMetadataRequestFieldTypeEnum, ParameterizeMetadataRequestMetadataTypeEnum, ParametersListItem, ParametersListItemInput, PdfOptions, PdfOptionsInput, PdfOptionsInputPageOrientationEnum, PdfOptionsPageSizeEnum, PermissionInput, PermissionInputShareModeEnum, PermissionOfMetadataResponse, PermissionOfPrincipalsResponse, PermissionsMetadataTypeInput, PermissionsMetadataTypeInputTypeEnum, PngOptionsInput, PolicyProcessOptions, PolicyProcessOptionsInput, PrincipalsInput, PrincipalsInputTypeEnum, PrincipalsListItem, PrincipalsListItemInput, PromiseHttpLibrary, PublishMetadataListItem, PublishMetadataListItemTypeEnum, PublishMetadataRequest, PutVariableValuesRequest, PutVariableValuesRequestOperationEnum, QueryGetDecomposedQueryRequest, QueryGetDecomposedQueryRequestNlsRequest, RecipientDetails, RecipientDetailsInput, RegionalSettingsInput, RegionalSettingsInputCurrencyFormatEnum, RegionalSettingsInputDateFormatLocaleEnum, RegionalSettingsInputNumberFormatLocaleEnum, RegionalSettingsInputUserLocaleEnum, RepoConfigObject, PromiseReportsApi as ReportsApi, RequestBody, RequestContext, RequiredError, ResetUserPasswordRequest, ResponseActivationURL, ResponseBody, ResponseContext, ResponseCopyObject, ResponseCustomAction, ResponseFailedEntities, ResponseFailedEntity, ResponseIncompleteEntities, ResponseIncompleteEntity, ResponseMessage, ResponseMessageMessageTypeEnum, ResponseMessageVisualizationTypeEnum, ResponsePostUpgradeFailedEntities, ResponsePostUpgradeFailedEntity, ResponseSchedule, ResponseScheduleRun, ResponseSuccessfulEntities, ResponseSuccessfulEntity, ResponseWorksheetToModelConversion, RevertCommitRequest, RevertCommitRequestRevertPolicyEnum, RevertResponse, RevertedMetadata, RevokeRefreshTokensRequest, RevokeRefreshTokensResponse, RevokeTokenRequest, RiseGQLArgWrapper, RiseSetter, Role, RoleResponse, RoleResponsePermissionEnum, RoleResponsePrivilegesEnum, PromiseRolesApi as RolesApi, RuntimeFilter, RuntimeFilters, RuntimeFiltersOperatorEnum, RuntimeParamOverride, RuntimeParameters, RuntimeSort, RuntimeSorts, RuntimeSortsOrderEnum, ScheduleHistoryRunsOptionsInput, PromiseSchedulesApi as SchedulesApi, SchedulesPdfOptionsInput, SchedulesPdfOptionsInputPageSizeEnum, SchemaObject, Scope, ScriptSrcUrls, ScriptSrcUrlsInput, SearchCalendarsRequest, SearchCalendarsRequestSortOptions, SearchCalendarsRequestSortOptionsFieldNameEnum, SearchCalendarsRequestSortOptionsOrderEnum, SearchChannelHistoryRequest, SearchChannelHistoryRequestChannelStatusEnum, SearchChannelHistoryRequestChannelTypeEnum, SearchChannelHistoryResponse, SearchCollectionsRequest, SearchCollectionsRequestSortOptions, SearchCollectionsRequestSortOptionsFieldNameEnum, SearchCollectionsRequestSortOptionsOrderEnum, SearchCommitsRequest, SearchCommitsRequestMetadataTypeEnum, SearchCommunicationChannelPreferencesRequest, SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum, SearchConfigRequest, SearchConnectionRequest, SearchConnectionRequestAuthenticationTypeEnum, SearchConnectionRequestDataWarehouseObjectTypeEnum, SearchConnectionRequestDataWarehouseTypesEnum, SearchConnectionRequestSortOptions, SearchConnectionRequestSortOptionsFieldNameEnum, SearchConnectionRequestSortOptionsOrderEnum, SearchConnectionResponse, SearchConnectionResponseDataWarehouseTypeEnum, SearchCustomActionsRequest, SearchCustomActionsRequestDefaultActionConfig, SearchCustomActionsRequestTypeEnum, SearchDataRequest, SearchDataRequestDataFormatEnum, SearchDataResponse, SearchEmailCustomizationRequest, SearchMetadataRequest, SearchMetadataRequestDependentObjectVersionEnum, SearchMetadataRequestFavoriteObjectOptions, SearchMetadataRequestLiveboardResponseVersionEnum, SearchMetadataRequestSortOptions, SearchMetadataRequestSortOptionsFieldNameEnum, SearchMetadataRequestSortOptionsOrderEnum, SearchOrgsRequest, SearchOrgsRequestStatusEnum, SearchOrgsRequestVisibilityEnum, SearchRoleResponse, SearchRoleResponsePermissionEnum, SearchRoleResponsePrivilegesEnum, SearchRolesRequest, SearchRolesRequestPermissionsEnum, SearchRolesRequestPrivilegesEnum, SearchSchedulesRequest, SearchSchedulesRequestHistoryRunsOptions, SearchSchedulesRequestSortOptions, SearchSecuritySettingsRequest, SearchSecuritySettingsRequestScopeEnum, SearchTagsRequest, SearchUserGroupsRequest, SearchUserGroupsRequestPrivilegesEnum, SearchUserGroupsRequestSortOptions, SearchUserGroupsRequestSortOptionsFieldNameEnum, SearchUserGroupsRequestSortOptionsOrderEnum, SearchUserGroupsRequestTypeEnum, SearchUserGroupsRequestVisibilityEnum, SearchUsersRequest, SearchUsersRequestAccountStatusEnum, SearchUsersRequestAccountTypeEnum, SearchUsersRequestPrivilegesEnum, SearchUsersRequestVisibilityEnum, SearchVariablesRequest, SearchVariablesRequestResponseContentEnum, SearchWebhookConfigurationsRequest, SearchWebhookConfigurationsRequestEventTypeEnum, SearchWebhookConfigurationsRequestSortOptions, SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum, SearchWebhookConfigurationsRequestSortOptionsOrderEnum, PromiseSecurityApi as SecurityApi, SecurityAuthentication, SecuritySettingsClusterPreferences, SecuritySettingsClusterPreferencesInput, SecuritySettingsOrgDetails, SecuritySettingsOrgPreferences, SecuritySettingsOrgPreferencesInput, SecuritySettingsResponse, SelfDecodingBody, SendAgentMessageRequest, SendAgentMessageResponse, SendAgentMessageStreamingRequest, SendMessageRequest, ServerConfiguration, SetNLInstructionsRequest, ShareMetadataRequest, ShareMetadataRequestMetadataTypeEnum, ShareMetadataTypeInput, ShareMetadataTypeInputTypeEnum, SharePermissionsInput, SharePermissionsInputShareModeEnum, SingleAnswerRequest, SortOption, SortOptionFieldNameEnum, SortOptionInput, SortOptionInputFieldNameEnum, SortOptionInputOrderEnum, SortOptionOrderEnum, SortOptions, SortOptionsFieldNameEnum, SortOptionsOrderEnum, SortingOptions, SqlQuery, SqlQueryResponse, SqlQueryResponseMetadataTypeEnum, StorageConfig, StorageConfigInput, StorageDestination, StorageDestinationInput, StorageDestinationInputStorageTypeEnum, StorageDestinationStorageTypeEnum, PromiseSystemApi as SystemApi, SystemConfig, SystemInfo, SystemOverrideInfo, Table, Tag, TagMetadataTypeInput, TagMetadataTypeInputTypeEnum, PromiseTagsApi as TagsApi, TemplatePropertiesInputCreate, PromiseThoughtSpotRestApi as ThoughtSpotRestApi, Token, TokenAccessScopeObject, TokenAccessScopeObjectTypeEnum, TokenProvider, TokenValidationResponse, URL, URLInput, URLInputMandatory, UnassignTagRequest, UnparameterizeMetadataRequest, UnparameterizeMetadataRequestFieldTypeEnum, UnparameterizeMetadataRequestMetadataTypeEnum, UnpublishMetadataRequest, UpdateCalendarRequest, UpdateCalendarRequestCalendarTypeEnum, UpdateCalendarRequestMonthOffsetEnum, UpdateCalendarRequestStartDayOfWeekEnum, UpdateCalendarRequestTableReference, UpdateCalendarRequestUpdateMethodEnum, UpdateCollectionRequest, UpdateCollectionRequestOperationEnum, UpdateColumnSecurityRulesRequest, UpdateConfigRequest, UpdateConnectionConfigurationRequest, UpdateConnectionConfigurationRequestAuthenticationTypeEnum, UpdateConnectionConfigurationRequestPolicyProcessesEnum, UpdateConnectionConfigurationRequestPolicyTypeEnum, UpdateConnectionRequest, UpdateConnectionV2Request, UpdateCustomActionRequest, UpdateCustomActionRequestActionDetails, UpdateCustomActionRequestDefaultActionConfig, UpdateCustomActionRequestOperationEnum, UpdateEmailCustomizationRequest, UpdateMetadataHeaderRequest, UpdateMetadataObjIdRequest, UpdateObjIdInput, UpdateObjIdInputTypeEnum, UpdateOrgRequest, UpdateOrgRequestOperationEnum, UpdateRoleRequest, UpdateRoleRequestPrivilegesEnum, UpdateScheduleRequest, UpdateScheduleRequestFileFormatEnum, UpdateScheduleRequestFrequency, UpdateScheduleRequestLiveboardOptions, UpdateScheduleRequestMetadataTypeEnum, UpdateScheduleRequestPdfOptions, UpdateScheduleRequestPdfOptionsPageSizeEnum, UpdateScheduleRequestRecipientDetails, UpdateScheduleRequestStatusEnum, UpdateScheduleRequestTimeZoneEnum, UpdateSystemConfigRequest, UpdateTagRequest, UpdateUserGroupRequest, UpdateUserGroupRequestOperationEnum, UpdateUserGroupRequestPrivilegesEnum, UpdateUserGroupRequestTypeEnum, UpdateUserGroupRequestVisibilityEnum, UpdateUserRequest, UpdateUserRequestAccountStatusEnum, UpdateUserRequestAccountTypeEnum, UpdateUserRequestOperationEnum, UpdateUserRequestPreferredLocaleEnum, UpdateUserRequestVisibilityEnum, UpdateVariableRequest, UpdateVariableValuesRequest, UpdateWebhookConfigurationRequest, UpdateWebhookConfigurationRequestEventsEnum, User, UserAccountStatusEnum, UserAccountTypeEnum, UserGroup, UserGroupResponse, UserGroupResponseParentTypeEnum, UserGroupResponseTypeEnum, UserGroupResponseVisibilityEnum, UserInfo, UserObject, UserObjectTypeEnum, UserParameterOptions, UserParentTypeEnum, UserPrincipal, UserVisibilityEnum, PromiseUsersApi as UsersApi, ValidateCommunicationChannelRequest, ValidateCommunicationChannelRequestChannelTypeEnum, ValidateCommunicationChannelRequestEventTypeEnum, ValidateMergeRequest, ValidateTokenRequest, ValueScopeInput, ValueScopeInputPrincipalTypeEnum, Variable, PromiseVariableApi as VariableApi, VariableDetailInput, VariableDetailInputTypeEnum, VariablePutAssignmentInput, VariablePutAssignmentInputPrincipalTypeEnum, VariableUpdateAssignmentInput, VariableUpdateAssignmentInputOperationEnum, VariableUpdateScopeInput, VariableUpdateScopeInputPrincipalTypeEnum, VariableValue, VariableValuePrincipalTypeEnum, VariableValues, VariableVariableTypeEnum, PromiseVersionControlApi as VersionControlApi, WebhookAuthApiKey, WebhookAuthApiKeyInput, WebhookAuthBasicAuth, WebhookAuthBasicAuthInput, WebhookAuthOAuth2, WebhookAuthOAuth2Input, WebhookAuthentication, WebhookAuthenticationInput, WebhookDeleteFailure, WebhookDeleteResponse, WebhookKeyValuePair, WebhookKeyValuePairInput, WebhookOrg, WebhookPagination, WebhookResponse, WebhookResponseEventsEnum, WebhookSearchResponse, WebhookSignatureVerification, WebhookSignatureVerificationAlgorithmEnum, WebhookSignatureVerificationInput, WebhookSignatureVerificationInputAlgorithmEnum, WebhookSignatureVerificationInputTypeEnum, WebhookSignatureVerificationTypeEnum, WebhookSortOptionsInput, WebhookSortOptionsInputFieldNameEnum, WebhookSortOptionsInputOrderEnum, WebhookUser, PromiseWebhooksApi as WebhooksApi, configureAuthMethods, createBasicConfig, createBearerAuthenticationConfig, createConfiguration, server1, servers, wrapHttpLibrary }; diff --git a/sdks/typescript/dist/index.js b/sdks/typescript/dist/index.js index c3eefbbd9..7d3727e20 100644 --- a/sdks/typescript/dist/index.js +++ b/sdks/typescript/dist/index.js @@ -1268,6 +1268,197 @@ _ChangeUserPasswordRequest.attributeTypeMap = [ ]; var ChangeUserPasswordRequest = _ChangeUserPasswordRequest; +// models/ChannelHistoryEventInfo.ts +var _ChannelHistoryEventInfo = class _ChannelHistoryEventInfo { + static getAttributeTypeMap() { + return _ChannelHistoryEventInfo.attributeTypeMap; + } + constructor() { + } +}; +_ChannelHistoryEventInfo.discriminator = void 0; +_ChannelHistoryEventInfo.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ChannelHistoryEventInfoTypeEnum", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "run_id", + "baseName": "run_id", + "type": "string", + "format": "" + } +]; +var ChannelHistoryEventInfo = _ChannelHistoryEventInfo; + +// models/ChannelHistoryEventInput.ts +var _ChannelHistoryEventInput = class _ChannelHistoryEventInput { + static getAttributeTypeMap() { + return _ChannelHistoryEventInput.attributeTypeMap; + } + constructor() { + } +}; +_ChannelHistoryEventInput.discriminator = void 0; +_ChannelHistoryEventInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "ChannelHistoryEventInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } +]; +var ChannelHistoryEventInput = _ChannelHistoryEventInput; + +// models/ChannelHistoryJob.ts +var _ChannelHistoryJob = class _ChannelHistoryJob { + static getAttributeTypeMap() { + return _ChannelHistoryJob.attributeTypeMap; + } + constructor() { + } +}; +_ChannelHistoryJob.discriminator = void 0; +_ChannelHistoryJob.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "ChannelHistoryJobStatusEnum", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "event", + "baseName": "event", + "type": "ChannelHistoryEventInfo", + "format": "" + }, + { + "name": "recipients", + "baseName": "recipients", + "type": "Array", + "format": "" + }, + { + "name": "detail", + "baseName": "detail", + "type": "string", + "format": "" + }, + { + "name": "try_count", + "baseName": "try_count", + "type": "number", + "format": "int32" + } +]; +var ChannelHistoryJob = _ChannelHistoryJob; + +// models/ChannelValidationAwsS3Info.ts +var _ChannelValidationAwsS3Info = class _ChannelValidationAwsS3Info { + static getAttributeTypeMap() { + return _ChannelValidationAwsS3Info.attributeTypeMap; + } + constructor() { + } +}; +_ChannelValidationAwsS3Info.discriminator = void 0; +_ChannelValidationAwsS3Info.attributeTypeMap = [ + { + "name": "bucket_name", + "baseName": "bucket_name", + "type": "string", + "format": "" + }, + { + "name": "file_name", + "baseName": "file_name", + "type": "string", + "format": "" + }, + { + "name": "object_key", + "baseName": "object_key", + "type": "string", + "format": "" + } +]; +var ChannelValidationAwsS3Info = _ChannelValidationAwsS3Info; + +// models/ChannelValidationDetail.ts +var _ChannelValidationDetail = class _ChannelValidationDetail { + static getAttributeTypeMap() { + return _ChannelValidationDetail.attributeTypeMap; + } + constructor() { + } +}; +_ChannelValidationDetail.discriminator = void 0; +_ChannelValidationDetail.attributeTypeMap = [ + { + "name": "validation_step", + "baseName": "validation_step", + "type": "ChannelValidationDetailValidationStepEnum", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "ChannelValidationDetailStatusEnum", + "format": "" + }, + { + "name": "http_status", + "baseName": "http_status", + "type": "number", + "format": "int32" + }, + { + "name": "error_message", + "baseName": "error_message", + "type": "string", + "format": "" + }, + { + "name": "aws_s3_info", + "baseName": "aws_s3_info", + "type": "ChannelValidationAwsS3Info", + "format": "" + } +]; +var ChannelValidationDetail = _ChannelValidationDetail; + // models/ClusterNonEmbedAccess.ts var _ClusterNonEmbedAccess = class _ClusterNonEmbedAccess { static getAttributeTypeMap() { @@ -1318,6 +1509,241 @@ _ClusterNonEmbedAccessInput.attributeTypeMap = [ ]; var ClusterNonEmbedAccessInput = _ClusterNonEmbedAccessInput; +// models/Collection.ts +var _Collection = class _Collection { + static getAttributeTypeMap() { + return _Collection.attributeTypeMap; + } + constructor() { + } +}; +_Collection.discriminator = void 0; +_Collection.attributeTypeMap = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "created_at", + "baseName": "created_at", + "type": "string", + "format": "" + }, + { + "name": "updated_at", + "baseName": "updated_at", + "type": "string", + "format": "" + }, + { + "name": "author_name", + "baseName": "author_name", + "type": "string", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "CollectionEntityIdentifier", + "format": "" + } +]; +var Collection = _Collection; + +// models/CollectionDeleteResponse.ts +var _CollectionDeleteResponse = class _CollectionDeleteResponse { + static getAttributeTypeMap() { + return _CollectionDeleteResponse.attributeTypeMap; + } + constructor() { + } +}; +_CollectionDeleteResponse.discriminator = void 0; +_CollectionDeleteResponse.attributeTypeMap = [ + { + "name": "metadata_deleted", + "baseName": "metadata_deleted", + "type": "Array", + "format": "" + }, + { + "name": "metadata_skipped", + "baseName": "metadata_skipped", + "type": "Array", + "format": "" + } +]; +var CollectionDeleteResponse = _CollectionDeleteResponse; + +// models/CollectionDeleteTypeIdentifiers.ts +var _CollectionDeleteTypeIdentifiers = class _CollectionDeleteTypeIdentifiers { + static getAttributeTypeMap() { + return _CollectionDeleteTypeIdentifiers.attributeTypeMap; + } + constructor() { + } +}; +_CollectionDeleteTypeIdentifiers.discriminator = void 0; +_CollectionDeleteTypeIdentifiers.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } +]; +var CollectionDeleteTypeIdentifiers = _CollectionDeleteTypeIdentifiers; + +// models/CollectionEntityIdentifier.ts +var _CollectionEntityIdentifier = class _CollectionEntityIdentifier { + static getAttributeTypeMap() { + return _CollectionEntityIdentifier.attributeTypeMap; + } + constructor() { + } +}; +_CollectionEntityIdentifier.discriminator = void 0; +_CollectionEntityIdentifier.attributeTypeMap = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } +]; +var CollectionEntityIdentifier = _CollectionEntityIdentifier; + +// models/CollectionMetadataInput.ts +var _CollectionMetadataInput = class _CollectionMetadataInput { + static getAttributeTypeMap() { + return _CollectionMetadataInput.attributeTypeMap; + } + constructor() { + } +}; +_CollectionMetadataInput.discriminator = void 0; +_CollectionMetadataInput.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "CollectionMetadataInputTypeEnum", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } +]; +var CollectionMetadataInput = _CollectionMetadataInput; + +// models/CollectionMetadataItem.ts +var _CollectionMetadataItem = class _CollectionMetadataItem { + static getAttributeTypeMap() { + return _CollectionMetadataItem.attributeTypeMap; + } + constructor() { + } +}; +_CollectionMetadataItem.discriminator = void 0; +_CollectionMetadataItem.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } +]; +var CollectionMetadataItem = _CollectionMetadataItem; + +// models/CollectionSearchResponse.ts +var _CollectionSearchResponse = class _CollectionSearchResponse { + static getAttributeTypeMap() { + return _CollectionSearchResponse.attributeTypeMap; + } + constructor() { + } +}; +_CollectionSearchResponse.discriminator = void 0; +_CollectionSearchResponse.attributeTypeMap = [ + { + "name": "collections", + "baseName": "collections", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "is_last_batch", + "baseName": "is_last_batch", + "type": "boolean", + "format": "" + }, + { + "name": "count", + "baseName": "count", + "type": "number", + "format": "int32" + } +]; +var CollectionSearchResponse = _CollectionSearchResponse; + // models/Column.ts var _Column = class _Column { static getAttributeTypeMap() { @@ -1807,6 +2233,61 @@ _CommunicationChannelPreferencesResponse.attributeTypeMap = [ ]; var CommunicationChannelPreferencesResponse = _CommunicationChannelPreferencesResponse; +// models/CommunicationChannelValidateResponse.ts +var _CommunicationChannelValidateResponse = class _CommunicationChannelValidateResponse { + static getAttributeTypeMap() { + return _CommunicationChannelValidateResponse.attributeTypeMap; + } + constructor() { + } +}; +_CommunicationChannelValidateResponse.discriminator = void 0; +_CommunicationChannelValidateResponse.attributeTypeMap = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "CommunicationChannelValidateResponseChannelTypeEnum", + "format": "" + }, + { + "name": "channel_id", + "baseName": "channel_id", + "type": "string", + "format": "" + }, + { + "name": "channel_name", + "baseName": "channel_name", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "CommunicationChannelValidateResponseEventTypeEnum", + "format": "" + }, + { + "name": "job_id", + "baseName": "job_id", + "type": "string", + "format": "" + }, + { + "name": "result_code", + "baseName": "result_code", + "type": "CommunicationChannelValidateResponseResultCodeEnum", + "format": "" + }, + { + "name": "details", + "baseName": "details", + "type": "Array", + "format": "" + } +]; +var CommunicationChannelValidateResponse = _CommunicationChannelValidateResponse; + // models/ConfigureCommunicationChannelPreferencesRequest.ts var _ConfigureCommunicationChannelPreferencesRequest = class _ConfigureCommunicationChannelPreferencesRequest { static getAttributeTypeMap() { @@ -2405,6 +2886,37 @@ _CreateCalendarRequestTableReference.attributeTypeMap = [ ]; var CreateCalendarRequestTableReference = _CreateCalendarRequestTableReference; +// models/CreateCollectionRequest.ts +var _CreateCollectionRequest = class _CreateCollectionRequest { + static getAttributeTypeMap() { + return _CreateCollectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_CreateCollectionRequest.discriminator = void 0; +_CreateCollectionRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + } +]; +var CreateCollectionRequest = _CreateCollectionRequest; + // models/CreateConfigRequest.ts var _CreateConfigRequest = class _CreateConfigRequest { static getAttributeTypeMap() { @@ -2946,6 +3458,12 @@ _CreateEmailCustomizationRequestTemplateProperties.attributeTypeMap = [ "baseName": "hide_contact_support_url", "type": "boolean", "format": "" + }, + { + "name": "hide_logo_url", + "baseName": "hide_logo_url", + "type": "boolean", + "format": "" } ]; var CreateEmailCustomizationRequestTemplateProperties = _CreateEmailCustomizationRequestTemplateProperties; @@ -3583,6 +4101,12 @@ _CreateWebhookConfigurationRequest.attributeTypeMap = [ "baseName": "storage_destination", "type": "CreateWebhookConfigurationRequestStorageDestination", "format": "" + }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" } ]; var CreateWebhookConfigurationRequest = _CreateWebhookConfigurationRequest; @@ -4212,6 +4736,37 @@ _DefaultActionConfigSearchInput.attributeTypeMap = [ ]; var DefaultActionConfigSearchInput = _DefaultActionConfigSearchInput; +// models/DeleteCollectionRequest.ts +var _DeleteCollectionRequest = class _DeleteCollectionRequest { + static getAttributeTypeMap() { + return _DeleteCollectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteCollectionRequest.discriminator = void 0; +_DeleteCollectionRequest.attributeTypeMap = [ + { + "name": "collection_identifiers", + "baseName": "collection_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "delete_children", + "baseName": "delete_children", + "type": "boolean", + "format": "" + }, + { + "name": "dry_run", + "baseName": "dry_run", + "type": "boolean", + "format": "" + } +]; +var DeleteCollectionRequest = _DeleteCollectionRequest; + // models/DeleteConfigRequest.ts var _DeleteConfigRequest = class _DeleteConfigRequest { static getAttributeTypeMap() { @@ -4344,6 +4899,25 @@ _DeleteOrgEmailCustomizationRequest.attributeTypeMap = [ ]; var DeleteOrgEmailCustomizationRequest = _DeleteOrgEmailCustomizationRequest; +// models/DeleteVariablesRequest.ts +var _DeleteVariablesRequest = class _DeleteVariablesRequest { + static getAttributeTypeMap() { + return _DeleteVariablesRequest.attributeTypeMap; + } + constructor() { + } +}; +_DeleteVariablesRequest.discriminator = void 0; +_DeleteVariablesRequest.attributeTypeMap = [ + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } +]; +var DeleteVariablesRequest = _DeleteVariablesRequest; + // models/DeleteWebhookConfigurationsRequest.ts var _DeleteWebhookConfigurationsRequest = class _DeleteWebhookConfigurationsRequest { static getAttributeTypeMap() { @@ -7265,6 +7839,43 @@ _JWTUserOptionsFull.attributeTypeMap = [ ]; var JWTUserOptionsFull = _JWTUserOptionsFull; +// models/JobRecipient.ts +var _JobRecipient = class _JobRecipient { + static getAttributeTypeMap() { + return _JobRecipient.attributeTypeMap; + } + constructor() { + } +}; +_JobRecipient.discriminator = void 0; +_JobRecipient.attributeTypeMap = [ + { + "name": "type", + "baseName": "type", + "type": "JobRecipientTypeEnum", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + } +]; +var JobRecipient = _JobRecipient; + // models/LBContextInput.ts var _LBContextInput = class _LBContextInput { static getAttributeTypeMap() { @@ -8276,6 +8887,49 @@ _ParameterValues.attributeTypeMap = [ ]; var ParameterValues = _ParameterValues; +// models/ParameterizeMetadataFieldsRequest.ts +var _ParameterizeMetadataFieldsRequest = class _ParameterizeMetadataFieldsRequest { + static getAttributeTypeMap() { + return _ParameterizeMetadataFieldsRequest.attributeTypeMap; + } + constructor() { + } +}; +_ParameterizeMetadataFieldsRequest.discriminator = void 0; +_ParameterizeMetadataFieldsRequest.attributeTypeMap = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ParameterizeMetadataFieldsRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "field_type", + "baseName": "field_type", + "type": "ParameterizeMetadataFieldsRequestFieldTypeEnum", + "format": "" + }, + { + "name": "field_names", + "baseName": "field_names", + "type": "Array", + "format": "" + }, + { + "name": "variable_identifier", + "baseName": "variable_identifier", + "type": "string", + "format": "" + } +]; +var ParameterizeMetadataFieldsRequest = _ParameterizeMetadataFieldsRequest; + // models/ParameterizeMetadataRequest.ts var _ParameterizeMetadataRequest = class _ParameterizeMetadataRequest { static getAttributeTypeMap() { @@ -8797,6 +9451,31 @@ _PublishMetadataRequest.attributeTypeMap = [ ]; var PublishMetadataRequest = _PublishMetadataRequest; +// models/PutVariableValuesRequest.ts +var _PutVariableValuesRequest = class _PutVariableValuesRequest { + static getAttributeTypeMap() { + return _PutVariableValuesRequest.attributeTypeMap; + } + constructor() { + } +}; +_PutVariableValuesRequest.discriminator = void 0; +_PutVariableValuesRequest.attributeTypeMap = [ + { + "name": "operation", + "baseName": "operation", + "type": "PutVariableValuesRequestOperationEnum", + "format": "" + }, + { + "name": "variable_assignment", + "baseName": "variable_assignment", + "type": "Array", + "format": "" + } +]; +var PutVariableValuesRequest = _PutVariableValuesRequest; + // models/QueryGetDecomposedQueryRequest.ts var _QueryGetDecomposedQueryRequest = class _QueryGetDecomposedQueryRequest { static getAttributeTypeMap() { @@ -10451,6 +11130,154 @@ _SearchCalendarsRequestSortOptions.attributeTypeMap = [ ]; var SearchCalendarsRequestSortOptions = _SearchCalendarsRequestSortOptions; +// models/SearchChannelHistoryRequest.ts +var _SearchChannelHistoryRequest = class _SearchChannelHistoryRequest { + static getAttributeTypeMap() { + return _SearchChannelHistoryRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchChannelHistoryRequest.discriminator = void 0; +_SearchChannelHistoryRequest.attributeTypeMap = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "SearchChannelHistoryRequestChannelTypeEnum", + "format": "" + }, + { + "name": "job_ids", + "baseName": "job_ids", + "type": "Array", + "format": "" + }, + { + "name": "channel_identifiers", + "baseName": "channel_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "channel_status", + "baseName": "channel_status", + "type": "SearchChannelHistoryRequestChannelStatusEnum", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "start_epoch_time_in_millis", + "baseName": "start_epoch_time_in_millis", + "type": "number", + "format": "float" + } +]; +var SearchChannelHistoryRequest = _SearchChannelHistoryRequest; + +// models/SearchChannelHistoryResponse.ts +var _SearchChannelHistoryResponse = class _SearchChannelHistoryResponse { + static getAttributeTypeMap() { + return _SearchChannelHistoryResponse.attributeTypeMap; + } + constructor() { + } +}; +_SearchChannelHistoryResponse.discriminator = void 0; +_SearchChannelHistoryResponse.attributeTypeMap = [ + { + "name": "jobs", + "baseName": "jobs", + "type": "Array", + "format": "" + } +]; +var SearchChannelHistoryResponse = _SearchChannelHistoryResponse; + +// models/SearchCollectionsRequest.ts +var _SearchCollectionsRequest = class _SearchCollectionsRequest { + static getAttributeTypeMap() { + return _SearchCollectionsRequest.attributeTypeMap; + } + constructor() { + } +}; +_SearchCollectionsRequest.discriminator = void 0; +_SearchCollectionsRequest.attributeTypeMap = [ + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "collection_identifiers", + "baseName": "collection_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "created_by_user_identifiers", + "baseName": "created_by_user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "include_metadata", + "baseName": "include_metadata", + "type": "boolean", + "format": "" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchCollectionsRequestSortOptions", + "format": "" + } +]; +var SearchCollectionsRequest = _SearchCollectionsRequest; + +// models/SearchCollectionsRequestSortOptions.ts +var _SearchCollectionsRequestSortOptions = class _SearchCollectionsRequestSortOptions { + static getAttributeTypeMap() { + return _SearchCollectionsRequestSortOptions.attributeTypeMap; + } + constructor() { + } +}; +_SearchCollectionsRequestSortOptions.discriminator = void 0; +_SearchCollectionsRequestSortOptions.attributeTypeMap = [ + { + "name": "field_name", + "baseName": "field_name", + "type": "SearchCollectionsRequestSortOptionsFieldNameEnum", + "format": "" + }, + { + "name": "order", + "baseName": "order", + "type": "SearchCollectionsRequestSortOptionsOrderEnum", + "format": "" + } +]; +var SearchCollectionsRequestSortOptions = _SearchCollectionsRequestSortOptions; + // models/SearchCommitsRequest.ts var _SearchCommitsRequest = class _SearchCommitsRequest { static getAttributeTypeMap() { @@ -11706,7 +12533,7 @@ _SearchUsersRequest.attributeTypeMap = [ { "name": "sort_options", "baseName": "sort_options", - "type": "SearchUsersRequestSortOptions", + "type": "SearchCollectionsRequestSortOptions", "format": "" }, { @@ -11730,31 +12557,6 @@ _SearchUsersRequest.attributeTypeMap = [ ]; var SearchUsersRequest = _SearchUsersRequest; -// models/SearchUsersRequestSortOptions.ts -var _SearchUsersRequestSortOptions = class _SearchUsersRequestSortOptions { - static getAttributeTypeMap() { - return _SearchUsersRequestSortOptions.attributeTypeMap; - } - constructor() { - } -}; -_SearchUsersRequestSortOptions.discriminator = void 0; -_SearchUsersRequestSortOptions.attributeTypeMap = [ - { - "name": "field_name", - "baseName": "field_name", - "type": "SearchUsersRequestSortOptionsFieldNameEnum", - "format": "" - }, - { - "name": "order", - "baseName": "order", - "type": "SearchUsersRequestSortOptionsOrderEnum", - "format": "" - } -]; -var SearchUsersRequestSortOptions = _SearchUsersRequestSortOptions; - // models/SearchVariablesRequest.ts var _SearchVariablesRequest = class _SearchVariablesRequest { static getAttributeTypeMap() { @@ -13130,6 +13932,12 @@ _TemplatePropertiesInputCreate.attributeTypeMap = [ "baseName": "hide_contact_support_url", "type": "boolean", "format": "" + }, + { + "name": "hide_logo_url", + "baseName": "hide_logo_url", + "type": "boolean", + "format": "" } ]; var TemplatePropertiesInputCreate = _TemplatePropertiesInputCreate; @@ -13571,6 +14379,43 @@ _UpdateCalendarRequestTableReference.attributeTypeMap = [ ]; var UpdateCalendarRequestTableReference = _UpdateCalendarRequestTableReference; +// models/UpdateCollectionRequest.ts +var _UpdateCollectionRequest = class _UpdateCollectionRequest { + static getAttributeTypeMap() { + return _UpdateCollectionRequest.attributeTypeMap; + } + constructor() { + } +}; +_UpdateCollectionRequest.discriminator = void 0; +_UpdateCollectionRequest.attributeTypeMap = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateCollectionRequestOperationEnum", + "format": "" + } +]; +var UpdateCollectionRequest = _UpdateCollectionRequest; + // models/UpdateColumnSecurityRulesRequest.ts var _UpdateColumnSecurityRulesRequest = class _UpdateColumnSecurityRulesRequest { static getAttributeTypeMap() { @@ -14655,6 +15500,12 @@ _UpdateWebhookConfigurationRequest.attributeTypeMap = [ "baseName": "storage_destination", "type": "CreateWebhookConfigurationRequestStorageDestination", "format": "" + }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" } ]; var UpdateWebhookConfigurationRequest = _UpdateWebhookConfigurationRequest; @@ -15290,6 +16141,37 @@ _UserPrincipal.attributeTypeMap = [ ]; var UserPrincipal = _UserPrincipal; +// models/ValidateCommunicationChannelRequest.ts +var _ValidateCommunicationChannelRequest = class _ValidateCommunicationChannelRequest { + static getAttributeTypeMap() { + return _ValidateCommunicationChannelRequest.attributeTypeMap; + } + constructor() { + } +}; +_ValidateCommunicationChannelRequest.discriminator = void 0; +_ValidateCommunicationChannelRequest.attributeTypeMap = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "ValidateCommunicationChannelRequestChannelTypeEnum", + "format": "" + }, + { + "name": "channel_identifier", + "baseName": "channel_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "ValidateCommunicationChannelRequestEventTypeEnum", + "format": "" + } +]; +var ValidateCommunicationChannelRequest = _ValidateCommunicationChannelRequest; + // models/ValidateMergeRequest.ts var _ValidateMergeRequest = class _ValidateMergeRequest { static getAttributeTypeMap() { @@ -15445,6 +16327,55 @@ _VariableDetailInput.attributeTypeMap = [ ]; var VariableDetailInput = _VariableDetailInput; +// models/VariablePutAssignmentInput.ts +var _VariablePutAssignmentInput = class _VariablePutAssignmentInput { + static getAttributeTypeMap() { + return _VariablePutAssignmentInput.attributeTypeMap; + } + constructor() { + } +}; +_VariablePutAssignmentInput.discriminator = void 0; +_VariablePutAssignmentInput.attributeTypeMap = [ + { + "name": "assigned_values", + "baseName": "assigned_values", + "type": "Array", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "VariablePutAssignmentInputPrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number", + "format": "int32" + } +]; +var VariablePutAssignmentInput = _VariablePutAssignmentInput; + // models/VariableUpdateAssignmentInput.ts var _VariableUpdateAssignmentInput = class _VariableUpdateAssignmentInput { static getAttributeTypeMap() { @@ -15903,6 +16834,56 @@ _WebhookDeleteResponse.attributeTypeMap = [ ]; var WebhookDeleteResponse = _WebhookDeleteResponse; +// models/WebhookKeyValuePair.ts +var _WebhookKeyValuePair = class _WebhookKeyValuePair { + static getAttributeTypeMap() { + return _WebhookKeyValuePair.attributeTypeMap; + } + constructor() { + } +}; +_WebhookKeyValuePair.discriminator = void 0; +_WebhookKeyValuePair.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var WebhookKeyValuePair = _WebhookKeyValuePair; + +// models/WebhookKeyValuePairInput.ts +var _WebhookKeyValuePairInput = class _WebhookKeyValuePairInput { + static getAttributeTypeMap() { + return _WebhookKeyValuePairInput.attributeTypeMap; + } + constructor() { + } +}; +_WebhookKeyValuePairInput.discriminator = void 0; +_WebhookKeyValuePairInput.attributeTypeMap = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } +]; +var WebhookKeyValuePairInput = _WebhookKeyValuePairInput; + // models/WebhookOrg.ts var _WebhookOrg = class _WebhookOrg { static getAttributeTypeMap() { @@ -16029,6 +17010,12 @@ _WebhookResponse.attributeTypeMap = [ "type": "WebhookSignatureVerification", "format": "" }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" + }, { "name": "creation_time_in_millis", "baseName": "creation_time_in_millis", @@ -16330,7 +17317,16 @@ var enumsMap = /* @__PURE__ */ new Set([ "AssociateMetadataInputTypeEnum", "AssociateMetadataInputCreateTypeEnum", "AuthorMetadataTypeInputTypeEnum", + "ChannelHistoryEventInfoTypeEnum", + "ChannelHistoryEventInputTypeEnum", + "ChannelHistoryJobStatusEnum", + "ChannelValidationDetailValidationStepEnum", + "ChannelValidationDetailStatusEnum", + "CollectionMetadataInputTypeEnum", "ColumnSecurityRuleGroupOperationOperationEnum", + "CommunicationChannelValidateResponseChannelTypeEnum", + "CommunicationChannelValidateResponseEventTypeEnum", + "CommunicationChannelValidateResponseResultCodeEnum", "ConnectionConfigurationResponsePolicyProcessesEnum", "ConnectionConfigurationResponseDataWarehouseTypeEnum", "ConnectionConfigurationResponsePolicyTypeEnum", @@ -16411,6 +17407,7 @@ var enumsMap = /* @__PURE__ */ new Set([ "ImportUserVisibilityEnum", "ImportUserPreferredLocaleEnum", "JWTMetadataObjectTypeEnum", + "JobRecipientTypeEnum", "ManageObjectPrivilegeRequestOperationEnum", "ManageObjectPrivilegeRequestMetadataTypeEnum", "ManageObjectPrivilegeRequestObjectPrivilegeTypesEnum", @@ -16430,6 +17427,8 @@ var enumsMap = /* @__PURE__ */ new Set([ "OrgPreferenceSearchCriteriaInputEventTypesEnum", "OrgResponseStatusEnum", "OrgResponseVisibilityEnum", + "ParameterizeMetadataFieldsRequestMetadataTypeEnum", + "ParameterizeMetadataFieldsRequestFieldTypeEnum", "ParameterizeMetadataRequestMetadataTypeEnum", "ParameterizeMetadataRequestFieldTypeEnum", "PdfOptionsPageSizeEnum", @@ -16438,6 +17437,7 @@ var enumsMap = /* @__PURE__ */ new Set([ "PermissionsMetadataTypeInputTypeEnum", "PrincipalsInputTypeEnum", "PublishMetadataListItemTypeEnum", + "PutVariableValuesRequestOperationEnum", "RegionalSettingsInputCurrencyFormatEnum", "RegionalSettingsInputUserLocaleEnum", "RegionalSettingsInputNumberFormatLocaleEnum", @@ -16452,6 +17452,10 @@ var enumsMap = /* @__PURE__ */ new Set([ "SchedulesPdfOptionsInputPageSizeEnum", "SearchCalendarsRequestSortOptionsFieldNameEnum", "SearchCalendarsRequestSortOptionsOrderEnum", + "SearchChannelHistoryRequestChannelTypeEnum", + "SearchChannelHistoryRequestChannelStatusEnum", + "SearchCollectionsRequestSortOptionsFieldNameEnum", + "SearchCollectionsRequestSortOptionsOrderEnum", "SearchCommitsRequestMetadataTypeEnum", "SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum", "SearchConnectionRequestDataWarehouseTypesEnum", @@ -16482,8 +17486,6 @@ var enumsMap = /* @__PURE__ */ new Set([ "SearchUsersRequestPrivilegesEnum", "SearchUsersRequestAccountTypeEnum", "SearchUsersRequestAccountStatusEnum", - "SearchUsersRequestSortOptionsFieldNameEnum", - "SearchUsersRequestSortOptionsOrderEnum", "SearchVariablesRequestResponseContentEnum", "SearchWebhookConfigurationsRequestEventTypeEnum", "SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum", @@ -16508,6 +17510,7 @@ var enumsMap = /* @__PURE__ */ new Set([ "UpdateCalendarRequestCalendarTypeEnum", "UpdateCalendarRequestMonthOffsetEnum", "UpdateCalendarRequestStartDayOfWeekEnum", + "UpdateCollectionRequestOperationEnum", "UpdateConnectionConfigurationRequestAuthenticationTypeEnum", "UpdateConnectionConfigurationRequestPolicyTypeEnum", "UpdateConnectionConfigurationRequestPolicyProcessesEnum", @@ -16538,9 +17541,12 @@ var enumsMap = /* @__PURE__ */ new Set([ "UserGroupResponseTypeEnum", "UserGroupResponseVisibilityEnum", "UserObjectTypeEnum", + "ValidateCommunicationChannelRequestChannelTypeEnum", + "ValidateCommunicationChannelRequestEventTypeEnum", "ValueScopeInputPrincipalTypeEnum", "VariableVariableTypeEnum", "VariableDetailInputTypeEnum", + "VariablePutAssignmentInputPrincipalTypeEnum", "VariableUpdateAssignmentInputOperationEnum", "VariableUpdateScopeInputPrincipalTypeEnum", "VariableValuePrincipalTypeEnum", @@ -16586,8 +17592,20 @@ var typeMap = { "CALLBACKInputMandatory": CALLBACKInputMandatory, "CalendarResponse": CalendarResponse, "ChangeUserPasswordRequest": ChangeUserPasswordRequest, + "ChannelHistoryEventInfo": ChannelHistoryEventInfo, + "ChannelHistoryEventInput": ChannelHistoryEventInput, + "ChannelHistoryJob": ChannelHistoryJob, + "ChannelValidationAwsS3Info": ChannelValidationAwsS3Info, + "ChannelValidationDetail": ChannelValidationDetail, "ClusterNonEmbedAccess": ClusterNonEmbedAccess, "ClusterNonEmbedAccessInput": ClusterNonEmbedAccessInput, + "Collection": Collection, + "CollectionDeleteResponse": CollectionDeleteResponse, + "CollectionDeleteTypeIdentifiers": CollectionDeleteTypeIdentifiers, + "CollectionEntityIdentifier": CollectionEntityIdentifier, + "CollectionMetadataInput": CollectionMetadataInput, + "CollectionMetadataItem": CollectionMetadataItem, + "CollectionSearchResponse": CollectionSearchResponse, "Column": Column, "ColumnSecurityRule": ColumnSecurityRule, "ColumnSecurityRuleColumn": ColumnSecurityRuleColumn, @@ -16603,6 +17621,7 @@ var typeMap = { "CommitResponse": CommitResponse, "CommiterType": CommiterType, "CommunicationChannelPreferencesResponse": CommunicationChannelPreferencesResponse, + "CommunicationChannelValidateResponse": CommunicationChannelValidateResponse, "ConfigureCommunicationChannelPreferencesRequest": ConfigureCommunicationChannelPreferencesRequest, "ConfigureSecuritySettingsRequest": ConfigureSecuritySettingsRequest, "ConfigureSecuritySettingsRequestClusterPreferences": ConfigureSecuritySettingsRequestClusterPreferences, @@ -16619,6 +17638,7 @@ var typeMap = { "CreateAgentConversationRequestMetadataContext": CreateAgentConversationRequestMetadataContext, "CreateCalendarRequest": CreateCalendarRequest, "CreateCalendarRequestTableReference": CreateCalendarRequestTableReference, + "CreateCollectionRequest": CreateCollectionRequest, "CreateConfigRequest": CreateConfigRequest, "CreateConnectionConfigurationRequest": CreateConnectionConfigurationRequest, "CreateConnectionConfigurationRequestPolicyProcessOptions": CreateConnectionConfigurationRequestPolicyProcessOptions, @@ -16662,12 +17682,14 @@ var typeMap = { "DefaultActionConfigInput": DefaultActionConfigInput, "DefaultActionConfigInputCreate": DefaultActionConfigInputCreate, "DefaultActionConfigSearchInput": DefaultActionConfigSearchInput, + "DeleteCollectionRequest": DeleteCollectionRequest, "DeleteConfigRequest": DeleteConfigRequest, "DeleteConnectionConfigurationRequest": DeleteConnectionConfigurationRequest, "DeleteConnectionRequest": DeleteConnectionRequest, "DeleteMetadataRequest": DeleteMetadataRequest, "DeleteMetadataTypeInput": DeleteMetadataTypeInput, "DeleteOrgEmailCustomizationRequest": DeleteOrgEmailCustomizationRequest, + "DeleteVariablesRequest": DeleteVariablesRequest, "DeleteWebhookConfigurationsRequest": DeleteWebhookConfigurationsRequest, "DeployCommitRequest": DeployCommitRequest, "DeployResponse": DeployResponse, @@ -16745,6 +17767,7 @@ var typeMap = { "JWTParameter": JWTParameter, "JWTUserOptions": JWTUserOptions, "JWTUserOptionsFull": JWTUserOptionsFull, + "JobRecipient": JobRecipient, "LBContextInput": LBContextInput, "LiveboardContent": LiveboardContent, "LiveboardDataResponse": LiveboardDataResponse, @@ -16778,6 +17801,7 @@ var typeMap = { "OrgResponse": OrgResponse, "OrgType": OrgType, "ParameterValues": ParameterValues, + "ParameterizeMetadataFieldsRequest": ParameterizeMetadataFieldsRequest, "ParameterizeMetadataRequest": ParameterizeMetadataRequest, "ParametersListItem": ParametersListItem, "ParametersListItemInput": ParametersListItemInput, @@ -16795,6 +17819,7 @@ var typeMap = { "PrincipalsListItemInput": PrincipalsListItemInput, "PublishMetadataListItem": PublishMetadataListItem, "PublishMetadataRequest": PublishMetadataRequest, + "PutVariableValuesRequest": PutVariableValuesRequest, "QueryGetDecomposedQueryRequest": QueryGetDecomposedQueryRequest, "QueryGetDecomposedQueryRequestNlsRequest": QueryGetDecomposedQueryRequestNlsRequest, "RecipientDetails": RecipientDetails, @@ -16841,6 +17866,10 @@ var typeMap = { "ScriptSrcUrlsInput": ScriptSrcUrlsInput, "SearchCalendarsRequest": SearchCalendarsRequest, "SearchCalendarsRequestSortOptions": SearchCalendarsRequestSortOptions, + "SearchChannelHistoryRequest": SearchChannelHistoryRequest, + "SearchChannelHistoryResponse": SearchChannelHistoryResponse, + "SearchCollectionsRequest": SearchCollectionsRequest, + "SearchCollectionsRequestSortOptions": SearchCollectionsRequestSortOptions, "SearchCommitsRequest": SearchCommitsRequest, "SearchCommunicationChannelPreferencesRequest": SearchCommunicationChannelPreferencesRequest, "SearchConfigRequest": SearchConfigRequest, @@ -16866,7 +17895,6 @@ var typeMap = { "SearchUserGroupsRequest": SearchUserGroupsRequest, "SearchUserGroupsRequestSortOptions": SearchUserGroupsRequestSortOptions, "SearchUsersRequest": SearchUsersRequest, - "SearchUsersRequestSortOptions": SearchUsersRequestSortOptions, "SearchVariablesRequest": SearchVariablesRequest, "SearchWebhookConfigurationsRequest": SearchWebhookConfigurationsRequest, "SearchWebhookConfigurationsRequestSortOptions": SearchWebhookConfigurationsRequestSortOptions, @@ -16913,6 +17941,7 @@ var typeMap = { "UnpublishMetadataRequest": UnpublishMetadataRequest, "UpdateCalendarRequest": UpdateCalendarRequest, "UpdateCalendarRequestTableReference": UpdateCalendarRequestTableReference, + "UpdateCollectionRequest": UpdateCollectionRequest, "UpdateColumnSecurityRulesRequest": UpdateColumnSecurityRulesRequest, "UpdateConfigRequest": UpdateConfigRequest, "UpdateConnectionConfigurationRequest": UpdateConnectionConfigurationRequest, @@ -16946,11 +17975,13 @@ var typeMap = { "UserObject": UserObject, "UserParameterOptions": UserParameterOptions, "UserPrincipal": UserPrincipal, + "ValidateCommunicationChannelRequest": ValidateCommunicationChannelRequest, "ValidateMergeRequest": ValidateMergeRequest, "ValidateTokenRequest": ValidateTokenRequest, "ValueScopeInput": ValueScopeInput, "Variable": Variable, "VariableDetailInput": VariableDetailInput, + "VariablePutAssignmentInput": VariablePutAssignmentInput, "VariableUpdateAssignmentInput": VariableUpdateAssignmentInput, "VariableUpdateScopeInput": VariableUpdateScopeInput, "VariableValue": VariableValue, @@ -16965,6 +17996,8 @@ var typeMap = { "WebhookAuthenticationInput": WebhookAuthenticationInput, "WebhookDeleteFailure": WebhookDeleteFailure, "WebhookDeleteResponse": WebhookDeleteResponse, + "WebhookKeyValuePair": WebhookKeyValuePair, + "WebhookKeyValuePairInput": WebhookKeyValuePairInput, "WebhookOrg": WebhookOrg, "WebhookPagination": WebhookPagination, "WebhookResponse": WebhookResponse, @@ -17174,7 +18207,7 @@ function canConsumeForm(contentTypes) { // apis/AIApi.ts var AIApiRequestFactory = class extends BaseAPIRequestFactory { /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest, _options) { @@ -17187,8 +18220,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/agent/conversation/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17211,7 +18244,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest, _options) { @@ -17224,8 +18257,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/conversation/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17248,7 +18281,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { @@ -17261,8 +18294,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/data-source-suggestions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17285,7 +18318,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest, _options) { @@ -17298,8 +18331,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/instructions/get"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17322,7 +18355,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest, _options) { @@ -17335,8 +18368,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/relevant-questions/"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17359,7 +18392,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { @@ -17372,8 +18405,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/analytical-questions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17396,7 +18429,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -17413,8 +18446,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/agent/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17437,7 +18470,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { @@ -17450,8 +18483,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/agent/converse/sse"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17474,7 +18507,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -17491,8 +18524,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17515,7 +18548,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest, _options) { @@ -17528,8 +18561,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/instructions/set"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17552,7 +18585,7 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest, _options) { @@ -17565,8 +18598,8 @@ var AIApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/answer/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -17624,6 +18657,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -17677,6 +18726,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -17730,6 +18795,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -17783,6 +18864,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -17836,6 +18933,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -17889,6 +19002,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -17942,6 +19071,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -17995,6 +19140,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -18048,6 +19209,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -18101,6 +19278,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -18154,6 +19347,22 @@ var AIApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -18187,8 +19396,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/user"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -18211,8 +19420,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/token"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -18239,8 +19448,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/custom"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18271,8 +19480,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/full"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18303,8 +19512,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/object"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18335,8 +19544,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/login"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18368,8 +19577,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/logout"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -18396,8 +19605,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/revoke"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18433,8 +19642,8 @@ var AuthenticationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -18867,7 +20076,343 @@ var AuthenticationApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to revokeToken + * @throws ApiException if the response code was not in [200, 299] + */ + revokeToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateToken + * @throws ApiException if the response code was not in [200, 299] + */ + validateToken(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "TokenValidationResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "TokenValidationResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + +// apis/CollectionsApi.ts +var CollectionsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createCollectionRequest === null || createCollectionRequest === void 0) { + throw new RequiredError("CollectionsApi", "createCollection", "createCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCollectionRequest, "CreateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteCollectionRequest === null || deleteCollectionRequest === void 0) { + throw new RequiredError("CollectionsApi", "deleteCollection", "deleteCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteCollectionRequest, "DeleteCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCollectionsRequest === null || searchCollectionsRequest === void 0) { + throw new RequiredError("CollectionsApi", "searchCollections", "searchCollectionsRequest"); + } + const localVarPath = "/api/rest/2.0/collections/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCollectionsRequest, "SearchCollectionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (collectionIdentifier === null || collectionIdentifier === void 0) { + throw new RequiredError("CollectionsApi", "updateCollection", "collectionIdentifier"); + } + if (updateCollectionRequest === null || updateCollectionRequest === void 0) { + throw new RequiredError("CollectionsApi", "updateCollection", "updateCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/{collection_identifier}/update".replace("{collection_identifier}", encodeURIComponent(String(collectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCollectionRequest, "UpdateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var CollectionsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + createCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Collection", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Collection", "" ); return body; @@ -18879,14 +20424,19 @@ var AuthenticationApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to revokeToken + * @params response Response returned by the server for a request to deleteCollection * @throws ApiException if the response code was not in [200, 299] */ - revokeToken(response) { + deleteCollection(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionDeleteResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -18912,6 +20462,14 @@ var AuthenticationApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -18923,7 +20481,7 @@ var AuthenticationApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "CollectionDeleteResponse", "" ); return body; @@ -18935,16 +20493,16 @@ var AuthenticationApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to validateToken + * @params response Response returned by the server for a request to searchCollections * @throws ApiException if the response code was not in [200, 299] */ - validateToken(response) { + searchCollections(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "TokenValidationResponse", + "CollectionSearchResponse", "" ); return body; @@ -18984,7 +20542,71 @@ var AuthenticationApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "TokenValidationResponse", + "CollectionSearchResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateCollection + * @throws ApiException if the response code was not in [200, 299] + */ + updateCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", "" ); return body; @@ -19010,8 +20632,8 @@ var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFact const localVarPath = "/api/rest/2.0/connection-configurations/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19047,8 +20669,8 @@ var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFact const localVarPath = "/api/rest/2.0/connection-configurations/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19084,8 +20706,8 @@ var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFact const localVarPath = "/api/rest/2.0/connection-configurations/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19125,8 +20747,8 @@ var ConnectionConfigurationsApiRequestFactory = class extends BaseAPIRequestFact const localVarPath = "/api/rest/2.0/connection-configurations/{configuration_identifier}/update".replace("{configuration_identifier}", encodeURIComponent(String(configurationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19389,7 +21011,7 @@ var ConnectionConfigurationsApiResponseProcessor = class { // apis/ConnectionsApi.ts var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest, _options) { @@ -19402,8 +21024,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19439,8 +21061,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19476,8 +21098,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/delete".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -19504,8 +21126,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -19532,8 +21154,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -19564,8 +21186,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19601,8 +21223,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19638,8 +21260,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -19679,8 +21301,8 @@ var ConnectionsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/update".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20263,8 +21885,8 @@ var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20300,8 +21922,8 @@ var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -20328,8 +21950,8 @@ var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20369,8 +21991,8 @@ var CustomActionApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20646,8 +22268,8 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20683,8 +22305,8 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/delete".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -20711,8 +22333,8 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/generate-csv"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20748,8 +22370,8 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -20789,8 +22411,8 @@ var CustomCalendarsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/update".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21139,8 +22761,8 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/dbt-connection"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -21216,8 +22838,8 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/generate-sync-tml"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -21278,8 +22900,8 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/generate-tml"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -21335,8 +22957,8 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -21363,8 +22985,8 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete".replace("{dbt_connection_identifier}", encodeURIComponent(String(dbtConnectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -21401,8 +23023,8 @@ var DBTApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/update-dbt-connection"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -21847,8 +23469,8 @@ var DataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/answer/data"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21884,8 +23506,8 @@ var DataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/liveboard/data"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -21921,8 +23543,8 @@ var DataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/searchdata"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22147,8 +23769,8 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22184,8 +23806,8 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/{template_identifier}/delete".replace("{template_identifier}", encodeURIComponent(String(templateIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -22212,8 +23834,8 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22249,8 +23871,8 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22286,8 +23908,8 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22319,8 +23941,8 @@ var EmailCustomizationApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -22667,8 +24289,8 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22704,8 +24326,8 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/{group_identifier}/delete".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -22732,8 +24354,8 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22769,8 +24391,8 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -22810,8 +24432,8 @@ var GroupsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/{group_identifier}/update".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23132,6 +24754,110 @@ var GroupsApiResponseProcessor = class { } }; +// apis/JobsApi.ts +var JobsApiRequestFactory = class extends BaseAPIRequestFactory { + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchChannelHistoryRequest === null || searchChannelHistoryRequest === void 0) { + throw new RequiredError("JobsApi", "searchChannelHistory", "searchChannelHistoryRequest"); + } + const localVarPath = "/api/rest/2.0/jobs/history/communication-channels/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchChannelHistoryRequest, "SearchChannelHistoryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } +}; +var JobsApiResponseProcessor = class { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchChannelHistory + * @throws ApiException if the response code was not in [200, 299] + */ + searchChannelHistory(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchChannelHistoryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchChannelHistoryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } +}; + // apis/LogApi.ts var LogApiRequestFactory = class extends BaseAPIRequestFactory { /** @@ -23148,8 +24874,8 @@ var LogApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/logs/fetch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23252,8 +24978,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/worksheets/convert"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23289,8 +25015,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/copyobject"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23326,8 +25052,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23363,8 +25089,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/export"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23400,8 +25126,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/export/batch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23437,8 +25163,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/answer/sql"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23474,8 +25200,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/async/status"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23511,8 +25237,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/liveboard/sql"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23548,8 +25274,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23585,8 +25311,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/async/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23609,7 +25335,7 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest, _options) { @@ -23622,8 +25348,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/parameterize"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23645,6 +25371,43 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (parameterizeMetadataFieldsRequest === null || parameterizeMetadataFieldsRequest === void 0) { + throw new RequiredError("MetadataApi", "parameterizeMetadataFields", "parameterizeMetadataFieldsRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/parameterize-fields"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataFieldsRequest, "ParameterizeMetadataFieldsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. * @param searchMetadataRequest @@ -23659,8 +25422,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23696,8 +25459,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/unparameterize"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23733,8 +25496,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/headers/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -23770,8 +25533,8 @@ var MetadataApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/update-obj-id"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24217,7 +25980,68 @@ var MetadataApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "GetAsyncImportStatusResponse", + "GetAsyncImportStatusResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @throws ApiException if the response code was not in [200, 299] + */ + fetchLiveboardSqlQuery(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SqlQueryResponse", "" ); return body; @@ -24229,16 +26053,16 @@ var MetadataApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @params response Response returned by the server for a request to importMetadataTML * @throws ApiException if the response code was not in [200, 299] */ - fetchLiveboardSqlQuery(response) { + importMetadataTML(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "Array", "" ); return body; @@ -24278,7 +26102,7 @@ var MetadataApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "Array", "" ); return body; @@ -24290,16 +26114,16 @@ var MetadataApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importMetadataTML + * @params response Response returned by the server for a request to importMetadataTMLAsync * @throws ApiException if the response code was not in [200, 299] */ - importMetadataTML(response) { + importMetadataTMLAsync(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "ImportEPackAsyncTaskStatus", "" ); return body; @@ -24339,7 +26163,7 @@ var MetadataApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "ImportEPackAsyncTaskStatus", "" ); return body; @@ -24351,19 +26175,14 @@ var MetadataApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importMetadataTMLAsync + * @params response Response returned by the server for a request to parameterizeMetadata * @throws ApiException if the response code was not in [200, 299] */ - importMetadataTMLAsync(response) { + parameterizeMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportEPackAsyncTaskStatus", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -24400,7 +26219,7 @@ var MetadataApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportEPackAsyncTaskStatus", + "void", "" ); return body; @@ -24412,10 +26231,10 @@ var MetadataApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to parameterizeMetadata + * @params response Response returned by the server for a request to parameterizeMetadataFields * @throws ApiException if the response code was not in [200, 299] */ - parameterizeMetadata(response) { + parameterizeMetadataFields(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -24711,8 +26530,8 @@ var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24748,8 +26567,8 @@ var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/delete".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -24776,8 +26595,8 @@ var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -24817,8 +26636,8 @@ var OrgsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/update".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25094,8 +26913,8 @@ var ReportsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/report/answer"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25131,8 +26950,8 @@ var ReportsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/report/liveboard"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25288,8 +27107,8 @@ var RolesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25325,8 +27144,8 @@ var RolesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/{role_identifier}/delete".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25353,8 +27172,8 @@ var RolesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25394,8 +27213,8 @@ var RolesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/{role_identifier}/update".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25676,8 +27495,8 @@ var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25713,8 +27532,8 @@ var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/delete".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -25741,8 +27560,8 @@ var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -25782,8 +27601,8 @@ var SchedulesApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/update".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26059,8 +27878,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/assign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26096,8 +27915,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/column/rules/fetch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26133,8 +27952,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/fetch-object-privileges"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26170,8 +27989,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/principals/fetch-permissions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26207,8 +28026,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/fetch-permissions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26244,8 +28063,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/manage-object-privilege"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26281,8 +28100,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/publish"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26318,8 +28137,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/share"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26355,8 +28174,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/unpublish"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -26392,8 +28211,8 @@ var SecurityApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/column/rules/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27015,8 +28834,8 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/configure"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27052,8 +28871,8 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/security-settings/configure"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27085,8 +28904,8 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -27109,8 +28928,8 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -27133,8 +28952,8 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config-overrides"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -27161,8 +28980,8 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27198,8 +29017,8 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/security-settings/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27235,8 +29054,8 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config-update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27258,6 +29077,43 @@ var SystemApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (validateCommunicationChannelRequest === null || validateCommunicationChannelRequest === void 0) { + throw new RequiredError("SystemApi", "validateCommunicationChannel", "validateCommunicationChannelRequest"); + } + const localVarPath = "/api/rest/2.0/system/communication-channels/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateCommunicationChannelRequest, "ValidateCommunicationChannelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } }; var SystemApiResponseProcessor = class { /** @@ -27733,6 +29589,67 @@ var SystemApiResponseProcessor = class { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to validateCommunicationChannel + * @throws ApiException if the response code was not in [200, 299] + */ + validateCommunicationChannel(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelValidateResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelValidateResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } }; // apis/TagsApi.ts @@ -27751,8 +29668,8 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/assign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27788,8 +29705,8 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27825,8 +29742,8 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/delete".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -27853,8 +29770,8 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27890,8 +29807,8 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/unassign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -27931,8 +29848,8 @@ var TagsApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/update".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28320,8 +30237,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/activate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28357,8 +30274,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/assign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28394,8 +30311,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/assign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28431,8 +30348,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/change-password"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28468,8 +30385,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/branches/commit"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28505,8 +30422,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/configure"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28542,8 +30459,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/security-settings/configure"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28579,8 +30496,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection-configurations/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28616,8 +30533,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/worksheets/convert"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28653,8 +30570,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/copyobject"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28677,7 +30594,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest, _options) { @@ -28690,8 +30607,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/agent/conversation/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28727,8 +30644,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28750,6 +30667,43 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (createCollectionRequest === null || createCollectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "createCollection", "createCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/create"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCollectionRequest, "CreateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. * @param createConfigRequest @@ -28764,8 +30718,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28788,7 +30742,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest, _options) { @@ -28801,8 +30755,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28838,8 +30792,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection-configurations/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28862,7 +30816,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest, _options) { @@ -28875,8 +30829,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/conversation/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28912,8 +30866,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28949,8 +30903,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -28986,8 +30940,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29023,8 +30977,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29060,8 +31014,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29097,8 +31051,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29134,8 +31088,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29171,8 +31125,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29208,8 +31162,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29245,8 +31199,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/webhooks/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29294,8 +31248,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/dbt-connection"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -29371,8 +31325,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/generate-sync-tml"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -29433,8 +31387,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/generate-tml"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -29490,8 +31444,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -29518,8 +31472,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/deactivate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29555,8 +31509,45 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/delete".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteCollectionRequest === null || deleteCollectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteCollection", "deleteCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteCollectionRequest, "DeleteCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -29583,8 +31574,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29620,8 +31611,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29657,8 +31648,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection-configurations/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29694,8 +31685,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/delete".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -29722,8 +31713,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/delete".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -29750,8 +31741,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/{dbt_connection_identifier}/delete".replace("{dbt_connection_identifier}", encodeURIComponent(String(dbtConnectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -29778,8 +31769,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/{template_identifier}/delete".replace("{template_identifier}", encodeURIComponent(String(templateIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -29806,8 +31797,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29843,8 +31834,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/delete".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -29871,8 +31862,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -29908,8 +31899,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/{role_identifier}/delete".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -29936,8 +31927,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/delete".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -29964,8 +31955,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/delete".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -29992,8 +31983,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/{user_identifier}/delete".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30020,8 +32011,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/{group_identifier}/delete".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30035,7 +32026,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier, _options) { @@ -30048,8 +32039,45 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/{identifier}/delete".replace("{identifier}", encodeURIComponent(String(identifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteVariablesRequest === null || deleteVariablesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "deleteVariables", "deleteVariablesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteVariablesRequest, "DeleteVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30076,8 +32104,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/webhooks/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30113,8 +32141,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/deploy"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30150,8 +32178,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/download-connection-metadata-changes/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30178,8 +32206,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/report/answer"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30215,8 +32243,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/report/liveboard"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30252,8 +32280,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/export"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30289,8 +32317,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/export/batch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30326,8 +32354,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/answer/data"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30363,8 +32391,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/answer/sql"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30400,8 +32428,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/async/status"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30437,8 +32465,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/column/rules/fetch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30474,8 +32502,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/fetch-connection-diff-status/{connection_identifier}".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30502,8 +32530,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/liveboard/data"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30539,8 +32567,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/liveboard/sql"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30576,8 +32604,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/logs/fetch"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30613,8 +32641,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/fetch-object-privileges"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30650,8 +32678,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/principals/fetch-permissions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30687,8 +32715,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/fetch-permissions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30724,8 +32752,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/force-logout"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30761,8 +32789,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/generate-csv"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30794,8 +32822,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/user"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30818,8 +32846,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/token"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -30846,8 +32874,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/custom"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30865,7 +32893,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { @@ -30878,8 +32906,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/data-source-suggestions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30915,8 +32943,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/full"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30934,7 +32962,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest, _options) { @@ -30947,8 +32975,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/instructions/get"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -30984,8 +33012,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/object"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31003,7 +33031,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest, _options) { @@ -31016,8 +33044,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/relevant-questions/"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31049,8 +33077,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -31073,8 +33101,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -31097,8 +33125,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config-overrides"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "GET" /* GET */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -31125,8 +33153,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31162,8 +33190,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/tml/async/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31199,8 +33227,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31236,8 +33264,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31273,8 +33301,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/login"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31306,8 +33334,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/session/logout"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -31334,8 +33362,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/manage-object-privilege"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31358,7 +33386,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest, _options) { @@ -31371,8 +33399,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/parameterize"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31394,6 +33422,43 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (parameterizeMetadataFieldsRequest === null || parameterizeMetadataFieldsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "parameterizeMetadataFields", "parameterizeMetadataFieldsRequest"); + } + const localVarPath = "/api/rest/2.0/metadata/parameterize-fields"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(parameterizeMetadataFieldsRequest, "ParameterizeMetadataFieldsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. * @param publishMetadataRequest @@ -31408,8 +33473,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/publish"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31432,7 +33497,48 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.7.0.cl or later + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (identifier === null || identifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "putVariableValues", "identifier"); + } + if (putVariableValuesRequest === null || putVariableValuesRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "putVariableValues", "putVariableValuesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update-values".replace("{identifier}", encodeURIComponent(String(identifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(putVariableValuesRequest, "PutVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { @@ -31445,8 +33551,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/analytical-questions"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31482,8 +33588,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/reset-password"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31523,8 +33629,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/{commit_id}/revert".replace("{commit_id}", encodeURIComponent(String(commitId))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31564,8 +33670,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/revoke-refresh-tokens".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31601,8 +33707,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/revoke"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31638,8 +33744,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31661,6 +33767,80 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchChannelHistoryRequest === null || searchChannelHistoryRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchChannelHistory", "searchChannelHistoryRequest"); + } + const localVarPath = "/api/rest/2.0/jobs/history/communication-channels/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchChannelHistoryRequest, "SearchChannelHistoryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (searchCollectionsRequest === null || searchCollectionsRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "searchCollections", "searchCollectionsRequest"); + } + const localVarPath = "/api/rest/2.0/collections/search"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(searchCollectionsRequest, "SearchCollectionsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. * @param searchCommitsRequest @@ -31675,8 +33855,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31712,8 +33892,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/preferences/communication-channels/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31749,8 +33929,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31786,8 +33966,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31823,8 +34003,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31860,8 +34040,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/searchdata"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31897,8 +34077,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31934,8 +34114,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -31971,8 +34151,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32008,8 +34188,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32045,8 +34225,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32082,8 +34262,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/security-settings/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32119,8 +34299,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32156,8 +34336,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32193,8 +34373,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32230,8 +34410,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32267,8 +34447,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/webhooks/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32291,7 +34471,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -32308,8 +34488,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/agent/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32332,7 +34512,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { @@ -32345,8 +34525,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/agent/converse/sse"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32369,7 +34549,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -32386,8 +34566,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/conversation/{conversation_identifier}/converse".replace("{conversation_identifier}", encodeURIComponent(String(conversationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32410,7 +34590,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest, _options) { @@ -32423,8 +34603,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/instructions/set"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32460,8 +34640,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/share"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32484,7 +34664,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest, _options) { @@ -32497,8 +34677,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/ai/answer/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32534,8 +34714,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/unassign"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32571,8 +34751,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/unparameterize"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32608,8 +34788,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/metadata/unpublish"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32649,8 +34829,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/calendars/{calendar_identifier}/update".replace("{calendar_identifier}", encodeURIComponent(String(calendarIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32672,6 +34852,47 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (collectionIdentifier === null || collectionIdentifier === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateCollection", "collectionIdentifier"); + } + if (updateCollectionRequest === null || updateCollectionRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "updateCollection", "updateCollectionRequest"); + } + const localVarPath = "/api/rest/2.0/collections/{collection_identifier}/update".replace("{collection_identifier}", encodeURIComponent(String(collectionIdentifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(updateCollectionRequest, "UpdateCollectionRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups * @param updateColumnSecurityRulesRequest @@ -32686,8 +34907,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/security/column/rules/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32723,8 +34944,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32760,8 +34981,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32801,8 +35022,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connection-configurations/{configuration_identifier}/update".replace("{configuration_identifier}", encodeURIComponent(String(configurationIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32842,8 +35063,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/connections/{connection_identifier}/update".replace("{connection_identifier}", encodeURIComponent(String(connectionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32883,8 +35104,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/custom-actions/{custom_action_identifier}/update".replace("{custom_action_identifier}", encodeURIComponent(String(customActionIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -32930,8 +35151,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/dbt/update-dbt-connection"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const useForm = canConsumeForm([ "multipart/form-data" ]); @@ -33009,8 +35230,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33046,8 +35267,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/headers/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33083,8 +35304,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/metadata/update-obj-id"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33124,8 +35345,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/orgs/{org_identifier}/update".replace("{org_identifier}", encodeURIComponent(String(orgIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33165,8 +35386,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/roles/{role_identifier}/update".replace("{role_identifier}", encodeURIComponent(String(roleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33206,8 +35427,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/schedules/{schedule_identifier}/update".replace("{schedule_identifier}", encodeURIComponent(String(scheduleIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33243,8 +35464,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/system/config-update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33284,8 +35505,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/tags/{tag_identifier}/update".replace("{tag_identifier}", encodeURIComponent(String(tagIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33325,8 +35546,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/{user_identifier}/update".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33366,8 +35587,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/groups/{group_identifier}/update".replace("{group_identifier}", encodeURIComponent(String(groupIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33407,8 +35628,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update".replace("{identifier}", encodeURIComponent(String(identifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33431,7 +35652,7 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -33444,8 +35665,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/update-values"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33485,8 +35706,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/webhooks/{webhook_identifier}/update".replace("{webhook_identifier}", encodeURIComponent(String(webhookIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33508,6 +35729,43 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { return requestContext; }); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (validateCommunicationChannelRequest === null || validateCommunicationChannelRequest === void 0) { + throw new RequiredError("ThoughtSpotRestApi", "validateCommunicationChannel", "validateCommunicationChannelRequest"); + } + const localVarPath = "/api/rest/2.0/system/communication-channels/validate"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(validateCommunicationChannelRequest, "ValidateCommunicationChannelRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -33518,8 +35776,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/customization/email/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -33546,8 +35804,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/branches/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -33583,8 +35841,8 @@ var ThoughtSpotRestApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/auth/token/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -34235,6 +36493,22 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -34315,6 +36589,67 @@ var ThoughtSpotRestApiResponseProcessor = class { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection + * @throws ApiException if the response code was not in [200, 299] + */ + createCollection(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Collection", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Collection", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -34532,6 +36867,22 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -35450,7 +37801,63 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseActivationURL", + "ResponseActivationURL", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteCalendar + * @throws ApiException if the response code was not in [200, 299] + */ + deleteCalendar(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", "" ); return body; @@ -35462,14 +37869,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteCalendar + * @params response Response returned by the server for a request to deleteCollection * @throws ApiException if the response code was not in [200, 299] */ - deleteCalendar(response) { + deleteCollection(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CollectionDeleteResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -35495,6 +37907,14 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -35506,7 +37926,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "CollectionDeleteResponse", "" ); return body; @@ -36402,6 +38822,62 @@ var ThoughtSpotRestApiResponseProcessor = class { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariables(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -36931,7 +39407,190 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "SqlQueryResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchAsyncImportTaskStatus(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetAsyncImportStatusResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "GetAsyncImportStatusResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchColumnSecurityRules + * @throws ApiException if the response code was not in [200, 299] + */ + fetchColumnSecurityRules(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Bad request - Table not found or invalid parameters", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden - User doesn't have permission to access security rules for this table", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to fetchConnectionDiffStatus + * @throws ApiException if the response code was not in [200, 299] + */ + fetchConnectionDiffStatus(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "FetchConnectionDiffStatusResponse", "" ); return body; @@ -36943,16 +39602,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchAsyncImportTaskStatus + * @params response Response returned by the server for a request to fetchLiveboardData * @throws ApiException if the response code was not in [200, 299] */ - fetchAsyncImportTaskStatus(response) { + fetchLiveboardData(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "GetAsyncImportStatusResponse", + "LiveboardDataResponse", "" ); return body; @@ -36992,7 +39651,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "GetAsyncImportStatusResponse", + "LiveboardDataResponse", "" ); return body; @@ -37004,16 +39663,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchColumnSecurityRules + * @params response Response returned by the server for a request to fetchLiveboardSqlQuery * @throws ApiException if the response code was not in [200, 299] */ - fetchColumnSecurityRules(response) { + fetchLiveboardSqlQuery(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "SqlQueryResponse", "" ); return body; @@ -37024,7 +39683,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Bad request - Table not found or invalid parameters", body, response.headers); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -37040,7 +39699,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden - User doesn't have permission to access security rules for this table", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -37048,12 +39707,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Internal server error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "SqlQueryResponse", "" ); return body; @@ -37065,16 +39724,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchConnectionDiffStatus + * @params response Response returned by the server for a request to fetchLogs * @throws ApiException if the response code was not in [200, 299] */ - fetchConnectionDiffStatus(response) { + fetchLogs(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "FetchConnectionDiffStatusResponse", + "Array", "" ); return body; @@ -37114,7 +39773,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "FetchConnectionDiffStatusResponse", + "Array", "" ); return body; @@ -37126,16 +39785,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchLiveboardData + * @params response Response returned by the server for a request to fetchObjectPrivileges * @throws ApiException if the response code was not in [200, 299] */ - fetchLiveboardData(response) { + fetchObjectPrivileges(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "LiveboardDataResponse", + "ObjectPrivilegesOfMetadataResponse", "" ); return body; @@ -37175,7 +39834,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "LiveboardDataResponse", + "ObjectPrivilegesOfMetadataResponse", "" ); return body; @@ -37187,16 +39846,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchLiveboardSqlQuery + * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals * @throws ApiException if the response code was not in [200, 299] */ - fetchLiveboardSqlQuery(response) { + fetchPermissionsOfPrincipals(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "PermissionOfPrincipalsResponse", "" ); return body; @@ -37236,7 +39895,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SqlQueryResponse", + "PermissionOfPrincipalsResponse", "" ); return body; @@ -37248,16 +39907,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchLogs + * @params response Response returned by the server for a request to fetchPermissionsOnMetadata * @throws ApiException if the response code was not in [200, 299] */ - fetchLogs(response) { + fetchPermissionsOnMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "PermissionOfMetadataResponse", "" ); return body; @@ -37297,7 +39956,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "PermissionOfMetadataResponse", "" ); return body; @@ -37309,16 +39968,72 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchObjectPrivileges + * @params response Response returned by the server for a request to forceLogoutUsers * @throws ApiException if the response code was not in [200, 299] */ - fetchObjectPrivileges(response) { + forceLogoutUsers(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to generateCSV + * @throws ApiException if the response code was not in [200, 299] + */ + generateCSV(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ObjectPrivilegesOfMetadataResponse", + "any", "" ); return body; @@ -37358,7 +40073,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ObjectPrivilegesOfMetadataResponse", + "any", "" ); return body; @@ -37370,16 +40085,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchPermissionsOfPrincipals + * @params response Response returned by the server for a request to getCurrentUserInfo * @throws ApiException if the response code was not in [200, 299] */ - fetchPermissionsOfPrincipals(response) { + getCurrentUserInfo(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "PermissionOfPrincipalsResponse", + "User", "" ); return body; @@ -37419,7 +40134,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "PermissionOfPrincipalsResponse", + "User", "" ); return body; @@ -37431,16 +40146,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to fetchPermissionsOnMetadata + * @params response Response returned by the server for a request to getCurrentUserToken * @throws ApiException if the response code was not in [200, 299] */ - fetchPermissionsOnMetadata(response) { + getCurrentUserToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "PermissionOfMetadataResponse", + "GetTokenResponse", "" ); return body; @@ -37480,7 +40195,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "PermissionOfMetadataResponse", + "GetTokenResponse", "" ); return body; @@ -37492,14 +40207,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to forceLogoutUsers + * @params response Response returned by the server for a request to getCustomAccessToken * @throws ApiException if the response code was not in [200, 299] */ - forceLogoutUsers(response) { + getCustomAccessToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AccessToken", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -37507,7 +40227,76 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Invalid request. This could be due to missing or incorrect parameters.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access. The request could not be authenticated.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access. The user does not have permission to access this resource.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "An unexpected error occurred on the server.", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "AccessToken", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getDataSourceSuggestions + * @throws ApiException if the response code was not in [200, 299] + */ + getDataSourceSuggestions(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDataSourceSuggestionResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -37531,12 +40320,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "EurekaDataSourceSuggestionResponse", "" ); return body; @@ -37548,16 +40337,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to generateCSV + * @params response Response returned by the server for a request to getFullAccessToken * @throws ApiException if the response code was not in [200, 299] */ - generateCSV(response) { + getFullAccessToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "Token", "" ); return body; @@ -37597,7 +40386,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "Token", "" ); return body; @@ -37609,16 +40398,24 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getCurrentUserInfo + * @params response Response returned by the server for a request to getNLInstructions * @throws ApiException if the response code was not in [200, 299] */ - getCurrentUserInfo(response) { + getNLInstructions(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "User", + "EurekaGetNLInstructionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetNLInstructionsResponse", "" ); return body; @@ -37629,7 +40426,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -37653,12 +40450,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "User", + "EurekaGetNLInstructionsResponse", "" ); return body; @@ -37670,16 +40467,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getCurrentUserToken + * @params response Response returned by the server for a request to getObjectAccessToken * @throws ApiException if the response code was not in [200, 299] */ - getCurrentUserToken(response) { + getObjectAccessToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "GetTokenResponse", + "Token", "" ); return body; @@ -37719,7 +40516,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "GetTokenResponse", + "Token", "" ); return body; @@ -37731,16 +40528,24 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getCustomAccessToken + * @params response Response returned by the server for a request to getRelevantQuestions * @throws ApiException if the response code was not in [200, 299] */ - getCustomAccessToken(response) { + getRelevantQuestions(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "AccessToken", + "EurekaGetRelevantQuestionsResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaGetRelevantQuestionsResponse", "" ); return body; @@ -37751,7 +40556,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request. This could be due to missing or incorrect parameters.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -37759,7 +40564,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access. The request could not be authenticated.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -37767,7 +40572,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access. The user does not have permission to access this resource.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -37775,12 +40580,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "An unexpected error occurred on the server.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "AccessToken", + "EurekaGetRelevantQuestionsResponse", "" ); return body; @@ -37792,35 +40597,43 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getDataSourceSuggestions + * @params response Response returned by the server for a request to getSystemConfig * @throws ApiException if the response code was not in [200, 299] */ - getDataSourceSuggestions(response) { + getSystemConfig(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDataSourceSuggestionResponse", + "SystemConfig", "" ); return body; } - if (isCodeInRange("201", response.httpStatusCode)) { + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDataSourceSuggestionResponse", + "ErrorResponse", "" ); - return body; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("400", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -37828,12 +40641,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDataSourceSuggestionResponse", + "SystemConfig", "" ); return body; @@ -37845,16 +40658,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getFullAccessToken + * @params response Response returned by the server for a request to getSystemInformation * @throws ApiException if the response code was not in [200, 299] */ - getFullAccessToken(response) { + getSystemInformation(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Token", + "SystemInfo", "" ); return body; @@ -37894,7 +40707,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Token", + "SystemInfo", "" ); return body; @@ -37906,35 +40719,43 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getNLInstructions + * @params response Response returned by the server for a request to getSystemOverrideInfo * @throws ApiException if the response code was not in [200, 299] */ - getNLInstructions(response) { + getSystemOverrideInfo(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaGetNLInstructionsResponse", + "SystemOverrideInfo", "" ); return body; } - if (isCodeInRange("201", response.httpStatusCode)) { + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaGetNLInstructionsResponse", + "ErrorResponse", "" ); - return body; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("400", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -37942,12 +40763,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaGetNLInstructionsResponse", + "SystemOverrideInfo", "" ); return body; @@ -37959,16 +40780,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getObjectAccessToken + * @params response Response returned by the server for a request to importMetadataTML * @throws ApiException if the response code was not in [200, 299] */ - getObjectAccessToken(response) { + importMetadataTML(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Token", + "Array", "" ); return body; @@ -38008,7 +40829,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Token", + "Array", "" ); return body; @@ -38020,35 +40841,43 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getRelevantQuestions + * @params response Response returned by the server for a request to importMetadataTMLAsync * @throws ApiException if the response code was not in [200, 299] */ - getRelevantQuestions(response) { + importMetadataTMLAsync(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaGetRelevantQuestionsResponse", + "ImportEPackAsyncTaskStatus", "" ); return body; } - if (isCodeInRange("201", response.httpStatusCode)) { + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaGetRelevantQuestionsResponse", + "ErrorResponse", "" ); - return body; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("400", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38056,12 +40885,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaGetRelevantQuestionsResponse", + "ImportEPackAsyncTaskStatus", "" ); return body; @@ -38073,16 +40902,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getSystemConfig + * @params response Response returned by the server for a request to importUserGroups * @throws ApiException if the response code was not in [200, 299] */ - getSystemConfig(response) { + importUserGroups(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemConfig", + "ImportUserGroupsResponse", "" ); return body; @@ -38122,7 +40951,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemConfig", + "ImportUserGroupsResponse", "" ); return body; @@ -38134,16 +40963,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getSystemInformation + * @params response Response returned by the server for a request to importUsers * @throws ApiException if the response code was not in [200, 299] */ - getSystemInformation(response) { + importUsers(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemInfo", + "ImportUsersResponse", "" ); return body; @@ -38183,7 +41012,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemInfo", + "ImportUsersResponse", "" ); return body; @@ -38195,19 +41024,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to getSystemOverrideInfo + * @params response Response returned by the server for a request to login * @throws ApiException if the response code was not in [200, 299] */ - getSystemOverrideInfo(response) { + login(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemOverrideInfo", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38244,7 +41068,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SystemOverrideInfo", + "void", "" ); return body; @@ -38256,19 +41080,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importMetadataTML + * @params response Response returned by the server for a request to logout * @throws ApiException if the response code was not in [200, 299] */ - importMetadataTML(response) { + logout(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38305,7 +41124,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "void", "" ); return body; @@ -38317,19 +41136,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importMetadataTMLAsync + * @params response Response returned by the server for a request to manageObjectPrivilege * @throws ApiException if the response code was not in [200, 299] */ - importMetadataTMLAsync(response) { + manageObjectPrivilege(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportEPackAsyncTaskStatus", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38337,7 +41151,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Invalid request", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38345,7 +41159,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access", body, response.headers); } if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38353,7 +41167,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38366,7 +41180,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportEPackAsyncTaskStatus", + "void", "" ); return body; @@ -38378,19 +41192,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importUserGroups + * @params response Response returned by the server for a request to parameterizeMetadata * @throws ApiException if the response code was not in [200, 299] */ - importUserGroups(response) { + parameterizeMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportUserGroupsResponse", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38427,7 +41236,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportUserGroupsResponse", + "void", "" ); return body; @@ -38439,19 +41248,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to importUsers + * @params response Response returned by the server for a request to parameterizeMetadataFields * @throws ApiException if the response code was not in [200, 299] */ - importUsers(response) { + parameterizeMetadataFields(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportUsersResponse", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38488,7 +41292,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ImportUsersResponse", + "void", "" ); return body; @@ -38500,10 +41304,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to login + * @params response Response returned by the server for a request to publishMetadata * @throws ApiException if the response code was not in [200, 299] */ - login(response) { + publishMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -38556,10 +41360,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to logout + * @params response Response returned by the server for a request to putVariableValues * @throws ApiException if the response code was not in [200, 299] */ - logout(response) { + putVariableValues(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -38612,14 +41416,27 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to manageObjectPrivilege + * @params response Response returned by the server for a request to queryGetDecomposedQuery * @throws ApiException if the response code was not in [200, 299] */ - manageObjectPrivilege(response) { + queryGetDecomposedQuery(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDecomposeQueryResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "EurekaDecomposeQueryResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38627,7 +41444,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38635,7 +41452,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38643,7 +41460,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38651,12 +41468,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "EurekaDecomposeQueryResponse", "" ); return body; @@ -38668,10 +41485,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to parameterizeMetadata + * @params response Response returned by the server for a request to resetUserPassword * @throws ApiException if the response code was not in [200, 299] */ - parameterizeMetadata(response) { + resetUserPassword(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -38724,14 +41541,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to publishMetadata + * @params response Response returned by the server for a request to revertCommit * @throws ApiException if the response code was not in [200, 299] */ - publishMetadata(response) { + revertCommit(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "RevertResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38768,7 +41590,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "RevertResponse", "" ); return body; @@ -38780,24 +41602,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to queryGetDecomposedQuery + * @params response Response returned by the server for a request to revokeRefreshTokens * @throws ApiException if the response code was not in [200, 299] */ - queryGetDecomposedQuery(response) { + revokeRefreshTokens(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDecomposeQueryResponse", - "" - ); - return body; - } - if (isCodeInRange("201", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDecomposeQueryResponse", + "RevokeRefreshTokensResponse", "" ); return body; @@ -38808,63 +41622,39 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("500", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); - } - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaDecomposeQueryResponse", - "" - ); - return body; - } - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); - }); - } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to resetUserPassword - * @throws ApiException if the response code was not in [200, 299] - */ - resetUserPassword(response) { - return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } - if (isCodeInRange("400", response.httpStatusCode)) { + if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } - if (isCodeInRange("401", response.httpStatusCode)) { + if (isCodeInRange("404", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); } - if (isCodeInRange("403", response.httpStatusCode)) { + if (isCodeInRange("409", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Conflict", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38877,7 +41667,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "RevokeRefreshTokensResponse", "" ); return body; @@ -38889,19 +41679,14 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to revertCommit + * @params response Response returned by the server for a request to revokeToken * @throws ApiException if the response code was not in [200, 299] */ - revertCommit(response) { + revokeToken(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "RevertResponse", - "" - ); - return body; + if (isCodeInRange("204", response.httpStatusCode)) { + return; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -38938,7 +41723,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RevertResponse", + "void", "" ); return body; @@ -38950,16 +41735,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to revokeRefreshTokens + * @params response Response returned by the server for a request to searchCalendars * @throws ApiException if the response code was not in [200, 299] */ - revokeRefreshTokens(response) { + searchCalendars(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RevokeRefreshTokensResponse", + "Array", "" ); return body; @@ -38988,22 +41773,6 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } - if (isCodeInRange("404", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Object not found", body, response.headers); - } - if (isCodeInRange("409", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Conflict", body, response.headers); - } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -39015,7 +41784,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "RevokeRefreshTokensResponse", + "Array", "" ); return body; @@ -39027,14 +41796,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to revokeToken + * @params response Response returned by the server for a request to searchChannelHistory * @throws ApiException if the response code was not in [200, 299] */ - revokeToken(response) { + searchChannelHistory(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SearchChannelHistoryResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -39071,7 +41845,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "SearchChannelHistoryResponse", "" ); return body; @@ -39083,16 +41857,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchCalendars + * @params response Response returned by the server for a request to searchCollections * @throws ApiException if the response code was not in [200, 299] */ - searchCalendars(response) { + searchCollections(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "CollectionSearchResponse", "" ); return body; @@ -39132,7 +41906,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "CollectionSearchResponse", "" ); return body; @@ -40095,12 +42869,142 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "Array", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to searchWebhookConfigurations + * @throws ApiException if the response code was not in [200, 299] + */ + searchWebhookConfigurations(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookSearchResponse", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "WebhookSearchResponse", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to sendAgentMessage + * @throws ApiException if the response code was not in [200, 299] + */ + sendAgentMessage(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "any", + "" + ); + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "any", "" ); return body; @@ -40112,16 +43016,24 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to searchWebhookConfigurations + * @params response Response returned by the server for a request to sendAgentMessageStreaming * @throws ApiException if the response code was not in [200, 299] */ - searchWebhookConfigurations(response) { + sendAgentMessageStreaming(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "WebhookSearchResponse", + "SendAgentMessageResponse", + "" + ); + return body; + } + if (isCodeInRange("201", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "SendAgentMessageResponse", "" ); return body; @@ -40132,7 +43044,7 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -40156,12 +43068,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "WebhookSearchResponse", + "SendAgentMessageResponse", "" ); return body; @@ -40173,16 +43085,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to sendAgentMessage + * @params response Response returned by the server for a request to sendMessage * @throws ApiException if the response code was not in [200, 299] */ - sendAgentMessage(response) { + sendMessage(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "Array", "" ); return body; @@ -40190,7 +43102,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (isCodeInRange("201", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "Array", "" ); return body; @@ -40203,6 +43115,22 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -40214,7 +43142,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "any", + "Array", "" ); return body; @@ -40226,16 +43154,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to sendAgentMessageStreaming + * @params response Response returned by the server for a request to setNLInstructions * @throws ApiException if the response code was not in [200, 299] */ - sendAgentMessageStreaming(response) { + setNLInstructions(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SendAgentMessageResponse", + "EurekaSetNLInstructionsResponse", "" ); return body; @@ -40243,7 +43171,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (isCodeInRange("201", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SendAgentMessageResponse", + "EurekaSetNLInstructionsResponse", "" ); return body; @@ -40256,6 +43184,22 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -40267,7 +43211,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "SendAgentMessageResponse", + "EurekaSetNLInstructionsResponse", "" ); return body; @@ -40279,35 +43223,38 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to sendMessage + * @params response Response returned by the server for a request to shareMetadata * @throws ApiException if the response code was not in [200, 299] */ - sendMessage(response) { + shareMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "ErrorResponse", "" ); - return body; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("201", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "ErrorResponse", "" ); - return body; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } - if (isCodeInRange("400", response.httpStatusCode)) { + if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -40315,12 +43262,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "Array", + "void", "" ); return body; @@ -40332,16 +43279,16 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to setNLInstructions + * @params response Response returned by the server for a request to singleAnswer * @throws ApiException if the response code was not in [200, 299] */ - setNLInstructions(response) { + singleAnswer(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaSetNLInstructionsResponse", + "ResponseMessage", "" ); return body; @@ -40349,7 +43296,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (isCodeInRange("201", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaSetNLInstructionsResponse", + "ResponseMessage", "" ); return body; @@ -40362,46 +43309,6 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } - if (isCodeInRange("500", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); - } - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "EurekaSetNLInstructionsResponse", - "" - ); - return body; - } - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); - }); - } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to shareMetadata - * @throws ApiException if the response code was not in [200, 299] - */ - shareMetadata(response) { - return __async(this, null, function* () { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; - } - if (isCodeInRange("400", response.httpStatusCode)) { - const body = ObjectSerializer.deserialize( - ObjectSerializer.parse(yield response.body.text(), contentType), - "ErrorResponse", - "" - ); - throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); - } if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -40424,12 +43331,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "ResponseMessage", "" ); return body; @@ -40441,35 +43348,38 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to singleAnswer + * @params response Response returned by the server for a request to unassignTag * @throws ApiException if the response code was not in [200, 299] */ - singleAnswer(response) { + unassignTag(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseMessage", + "ErrorResponse", "" ); - return body; + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); } - if (isCodeInRange("201", response.httpStatusCode)) { + if (isCodeInRange("401", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseMessage", + "ErrorResponse", "" ); - return body; + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); } - if (isCodeInRange("400", response.httpStatusCode)) { + if (isCodeInRange("403", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -40477,12 +43387,12 @@ var ThoughtSpotRestApiResponseProcessor = class { "ErrorResponse", "" ); - throw new ApiException(response.httpStatusCode, "Operation failed", body, response.headers); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); } if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "ResponseMessage", + "void", "" ); return body; @@ -40494,10 +43404,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to unassignTag + * @params response Response returned by the server for a request to unparameterizeMetadata * @throws ApiException if the response code was not in [200, 299] */ - unassignTag(response) { + unparameterizeMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -40550,10 +43460,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to unparameterizeMetadata + * @params response Response returned by the server for a request to unpublishMetadata * @throws ApiException if the response code was not in [200, 299] */ - unparameterizeMetadata(response) { + unpublishMetadata(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -40606,10 +43516,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to unpublishMetadata + * @params response Response returned by the server for a request to updateCalendar * @throws ApiException if the response code was not in [200, 299] */ - unpublishMetadata(response) { + updateCalendar(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -40662,10 +43572,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateCalendar + * @params response Response returned by the server for a request to updateCollection * @throws ApiException if the response code was not in [200, 299] */ - updateCalendar(response) { + updateCollection(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -40695,6 +43605,14 @@ var ThoughtSpotRestApiResponseProcessor = class { ); throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); } + if (isCodeInRange("404", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Resource not found.", body, response.headers); + } if (isCodeInRange("500", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), @@ -41461,10 +44379,66 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateSystemConfig + * @params response Response returned by the server for a request to updateSystemConfig + * @throws ApiException if the response code was not in [200, 299] + */ + updateSystemConfig(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateTag * @throws ApiException if the response code was not in [200, 299] */ - updateSystemConfig(response) { + updateTag(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -41517,10 +44491,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateTag + * @params response Response returned by the server for a request to updateUser * @throws ApiException if the response code was not in [200, 299] */ - updateTag(response) { + updateUser(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -41573,10 +44547,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateUser + * @params response Response returned by the server for a request to updateUserGroup * @throws ApiException if the response code was not in [200, 299] */ - updateUser(response) { + updateUserGroup(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -41629,10 +44603,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateUserGroup + * @params response Response returned by the server for a request to updateVariable * @throws ApiException if the response code was not in [200, 299] */ - updateUserGroup(response) { + updateVariable(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -41685,10 +44659,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateVariable + * @params response Response returned by the server for a request to updateVariableValues * @throws ApiException if the response code was not in [200, 299] */ - updateVariable(response) { + updateVariableValues(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -41741,10 +44715,10 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateVariableValues + * @params response Response returned by the server for a request to updateWebhookConfiguration * @throws ApiException if the response code was not in [200, 299] */ - updateVariableValues(response) { + updateWebhookConfiguration(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("204", response.httpStatusCode)) { @@ -41797,14 +44771,19 @@ var ThoughtSpotRestApiResponseProcessor = class { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateWebhookConfiguration + * @params response Response returned by the server for a request to validateCommunicationChannel * @throws ApiException if the response code was not in [200, 299] */ - updateWebhookConfiguration(response) { + validateCommunicationChannel(response) { return __async(this, null, function* () { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("204", response.httpStatusCode)) { - return; + if (isCodeInRange("200", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "CommunicationChannelValidateResponse", + "" + ); + return body; } if (isCodeInRange("400", response.httpStatusCode)) { const body = ObjectSerializer.deserialize( @@ -41841,7 +44820,7 @@ var ThoughtSpotRestApiResponseProcessor = class { if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body = ObjectSerializer.deserialize( ObjectSerializer.parse(yield response.body.text(), contentType), - "void", + "CommunicationChannelValidateResponse", "" ); return body; @@ -42037,8 +45016,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/activate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -42074,8 +45053,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/change-password"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -42111,8 +45090,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -42148,8 +45127,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/deactivate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -42185,8 +45164,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/{user_identifier}/delete".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -42213,8 +45192,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/force-logout"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -42250,8 +45229,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/import"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -42287,8 +45266,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/reset-password"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -42324,8 +45303,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -42365,8 +45344,8 @@ var UsersApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/users/{user_identifier}/update".replace("{user_identifier}", encodeURIComponent(String(userIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -42993,8 +45972,8 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43017,7 +45996,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier, _options) { @@ -43030,8 +46009,86 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/{identifier}/delete".replace("{identifier}", encodeURIComponent(String(identifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (deleteVariablesRequest === null || deleteVariablesRequest === void 0) { + throw new RequiredError("VariableApi", "deleteVariables", "deleteVariablesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/delete"; + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(deleteVariablesRequest, "DeleteVariablesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + let authMethod; + authMethod = _config.authMethods["bearerAuth"]; + if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { + yield authMethod == null ? void 0 : authMethod.applySecurityAuthentication(requestContext); + } + const defaultAuth = ((_a = _options == null ? void 0 : _options.authMethods) == null ? void 0 : _a.default) || ((_c = (_b = this.configuration) == null ? void 0 : _b.authMethods) == null ? void 0 : _c.default); + if (defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication) { + yield defaultAuth == null ? void 0 : defaultAuth.applySecurityAuthentication(requestContext); + } + return requestContext; + }); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + return __async(this, null, function* () { + var _a, _b, _c; + let _config = _options || this.configuration; + if (identifier === null || identifier === void 0) { + throw new RequiredError("VariableApi", "putVariableValues", "identifier"); + } + if (putVariableValuesRequest === null || putVariableValuesRequest === void 0) { + throw new RequiredError("VariableApi", "putVariableValues", "putVariableValuesRequest"); + } + const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update-values".replace("{identifier}", encodeURIComponent(String(identifier))); + const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(putVariableValuesRequest, "PutVariableValuesRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); let authMethod; authMethod = _config.authMethods["bearerAuth"]; if (authMethod == null ? void 0 : authMethod.applySecurityAuthentication) { @@ -43058,8 +46115,8 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43099,8 +46156,8 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/{identifier}/update".replace("{identifier}", encodeURIComponent(String(identifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43123,7 +46180,7 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { }); } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -43136,8 +46193,8 @@ var VariableApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/template/variables/update-values"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43278,6 +46335,118 @@ var VariableApiResponseProcessor = class { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); }); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteVariables + * @throws ApiException if the response code was not in [200, 299] + */ + deleteVariables(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to putVariableValues + * @throws ApiException if the response code was not in [200, 299] + */ + putVariableValues(response) { + return __async(this, null, function* () { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("204", response.httpStatusCode)) { + return; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Invalid request.", body, response.headers); + } + if (isCodeInRange("401", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unauthorized access.", body, response.headers); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Forbidden access.", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "ErrorResponse", + "" + ); + throw new ApiException(response.httpStatusCode, "Unexpected error", body, response.headers); + } + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body = ObjectSerializer.deserialize( + ObjectSerializer.parse(yield response.body.text(), contentType), + "void", + "" + ); + return body; + } + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", yield response.getBodyAsAny(), response.headers); + }); + } /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -43469,8 +46638,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/branches/commit"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43506,8 +46675,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43543,8 +46712,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43580,8 +46749,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/deploy"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43621,8 +46790,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/{commit_id}/revert".replace("{commit_id}", encodeURIComponent(String(commitId))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43658,8 +46827,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/commits/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43695,8 +46864,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43732,8 +46901,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/config/update"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -43769,8 +46938,8 @@ var VersionControlApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/vcs/git/branches/validate"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -44356,8 +47525,8 @@ var WebhooksApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/webhooks/create"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -44393,8 +47562,8 @@ var WebhooksApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/webhooks/delete"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -44430,8 +47599,8 @@ var WebhooksApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/webhooks/search"; const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -44471,8 +47640,8 @@ var WebhooksApiRequestFactory = class extends BaseAPIRequestFactory { const localVarPath = "/api/rest/2.0/webhooks/{webhook_identifier}/update".replace("{webhook_identifier}", encodeURIComponent(String(webhookIdentifier))); const requestContext = _config.baseServer.makeRequestContext(localVarPath, "POST" /* POST */); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); - requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.22.0"); - requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.22.0"); + requestContext.setHeaderParam("User-Agent", "ThoughtSpot-Client/typescript/2.23.0"); + requestContext.setHeaderParam("X-ThoughtSpot-Client", "ThoughtSpot-ts-client/2.23.0"); const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); @@ -44745,7 +47914,7 @@ var ObservableAIApi = class { this.responseProcessor = responseProcessor || new AIApiResponseProcessor(); } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest, _options) { @@ -44763,7 +47932,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest, _options) { @@ -44781,7 +47950,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { @@ -44799,7 +47968,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest, _options) { @@ -44817,7 +47986,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest, _options) { @@ -44835,7 +48004,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { @@ -44853,7 +48022,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -44872,7 +48041,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { @@ -44890,7 +48059,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -44909,7 +48078,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest, _options) { @@ -44927,7 +48096,7 @@ var ObservableAIApi = class { })); } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest, _options) { @@ -45111,6 +48280,86 @@ var ObservableAuthenticationApi = class { })); } }; +var ObservableCollectionsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new CollectionsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new CollectionsApiResponseProcessor(); + } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.createCollection(createCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCollection(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.deleteCollection(deleteCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCollection(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCollections(searchCollectionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCollections(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCollection(rsp))); + })); + } +}; var ObservableConnectionConfigurationsApi = class { constructor(configuration, requestFactory, responseProcessor) { this.configuration = configuration; @@ -45198,7 +48447,7 @@ var ObservableConnectionsApi = class { this.responseProcessor = responseProcessor || new ConnectionsApiResponseProcessor(); } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest, _options) { @@ -45951,6 +49200,31 @@ var ObservableGroupsApi = class { })); } }; +var ObservableJobsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.configuration = configuration; + this.requestFactory = requestFactory || new JobsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new JobsApiResponseProcessor(); + } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + const requestContextPromise = this.requestFactory.searchChannelHistory(searchChannelHistoryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchChannelHistory(rsp))); + })); + } +}; var ObservableLogApi = class { constructor(configuration, requestFactory, responseProcessor) { this.configuration = configuration; @@ -46163,7 +49437,7 @@ var ObservableMetadataApi = class { })); } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest, _options) { @@ -46180,6 +49454,24 @@ var ObservableMetadataApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.parameterizeMetadata(rsp))); })); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + const requestContextPromise = this.requestFactory.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.parameterizeMetadataFields(rsp))); + })); + } /** * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. * @param searchMetadataRequest @@ -46870,6 +50162,24 @@ var ObservableSystemApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateSystemConfig(rsp))); })); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + const requestContextPromise = this.requestFactory.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateCommunicationChannel(rsp))); + })); + } }; var ObservableTagsApi = class { constructor(configuration, requestFactory, responseProcessor) { @@ -47174,7 +50484,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest, _options) { @@ -47209,6 +50519,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCalendar(rsp))); })); } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.createCollection(createCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.createCollection(rsp))); + })); + } /** * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. * @param createConfigRequest @@ -47228,7 +50556,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest, _options) { @@ -47264,7 +50592,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest, _options) { @@ -47582,6 +50910,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCalendar(rsp))); })); } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.deleteCollection(deleteCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteCollection(rsp))); + })); + } /** * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param deleteConfigRequest @@ -47853,7 +51199,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier, _options) { @@ -47870,6 +51216,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariable(rsp))); })); } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + const requestContextPromise = this.requestFactory.deleteVariables(deleteVariablesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariables(rsp))); + })); + } /** * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. * @param deleteWebhookConfigurationsRequest @@ -48283,7 +51647,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { @@ -48319,7 +51683,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest, _options) { @@ -48355,7 +51719,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest, _options) { @@ -48549,7 +51913,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest, _options) { @@ -48566,6 +51930,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.parameterizeMetadata(rsp))); })); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + const requestContextPromise = this.requestFactory.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.parameterizeMetadataFields(rsp))); + })); + } /** * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. * @param publishMetadataRequest @@ -48585,7 +51967,26 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.7.0.cl or later + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + const requestContextPromise = this.requestFactory.putVariableValues(identifier, putVariableValuesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.putVariableValues(rsp))); + })); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { @@ -48694,6 +52095,42 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCalendars(rsp))); })); } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + const requestContextPromise = this.requestFactory.searchChannelHistory(searchChannelHistoryRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchChannelHistory(rsp))); + })); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + const requestContextPromise = this.requestFactory.searchCollections(searchCollectionsRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.searchCollections(rsp))); + })); + } /** * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. * @param searchCommitsRequest @@ -49001,7 +52438,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -49020,7 +52457,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { @@ -49038,7 +52475,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -49057,7 +52494,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest, _options) { @@ -49093,7 +52530,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest, _options) { @@ -49183,6 +52620,25 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCalendar(rsp))); })); } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + const requestContextPromise = this.requestFactory.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateCollection(rsp))); + })); + } /** * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups * @param updateColumnSecurityRulesRequest @@ -49528,7 +52984,7 @@ var ObservableThoughtSpotRestApi = class { })); } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -49564,6 +53020,24 @@ var ObservableThoughtSpotRestApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.updateWebhookConfiguration(rsp))); })); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + const requestContextPromise = this.requestFactory.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.validateCommunicationChannel(rsp))); + })); + } /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -49831,7 +53305,7 @@ var ObservableVariableApi = class { })); } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier, _options) { @@ -49848,6 +53322,43 @@ var ObservableVariableApi = class { return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariable(rsp))); })); } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + const requestContextPromise = this.requestFactory.deleteVariables(deleteVariablesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.deleteVariables(rsp))); + })); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + const requestContextPromise = this.requestFactory.putVariableValues(identifier, putVariableValuesRequest, _options); + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx) => middleware.pre(ctx))); + } + return middlewarePreObservable.pipe(mergeMap((ctx) => this.configuration.httpApi.send(ctx))).pipe(mergeMap((response) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp) => this.responseProcessor.putVariableValues(rsp))); + })); + } /** * Search variables Version: 10.14.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier * @param searchVariablesRequest @@ -49886,7 +53397,7 @@ var ObservableVariableApi = class { })); } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -50161,7 +53672,7 @@ var PromiseAIApi = class { this.api = new ObservableAIApi(configuration, requestFactory, responseProcessor); } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest, _options) { @@ -50169,7 +53680,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest, _options) { @@ -50177,7 +53688,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { @@ -50185,7 +53696,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest, _options) { @@ -50193,7 +53704,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest, _options) { @@ -50201,7 +53712,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { @@ -50209,7 +53720,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -50218,7 +53729,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { @@ -50226,7 +53737,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -50235,7 +53746,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest, _options) { @@ -50243,7 +53754,7 @@ var PromiseAIApi = class { return result.toPromise(); } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest, _options) { @@ -50325,6 +53836,44 @@ var PromiseAuthenticationApi = class { return result.toPromise(); } }; +var PromiseCollectionsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableCollectionsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + const result = this.api.createCollection(createCollectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + const result = this.api.deleteCollection(deleteCollectionRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + const result = this.api.searchCollections(searchCollectionsRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + const result = this.api.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + return result.toPromise(); + } +}; var PromiseConnectionConfigurationsApi = class { constructor(configuration, requestFactory, responseProcessor) { this.api = new ObservableConnectionConfigurationsApi(configuration, requestFactory, responseProcessor); @@ -50368,7 +53917,7 @@ var PromiseConnectionsApi = class { this.api = new ObservableConnectionsApi(configuration, requestFactory, responseProcessor); } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest, _options) { @@ -50729,6 +54278,19 @@ var PromiseGroupsApi = class { return result.toPromise(); } }; +var PromiseJobsApi = class { + constructor(configuration, requestFactory, responseProcessor) { + this.api = new ObservableJobsApi(configuration, requestFactory, responseProcessor); + } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + const result = this.api.searchChannelHistory(searchChannelHistoryRequest, _options); + return result.toPromise(); + } +}; var PromiseLogApi = class { constructor(configuration, requestFactory, responseProcessor) { this.api = new ObservableLogApi(configuration, requestFactory, responseProcessor); @@ -50827,13 +54389,21 @@ var PromiseMetadataApi = class { return result.toPromise(); } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest, _options) { const result = this.api.parameterizeMetadata(parameterizeMetadataRequest, _options); return result.toPromise(); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + const result = this.api.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + return result.toPromise(); + } /** * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. * @param searchMetadataRequest @@ -51152,6 +54722,14 @@ var PromiseSystemApi = class { const result = this.api.updateSystemConfig(updateSystemConfigRequest, _options); return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + const result = this.api.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + return result.toPromise(); + } }; var PromiseTagsApi = class { constructor(configuration, requestFactory, responseProcessor) { @@ -51292,7 +54870,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ createAgentConversation(createAgentConversationRequest, _options) { @@ -51307,6 +54885,14 @@ var PromiseThoughtSpotRestApi = class { const result = this.api.createCalendar(createCalendarRequest, _options); return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + createCollection(createCollectionRequest, _options) { + const result = this.api.createCollection(createCollectionRequest, _options); + return result.toPromise(); + } /** * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. * @param createConfigRequest @@ -51316,7 +54902,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ createConnection(createConnectionRequest, _options) { @@ -51332,7 +54918,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ createConversation(createConversationRequest, _options) { @@ -51480,6 +55066,14 @@ var PromiseThoughtSpotRestApi = class { const result = this.api.deleteCalendar(calendarIdentifier, _options); return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + deleteCollection(deleteCollectionRequest, _options) { + const result = this.api.deleteCollection(deleteCollectionRequest, _options); + return result.toPromise(); + } /** * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param deleteConfigRequest @@ -51601,13 +55195,21 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier, _options) { const result = this.api.deleteVariable(identifier, _options); return result.toPromise(); } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + const result = this.api.deleteVariables(deleteVariablesRequest, _options); + return result.toPromise(); + } /** * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. * @param deleteWebhookConfigurationsRequest @@ -51791,7 +55393,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ getDataSourceSuggestions(getDataSourceSuggestionsRequest, _options) { @@ -51807,7 +55409,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ getNLInstructions(getNLInstructionsRequest, _options) { @@ -51823,7 +55425,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ getRelevantQuestions(getRelevantQuestionsRequest, _options) { @@ -51907,13 +55509,21 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ parameterizeMetadata(parameterizeMetadataRequest, _options) { const result = this.api.parameterizeMetadata(parameterizeMetadataRequest, _options); return result.toPromise(); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options) { + const result = this.api.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + return result.toPromise(); + } /** * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. * @param publishMetadataRequest @@ -51923,7 +55533,16 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.7.0.cl or later + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + const result = this.api.putVariableValues(identifier, putVariableValuesRequest, _options); + return result.toPromise(); + } + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ queryGetDecomposedQuery(queryGetDecomposedQueryRequest, _options) { @@ -51972,6 +55591,22 @@ var PromiseThoughtSpotRestApi = class { const result = this.api.searchCalendars(searchCalendarsRequest, _options); return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + searchChannelHistory(searchChannelHistoryRequest, _options) { + const result = this.api.searchChannelHistory(searchChannelHistoryRequest, _options); + return result.toPromise(); + } + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + searchCollections(searchCollectionsRequest, _options) { + const result = this.api.searchCollections(searchCollectionsRequest, _options); + return result.toPromise(); + } /** * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. * @param searchCommitsRequest @@ -52109,7 +55744,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -52118,7 +55753,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ sendAgentMessageStreaming(sendAgentMessageStreamingRequest, _options) { @@ -52126,7 +55761,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -52135,7 +55770,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ setNLInstructions(setNLInstructionsRequest, _options) { @@ -52151,7 +55786,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ singleAnswer(singleAnswerRequest, _options) { @@ -52191,6 +55826,15 @@ var PromiseThoughtSpotRestApi = class { const result = this.api.updateCalendar(calendarIdentifier, updateCalendarRequest, _options); return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + updateCollection(collectionIdentifier, updateCollectionRequest, _options) { + const result = this.api.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + return result.toPromise(); + } /** * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups * @param updateColumnSecurityRulesRequest @@ -52356,7 +56000,7 @@ var PromiseThoughtSpotRestApi = class { return result.toPromise(); } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -52372,6 +56016,14 @@ var PromiseThoughtSpotRestApi = class { const result = this.api.updateWebhookConfiguration(webhookIdentifier, updateWebhookConfigurationRequest, _options); return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + validateCommunicationChannel(validateCommunicationChannelRequest, _options) { + const result = this.api.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + return result.toPromise(); + } /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -52495,13 +56147,30 @@ var PromiseVariableApi = class { return result.toPromise(); } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ deleteVariable(identifier, _options) { const result = this.api.deleteVariable(identifier, _options); return result.toPromise(); } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + deleteVariables(deleteVariablesRequest, _options) { + const result = this.api.deleteVariables(deleteVariablesRequest, _options); + return result.toPromise(); + } + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + putVariableValues(identifier, putVariableValuesRequest, _options) { + const result = this.api.putVariableValues(identifier, putVariableValuesRequest, _options); + return result.toPromise(); + } /** * Search variables Version: 10.14.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier * @param searchVariablesRequest @@ -52520,7 +56189,7 @@ var PromiseVariableApi = class { return result.toPromise(); } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ updateVariableValues(updateVariableValuesRequest, _options) { @@ -52758,8 +56427,21 @@ export { CALLBACKInputMandatory, CalendarResponse, ChangeUserPasswordRequest, + ChannelHistoryEventInfo, + ChannelHistoryEventInput, + ChannelHistoryJob, + ChannelValidationAwsS3Info, + ChannelValidationDetail, ClusterNonEmbedAccess, ClusterNonEmbedAccessInput, + Collection, + CollectionDeleteResponse, + CollectionDeleteTypeIdentifiers, + CollectionEntityIdentifier, + CollectionMetadataInput, + CollectionMetadataItem, + CollectionSearchResponse, + PromiseCollectionsApi as CollectionsApi, Column, ColumnSecurityRule, ColumnSecurityRuleColumn, @@ -52775,6 +56457,7 @@ export { CommitResponse, CommiterType, CommunicationChannelPreferencesResponse, + CommunicationChannelValidateResponse, ConfigureCommunicationChannelPreferencesRequest, ConfigureSecuritySettingsRequest, ConfigureSecuritySettingsRequestClusterPreferences, @@ -52793,6 +56476,7 @@ export { CreateAgentConversationRequestMetadataContext, CreateCalendarRequest, CreateCalendarRequestTableReference, + CreateCollectionRequest, CreateConfigRequest, CreateConnectionConfigurationRequest, CreateConnectionConfigurationRequestPolicyProcessOptions, @@ -52840,12 +56524,14 @@ export { DefaultActionConfigInput, DefaultActionConfigInputCreate, DefaultActionConfigSearchInput, + DeleteCollectionRequest, DeleteConfigRequest, DeleteConnectionConfigurationRequest, DeleteConnectionRequest, DeleteMetadataRequest, DeleteMetadataTypeInput, DeleteOrgEmailCustomizationRequest, + DeleteVariablesRequest, DeleteWebhookConfigurationsRequest, DeployCommitRequest, DeployResponse, @@ -52928,6 +56614,8 @@ export { JWTParameter, JWTUserOptions, JWTUserOptionsFull, + JobRecipient, + PromiseJobsApi as JobsApi, LBContextInput, LiveboardContent, LiveboardDataResponse, @@ -52964,6 +56652,7 @@ export { OrgType, PromiseOrgsApi as OrgsApi, ParameterValues, + ParameterizeMetadataFieldsRequest, ParameterizeMetadataRequest, ParametersListItem, ParametersListItemInput, @@ -52981,6 +56670,7 @@ export { PrincipalsListItemInput, PublishMetadataListItem, PublishMetadataRequest, + PutVariableValuesRequest, QueryGetDecomposedQueryRequest, QueryGetDecomposedQueryRequestNlsRequest, RecipientDetails, @@ -53033,6 +56723,10 @@ export { ScriptSrcUrlsInput, SearchCalendarsRequest, SearchCalendarsRequestSortOptions, + SearchChannelHistoryRequest, + SearchChannelHistoryResponse, + SearchCollectionsRequest, + SearchCollectionsRequestSortOptions, SearchCommitsRequest, SearchCommunicationChannelPreferencesRequest, SearchConfigRequest, @@ -53058,7 +56752,6 @@ export { SearchUserGroupsRequest, SearchUserGroupsRequestSortOptions, SearchUsersRequest, - SearchUsersRequestSortOptions, SearchVariablesRequest, SearchWebhookConfigurationsRequest, SearchWebhookConfigurationsRequestSortOptions, @@ -53111,6 +56804,7 @@ export { UnpublishMetadataRequest, UpdateCalendarRequest, UpdateCalendarRequestTableReference, + UpdateCollectionRequest, UpdateColumnSecurityRulesRequest, UpdateConfigRequest, UpdateConnectionConfigurationRequest, @@ -53145,12 +56839,14 @@ export { UserParameterOptions, UserPrincipal, PromiseUsersApi as UsersApi, + ValidateCommunicationChannelRequest, ValidateMergeRequest, ValidateTokenRequest, ValueScopeInput, Variable, PromiseVariableApi as VariableApi, VariableDetailInput, + VariablePutAssignmentInput, VariableUpdateAssignmentInput, VariableUpdateScopeInput, VariableValue, @@ -53166,6 +56862,8 @@ export { WebhookAuthenticationInput, WebhookDeleteFailure, WebhookDeleteResponse, + WebhookKeyValuePair, + WebhookKeyValuePairInput, WebhookOrg, WebhookPagination, WebhookResponse, diff --git a/sdks/typescript/index.ts b/sdks/typescript/index.ts index 27a36f985..a3ef54317 100644 --- a/sdks/typescript/index.ts +++ b/sdks/typescript/index.ts @@ -8,6 +8,6 @@ export * from "./servers"; export { RequiredError } from "./apis/baseapi"; export { PromiseMiddleware as Middleware } from './middleware'; -export { PromiseAIApi as AIApi, PromiseAuthenticationApi as AuthenticationApi, PromiseConnectionConfigurationsApi as ConnectionConfigurationsApi, PromiseConnectionsApi as ConnectionsApi, PromiseCustomActionApi as CustomActionApi, PromiseCustomCalendarsApi as CustomCalendarsApi, PromiseDBTApi as DBTApi, PromiseDataApi as DataApi, PromiseEmailCustomizationApi as EmailCustomizationApi, PromiseGroupsApi as GroupsApi, PromiseLogApi as LogApi, PromiseMetadataApi as MetadataApi, PromiseOrgsApi as OrgsApi, PromiseReportsApi as ReportsApi, PromiseRolesApi as RolesApi, PromiseSchedulesApi as SchedulesApi, PromiseSecurityApi as SecurityApi, PromiseSystemApi as SystemApi, PromiseTagsApi as TagsApi, PromiseThoughtSpotRestApi as ThoughtSpotRestApi, PromiseUsersApi as UsersApi, PromiseVariableApi as VariableApi, PromiseVersionControlApi as VersionControlApi, PromiseWebhooksApi as WebhooksApi } from './types/PromiseAPI'; +export { PromiseAIApi as AIApi, PromiseAuthenticationApi as AuthenticationApi, PromiseCollectionsApi as CollectionsApi, PromiseConnectionConfigurationsApi as ConnectionConfigurationsApi, PromiseConnectionsApi as ConnectionsApi, PromiseCustomActionApi as CustomActionApi, PromiseCustomCalendarsApi as CustomCalendarsApi, PromiseDBTApi as DBTApi, PromiseDataApi as DataApi, PromiseEmailCustomizationApi as EmailCustomizationApi, PromiseGroupsApi as GroupsApi, PromiseJobsApi as JobsApi, PromiseLogApi as LogApi, PromiseMetadataApi as MetadataApi, PromiseOrgsApi as OrgsApi, PromiseReportsApi as ReportsApi, PromiseRolesApi as RolesApi, PromiseSchedulesApi as SchedulesApi, PromiseSecurityApi as SecurityApi, PromiseSystemApi as SystemApi, PromiseTagsApi as TagsApi, PromiseThoughtSpotRestApi as ThoughtSpotRestApi, PromiseUsersApi as UsersApi, PromiseVariableApi as VariableApi, PromiseVersionControlApi as VersionControlApi, PromiseWebhooksApi as WebhooksApi } from './types/PromiseAPI'; export { createBearerAuthenticationConfig, createBasicConfig } from "./utils/config"; \ No newline at end of file diff --git a/sdks/typescript/models/ChannelHistoryEventInfo.ts b/sdks/typescript/models/ChannelHistoryEventInfo.ts new file mode 100644 index 000000000..bc220328f --- /dev/null +++ b/sdks/typescript/models/ChannelHistoryEventInfo.ts @@ -0,0 +1,74 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Event metadata for the triggering event associated with a job. +*/ +export class ChannelHistoryEventInfo { + /** + * Type of the event. + */ + 'type': ChannelHistoryEventInfoTypeEnum; + /** + * Unique ID of the event. + */ + 'id': string; + /** + * Name of the event. + */ + 'name'?: string | null; + /** + * Unique run ID for this event execution. + */ + 'run_id'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "ChannelHistoryEventInfoTypeEnum", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "run_id", + "baseName": "run_id", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ChannelHistoryEventInfo.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ChannelHistoryEventInfoTypeEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/ChannelHistoryEventInput.ts b/sdks/typescript/models/ChannelHistoryEventInput.ts new file mode 100644 index 000000000..56b2a6649 --- /dev/null +++ b/sdks/typescript/models/ChannelHistoryEventInput.ts @@ -0,0 +1,54 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Event specification for channel history search. +*/ +export class ChannelHistoryEventInput { + /** + * Type of the event. + */ + 'type': ChannelHistoryEventInputTypeEnum; + /** + * Unique ID or name of the event. + */ + 'identifier'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "ChannelHistoryEventInputTypeEnum", + "format": "" + }, + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ChannelHistoryEventInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ChannelHistoryEventInputTypeEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/ChannelHistoryJob.ts b/sdks/typescript/models/ChannelHistoryJob.ts new file mode 100644 index 000000000..6048744aa --- /dev/null +++ b/sdks/typescript/models/ChannelHistoryJob.ts @@ -0,0 +1,103 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ChannelHistoryEventInfo } from '../models/ChannelHistoryEventInfo'; +import { JobRecipient } from '../models/JobRecipient'; +import { HttpFile } from '../http/http'; + +/** +* A single job execution record for a channel. +*/ +export class ChannelHistoryJob { + /** + * Unique identifier for this job. + */ + 'id': string; + /** + * Delivery status of this job. + */ + 'status': ChannelHistoryJobStatusEnum; + /** + * Timestamp when this job was created (epoch milliseconds). + */ + 'creation_time_in_millis': number; + 'event'?: ChannelHistoryEventInfo; + /** + * The users, groups or external recipients for this job. + */ + 'recipients'?: Array | null; + /** + * Additional delivery details such as HTTP response code or error message. + */ + 'detail'?: string | null; + /** + * Number of attempts made. 1 indicates first attempt. + */ + 'try_count'?: number | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "ChannelHistoryJobStatusEnum", + "format": "" + }, + { + "name": "creation_time_in_millis", + "baseName": "creation_time_in_millis", + "type": "number", + "format": "float" + }, + { + "name": "event", + "baseName": "event", + "type": "ChannelHistoryEventInfo", + "format": "" + }, + { + "name": "recipients", + "baseName": "recipients", + "type": "Array", + "format": "" + }, + { + "name": "detail", + "baseName": "detail", + "type": "string", + "format": "" + }, + { + "name": "try_count", + "baseName": "try_count", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return ChannelHistoryJob.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ChannelHistoryJobStatusEnum = "PENDING" | "RETRY" | "SUCCESS" | "FAILED" ; + diff --git a/sdks/typescript/models/ChannelValidationAwsS3Info.ts b/sdks/typescript/models/ChannelValidationAwsS3Info.ts new file mode 100644 index 000000000..d30a0070a --- /dev/null +++ b/sdks/typescript/models/ChannelValidationAwsS3Info.ts @@ -0,0 +1,61 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* AWS S3 storage information returned from a validation step. +*/ +export class ChannelValidationAwsS3Info { + /** + * Name of the S3 bucket. + */ + 'bucket_name'?: string | null; + /** + * Name of the uploaded file. + */ + 'file_name'?: string | null; + /** + * Key of the object in S3 storage. + */ + 'object_key'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "bucket_name", + "baseName": "bucket_name", + "type": "string", + "format": "" + }, + { + "name": "file_name", + "baseName": "file_name", + "type": "string", + "format": "" + }, + { + "name": "object_key", + "baseName": "object_key", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ChannelValidationAwsS3Info.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/ChannelValidationDetail.ts b/sdks/typescript/models/ChannelValidationDetail.ts new file mode 100644 index 000000000..4bb4b69c6 --- /dev/null +++ b/sdks/typescript/models/ChannelValidationDetail.ts @@ -0,0 +1,83 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ChannelValidationAwsS3Info } from '../models/ChannelValidationAwsS3Info'; +import { HttpFile } from '../http/http'; + +/** +* Validation detail result for a sub-step. +*/ +export class ChannelValidationDetail { + /** + * The validation step that was performed. + */ + 'validation_step': ChannelValidationDetailValidationStepEnum; + /** + * Status of this validation step. + */ + 'status': ChannelValidationDetailStatusEnum; + /** + * HTTP status code returned by the channel (if applicable). + */ + 'http_status'?: number | null; + /** + * Error message from the channel or validation process. + */ + 'error_message'?: string | null; + 'aws_s3_info'?: ChannelValidationAwsS3Info; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "validation_step", + "baseName": "validation_step", + "type": "ChannelValidationDetailValidationStepEnum", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "ChannelValidationDetailStatusEnum", + "format": "" + }, + { + "name": "http_status", + "baseName": "http_status", + "type": "number", + "format": "int32" + }, + { + "name": "error_message", + "baseName": "error_message", + "type": "string", + "format": "" + }, + { + "name": "aws_s3_info", + "baseName": "aws_s3_info", + "type": "ChannelValidationAwsS3Info", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ChannelValidationDetail.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ChannelValidationDetailValidationStepEnum = "HTTP_CONNECTION_CHECK" | "STORAGE_FILE_UPLOAD_CHECK" ; +export type ChannelValidationDetailStatusEnum = "SUCCESS" | "FAILED" ; + diff --git a/sdks/typescript/models/Collection.ts b/sdks/typescript/models/Collection.ts new file mode 100644 index 000000000..5cbbb80f1 --- /dev/null +++ b/sdks/typescript/models/Collection.ts @@ -0,0 +1,120 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CollectionEntityIdentifier } from '../models/CollectionEntityIdentifier'; +import { CollectionMetadataItem } from '../models/CollectionMetadataItem'; +import { HttpFile } from '../http/http'; + +/** +* Response object for a collection. +*/ +export class Collection { + /** + * Unique identifier of the collection. + */ + 'id': string; + /** + * Name of the collection. + */ + 'name': string; + /** + * Description of the collection. + */ + 'description'?: string | null; + /** + * Metadata objects in the collection. + */ + 'metadata'?: Array | null; + /** + * Creation timestamp in milliseconds. + */ + 'created_at'?: string | null; + /** + * Last updated timestamp in milliseconds. + */ + 'updated_at'?: string | null; + /** + * Name of the author who created the collection. + */ + 'author_name'?: string | null; + /** + * Unique identifier of the author. + */ + 'author_id'?: string | null; + 'org'?: CollectionEntityIdentifier; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "created_at", + "baseName": "created_at", + "type": "string", + "format": "" + }, + { + "name": "updated_at", + "baseName": "updated_at", + "type": "string", + "format": "" + }, + { + "name": "author_name", + "baseName": "author_name", + "type": "string", + "format": "" + }, + { + "name": "author_id", + "baseName": "author_id", + "type": "string", + "format": "" + }, + { + "name": "org", + "baseName": "org", + "type": "CollectionEntityIdentifier", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Collection.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CollectionDeleteResponse.ts b/sdks/typescript/models/CollectionDeleteResponse.ts new file mode 100644 index 000000000..9b57c4f02 --- /dev/null +++ b/sdks/typescript/models/CollectionDeleteResponse.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CollectionDeleteTypeIdentifiers } from '../models/CollectionDeleteTypeIdentifiers'; +import { HttpFile } from '../http/http'; + +/** +* Response object for delete collection operation. +*/ +export class CollectionDeleteResponse { + /** + * List of metadata objects that were successfully deleted. + */ + 'metadata_deleted'?: Array | null; + /** + * List of metadata objects that were skipped during deletion. Objects may be skipped due to lack of permissions, dependencies, or other constraints. + */ + 'metadata_skipped'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_deleted", + "baseName": "metadata_deleted", + "type": "Array", + "format": "" + }, + { + "name": "metadata_skipped", + "baseName": "metadata_skipped", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CollectionDeleteResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CollectionDeleteTypeIdentifiers.ts b/sdks/typescript/models/CollectionDeleteTypeIdentifiers.ts new file mode 100644 index 000000000..e4f83cdc1 --- /dev/null +++ b/sdks/typescript/models/CollectionDeleteTypeIdentifiers.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { GenericInfo } from '../models/GenericInfo'; +import { HttpFile } from '../http/http'; + +/** +* Group of metadata objects identified by type. +*/ +export class CollectionDeleteTypeIdentifiers { + /** + * Type of the metadata object (e.g., Collection, Worksheet, Table). + */ + 'type'?: string | null; + /** + * List of metadata identifiers belonging to the given type. + */ + 'identifiers'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CollectionDeleteTypeIdentifiers.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CollectionEntityIdentifier.ts b/sdks/typescript/models/CollectionEntityIdentifier.ts new file mode 100644 index 000000000..0939da3ec --- /dev/null +++ b/sdks/typescript/models/CollectionEntityIdentifier.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Entity identifier with name. +*/ +export class CollectionEntityIdentifier { + /** + * Unique identifier of the entity. + */ + 'identifier'?: string | null; + /** + * Name of the entity. + */ + 'name'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifier", + "baseName": "identifier", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CollectionEntityIdentifier.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CollectionMetadataInput.ts b/sdks/typescript/models/CollectionMetadataInput.ts new file mode 100644 index 000000000..ac63ef15b --- /dev/null +++ b/sdks/typescript/models/CollectionMetadataInput.ts @@ -0,0 +1,54 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Input type for metadata to be added to a collection. +*/ +export class CollectionMetadataInput { + /** + * Type of metadata object. + */ + 'type': CollectionMetadataInputTypeEnum; + /** + * List of unique IDs or names of metadata objects. + */ + 'identifiers': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "CollectionMetadataInputTypeEnum", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CollectionMetadataInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CollectionMetadataInputTypeEnum = "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "COLLECTION" ; + diff --git a/sdks/typescript/models/CollectionMetadataItem.ts b/sdks/typescript/models/CollectionMetadataItem.ts new file mode 100644 index 000000000..38a59c48b --- /dev/null +++ b/sdks/typescript/models/CollectionMetadataItem.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CollectionEntityIdentifier } from '../models/CollectionEntityIdentifier'; +import { HttpFile } from '../http/http'; + +/** +* Metadata item in a collection response. +*/ +export class CollectionMetadataItem { + /** + * Type of the metadata object. + */ + 'type'?: string | null; + /** + * List of identifiers for this metadata type. + */ + 'identifiers'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + }, + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CollectionMetadataItem.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CollectionSearchResponse.ts b/sdks/typescript/models/CollectionSearchResponse.ts new file mode 100644 index 000000000..f7a78e6c1 --- /dev/null +++ b/sdks/typescript/models/CollectionSearchResponse.ts @@ -0,0 +1,82 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Collection } from '../models/Collection'; +import { HttpFile } from '../http/http'; + +/** +* Response object for search collections operation. +*/ +export class CollectionSearchResponse { + /** + * List of collections matching the search criteria. + */ + 'collections': Array; + /** + * The starting record number from where the records are included. + */ + 'record_offset'?: number | null; + /** + * The number of records returned. + */ + 'record_size'?: number | null; + /** + * Indicates if this is the last batch of results. + */ + 'is_last_batch'?: boolean | null; + /** + * Total count of records returned. + */ + 'count'?: number | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "collections", + "baseName": "collections", + "type": "Array", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "is_last_batch", + "baseName": "is_last_batch", + "type": "boolean", + "format": "" + }, + { + "name": "count", + "baseName": "count", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return CollectionSearchResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CommunicationChannelValidateResponse.ts b/sdks/typescript/models/CommunicationChannelValidateResponse.ts new file mode 100644 index 000000000..2015ceaed --- /dev/null +++ b/sdks/typescript/models/CommunicationChannelValidateResponse.ts @@ -0,0 +1,107 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ChannelValidationDetail } from '../models/ChannelValidationDetail'; +import { HttpFile } from '../http/http'; + +/** +* Response containing validation results for communication channel configuration. +*/ +export class CommunicationChannelValidateResponse { + /** + * Type of communication channel that was validated. + */ + 'channel_type': CommunicationChannelValidateResponseChannelTypeEnum; + /** + * ID of the communication channel (e.g., webhook_id). + */ + 'channel_id': string; + /** + * Name of the communication channel (e.g., webhook name). + */ + 'channel_name'?: string | null; + /** + * Event type that was validated. + */ + 'event_type': CommunicationChannelValidateResponseEventTypeEnum; + /** + * Unique Job Id of the validation. + */ + 'job_id': string; + /** + * Overall result of the validation. + */ + 'result_code': CommunicationChannelValidateResponseResultCodeEnum; + /** + * Detailed results of various validation sub-steps. + */ + 'details'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "CommunicationChannelValidateResponseChannelTypeEnum", + "format": "" + }, + { + "name": "channel_id", + "baseName": "channel_id", + "type": "string", + "format": "" + }, + { + "name": "channel_name", + "baseName": "channel_name", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "CommunicationChannelValidateResponseEventTypeEnum", + "format": "" + }, + { + "name": "job_id", + "baseName": "job_id", + "type": "string", + "format": "" + }, + { + "name": "result_code", + "baseName": "result_code", + "type": "CommunicationChannelValidateResponseResultCodeEnum", + "format": "" + }, + { + "name": "details", + "baseName": "details", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CommunicationChannelValidateResponse.attributeTypeMap; + } + + public constructor() { + } +} + + +export type CommunicationChannelValidateResponseChannelTypeEnum = "WEBHOOK" ; +export type CommunicationChannelValidateResponseEventTypeEnum = "LIVEBOARD_SCHEDULE" ; +export type CommunicationChannelValidateResponseResultCodeEnum = "SUCCESS" | "FAILED" | "PARTIAL_SUCCESS" ; + diff --git a/sdks/typescript/models/CreateCollectionRequest.ts b/sdks/typescript/models/CreateCollectionRequest.ts new file mode 100644 index 000000000..0812a8d2a --- /dev/null +++ b/sdks/typescript/models/CreateCollectionRequest.ts @@ -0,0 +1,59 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CollectionMetadataInput } from '../models/CollectionMetadataInput'; +import { HttpFile } from '../http/http'; + +export class CreateCollectionRequest { + /** + * Name of the collection. + */ + 'name': string; + /** + * Description of the collection. + */ + 'description'?: string; + /** + * Metadata objects to add to the collection. + */ + 'metadata'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateCollectionRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/CreateEmailCustomizationRequestTemplateProperties.ts b/sdks/typescript/models/CreateEmailCustomizationRequestTemplateProperties.ts index 74f30c135..ce815e172 100644 --- a/sdks/typescript/models/CreateEmailCustomizationRequestTemplateProperties.ts +++ b/sdks/typescript/models/CreateEmailCustomizationRequestTemplateProperties.ts @@ -124,6 +124,10 @@ export class CreateEmailCustomizationRequestTemplateProperties { * Whether to hide contact support url. Version: 26.2.0.cl or later */ 'hide_contact_support_url'?: boolean | null; + /** + * Whether to hide logo Version: 26.4.0.cl or later + */ + 'hide_logo_url'?: boolean | null; static readonly discriminator: string | undefined = undefined; @@ -289,6 +293,12 @@ export class CreateEmailCustomizationRequestTemplateProperties { "baseName": "hide_contact_support_url", "type": "boolean", "format": "" + }, + { + "name": "hide_logo_url", + "baseName": "hide_logo_url", + "type": "boolean", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/sdks/typescript/models/CreateWebhookConfigurationRequest.ts b/sdks/typescript/models/CreateWebhookConfigurationRequest.ts index 9cd10dd3f..12e5ac2a9 100644 --- a/sdks/typescript/models/CreateWebhookConfigurationRequest.ts +++ b/sdks/typescript/models/CreateWebhookConfigurationRequest.ts @@ -13,6 +13,7 @@ import { CreateWebhookConfigurationRequestAuthentication } from '../models/CreateWebhookConfigurationRequestAuthentication'; import { CreateWebhookConfigurationRequestSignatureVerification } from '../models/CreateWebhookConfigurationRequestSignatureVerification'; import { CreateWebhookConfigurationRequestStorageDestination } from '../models/CreateWebhookConfigurationRequestStorageDestination'; +import { WebhookKeyValuePairInput } from '../models/WebhookKeyValuePairInput'; import { HttpFile } from '../http/http'; export class CreateWebhookConfigurationRequest { @@ -39,6 +40,10 @@ export class CreateWebhookConfigurationRequest { 'authentication'?: CreateWebhookConfigurationRequestAuthentication; 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; 'storage_destination'?: CreateWebhookConfigurationRequestStorageDestination; + /** + * Additional headers as an array of key-value pairs. Example: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array; static readonly discriminator: string | undefined = undefined; @@ -90,6 +95,12 @@ export class CreateWebhookConfigurationRequest { "baseName": "storage_destination", "type": "CreateWebhookConfigurationRequestStorageDestination", "format": "" + }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/sdks/typescript/models/DeleteCollectionRequest.ts b/sdks/typescript/models/DeleteCollectionRequest.ts new file mode 100644 index 000000000..a031016ed --- /dev/null +++ b/sdks/typescript/models/DeleteCollectionRequest.ts @@ -0,0 +1,58 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class DeleteCollectionRequest { + /** + * Unique GUIDs of collections to delete. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + */ + 'collection_identifiers': Array; + /** + * Flag to delete child objects of the collection that the user has access to. + */ + 'delete_children'?: boolean | null; + /** + * Preview deletion without actually deleting. When set to true, returns what would be deleted without performing the actual deletion. + */ + 'dry_run'?: boolean | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "collection_identifiers", + "baseName": "collection_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "delete_children", + "baseName": "delete_children", + "type": "boolean", + "format": "" + }, + { + "name": "dry_run", + "baseName": "dry_run", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DeleteCollectionRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/DeleteVariablesRequest.ts b/sdks/typescript/models/DeleteVariablesRequest.ts new file mode 100644 index 000000000..762e6f66f --- /dev/null +++ b/sdks/typescript/models/DeleteVariablesRequest.ts @@ -0,0 +1,38 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class DeleteVariablesRequest { + /** + * Unique id(s) or name(s) of the variable(s) to delete + */ + 'identifiers': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "identifiers", + "baseName": "identifiers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DeleteVariablesRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/JobRecipient.ts b/sdks/typescript/models/JobRecipient.ts new file mode 100644 index 000000000..c0a9ceb17 --- /dev/null +++ b/sdks/typescript/models/JobRecipient.ts @@ -0,0 +1,74 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* A recipient (user, group, or external) for a job execution. +*/ +export class JobRecipient { + /** + * Type of the recipient. + */ + 'type': JobRecipientTypeEnum; + /** + * Unique ID of the recipient. + */ + 'id'?: string | null; + /** + * Name of the recipient. + */ + 'name'?: string | null; + /** + * Email of the recipient. + */ + 'email'?: string | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "JobRecipientTypeEnum", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "email", + "baseName": "email", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return JobRecipient.attributeTypeMap; + } + + public constructor() { + } +} + + +export type JobRecipientTypeEnum = "USER" | "EXTERNAL" ; + diff --git a/sdks/typescript/models/ObjectSerializer.ts b/sdks/typescript/models/ObjectSerializer.ts index af05f8fb6..22e4d3832 100644 --- a/sdks/typescript/models/ObjectSerializer.ts +++ b/sdks/typescript/models/ObjectSerializer.ts @@ -31,8 +31,20 @@ export * from '../models/CALLBACKInput'; export * from '../models/CALLBACKInputMandatory'; export * from '../models/CalendarResponse'; export * from '../models/ChangeUserPasswordRequest'; +export * from '../models/ChannelHistoryEventInfo'; +export * from '../models/ChannelHistoryEventInput'; +export * from '../models/ChannelHistoryJob'; +export * from '../models/ChannelValidationAwsS3Info'; +export * from '../models/ChannelValidationDetail'; export * from '../models/ClusterNonEmbedAccess'; export * from '../models/ClusterNonEmbedAccessInput'; +export * from '../models/Collection'; +export * from '../models/CollectionDeleteResponse'; +export * from '../models/CollectionDeleteTypeIdentifiers'; +export * from '../models/CollectionEntityIdentifier'; +export * from '../models/CollectionMetadataInput'; +export * from '../models/CollectionMetadataItem'; +export * from '../models/CollectionSearchResponse'; export * from '../models/Column'; export * from '../models/ColumnSecurityRule'; export * from '../models/ColumnSecurityRuleColumn'; @@ -48,6 +60,7 @@ export * from '../models/CommitHistoryResponse'; export * from '../models/CommitResponse'; export * from '../models/CommiterType'; export * from '../models/CommunicationChannelPreferencesResponse'; +export * from '../models/CommunicationChannelValidateResponse'; export * from '../models/ConfigureCommunicationChannelPreferencesRequest'; export * from '../models/ConfigureSecuritySettingsRequest'; export * from '../models/ConfigureSecuritySettingsRequestClusterPreferences'; @@ -64,6 +77,7 @@ export * from '../models/CreateAgentConversationRequestConversationSettings'; export * from '../models/CreateAgentConversationRequestMetadataContext'; export * from '../models/CreateCalendarRequest'; export * from '../models/CreateCalendarRequestTableReference'; +export * from '../models/CreateCollectionRequest'; export * from '../models/CreateConfigRequest'; export * from '../models/CreateConnectionConfigurationRequest'; export * from '../models/CreateConnectionConfigurationRequestPolicyProcessOptions'; @@ -107,12 +121,14 @@ export * from '../models/DefaultActionConfig'; export * from '../models/DefaultActionConfigInput'; export * from '../models/DefaultActionConfigInputCreate'; export * from '../models/DefaultActionConfigSearchInput'; +export * from '../models/DeleteCollectionRequest'; export * from '../models/DeleteConfigRequest'; export * from '../models/DeleteConnectionConfigurationRequest'; export * from '../models/DeleteConnectionRequest'; export * from '../models/DeleteMetadataRequest'; export * from '../models/DeleteMetadataTypeInput'; export * from '../models/DeleteOrgEmailCustomizationRequest'; +export * from '../models/DeleteVariablesRequest'; export * from '../models/DeleteWebhookConfigurationsRequest'; export * from '../models/DeployCommitRequest'; export * from '../models/DeployResponse'; @@ -190,6 +206,7 @@ export * from '../models/JWTMetadataObject'; export * from '../models/JWTParameter'; export * from '../models/JWTUserOptions'; export * from '../models/JWTUserOptionsFull'; +export * from '../models/JobRecipient'; export * from '../models/LBContextInput'; export * from '../models/LiveboardContent'; export * from '../models/LiveboardDataResponse'; @@ -223,6 +240,7 @@ export * from '../models/OrgPreferenceSearchCriteriaInput'; export * from '../models/OrgResponse'; export * from '../models/OrgType'; export * from '../models/ParameterValues'; +export * from '../models/ParameterizeMetadataFieldsRequest'; export * from '../models/ParameterizeMetadataRequest'; export * from '../models/ParametersListItem'; export * from '../models/ParametersListItemInput'; @@ -240,6 +258,7 @@ export * from '../models/PrincipalsListItem'; export * from '../models/PrincipalsListItemInput'; export * from '../models/PublishMetadataListItem'; export * from '../models/PublishMetadataRequest'; +export * from '../models/PutVariableValuesRequest'; export * from '../models/QueryGetDecomposedQueryRequest'; export * from '../models/QueryGetDecomposedQueryRequestNlsRequest'; export * from '../models/RecipientDetails'; @@ -286,6 +305,10 @@ export * from '../models/ScriptSrcUrls'; export * from '../models/ScriptSrcUrlsInput'; export * from '../models/SearchCalendarsRequest'; export * from '../models/SearchCalendarsRequestSortOptions'; +export * from '../models/SearchChannelHistoryRequest'; +export * from '../models/SearchChannelHistoryResponse'; +export * from '../models/SearchCollectionsRequest'; +export * from '../models/SearchCollectionsRequestSortOptions'; export * from '../models/SearchCommitsRequest'; export * from '../models/SearchCommunicationChannelPreferencesRequest'; export * from '../models/SearchConfigRequest'; @@ -311,7 +334,6 @@ export * from '../models/SearchTagsRequest'; export * from '../models/SearchUserGroupsRequest'; export * from '../models/SearchUserGroupsRequestSortOptions'; export * from '../models/SearchUsersRequest'; -export * from '../models/SearchUsersRequestSortOptions'; export * from '../models/SearchVariablesRequest'; export * from '../models/SearchWebhookConfigurationsRequest'; export * from '../models/SearchWebhookConfigurationsRequestSortOptions'; @@ -358,6 +380,7 @@ export * from '../models/UnparameterizeMetadataRequest'; export * from '../models/UnpublishMetadataRequest'; export * from '../models/UpdateCalendarRequest'; export * from '../models/UpdateCalendarRequestTableReference'; +export * from '../models/UpdateCollectionRequest'; export * from '../models/UpdateColumnSecurityRulesRequest'; export * from '../models/UpdateConfigRequest'; export * from '../models/UpdateConnectionConfigurationRequest'; @@ -391,11 +414,13 @@ export * from '../models/UserInfo'; export * from '../models/UserObject'; export * from '../models/UserParameterOptions'; export * from '../models/UserPrincipal'; +export * from '../models/ValidateCommunicationChannelRequest'; export * from '../models/ValidateMergeRequest'; export * from '../models/ValidateTokenRequest'; export * from '../models/ValueScopeInput'; export * from '../models/Variable'; export * from '../models/VariableDetailInput'; +export * from '../models/VariablePutAssignmentInput'; export * from '../models/VariableUpdateAssignmentInput'; export * from '../models/VariableUpdateScopeInput'; export * from '../models/VariableValue'; @@ -410,6 +435,8 @@ export * from '../models/WebhookAuthentication'; export * from '../models/WebhookAuthenticationInput'; export * from '../models/WebhookDeleteFailure'; export * from '../models/WebhookDeleteResponse'; +export * from '../models/WebhookKeyValuePair'; +export * from '../models/WebhookKeyValuePairInput'; export * from '../models/WebhookOrg'; export * from '../models/WebhookPagination'; export * from '../models/WebhookResponse'; @@ -452,8 +479,20 @@ import { CALLBACKInput } from '../models/CALLBACKInput'; import { CALLBACKInputMandatory } from '../models/CALLBACKInputMandatory'; import { CalendarResponse } from '../models/CalendarResponse'; import { ChangeUserPasswordRequest } from '../models/ChangeUserPasswordRequest'; +import { ChannelHistoryEventInfo, ChannelHistoryEventInfoTypeEnum } from '../models/ChannelHistoryEventInfo'; +import { ChannelHistoryEventInput, ChannelHistoryEventInputTypeEnum } from '../models/ChannelHistoryEventInput'; +import { ChannelHistoryJob , ChannelHistoryJobStatusEnum } from '../models/ChannelHistoryJob'; +import { ChannelValidationAwsS3Info } from '../models/ChannelValidationAwsS3Info'; +import { ChannelValidationDetail, ChannelValidationDetailValidationStepEnum , ChannelValidationDetailStatusEnum } from '../models/ChannelValidationDetail'; import { ClusterNonEmbedAccess } from '../models/ClusterNonEmbedAccess'; import { ClusterNonEmbedAccessInput } from '../models/ClusterNonEmbedAccessInput'; +import { Collection } from '../models/Collection'; +import { CollectionDeleteResponse } from '../models/CollectionDeleteResponse'; +import { CollectionDeleteTypeIdentifiers } from '../models/CollectionDeleteTypeIdentifiers'; +import { CollectionEntityIdentifier } from '../models/CollectionEntityIdentifier'; +import { CollectionMetadataInput, CollectionMetadataInputTypeEnum } from '../models/CollectionMetadataInput'; +import { CollectionMetadataItem } from '../models/CollectionMetadataItem'; +import { CollectionSearchResponse } from '../models/CollectionSearchResponse'; import { Column } from '../models/Column'; import { ColumnSecurityRule } from '../models/ColumnSecurityRule'; import { ColumnSecurityRuleColumn } from '../models/ColumnSecurityRuleColumn'; @@ -469,6 +508,7 @@ import { CommitHistoryResponse } from '../models/CommitHistoryResponse'; import { CommitResponse } from '../models/CommitResponse'; import { CommiterType } from '../models/CommiterType'; import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { CommunicationChannelValidateResponse, CommunicationChannelValidateResponseChannelTypeEnum , CommunicationChannelValidateResponseEventTypeEnum , CommunicationChannelValidateResponseResultCodeEnum } from '../models/CommunicationChannelValidateResponse'; import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; import { ConfigureSecuritySettingsRequest } from '../models/ConfigureSecuritySettingsRequest'; import { ConfigureSecuritySettingsRequestClusterPreferences } from '../models/ConfigureSecuritySettingsRequestClusterPreferences'; @@ -485,6 +525,7 @@ import { CreateAgentConversationRequestConversationSettings } from '../models/Cr import { CreateAgentConversationRequestMetadataContext, CreateAgentConversationRequestMetadataContextTypeEnum } from '../models/CreateAgentConversationRequestMetadataContext'; import { CreateCalendarRequest , CreateCalendarRequestCreationMethodEnum , CreateCalendarRequestCalendarTypeEnum , CreateCalendarRequestMonthOffsetEnum , CreateCalendarRequestStartDayOfWeekEnum } from '../models/CreateCalendarRequest'; import { CreateCalendarRequestTableReference } from '../models/CreateCalendarRequestTableReference'; +import { CreateCollectionRequest } from '../models/CreateCollectionRequest'; import { CreateConfigRequest } from '../models/CreateConfigRequest'; import { CreateConnectionConfigurationRequest , CreateConnectionConfigurationRequestAuthenticationTypeEnum , CreateConnectionConfigurationRequestPolicyTypeEnum , CreateConnectionConfigurationRequestPolicyProcessesEnum } from '../models/CreateConnectionConfigurationRequest'; import { CreateConnectionConfigurationRequestPolicyProcessOptions } from '../models/CreateConnectionConfigurationRequestPolicyProcessOptions'; @@ -508,7 +549,7 @@ import { CreateTagRequest } from '../models/CreateTagRequest'; import { CreateUserGroupRequest , CreateUserGroupRequestPrivilegesEnum , CreateUserGroupRequestTypeEnum , CreateUserGroupRequestVisibilityEnum } from '../models/CreateUserGroupRequest'; import { CreateUserRequest , CreateUserRequestAccountTypeEnum , CreateUserRequestAccountStatusEnum , CreateUserRequestVisibilityEnum , CreateUserRequestPreferredLocaleEnum } from '../models/CreateUserRequest'; import { CreateVariableRequest, CreateVariableRequestTypeEnum , CreateVariableRequestDataTypeEnum } from '../models/CreateVariableRequest'; -import { CreateWebhookConfigurationRequest , CreateWebhookConfigurationRequestEventsEnum } from '../models/CreateWebhookConfigurationRequest'; +import { CreateWebhookConfigurationRequest , CreateWebhookConfigurationRequestEventsEnum } from '../models/CreateWebhookConfigurationRequest'; import { CreateWebhookConfigurationRequestAuthentication } from '../models/CreateWebhookConfigurationRequestAuthentication'; import { CreateWebhookConfigurationRequestSignatureVerification, CreateWebhookConfigurationRequestSignatureVerificationTypeEnum , CreateWebhookConfigurationRequestSignatureVerificationAlgorithmEnum } from '../models/CreateWebhookConfigurationRequestSignatureVerification'; import { CreateWebhookConfigurationRequestStorageDestination, CreateWebhookConfigurationRequestStorageDestinationStorageTypeEnum } from '../models/CreateWebhookConfigurationRequestStorageDestination'; @@ -528,12 +569,14 @@ import { DefaultActionConfig } from '../models/DefaultActionConfig'; import { DefaultActionConfigInput } from '../models/DefaultActionConfigInput'; import { DefaultActionConfigInputCreate } from '../models/DefaultActionConfigInputCreate'; import { DefaultActionConfigSearchInput } from '../models/DefaultActionConfigSearchInput'; +import { DeleteCollectionRequest } from '../models/DeleteCollectionRequest'; import { DeleteConfigRequest } from '../models/DeleteConfigRequest'; import { DeleteConnectionConfigurationRequest } from '../models/DeleteConnectionConfigurationRequest'; import { DeleteConnectionRequest } from '../models/DeleteConnectionRequest'; import { DeleteMetadataRequest } from '../models/DeleteMetadataRequest'; import { DeleteMetadataTypeInput, DeleteMetadataTypeInputTypeEnum } from '../models/DeleteMetadataTypeInput'; import { DeleteOrgEmailCustomizationRequest } from '../models/DeleteOrgEmailCustomizationRequest'; +import { DeleteVariablesRequest } from '../models/DeleteVariablesRequest'; import { DeleteWebhookConfigurationsRequest } from '../models/DeleteWebhookConfigurationsRequest'; import { DeployCommitRequest , DeployCommitRequestDeployTypeEnum , DeployCommitRequestDeployPolicyEnum } from '../models/DeployCommitRequest'; import { DeployResponse } from '../models/DeployResponse'; @@ -611,6 +654,7 @@ import { JWTMetadataObject , JWTMetadataObjectTypeEnum } from '../models/JWTMe import { JWTParameter } from '../models/JWTParameter'; import { JWTUserOptions } from '../models/JWTUserOptions'; import { JWTUserOptionsFull } from '../models/JWTUserOptionsFull'; +import { JobRecipient, JobRecipientTypeEnum } from '../models/JobRecipient'; import { LBContextInput } from '../models/LBContextInput'; import { LiveboardContent } from '../models/LiveboardContent'; import { LiveboardDataResponse } from '../models/LiveboardDataResponse'; @@ -644,6 +688,7 @@ import { OrgPreferenceSearchCriteriaInput , OrgPreferenceSearchCriteriaInputEven import { OrgResponse , OrgResponseStatusEnum , OrgResponseVisibilityEnum } from '../models/OrgResponse'; import { OrgType } from '../models/OrgType'; import { ParameterValues } from '../models/ParameterValues'; +import { ParameterizeMetadataFieldsRequest, ParameterizeMetadataFieldsRequestMetadataTypeEnum , ParameterizeMetadataFieldsRequestFieldTypeEnum } from '../models/ParameterizeMetadataFieldsRequest'; import { ParameterizeMetadataRequest, ParameterizeMetadataRequestMetadataTypeEnum , ParameterizeMetadataRequestFieldTypeEnum } from '../models/ParameterizeMetadataRequest'; import { ParametersListItem } from '../models/ParametersListItem'; import { ParametersListItemInput } from '../models/ParametersListItemInput'; @@ -661,6 +706,7 @@ import { PrincipalsListItem } from '../models/PrincipalsListItem'; import { PrincipalsListItemInput } from '../models/PrincipalsListItemInput'; import { PublishMetadataListItem , PublishMetadataListItemTypeEnum } from '../models/PublishMetadataListItem'; import { PublishMetadataRequest } from '../models/PublishMetadataRequest'; +import { PutVariableValuesRequest, PutVariableValuesRequestOperationEnum } from '../models/PutVariableValuesRequest'; import { QueryGetDecomposedQueryRequest } from '../models/QueryGetDecomposedQueryRequest'; import { QueryGetDecomposedQueryRequestNlsRequest } from '../models/QueryGetDecomposedQueryRequestNlsRequest'; import { RecipientDetails } from '../models/RecipientDetails'; @@ -707,6 +753,10 @@ import { ScriptSrcUrls } from '../models/ScriptSrcUrls'; import { ScriptSrcUrlsInput } from '../models/ScriptSrcUrlsInput'; import { SearchCalendarsRequest } from '../models/SearchCalendarsRequest'; import { SearchCalendarsRequestSortOptions, SearchCalendarsRequestSortOptionsFieldNameEnum , SearchCalendarsRequestSortOptionsOrderEnum } from '../models/SearchCalendarsRequestSortOptions'; +import { SearchChannelHistoryRequest, SearchChannelHistoryRequestChannelTypeEnum , SearchChannelHistoryRequestChannelStatusEnum } from '../models/SearchChannelHistoryRequest'; +import { SearchChannelHistoryResponse } from '../models/SearchChannelHistoryResponse'; +import { SearchCollectionsRequest } from '../models/SearchCollectionsRequest'; +import { SearchCollectionsRequestSortOptions, SearchCollectionsRequestSortOptionsFieldNameEnum , SearchCollectionsRequestSortOptionsOrderEnum } from '../models/SearchCollectionsRequestSortOptions'; import { SearchCommitsRequest , SearchCommitsRequestMetadataTypeEnum } from '../models/SearchCommitsRequest'; import { SearchCommunicationChannelPreferencesRequest, SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum } from '../models/SearchCommunicationChannelPreferencesRequest'; import { SearchConfigRequest } from '../models/SearchConfigRequest'; @@ -732,7 +782,6 @@ import { SearchTagsRequest } from '../models/SearchTagsRequest'; import { SearchUserGroupsRequest , SearchUserGroupsRequestPrivilegesEnum , SearchUserGroupsRequestTypeEnum , SearchUserGroupsRequestVisibilityEnum } from '../models/SearchUserGroupsRequest'; import { SearchUserGroupsRequestSortOptions, SearchUserGroupsRequestSortOptionsFieldNameEnum , SearchUserGroupsRequestSortOptionsOrderEnum } from '../models/SearchUserGroupsRequestSortOptions'; import { SearchUsersRequest , SearchUsersRequestVisibilityEnum , SearchUsersRequestPrivilegesEnum , SearchUsersRequestAccountTypeEnum , SearchUsersRequestAccountStatusEnum } from '../models/SearchUsersRequest'; -import { SearchUsersRequestSortOptions, SearchUsersRequestSortOptionsFieldNameEnum , SearchUsersRequestSortOptionsOrderEnum } from '../models/SearchUsersRequestSortOptions'; import { SearchVariablesRequest , SearchVariablesRequestResponseContentEnum } from '../models/SearchVariablesRequest'; import { SearchWebhookConfigurationsRequest , SearchWebhookConfigurationsRequestEventTypeEnum } from '../models/SearchWebhookConfigurationsRequest'; import { SearchWebhookConfigurationsRequestSortOptions, SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum , SearchWebhookConfigurationsRequestSortOptionsOrderEnum } from '../models/SearchWebhookConfigurationsRequestSortOptions'; @@ -779,6 +828,7 @@ import { UnparameterizeMetadataRequest, UnparameterizeMetadataRequestMetadataTyp import { UnpublishMetadataRequest } from '../models/UnpublishMetadataRequest'; import { UpdateCalendarRequest, UpdateCalendarRequestUpdateMethodEnum , UpdateCalendarRequestCalendarTypeEnum , UpdateCalendarRequestMonthOffsetEnum , UpdateCalendarRequestStartDayOfWeekEnum } from '../models/UpdateCalendarRequest'; import { UpdateCalendarRequestTableReference } from '../models/UpdateCalendarRequestTableReference'; +import { UpdateCollectionRequest , UpdateCollectionRequestOperationEnum } from '../models/UpdateCollectionRequest'; import { UpdateColumnSecurityRulesRequest } from '../models/UpdateColumnSecurityRulesRequest'; import { UpdateConfigRequest } from '../models/UpdateConfigRequest'; import { UpdateConnectionConfigurationRequest , UpdateConnectionConfigurationRequestAuthenticationTypeEnum , UpdateConnectionConfigurationRequestPolicyTypeEnum , UpdateConnectionConfigurationRequestPolicyProcessesEnum } from '../models/UpdateConnectionConfigurationRequest'; @@ -804,7 +854,7 @@ import { UpdateUserGroupRequest , UpdateUserGroupRequestPrivilegesEnum , Up import { UpdateUserRequest , UpdateUserRequestVisibilityEnum , UpdateUserRequestAccountStatusEnum , UpdateUserRequestAccountTypeEnum , UpdateUserRequestOperationEnum , UpdateUserRequestPreferredLocaleEnum } from '../models/UpdateUserRequest'; import { UpdateVariableRequest } from '../models/UpdateVariableRequest'; import { UpdateVariableValuesRequest } from '../models/UpdateVariableValuesRequest'; -import { UpdateWebhookConfigurationRequest , UpdateWebhookConfigurationRequestEventsEnum } from '../models/UpdateWebhookConfigurationRequest'; +import { UpdateWebhookConfigurationRequest , UpdateWebhookConfigurationRequestEventsEnum } from '../models/UpdateWebhookConfigurationRequest'; import { User , UserVisibilityEnum , UserAccountTypeEnum , UserAccountStatusEnum , UserParentTypeEnum } from '../models/User'; import { UserGroup } from '../models/UserGroup'; import { UserGroupResponse , UserGroupResponseParentTypeEnum , UserGroupResponseTypeEnum , UserGroupResponseVisibilityEnum } from '../models/UserGroupResponse'; @@ -812,11 +862,13 @@ import { UserInfo } from '../models/UserInfo'; import { UserObject, UserObjectTypeEnum } from '../models/UserObject'; import { UserParameterOptions } from '../models/UserParameterOptions'; import { UserPrincipal } from '../models/UserPrincipal'; +import { ValidateCommunicationChannelRequest, ValidateCommunicationChannelRequestChannelTypeEnum , ValidateCommunicationChannelRequestEventTypeEnum } from '../models/ValidateCommunicationChannelRequest'; import { ValidateMergeRequest } from '../models/ValidateMergeRequest'; import { ValidateTokenRequest } from '../models/ValidateTokenRequest'; import { ValueScopeInput , ValueScopeInputPrincipalTypeEnum } from '../models/ValueScopeInput'; import { Variable , VariableVariableTypeEnum } from '../models/Variable'; import { VariableDetailInput , VariableDetailInputTypeEnum } from '../models/VariableDetailInput'; +import { VariablePutAssignmentInput , VariablePutAssignmentInputPrincipalTypeEnum } from '../models/VariablePutAssignmentInput'; import { VariableUpdateAssignmentInput , VariableUpdateAssignmentInputOperationEnum } from '../models/VariableUpdateAssignmentInput'; import { VariableUpdateScopeInput , VariableUpdateScopeInputPrincipalTypeEnum } from '../models/VariableUpdateScopeInput'; import { VariableValue , VariableValuePrincipalTypeEnum } from '../models/VariableValue'; @@ -831,9 +883,11 @@ import { WebhookAuthentication } from '../models/WebhookAuthentication'; import { WebhookAuthenticationInput } from '../models/WebhookAuthenticationInput'; import { WebhookDeleteFailure } from '../models/WebhookDeleteFailure'; import { WebhookDeleteResponse } from '../models/WebhookDeleteResponse'; +import { WebhookKeyValuePair } from '../models/WebhookKeyValuePair'; +import { WebhookKeyValuePairInput } from '../models/WebhookKeyValuePairInput'; import { WebhookOrg } from '../models/WebhookOrg'; import { WebhookPagination } from '../models/WebhookPagination'; -import { WebhookResponse , WebhookResponseEventsEnum } from '../models/WebhookResponse'; +import { WebhookResponse , WebhookResponseEventsEnum } from '../models/WebhookResponse'; import { WebhookSearchResponse } from '../models/WebhookSearchResponse'; import { WebhookSignatureVerification, WebhookSignatureVerificationTypeEnum , WebhookSignatureVerificationAlgorithmEnum } from '../models/WebhookSignatureVerification'; import { WebhookSignatureVerificationInput, WebhookSignatureVerificationInputTypeEnum , WebhookSignatureVerificationInputAlgorithmEnum } from '../models/WebhookSignatureVerificationInput'; @@ -865,7 +919,16 @@ let enumsMap: Set = new Set([ "AssociateMetadataInputTypeEnum", "AssociateMetadataInputCreateTypeEnum", "AuthorMetadataTypeInputTypeEnum", + "ChannelHistoryEventInfoTypeEnum", + "ChannelHistoryEventInputTypeEnum", + "ChannelHistoryJobStatusEnum", + "ChannelValidationDetailValidationStepEnum", + "ChannelValidationDetailStatusEnum", + "CollectionMetadataInputTypeEnum", "ColumnSecurityRuleGroupOperationOperationEnum", + "CommunicationChannelValidateResponseChannelTypeEnum", + "CommunicationChannelValidateResponseEventTypeEnum", + "CommunicationChannelValidateResponseResultCodeEnum", "ConnectionConfigurationResponsePolicyProcessesEnum", "ConnectionConfigurationResponseDataWarehouseTypeEnum", "ConnectionConfigurationResponsePolicyTypeEnum", @@ -946,6 +1009,7 @@ let enumsMap: Set = new Set([ "ImportUserVisibilityEnum", "ImportUserPreferredLocaleEnum", "JWTMetadataObjectTypeEnum", + "JobRecipientTypeEnum", "ManageObjectPrivilegeRequestOperationEnum", "ManageObjectPrivilegeRequestMetadataTypeEnum", "ManageObjectPrivilegeRequestObjectPrivilegeTypesEnum", @@ -965,6 +1029,8 @@ let enumsMap: Set = new Set([ "OrgPreferenceSearchCriteriaInputEventTypesEnum", "OrgResponseStatusEnum", "OrgResponseVisibilityEnum", + "ParameterizeMetadataFieldsRequestMetadataTypeEnum", + "ParameterizeMetadataFieldsRequestFieldTypeEnum", "ParameterizeMetadataRequestMetadataTypeEnum", "ParameterizeMetadataRequestFieldTypeEnum", "PdfOptionsPageSizeEnum", @@ -973,6 +1039,7 @@ let enumsMap: Set = new Set([ "PermissionsMetadataTypeInputTypeEnum", "PrincipalsInputTypeEnum", "PublishMetadataListItemTypeEnum", + "PutVariableValuesRequestOperationEnum", "RegionalSettingsInputCurrencyFormatEnum", "RegionalSettingsInputUserLocaleEnum", "RegionalSettingsInputNumberFormatLocaleEnum", @@ -987,6 +1054,10 @@ let enumsMap: Set = new Set([ "SchedulesPdfOptionsInputPageSizeEnum", "SearchCalendarsRequestSortOptionsFieldNameEnum", "SearchCalendarsRequestSortOptionsOrderEnum", + "SearchChannelHistoryRequestChannelTypeEnum", + "SearchChannelHistoryRequestChannelStatusEnum", + "SearchCollectionsRequestSortOptionsFieldNameEnum", + "SearchCollectionsRequestSortOptionsOrderEnum", "SearchCommitsRequestMetadataTypeEnum", "SearchCommunicationChannelPreferencesRequestClusterPreferencesEnum", "SearchConnectionRequestDataWarehouseTypesEnum", @@ -1017,8 +1088,6 @@ let enumsMap: Set = new Set([ "SearchUsersRequestPrivilegesEnum", "SearchUsersRequestAccountTypeEnum", "SearchUsersRequestAccountStatusEnum", - "SearchUsersRequestSortOptionsFieldNameEnum", - "SearchUsersRequestSortOptionsOrderEnum", "SearchVariablesRequestResponseContentEnum", "SearchWebhookConfigurationsRequestEventTypeEnum", "SearchWebhookConfigurationsRequestSortOptionsFieldNameEnum", @@ -1043,6 +1112,7 @@ let enumsMap: Set = new Set([ "UpdateCalendarRequestCalendarTypeEnum", "UpdateCalendarRequestMonthOffsetEnum", "UpdateCalendarRequestStartDayOfWeekEnum", + "UpdateCollectionRequestOperationEnum", "UpdateConnectionConfigurationRequestAuthenticationTypeEnum", "UpdateConnectionConfigurationRequestPolicyTypeEnum", "UpdateConnectionConfigurationRequestPolicyProcessesEnum", @@ -1073,9 +1143,12 @@ let enumsMap: Set = new Set([ "UserGroupResponseTypeEnum", "UserGroupResponseVisibilityEnum", "UserObjectTypeEnum", + "ValidateCommunicationChannelRequestChannelTypeEnum", + "ValidateCommunicationChannelRequestEventTypeEnum", "ValueScopeInputPrincipalTypeEnum", "VariableVariableTypeEnum", "VariableDetailInputTypeEnum", + "VariablePutAssignmentInputPrincipalTypeEnum", "VariableUpdateAssignmentInputOperationEnum", "VariableUpdateScopeInputPrincipalTypeEnum", "VariableValuePrincipalTypeEnum", @@ -1122,8 +1195,20 @@ let typeMap: {[index: string]: any} = { "CALLBACKInputMandatory": CALLBACKInputMandatory, "CalendarResponse": CalendarResponse, "ChangeUserPasswordRequest": ChangeUserPasswordRequest, + "ChannelHistoryEventInfo": ChannelHistoryEventInfo, + "ChannelHistoryEventInput": ChannelHistoryEventInput, + "ChannelHistoryJob": ChannelHistoryJob, + "ChannelValidationAwsS3Info": ChannelValidationAwsS3Info, + "ChannelValidationDetail": ChannelValidationDetail, "ClusterNonEmbedAccess": ClusterNonEmbedAccess, "ClusterNonEmbedAccessInput": ClusterNonEmbedAccessInput, + "Collection": Collection, + "CollectionDeleteResponse": CollectionDeleteResponse, + "CollectionDeleteTypeIdentifiers": CollectionDeleteTypeIdentifiers, + "CollectionEntityIdentifier": CollectionEntityIdentifier, + "CollectionMetadataInput": CollectionMetadataInput, + "CollectionMetadataItem": CollectionMetadataItem, + "CollectionSearchResponse": CollectionSearchResponse, "Column": Column, "ColumnSecurityRule": ColumnSecurityRule, "ColumnSecurityRuleColumn": ColumnSecurityRuleColumn, @@ -1139,6 +1224,7 @@ let typeMap: {[index: string]: any} = { "CommitResponse": CommitResponse, "CommiterType": CommiterType, "CommunicationChannelPreferencesResponse": CommunicationChannelPreferencesResponse, + "CommunicationChannelValidateResponse": CommunicationChannelValidateResponse, "ConfigureCommunicationChannelPreferencesRequest": ConfigureCommunicationChannelPreferencesRequest, "ConfigureSecuritySettingsRequest": ConfigureSecuritySettingsRequest, "ConfigureSecuritySettingsRequestClusterPreferences": ConfigureSecuritySettingsRequestClusterPreferences, @@ -1155,6 +1241,7 @@ let typeMap: {[index: string]: any} = { "CreateAgentConversationRequestMetadataContext": CreateAgentConversationRequestMetadataContext, "CreateCalendarRequest": CreateCalendarRequest, "CreateCalendarRequestTableReference": CreateCalendarRequestTableReference, + "CreateCollectionRequest": CreateCollectionRequest, "CreateConfigRequest": CreateConfigRequest, "CreateConnectionConfigurationRequest": CreateConnectionConfigurationRequest, "CreateConnectionConfigurationRequestPolicyProcessOptions": CreateConnectionConfigurationRequestPolicyProcessOptions, @@ -1198,12 +1285,14 @@ let typeMap: {[index: string]: any} = { "DefaultActionConfigInput": DefaultActionConfigInput, "DefaultActionConfigInputCreate": DefaultActionConfigInputCreate, "DefaultActionConfigSearchInput": DefaultActionConfigSearchInput, + "DeleteCollectionRequest": DeleteCollectionRequest, "DeleteConfigRequest": DeleteConfigRequest, "DeleteConnectionConfigurationRequest": DeleteConnectionConfigurationRequest, "DeleteConnectionRequest": DeleteConnectionRequest, "DeleteMetadataRequest": DeleteMetadataRequest, "DeleteMetadataTypeInput": DeleteMetadataTypeInput, "DeleteOrgEmailCustomizationRequest": DeleteOrgEmailCustomizationRequest, + "DeleteVariablesRequest": DeleteVariablesRequest, "DeleteWebhookConfigurationsRequest": DeleteWebhookConfigurationsRequest, "DeployCommitRequest": DeployCommitRequest, "DeployResponse": DeployResponse, @@ -1281,6 +1370,7 @@ let typeMap: {[index: string]: any} = { "JWTParameter": JWTParameter, "JWTUserOptions": JWTUserOptions, "JWTUserOptionsFull": JWTUserOptionsFull, + "JobRecipient": JobRecipient, "LBContextInput": LBContextInput, "LiveboardContent": LiveboardContent, "LiveboardDataResponse": LiveboardDataResponse, @@ -1314,6 +1404,7 @@ let typeMap: {[index: string]: any} = { "OrgResponse": OrgResponse, "OrgType": OrgType, "ParameterValues": ParameterValues, + "ParameterizeMetadataFieldsRequest": ParameterizeMetadataFieldsRequest, "ParameterizeMetadataRequest": ParameterizeMetadataRequest, "ParametersListItem": ParametersListItem, "ParametersListItemInput": ParametersListItemInput, @@ -1331,6 +1422,7 @@ let typeMap: {[index: string]: any} = { "PrincipalsListItemInput": PrincipalsListItemInput, "PublishMetadataListItem": PublishMetadataListItem, "PublishMetadataRequest": PublishMetadataRequest, + "PutVariableValuesRequest": PutVariableValuesRequest, "QueryGetDecomposedQueryRequest": QueryGetDecomposedQueryRequest, "QueryGetDecomposedQueryRequestNlsRequest": QueryGetDecomposedQueryRequestNlsRequest, "RecipientDetails": RecipientDetails, @@ -1377,6 +1469,10 @@ let typeMap: {[index: string]: any} = { "ScriptSrcUrlsInput": ScriptSrcUrlsInput, "SearchCalendarsRequest": SearchCalendarsRequest, "SearchCalendarsRequestSortOptions": SearchCalendarsRequestSortOptions, + "SearchChannelHistoryRequest": SearchChannelHistoryRequest, + "SearchChannelHistoryResponse": SearchChannelHistoryResponse, + "SearchCollectionsRequest": SearchCollectionsRequest, + "SearchCollectionsRequestSortOptions": SearchCollectionsRequestSortOptions, "SearchCommitsRequest": SearchCommitsRequest, "SearchCommunicationChannelPreferencesRequest": SearchCommunicationChannelPreferencesRequest, "SearchConfigRequest": SearchConfigRequest, @@ -1402,7 +1498,6 @@ let typeMap: {[index: string]: any} = { "SearchUserGroupsRequest": SearchUserGroupsRequest, "SearchUserGroupsRequestSortOptions": SearchUserGroupsRequestSortOptions, "SearchUsersRequest": SearchUsersRequest, - "SearchUsersRequestSortOptions": SearchUsersRequestSortOptions, "SearchVariablesRequest": SearchVariablesRequest, "SearchWebhookConfigurationsRequest": SearchWebhookConfigurationsRequest, "SearchWebhookConfigurationsRequestSortOptions": SearchWebhookConfigurationsRequestSortOptions, @@ -1449,6 +1544,7 @@ let typeMap: {[index: string]: any} = { "UnpublishMetadataRequest": UnpublishMetadataRequest, "UpdateCalendarRequest": UpdateCalendarRequest, "UpdateCalendarRequestTableReference": UpdateCalendarRequestTableReference, + "UpdateCollectionRequest": UpdateCollectionRequest, "UpdateColumnSecurityRulesRequest": UpdateColumnSecurityRulesRequest, "UpdateConfigRequest": UpdateConfigRequest, "UpdateConnectionConfigurationRequest": UpdateConnectionConfigurationRequest, @@ -1482,11 +1578,13 @@ let typeMap: {[index: string]: any} = { "UserObject": UserObject, "UserParameterOptions": UserParameterOptions, "UserPrincipal": UserPrincipal, + "ValidateCommunicationChannelRequest": ValidateCommunicationChannelRequest, "ValidateMergeRequest": ValidateMergeRequest, "ValidateTokenRequest": ValidateTokenRequest, "ValueScopeInput": ValueScopeInput, "Variable": Variable, "VariableDetailInput": VariableDetailInput, + "VariablePutAssignmentInput": VariablePutAssignmentInput, "VariableUpdateAssignmentInput": VariableUpdateAssignmentInput, "VariableUpdateScopeInput": VariableUpdateScopeInput, "VariableValue": VariableValue, @@ -1501,6 +1599,8 @@ let typeMap: {[index: string]: any} = { "WebhookAuthenticationInput": WebhookAuthenticationInput, "WebhookDeleteFailure": WebhookDeleteFailure, "WebhookDeleteResponse": WebhookDeleteResponse, + "WebhookKeyValuePair": WebhookKeyValuePair, + "WebhookKeyValuePairInput": WebhookKeyValuePairInput, "WebhookOrg": WebhookOrg, "WebhookPagination": WebhookPagination, "WebhookResponse": WebhookResponse, diff --git a/sdks/typescript/models/ParameterizeMetadataFieldsRequest.ts b/sdks/typescript/models/ParameterizeMetadataFieldsRequest.ts new file mode 100644 index 000000000..08e8495dd --- /dev/null +++ b/sdks/typescript/models/ParameterizeMetadataFieldsRequest.ts @@ -0,0 +1,82 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ParameterizeMetadataFieldsRequest { + /** + * Type of metadata object to parameterize. + */ + 'metadata_type'?: ParameterizeMetadataFieldsRequestMetadataTypeEnum; + /** + * Unique ID or name of the metadata object to parameterize. + */ + 'metadata_identifier': string; + /** + * Type of field in the metadata to parameterize. + */ + 'field_type': ParameterizeMetadataFieldsRequestFieldTypeEnum; + /** + * JSON array of field names to parameterize. Example: [schemaName, databaseName, tableName] + */ + 'field_names': Array; + /** + * Unique ID or name of the variable to use for parameterization of these fields. + */ + 'variable_identifier': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metadata_type", + "baseName": "metadata_type", + "type": "ParameterizeMetadataFieldsRequestMetadataTypeEnum", + "format": "" + }, + { + "name": "metadata_identifier", + "baseName": "metadata_identifier", + "type": "string", + "format": "" + }, + { + "name": "field_type", + "baseName": "field_type", + "type": "ParameterizeMetadataFieldsRequestFieldTypeEnum", + "format": "" + }, + { + "name": "field_names", + "baseName": "field_names", + "type": "Array", + "format": "" + }, + { + "name": "variable_identifier", + "baseName": "variable_identifier", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ParameterizeMetadataFieldsRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ParameterizeMetadataFieldsRequestMetadataTypeEnum = "LOGICAL_TABLE" | "CONNECTION" | "CONNECTION_CONFIG" ; +export type ParameterizeMetadataFieldsRequestFieldTypeEnum = "ATTRIBUTE" | "CONNECTION_PROPERTY" ; + diff --git a/sdks/typescript/models/PutVariableValuesRequest.ts b/sdks/typescript/models/PutVariableValuesRequest.ts new file mode 100644 index 000000000..00916b4c6 --- /dev/null +++ b/sdks/typescript/models/PutVariableValuesRequest.ts @@ -0,0 +1,52 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { VariablePutAssignmentInput } from '../models/VariablePutAssignmentInput'; +import { HttpFile } from '../http/http'; + +export class PutVariableValuesRequest { + /** + * Operation to perform + */ + 'operation'?: PutVariableValuesRequestOperationEnum; + /** + * Variable assignments + */ + 'variable_assignment': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "operation", + "baseName": "operation", + "type": "PutVariableValuesRequestOperationEnum", + "format": "" + }, + { + "name": "variable_assignment", + "baseName": "variable_assignment", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PutVariableValuesRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type PutVariableValuesRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE" | "RESET" ; + diff --git a/sdks/typescript/models/SearchChannelHistoryRequest.ts b/sdks/typescript/models/SearchChannelHistoryRequest.ts new file mode 100644 index 000000000..8b8b12a51 --- /dev/null +++ b/sdks/typescript/models/SearchChannelHistoryRequest.ts @@ -0,0 +1,93 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ChannelHistoryEventInput } from '../models/ChannelHistoryEventInput'; +import { HttpFile } from '../http/http'; + +export class SearchChannelHistoryRequest { + /** + * Type of communication channel to search history for. + */ + 'channel_type': SearchChannelHistoryRequestChannelTypeEnum; + /** + * List of job execution record IDs to retrieve. + */ + 'job_ids'?: Array; + /** + * List of channel IDs or names to filter by. + */ + 'channel_identifiers'?: Array; + /** + * Filter by channel delivery status. + */ + 'channel_status'?: SearchChannelHistoryRequestChannelStatusEnum; + /** + * Filter by events that triggered the channel. + */ + 'events'?: Array; + /** + * Filter records created on or after this time (epoch milliseconds). + */ + 'start_epoch_time_in_millis'?: number; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "SearchChannelHistoryRequestChannelTypeEnum", + "format": "" + }, + { + "name": "job_ids", + "baseName": "job_ids", + "type": "Array", + "format": "" + }, + { + "name": "channel_identifiers", + "baseName": "channel_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "channel_status", + "baseName": "channel_status", + "type": "SearchChannelHistoryRequestChannelStatusEnum", + "format": "" + }, + { + "name": "events", + "baseName": "events", + "type": "Array", + "format": "" + }, + { + "name": "start_epoch_time_in_millis", + "baseName": "start_epoch_time_in_millis", + "type": "number", + "format": "float" + } ]; + + static getAttributeTypeMap() { + return SearchChannelHistoryRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type SearchChannelHistoryRequestChannelTypeEnum = "WEBHOOK" ; +export type SearchChannelHistoryRequestChannelStatusEnum = "PENDING" | "RETRY" | "SUCCESS" | "FAILED" ; + diff --git a/sdks/typescript/models/SearchChannelHistoryResponse.ts b/sdks/typescript/models/SearchChannelHistoryResponse.ts new file mode 100644 index 000000000..3fb562a07 --- /dev/null +++ b/sdks/typescript/models/SearchChannelHistoryResponse.ts @@ -0,0 +1,42 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ChannelHistoryJob } from '../models/ChannelHistoryJob'; +import { HttpFile } from '../http/http'; + +/** +* Response wrapper for channel delivery history. +*/ +export class SearchChannelHistoryResponse { + /** + * List of job execution records. + */ + 'jobs': Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "jobs", + "baseName": "jobs", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchChannelHistoryResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SearchCollectionsRequest.ts b/sdks/typescript/models/SearchCollectionsRequest.ts new file mode 100644 index 000000000..217f49eee --- /dev/null +++ b/sdks/typescript/models/SearchCollectionsRequest.ts @@ -0,0 +1,96 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { SearchCollectionsRequestSortOptions } from '../models/SearchCollectionsRequestSortOptions'; +import { HttpFile } from '../http/http'; + +export class SearchCollectionsRequest { + /** + * A pattern to match case-insensitive name of the Collection object. Use \'%\' for wildcard match. + */ + 'name_pattern'?: string; + /** + * The starting record number from where the records should be included. + */ + 'record_offset'?: number; + /** + * The number of records that should be included. -1 implies no pagination. + */ + 'record_size'?: number; + /** + * Unique GUIDs of collections to search. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + */ + 'collection_identifiers'?: Array; + /** + * Filter collections by author. Provide unique IDs or names of users who created the collections. + */ + 'created_by_user_identifiers'?: Array; + /** + * Include collection metadata items in the response. + */ + 'include_metadata'?: boolean | null; + 'sort_options'?: SearchCollectionsRequestSortOptions; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name_pattern", + "baseName": "name_pattern", + "type": "string", + "format": "" + }, + { + "name": "record_offset", + "baseName": "record_offset", + "type": "number", + "format": "int32" + }, + { + "name": "record_size", + "baseName": "record_size", + "type": "number", + "format": "int32" + }, + { + "name": "collection_identifiers", + "baseName": "collection_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "created_by_user_identifiers", + "baseName": "created_by_user_identifiers", + "type": "Array", + "format": "" + }, + { + "name": "include_metadata", + "baseName": "include_metadata", + "type": "boolean", + "format": "" + }, + { + "name": "sort_options", + "baseName": "sort_options", + "type": "SearchCollectionsRequestSortOptions", + "format": "" + } ]; + + static getAttributeTypeMap() { + return SearchCollectionsRequest.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/SearchUsersRequestSortOptions.ts b/sdks/typescript/models/SearchCollectionsRequestSortOptions.ts similarity index 63% rename from sdks/typescript/models/SearchUsersRequestSortOptions.ts rename to sdks/typescript/models/SearchCollectionsRequestSortOptions.ts index 17d4cad6b..6acc37a15 100644 --- a/sdks/typescript/models/SearchUsersRequestSortOptions.ts +++ b/sdks/typescript/models/SearchCollectionsRequestSortOptions.ts @@ -15,15 +15,15 @@ import { HttpFile } from '../http/http'; /** * Sort options. */ -export class SearchUsersRequestSortOptions { +export class SearchCollectionsRequestSortOptions { /** * Name of the field to apply the sort on. */ - 'field_name'?: SearchUsersRequestSortOptionsFieldNameEnum | null; + 'field_name'?: SearchCollectionsRequestSortOptionsFieldNameEnum | null; /** * Sort order : ASC(Ascending) or DESC(Descending). */ - 'order'?: SearchUsersRequestSortOptionsOrderEnum | null; + 'order'?: SearchCollectionsRequestSortOptionsOrderEnum | null; static readonly discriminator: string | undefined = undefined; @@ -31,18 +31,18 @@ export class SearchUsersRequestSortOptions { { "name": "field_name", "baseName": "field_name", - "type": "SearchUsersRequestSortOptionsFieldNameEnum", + "type": "SearchCollectionsRequestSortOptionsFieldNameEnum", "format": "" }, { "name": "order", "baseName": "order", - "type": "SearchUsersRequestSortOptionsOrderEnum", + "type": "SearchCollectionsRequestSortOptionsOrderEnum", "format": "" } ]; static getAttributeTypeMap() { - return SearchUsersRequestSortOptions.attributeTypeMap; + return SearchCollectionsRequestSortOptions.attributeTypeMap; } public constructor() { @@ -50,6 +50,6 @@ export class SearchUsersRequestSortOptions { } -export type SearchUsersRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" ; -export type SearchUsersRequestSortOptionsOrderEnum = "ASC" | "DESC" ; +export type SearchCollectionsRequestSortOptionsFieldNameEnum = "NAME" | "DISPLAY_NAME" | "AUTHOR" | "CREATED" | "MODIFIED" ; +export type SearchCollectionsRequestSortOptionsOrderEnum = "ASC" | "DESC" ; diff --git a/sdks/typescript/models/SearchUsersRequest.ts b/sdks/typescript/models/SearchUsersRequest.ts index 1d9378626..835a4ea0f 100644 --- a/sdks/typescript/models/SearchUsersRequest.ts +++ b/sdks/typescript/models/SearchUsersRequest.ts @@ -11,7 +11,7 @@ */ import { FavoriteMetadataInput } from '../models/FavoriteMetadataInput'; -import { SearchUsersRequestSortOptions } from '../models/SearchUsersRequestSortOptions'; +import { SearchCollectionsRequestSortOptions } from '../models/SearchCollectionsRequestSortOptions'; import { HttpFile } from '../http/http'; export class SearchUsersRequest { @@ -83,7 +83,7 @@ export class SearchUsersRequest { * The number of records that should be included. */ 'record_size'?: number; - 'sort_options'?: SearchUsersRequestSortOptions; + 'sort_options'?: SearchCollectionsRequestSortOptions; /** * Filters by the role assigned to the user. */ @@ -205,7 +205,7 @@ export class SearchUsersRequest { { "name": "sort_options", "baseName": "sort_options", - "type": "SearchUsersRequestSortOptions", + "type": "SearchCollectionsRequestSortOptions", "format": "" }, { diff --git a/sdks/typescript/models/TemplatePropertiesInputCreate.ts b/sdks/typescript/models/TemplatePropertiesInputCreate.ts index bd2c6559c..e002395fa 100644 --- a/sdks/typescript/models/TemplatePropertiesInputCreate.ts +++ b/sdks/typescript/models/TemplatePropertiesInputCreate.ts @@ -124,6 +124,10 @@ export class TemplatePropertiesInputCreate { * Whether to hide contact support url. Version: 26.2.0.cl or later */ 'hide_contact_support_url'?: boolean | null; + /** + * Whether to hide logo Version: 26.4.0.cl or later + */ + 'hide_logo_url'?: boolean | null; static readonly discriminator: string | undefined = undefined; @@ -289,6 +293,12 @@ export class TemplatePropertiesInputCreate { "baseName": "hide_contact_support_url", "type": "boolean", "format": "" + }, + { + "name": "hide_logo_url", + "baseName": "hide_logo_url", + "type": "boolean", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/sdks/typescript/models/UpdateCollectionRequest.ts b/sdks/typescript/models/UpdateCollectionRequest.ts new file mode 100644 index 000000000..abf0a645e --- /dev/null +++ b/sdks/typescript/models/UpdateCollectionRequest.ts @@ -0,0 +1,72 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { CollectionMetadataInput } from '../models/CollectionMetadataInput'; +import { HttpFile } from '../http/http'; + +export class UpdateCollectionRequest { + /** + * Name of the collection. + */ + 'name'?: string; + /** + * Description of the collection. + */ + 'description'?: string; + /** + * Metadata objects to add, remove, or replace in the collection. + */ + 'metadata'?: Array; + /** + * Type of update operation. Default operation type is REPLACE. + */ + 'operation'?: UpdateCollectionRequestOperationEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "Array", + "format": "" + }, + { + "name": "operation", + "baseName": "operation", + "type": "UpdateCollectionRequestOperationEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return UpdateCollectionRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type UpdateCollectionRequestOperationEnum = "ADD" | "REMOVE" | "REPLACE" ; + diff --git a/sdks/typescript/models/UpdateVariableValuesRequest.ts b/sdks/typescript/models/UpdateVariableValuesRequest.ts index c636775ea..9a170e018 100644 --- a/sdks/typescript/models/UpdateVariableValuesRequest.ts +++ b/sdks/typescript/models/UpdateVariableValuesRequest.ts @@ -16,11 +16,11 @@ import { HttpFile } from '../http/http'; export class UpdateVariableValuesRequest { /** - * Variables and values to update + * Array of variable assignment objects specifying the variable identifier, values to assign, and the operation type (ADD, REMOVE, REPLACE, or RESET) to perform on each variable. */ 'variable_assignment': Array; /** - * Variables and values to update + * Array of scope objects defining where the variable values apply, including organization context, optional principal constraints (user or group), model reference for formula variables, and priority for conflict resolution. */ 'variable_value_scope': Array; diff --git a/sdks/typescript/models/UpdateWebhookConfigurationRequest.ts b/sdks/typescript/models/UpdateWebhookConfigurationRequest.ts index 7fcbbd474..8590ccd3b 100644 --- a/sdks/typescript/models/UpdateWebhookConfigurationRequest.ts +++ b/sdks/typescript/models/UpdateWebhookConfigurationRequest.ts @@ -13,6 +13,7 @@ import { CreateWebhookConfigurationRequestAuthentication } from '../models/CreateWebhookConfigurationRequestAuthentication'; import { CreateWebhookConfigurationRequestSignatureVerification } from '../models/CreateWebhookConfigurationRequestSignatureVerification'; import { CreateWebhookConfigurationRequestStorageDestination } from '../models/CreateWebhookConfigurationRequestStorageDestination'; +import { WebhookKeyValuePairInput } from '../models/WebhookKeyValuePairInput'; import { HttpFile } from '../http/http'; export class UpdateWebhookConfigurationRequest { @@ -39,6 +40,10 @@ export class UpdateWebhookConfigurationRequest { 'authentication'?: CreateWebhookConfigurationRequestAuthentication; 'signature_verification'?: CreateWebhookConfigurationRequestSignatureVerification; 'storage_destination'?: CreateWebhookConfigurationRequestStorageDestination; + /** + * Additional headers as an array of key-value pairs. Example: [{\"key\": \"X-Custom-Header\", \"value\": \"custom_value\"}] Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array; static readonly discriminator: string | undefined = undefined; @@ -90,6 +95,12 @@ export class UpdateWebhookConfigurationRequest { "baseName": "storage_destination", "type": "CreateWebhookConfigurationRequestStorageDestination", "format": "" + }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/sdks/typescript/models/ValidateCommunicationChannelRequest.ts b/sdks/typescript/models/ValidateCommunicationChannelRequest.ts new file mode 100644 index 000000000..9b44a4694 --- /dev/null +++ b/sdks/typescript/models/ValidateCommunicationChannelRequest.ts @@ -0,0 +1,62 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class ValidateCommunicationChannelRequest { + /** + * Type of communication channel to validate (e.g., WEBHOOK). + */ + 'channel_type': ValidateCommunicationChannelRequestChannelTypeEnum; + /** + * Unique identifier or name for the communication channel. + */ + 'channel_identifier': string; + /** + * Event type to validate for this channel. + */ + 'event_type': ValidateCommunicationChannelRequestEventTypeEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "channel_type", + "baseName": "channel_type", + "type": "ValidateCommunicationChannelRequestChannelTypeEnum", + "format": "" + }, + { + "name": "channel_identifier", + "baseName": "channel_identifier", + "type": "string", + "format": "" + }, + { + "name": "event_type", + "baseName": "event_type", + "type": "ValidateCommunicationChannelRequestEventTypeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ValidateCommunicationChannelRequest.attributeTypeMap; + } + + public constructor() { + } +} + + +export type ValidateCommunicationChannelRequestChannelTypeEnum = "WEBHOOK" ; +export type ValidateCommunicationChannelRequestEventTypeEnum = "LIVEBOARD_SCHEDULE" ; + diff --git a/sdks/typescript/models/ValueScopeInput.ts b/sdks/typescript/models/ValueScopeInput.ts index ec2f14c9a..03a58b14c 100644 --- a/sdks/typescript/models/ValueScopeInput.ts +++ b/sdks/typescript/models/ValueScopeInput.ts @@ -13,7 +13,7 @@ import { HttpFile } from '../http/http'; /** -* Input for variable scope in search +* Input for filtering variable values by scope in search operations */ export class ValueScopeInput { /** @@ -21,7 +21,7 @@ export class ValueScopeInput { */ 'org_identifier'?: string | null; /** - * Principal type + * Type of principal to filter by. Use USER to filter values assigned to specific users, or USER_GROUP to filter values assigned to groups. */ 'principal_type'?: ValueScopeInputPrincipalTypeEnum | null; /** @@ -29,7 +29,7 @@ export class ValueScopeInput { */ 'principal_identifier'?: string | null; /** - * Model Identifier + * Unique ID or name of the model to filter by. Applicable only for FORMULA_VARIABLE type. */ 'model_identifier'?: string | null; diff --git a/sdks/typescript/models/Variable.ts b/sdks/typescript/models/Variable.ts index 1bca14d3d..6346581be 100644 --- a/sdks/typescript/models/Variable.ts +++ b/sdks/typescript/models/Variable.ts @@ -81,5 +81,5 @@ export class Variable { } -export type VariableVariableTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE" ; +export type VariableVariableTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE" | "USER_PROPERTY" ; diff --git a/sdks/typescript/models/VariableDetailInput.ts b/sdks/typescript/models/VariableDetailInput.ts index 7f3a353ff..2deab311f 100644 --- a/sdks/typescript/models/VariableDetailInput.ts +++ b/sdks/typescript/models/VariableDetailInput.ts @@ -60,5 +60,5 @@ export class VariableDetailInput { } -export type VariableDetailInputTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE" ; +export type VariableDetailInputTypeEnum = "CONNECTION_PROPERTY" | "TABLE_MAPPING" | "CONNECTION_PROPERTY_PER_PRINCIPAL" | "FORMULA_VARIABLE" | "USER_PROPERTY" ; diff --git a/sdks/typescript/models/VariablePutAssignmentInput.ts b/sdks/typescript/models/VariablePutAssignmentInput.ts new file mode 100644 index 000000000..14d4fcd2a --- /dev/null +++ b/sdks/typescript/models/VariablePutAssignmentInput.ts @@ -0,0 +1,94 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Input for variable value put operations +*/ +export class VariablePutAssignmentInput { + /** + * Values of the variable + */ + 'assigned_values': Array; + /** + * The unique name of the org + */ + 'org_identifier'?: string | null; + /** + * Principal type + */ + 'principal_type'?: VariablePutAssignmentInputPrincipalTypeEnum | null; + /** + * Unique ID or name of the principal + */ + 'principal_identifier'?: string | null; + /** + * Unique ID of the model + */ + 'model_identifier'?: string | null; + /** + * Priority level + */ + 'priority'?: number | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "assigned_values", + "baseName": "assigned_values", + "type": "Array", + "format": "" + }, + { + "name": "org_identifier", + "baseName": "org_identifier", + "type": "string", + "format": "" + }, + { + "name": "principal_type", + "baseName": "principal_type", + "type": "VariablePutAssignmentInputPrincipalTypeEnum", + "format": "" + }, + { + "name": "principal_identifier", + "baseName": "principal_identifier", + "type": "string", + "format": "" + }, + { + "name": "model_identifier", + "baseName": "model_identifier", + "type": "string", + "format": "" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return VariablePutAssignmentInput.attributeTypeMap; + } + + public constructor() { + } +} + + +export type VariablePutAssignmentInputPrincipalTypeEnum = "USER" | "USER_GROUP" ; + diff --git a/sdks/typescript/models/VariableUpdateScopeInput.ts b/sdks/typescript/models/VariableUpdateScopeInput.ts index 4edaf1331..f89fe8fda 100644 --- a/sdks/typescript/models/VariableUpdateScopeInput.ts +++ b/sdks/typescript/models/VariableUpdateScopeInput.ts @@ -13,7 +13,7 @@ import { HttpFile } from '../http/http'; /** -* Input for variable value update in batch operations +* Input for defining the scope of variable value assignments in batch update operations */ export class VariableUpdateScopeInput { /** @@ -21,7 +21,7 @@ export class VariableUpdateScopeInput { */ 'org_identifier': string; /** - * Principal type + * Type of principal to which the variable value applies. Use USER to assign values to a specific user, or USER_GROUP to assign values to a group. */ 'principal_type'?: VariableUpdateScopeInputPrincipalTypeEnum | null; /** @@ -29,11 +29,11 @@ export class VariableUpdateScopeInput { */ 'principal_identifier'?: string | null; /** - * Unique ID of the model + * Unique ID or name of the model. Required for FORMULA_VARIABLE type to scope the variable value to a specific worksheet. */ 'model_identifier'?: string | null; /** - * Priority level + * The priority level for this scope assignment, used for conflict resolution when multiple values match. Higher priority values (larger numbers) take precedence. */ 'priority'?: number | null; diff --git a/sdks/typescript/models/VariableValue.ts b/sdks/typescript/models/VariableValue.ts index 64a3bce4c..b02e9fadc 100644 --- a/sdks/typescript/models/VariableValue.ts +++ b/sdks/typescript/models/VariableValue.ts @@ -26,7 +26,7 @@ export class VariableValue { */ 'org_identifier': string; /** - * Principal type + * Type of principal to which this value applies. Use USER to assign the value to a specific user, or USER_GROUP to assign it to a group. */ 'principal_type'?: VariableValuePrincipalTypeEnum | null; /** diff --git a/sdks/typescript/models/WebhookKeyValuePair.ts b/sdks/typescript/models/WebhookKeyValuePair.ts new file mode 100644 index 000000000..4c750f7ae --- /dev/null +++ b/sdks/typescript/models/WebhookKeyValuePair.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Key-value pair for additional webhook headers. +*/ +export class WebhookKeyValuePair { + /** + * Header name. + */ + 'key': string; + /** + * Header value. + */ + 'value': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookKeyValuePair.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookKeyValuePairInput.ts b/sdks/typescript/models/WebhookKeyValuePairInput.ts new file mode 100644 index 000000000..442c8a00c --- /dev/null +++ b/sdks/typescript/models/WebhookKeyValuePairInput.ts @@ -0,0 +1,51 @@ +/** + * ThoughtSpot Public REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +/** +* Key-value pair input for additional webhook headers. +*/ +export class WebhookKeyValuePairInput { + /** + * Header name. + */ + 'key': string; + /** + * Header value. + */ + 'value': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "key", + "baseName": "key", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return WebhookKeyValuePairInput.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/sdks/typescript/models/WebhookResponse.ts b/sdks/typescript/models/WebhookResponse.ts index 6fcdce34c..96a7ca1ed 100644 --- a/sdks/typescript/models/WebhookResponse.ts +++ b/sdks/typescript/models/WebhookResponse.ts @@ -12,6 +12,7 @@ import { StorageDestination } from '../models/StorageDestination'; import { WebhookAuthentication } from '../models/WebhookAuthentication'; +import { WebhookKeyValuePair } from '../models/WebhookKeyValuePair'; import { WebhookOrg } from '../models/WebhookOrg'; import { WebhookSignatureVerification } from '../models/WebhookSignatureVerification'; import { WebhookUser } from '../models/WebhookUser'; @@ -46,6 +47,10 @@ export class WebhookResponse { 'authentication'?: WebhookAuthentication; 'signature_verification'?: WebhookSignatureVerification; /** + * Additional headers as an array of key-value pairs. Version: 26.4.0.cl or later + */ + 'additional_headers'?: Array | null; + /** * Creation time of the webhook configuration in milliseconds. */ 'creation_time_in_millis': number; @@ -114,6 +119,12 @@ export class WebhookResponse { "type": "WebhookSignatureVerification", "format": "" }, + { + "name": "additional_headers", + "baseName": "additional_headers", + "type": "Array", + "format": "" + }, { "name": "creation_time_in_millis", "baseName": "creation_time_in_millis", diff --git a/sdks/typescript/models/all.ts b/sdks/typescript/models/all.ts index 79fa5d7d0..eb3445f30 100644 --- a/sdks/typescript/models/all.ts +++ b/sdks/typescript/models/all.ts @@ -31,8 +31,20 @@ export * from '../models/CALLBACKInput' export * from '../models/CALLBACKInputMandatory' export * from '../models/CalendarResponse' export * from '../models/ChangeUserPasswordRequest' +export * from '../models/ChannelHistoryEventInfo' +export * from '../models/ChannelHistoryEventInput' +export * from '../models/ChannelHistoryJob' +export * from '../models/ChannelValidationAwsS3Info' +export * from '../models/ChannelValidationDetail' export * from '../models/ClusterNonEmbedAccess' export * from '../models/ClusterNonEmbedAccessInput' +export * from '../models/Collection' +export * from '../models/CollectionDeleteResponse' +export * from '../models/CollectionDeleteTypeIdentifiers' +export * from '../models/CollectionEntityIdentifier' +export * from '../models/CollectionMetadataInput' +export * from '../models/CollectionMetadataItem' +export * from '../models/CollectionSearchResponse' export * from '../models/Column' export * from '../models/ColumnSecurityRule' export * from '../models/ColumnSecurityRuleColumn' @@ -48,6 +60,7 @@ export * from '../models/CommitHistoryResponse' export * from '../models/CommitResponse' export * from '../models/CommiterType' export * from '../models/CommunicationChannelPreferencesResponse' +export * from '../models/CommunicationChannelValidateResponse' export * from '../models/ConfigureCommunicationChannelPreferencesRequest' export * from '../models/ConfigureSecuritySettingsRequest' export * from '../models/ConfigureSecuritySettingsRequestClusterPreferences' @@ -64,6 +77,7 @@ export * from '../models/CreateAgentConversationRequestConversationSettings' export * from '../models/CreateAgentConversationRequestMetadataContext' export * from '../models/CreateCalendarRequest' export * from '../models/CreateCalendarRequestTableReference' +export * from '../models/CreateCollectionRequest' export * from '../models/CreateConfigRequest' export * from '../models/CreateConnectionConfigurationRequest' export * from '../models/CreateConnectionConfigurationRequestPolicyProcessOptions' @@ -107,12 +121,14 @@ export * from '../models/DefaultActionConfig' export * from '../models/DefaultActionConfigInput' export * from '../models/DefaultActionConfigInputCreate' export * from '../models/DefaultActionConfigSearchInput' +export * from '../models/DeleteCollectionRequest' export * from '../models/DeleteConfigRequest' export * from '../models/DeleteConnectionConfigurationRequest' export * from '../models/DeleteConnectionRequest' export * from '../models/DeleteMetadataRequest' export * from '../models/DeleteMetadataTypeInput' export * from '../models/DeleteOrgEmailCustomizationRequest' +export * from '../models/DeleteVariablesRequest' export * from '../models/DeleteWebhookConfigurationsRequest' export * from '../models/DeployCommitRequest' export * from '../models/DeployResponse' @@ -190,6 +206,7 @@ export * from '../models/JWTMetadataObject' export * from '../models/JWTParameter' export * from '../models/JWTUserOptions' export * from '../models/JWTUserOptionsFull' +export * from '../models/JobRecipient' export * from '../models/LBContextInput' export * from '../models/LiveboardContent' export * from '../models/LiveboardDataResponse' @@ -223,6 +240,7 @@ export * from '../models/OrgPreferenceSearchCriteriaInput' export * from '../models/OrgResponse' export * from '../models/OrgType' export * from '../models/ParameterValues' +export * from '../models/ParameterizeMetadataFieldsRequest' export * from '../models/ParameterizeMetadataRequest' export * from '../models/ParametersListItem' export * from '../models/ParametersListItemInput' @@ -240,6 +258,7 @@ export * from '../models/PrincipalsListItem' export * from '../models/PrincipalsListItemInput' export * from '../models/PublishMetadataListItem' export * from '../models/PublishMetadataRequest' +export * from '../models/PutVariableValuesRequest' export * from '../models/QueryGetDecomposedQueryRequest' export * from '../models/QueryGetDecomposedQueryRequestNlsRequest' export * from '../models/RecipientDetails' @@ -286,6 +305,10 @@ export * from '../models/ScriptSrcUrls' export * from '../models/ScriptSrcUrlsInput' export * from '../models/SearchCalendarsRequest' export * from '../models/SearchCalendarsRequestSortOptions' +export * from '../models/SearchChannelHistoryRequest' +export * from '../models/SearchChannelHistoryResponse' +export * from '../models/SearchCollectionsRequest' +export * from '../models/SearchCollectionsRequestSortOptions' export * from '../models/SearchCommitsRequest' export * from '../models/SearchCommunicationChannelPreferencesRequest' export * from '../models/SearchConfigRequest' @@ -311,7 +334,6 @@ export * from '../models/SearchTagsRequest' export * from '../models/SearchUserGroupsRequest' export * from '../models/SearchUserGroupsRequestSortOptions' export * from '../models/SearchUsersRequest' -export * from '../models/SearchUsersRequestSortOptions' export * from '../models/SearchVariablesRequest' export * from '../models/SearchWebhookConfigurationsRequest' export * from '../models/SearchWebhookConfigurationsRequestSortOptions' @@ -358,6 +380,7 @@ export * from '../models/UnparameterizeMetadataRequest' export * from '../models/UnpublishMetadataRequest' export * from '../models/UpdateCalendarRequest' export * from '../models/UpdateCalendarRequestTableReference' +export * from '../models/UpdateCollectionRequest' export * from '../models/UpdateColumnSecurityRulesRequest' export * from '../models/UpdateConfigRequest' export * from '../models/UpdateConnectionConfigurationRequest' @@ -391,11 +414,13 @@ export * from '../models/UserInfo' export * from '../models/UserObject' export * from '../models/UserParameterOptions' export * from '../models/UserPrincipal' +export * from '../models/ValidateCommunicationChannelRequest' export * from '../models/ValidateMergeRequest' export * from '../models/ValidateTokenRequest' export * from '../models/ValueScopeInput' export * from '../models/Variable' export * from '../models/VariableDetailInput' +export * from '../models/VariablePutAssignmentInput' export * from '../models/VariableUpdateAssignmentInput' export * from '../models/VariableUpdateScopeInput' export * from '../models/VariableValue' @@ -410,6 +435,8 @@ export * from '../models/WebhookAuthentication' export * from '../models/WebhookAuthenticationInput' export * from '../models/WebhookDeleteFailure' export * from '../models/WebhookDeleteResponse' +export * from '../models/WebhookKeyValuePair' +export * from '../models/WebhookKeyValuePairInput' export * from '../models/WebhookOrg' export * from '../models/WebhookPagination' export * from '../models/WebhookResponse' diff --git a/sdks/typescript/package-lock.json b/sdks/typescript/package-lock.json index a81bc29b3..6a6f09237 100644 --- a/sdks/typescript/package-lock.json +++ b/sdks/typescript/package-lock.json @@ -1,12 +1,12 @@ { "name": "@thoughtspot/rest-api-sdk", - "version": "2.22.0", + "version": "2.23.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@thoughtspot/rest-api-sdk", - "version": "2.22.0", + "version": "2.23.0", "license": "ThoughtSpot Development Tools End User License Agreement", "dependencies": { "es6-promise": "^4.2.4", @@ -456,9 +456,9 @@ } }, "node_modules/@jest/diff-sequences": { - "version": "30.0.1", - "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.0.1.tgz", - "integrity": "sha512-n5H8QLDJ47QqbCNn5SuFjCRDrOLEZ0h8vAHCK5RL9Ls7Xa8AQLa/YxAc9UjFqoEDM48muwtBGjtMY5cr0PLDCw==", + "version": "30.3.0", + "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.3.0.tgz", + "integrity": "sha512-cG51MVnLq1ecVUaQ3fr6YuuAOitHK1S4WUJHnsPFE/quQr33ADUx1FfrTCpMCRxvy0Yr9BThKpDjSlcTi91tMA==", "dev": true, "license": "MIT", "engines": { @@ -466,9 +466,9 @@ } }, "node_modules/@jest/expect-utils": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.2.0.tgz", - "integrity": "sha512-1JnRfhqpD8HGpOmQp180Fo9Zt69zNtC+9lR+kT7NVL05tNXIi+QC8Csz7lfidMoVLPD3FnOtcmp0CEFnxExGEA==", + "version": "30.3.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.3.0.tgz", + "integrity": "sha512-j0+W5iQQ8hBh7tHZkTQv3q2Fh/M7Je72cIsYqC4OaktgtO7v1So9UTjp6uPBHIaB6beoF/RRsCgMJKvti0wADA==", "dev": true, "license": "MIT", "dependencies": { @@ -516,9 +516,9 @@ } }, "node_modules/@jest/types": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.2.0.tgz", - "integrity": "sha512-H9xg1/sfVvyfU7o3zMfBEjQ1gcsdeTMgqHoYdN79tuLqfTtuu7WckRA1R5whDwOzxaZAeMKTYWqP+WCAi0CHsg==", + "version": "30.3.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.3.0.tgz", + "integrity": "sha512-JHm87k7bA33hpBngtU8h6UBub/fqqA9uXfw+21j5Hmk7ooPHlboRNxHq0JcMtC+n8VJGP1mcfnD3Mk+XKe1oSw==", "dev": true, "license": "MIT", "dependencies": { @@ -619,9 +619,9 @@ "license": "MIT" }, "node_modules/@swc/core": { - "version": "1.15.13", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.15.13.tgz", - "integrity": "sha512-0l1gl/72PErwUZuavcRpRAQN9uSst+Nk++niC5IX6lmMWpXoScYx3oq/narT64/sKv/eRiPTaAjBFGDEQiWJIw==", + "version": "1.15.21", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.15.21.tgz", + "integrity": "sha512-fkk7NJcBscrR3/F8jiqlMptRHP650NxqDnspBMrRe5d8xOoCy9MLL5kOBLFXjFLfMo3KQQHhk+/jUULOMlR1uQ==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", @@ -637,16 +637,18 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.15.13", - "@swc/core-darwin-x64": "1.15.13", - "@swc/core-linux-arm-gnueabihf": "1.15.13", - "@swc/core-linux-arm64-gnu": "1.15.13", - "@swc/core-linux-arm64-musl": "1.15.13", - "@swc/core-linux-x64-gnu": "1.15.13", - "@swc/core-linux-x64-musl": "1.15.13", - "@swc/core-win32-arm64-msvc": "1.15.13", - "@swc/core-win32-ia32-msvc": "1.15.13", - "@swc/core-win32-x64-msvc": "1.15.13" + "@swc/core-darwin-arm64": "1.15.21", + "@swc/core-darwin-x64": "1.15.21", + "@swc/core-linux-arm-gnueabihf": "1.15.21", + "@swc/core-linux-arm64-gnu": "1.15.21", + "@swc/core-linux-arm64-musl": "1.15.21", + "@swc/core-linux-ppc64-gnu": "1.15.21", + "@swc/core-linux-s390x-gnu": "1.15.21", + "@swc/core-linux-x64-gnu": "1.15.21", + "@swc/core-linux-x64-musl": "1.15.21", + "@swc/core-win32-arm64-msvc": "1.15.21", + "@swc/core-win32-ia32-msvc": "1.15.21", + "@swc/core-win32-x64-msvc": "1.15.21" }, "peerDependencies": { "@swc/helpers": ">=0.5.17" @@ -658,9 +660,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.15.13", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.13.tgz", - "integrity": "sha512-ztXusRuC5NV2w+a6pDhX13CGioMLq8CjX5P4XgVJ21ocqz9t19288Do0y8LklplDtwcEhYGTNdMbkmUT7+lDTg==", + "version": "1.15.21", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.15.21.tgz", + "integrity": "sha512-SA8SFg9dp0qKRH8goWsax6bptFE2EdmPf2YRAQW9WoHGf3XKM1bX0nd5UdwxmC5hXsBUZAYf7xSciCler6/oyA==", "cpu": [ "arm64" ], @@ -675,9 +677,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.15.13", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.15.13.tgz", - "integrity": "sha512-cVifxQUKhaE7qcO/y9Mq6PEhoyvN9tSLzCnnFZ4EIabFHBuLtDDO6a+vLveOy98hAs5Qu1+bb5Nv0oa1Pihe3Q==", + "version": "1.15.21", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.15.21.tgz", + "integrity": "sha512-//fOVntgowz9+V90lVsNCtyyrtbHp3jWH6Rch7MXHXbcvbLmbCTmssl5DeedUWLLGiAAW1wksBdqdGYOTjaNLw==", "cpu": [ "x64" ], @@ -692,9 +694,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.15.13", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.13.tgz", - "integrity": "sha512-t+xxEzZ48enl/wGGy7SRYd7kImWQ/+wvVFD7g5JZo234g6/QnIgZ+YdfIyjHB+ZJI3F7a2IQHS7RNjxF29UkWw==", + "version": "1.15.21", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.15.21.tgz", + "integrity": "sha512-meNI4Sh6h9h8DvIfEc0l5URabYMSuNvyisLmG6vnoYAS43s8ON3NJR8sDHvdP7NJTrLe0q/x2XCn6yL/BeHcZg==", "cpu": [ "arm" ], @@ -709,9 +711,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.15.13", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.13.tgz", - "integrity": "sha512-VndeGvKmTXFn6AGwjy0Kg8i7HccOCE7Jt/vmZwRxGtOfNZM1RLYRQ7MfDLo6T0h1Bq6eYzps3L5Ma4zBmjOnOg==", + "version": "1.15.21", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.15.21.tgz", + "integrity": "sha512-QrXlNQnHeXqU2EzLlnsPoWEh8/GtNJLvfMiPsDhk+ht6Xv8+vhvZ5YZ/BokNWSIZiWPKLAqR0M7T92YF5tmD3g==", "cpu": [ "arm64" ], @@ -726,9 +728,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.15.13", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.13.tgz", - "integrity": "sha512-SmZ9m+XqCB35NddHCctvHFLqPZDAs5j8IgD36GoutufDJmeq2VNfgk5rQoqNqKmAK3Y7iFdEmI76QoHIWiCLyw==", + "version": "1.15.21", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.15.21.tgz", + "integrity": "sha512-8/yGCMO333ultDaMQivE5CjO6oXDPeeg1IV4sphojPkb0Pv0i6zvcRIkgp60xDB+UxLr6VgHgt+BBgqS959E9g==", "cpu": [ "arm64" ], @@ -742,10 +744,44 @@ "node": ">=10" } }, + "node_modules/@swc/core-linux-ppc64-gnu": { + "version": "1.15.21", + "resolved": "https://registry.npmjs.org/@swc/core-linux-ppc64-gnu/-/core-linux-ppc64-gnu-1.15.21.tgz", + "integrity": "sha512-ucW0HzPx0s1dgRvcvuLSPSA/2Kk/VYTv9st8qe1Kc22Gu0Q0rH9+6TcBTmMuNIp0Xs4BPr1uBttmbO1wEGI49Q==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-s390x-gnu": { + "version": "1.15.21", + "resolved": "https://registry.npmjs.org/@swc/core-linux-s390x-gnu/-/core-linux-s390x-gnu-1.15.21.tgz", + "integrity": "sha512-ulTnOGc5I7YRObE/9NreAhQg94QkiR5qNhhcUZ1iFAYjzg/JGAi1ch+s/Ixe61pMIr8bfVrF0NOaB0f8wjaAfA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.15.13", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.13.tgz", - "integrity": "sha512-5rij+vB9a29aNkHq72EXI2ihDZPszJb4zlApJY4aCC/q6utgqFA6CkrfTfIb+O8hxtG3zP5KERETz8mfFK6A0A==", + "version": "1.15.21", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.15.21.tgz", + "integrity": "sha512-D0RokxtM+cPvSqJIKR6uja4hbD+scI9ezo95mBhfSyLUs9wnPPl26sLp1ZPR/EXRdYm3F3S6RUtVi+8QXhT24Q==", "cpu": [ "x64" ], @@ -760,9 +796,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.15.13", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.13.tgz", - "integrity": "sha512-OlSlaOK9JplQ5qn07WiBLibkOw7iml2++ojEXhhR3rbWrNEKCD7sd8+6wSavsInyFdw4PhLA+Hy6YyDBIE23Yw==", + "version": "1.15.21", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.15.21.tgz", + "integrity": "sha512-nER8u7VeRfmU6fMDzl1NQAbbB/G7O2avmvCOwIul1uGkZ2/acbPH+DCL9h5+0yd/coNcxMBTL6NGepIew+7C2w==", "cpu": [ "x64" ], @@ -777,9 +813,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.15.13", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.13.tgz", - "integrity": "sha512-zwQii5YVdsfG8Ti9gIKgBKZg8qMkRZxl+OlYWUT5D93Jl4NuNBRausP20tfEkQdAPSRrMCSUZBM6FhW7izAZRg==", + "version": "1.15.21", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.15.21.tgz", + "integrity": "sha512-+/AgNBnjYugUA8C0Do4YzymgvnGbztv7j8HKSQLvR/DQgZPoXQ2B3PqB2mTtGh/X5DhlJWiqnunN35JUgWcAeQ==", "cpu": [ "arm64" ], @@ -794,9 +830,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.15.13", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.13.tgz", - "integrity": "sha512-hYXvyVVntqRlYoAIDwNzkS3tL2ijP3rxyWQMNKaxcCxxkCDto/w3meOK/OB6rbQSkNw0qTUcBfU9k+T0ptYdfQ==", + "version": "1.15.21", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.15.21.tgz", + "integrity": "sha512-IkSZj8PX/N4HcaFhMQtzmkV8YSnuNoJ0E6OvMwFiOfejPhiKXvl7CdDsn1f4/emYEIDO3fpgZW9DTaCRMDxaDA==", "cpu": [ "ia32" ], @@ -811,9 +847,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.15.13", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.13.tgz", - "integrity": "sha512-XTzKs7c/vYCcjmcwawnQvlHHNS1naJEAzcBckMI5OJlnrcgW8UtcX9NHFYvNjGtXuKv0/9KvqL4fuahdvlNGKw==", + "version": "1.15.21", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.15.21.tgz", + "integrity": "sha512-zUyWso7OOENB6e1N1hNuNn8vbvLsTdKQ5WKLgt/JcBNfJhKy/6jmBmqI3GXk/MyvQKd5SLvP7A0F36p7TeDqvw==", "cpu": [ "x64" ], @@ -835,9 +871,9 @@ "license": "Apache-2.0" }, "node_modules/@swc/types": { - "version": "0.1.25", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.25.tgz", - "integrity": "sha512-iAoY/qRhNH8a/hBvm3zKj9qQ4oc2+3w1unPJa2XvTK3XjeLXtzcCingVPw/9e5mn1+0yPqxcBGp9Jf0pkfMb1g==", + "version": "0.1.26", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.26.tgz", + "integrity": "sha512-lyMwd7WGgG79RS7EERZV3T8wMdmPq3xwyg+1nmAM64kIhx5yl+juO2PYIHb7vTiPgPCj8LYjsNV2T5wiQHUEaw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -951,9 +987,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "25.3.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.3.0.tgz", - "integrity": "sha512-4K3bqJpXpqfg2XKGK9bpDTc6xO/xoUP/RBWS7AtRMug6zZFaRekiLzjVtAoZMquxoAbzBvy5nxQ7veS5eYzf8A==", + "version": "25.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz", + "integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==", "dev": true, "license": "MIT", "dependencies": { @@ -1079,9 +1115,9 @@ } }, "node_modules/anymatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "dev": true, "license": "MIT", "engines": { @@ -1568,18 +1604,18 @@ } }, "node_modules/expect": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-30.2.0.tgz", - "integrity": "sha512-u/feCi0GPsI+988gU2FLcsHyAHTU0MX1Wg68NhAnN7z/+C5wqG+CY8J53N9ioe8RXgaoz0nBR/TYMf3AycUuPw==", + "version": "30.3.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-30.3.0.tgz", + "integrity": "sha512-1zQrciTiQfRdo7qJM1uG4navm8DayFa2TgCSRlzUyNkhcJ6XUZF3hjnpkyr3VhAqPH7i/9GkG7Tv5abz6fqz0Q==", "dev": true, "license": "MIT", "dependencies": { - "@jest/expect-utils": "30.2.0", + "@jest/expect-utils": "30.3.0", "@jest/get-type": "30.1.0", - "jest-matcher-utils": "30.2.0", - "jest-message-util": "30.2.0", - "jest-mock": "30.2.0", - "jest-util": "30.2.0" + "jest-matcher-utils": "30.3.0", + "jest-message-util": "30.3.0", + "jest-mock": "30.3.0", + "jest-util": "30.3.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" @@ -1946,51 +1982,51 @@ "license": "ISC" }, "node_modules/jest-diff": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.2.0.tgz", - "integrity": "sha512-dQHFo3Pt4/NLlG5z4PxZ/3yZTZ1C7s9hveiOj+GCN+uT109NC2QgsoVZsVOAvbJ3RgKkvyLGXZV9+piDpWbm6A==", + "version": "30.3.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.3.0.tgz", + "integrity": "sha512-n3q4PDQjS4LrKxfWB3Z5KNk1XjXtZTBwQp71OP0Jo03Z6V60x++K5L8k6ZrW8MY8pOFylZvHM0zsjS1RqlHJZQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/diff-sequences": "30.0.1", + "@jest/diff-sequences": "30.3.0", "@jest/get-type": "30.1.0", "chalk": "^4.1.2", - "pretty-format": "30.2.0" + "pretty-format": "30.3.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.2.0.tgz", - "integrity": "sha512-dQ94Nq4dbzmUWkQ0ANAWS9tBRfqCrn0bV9AMYdOi/MHW726xn7eQmMeRTpX2ViC00bpNaWXq+7o4lIQ3AX13Hg==", + "version": "30.3.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.3.0.tgz", + "integrity": "sha512-HEtc9uFQgaUHkC7nLSlQL3Tph4Pjxt/yiPvkIrrDCt9jhoLIgxaubo1G+CFOnmHYMxHwwdaSN7mkIFs6ZK8OhA==", "dev": true, "license": "MIT", "dependencies": { "@jest/get-type": "30.1.0", "chalk": "^4.1.2", - "jest-diff": "30.2.0", - "pretty-format": "30.2.0" + "jest-diff": "30.3.0", + "pretty-format": "30.3.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-message-util": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.2.0.tgz", - "integrity": "sha512-y4DKFLZ2y6DxTWD4cDe07RglV88ZiNEdlRfGtqahfbIjfsw1nMCPx49Uev4IA/hWn3sDKyAnSPwoYSsAEdcimw==", + "version": "30.3.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.3.0.tgz", + "integrity": "sha512-Z/j4Bo+4ySJ+JPJN3b2Qbl9hDq3VrXmnjjGEWD/x0BCXeOXPTV1iZYYzl2X8c1MaCOL+ewMyNBcm88sboE6YWw==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@jest/types": "30.2.0", + "@jest/types": "30.3.0", "@types/stack-utils": "^2.0.3", "chalk": "^4.1.2", "graceful-fs": "^4.2.11", - "micromatch": "^4.0.8", - "pretty-format": "30.2.0", + "picomatch": "^4.0.3", + "pretty-format": "30.3.0", "slash": "^3.0.0", "stack-utils": "^2.0.6" }, @@ -1999,15 +2035,15 @@ } }, "node_modules/jest-mock": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.2.0.tgz", - "integrity": "sha512-JNNNl2rj4b5ICpmAcq+WbLH83XswjPbjH4T7yvGzfAGCPh1rw+xVNbtk+FnRslvt9lkCcdn9i1oAoKUuFsOxRw==", + "version": "30.3.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.3.0.tgz", + "integrity": "sha512-OTzICK8CpE+t4ndhKrwlIdbM6Pn8j00lvmSmq5ejiO+KxukbLjgOflKWMn3KE34EZdQm5RqTuKj+5RIEniYhog==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.2.0", + "@jest/types": "30.3.0", "@types/node": "*", - "jest-util": "30.2.0" + "jest-util": "30.3.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" @@ -2024,18 +2060,18 @@ } }, "node_modules/jest-util": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.2.0.tgz", - "integrity": "sha512-QKNsM0o3Xe6ISQU869e+DhG+4CK/48aHYdJZGlFQVTjnbvgpcKyxpzk29fGiO7i/J8VENZ+d2iGnSsvmuHywlA==", + "version": "30.3.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.3.0.tgz", + "integrity": "sha512-/jZDa00a3Sz7rdyu55NLrQCIrbyIkbBxareejQI315f/i8HjYN+ZWsDLLpoQSiUIEIyZF/R8fDg3BmB8AtHttg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.2.0", + "@jest/types": "30.3.0", "@types/node": "*", "chalk": "^4.1.2", "ci-info": "^4.2.0", "graceful-fs": "^4.2.11", - "picomatch": "^4.0.2" + "picomatch": "^4.0.3" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" @@ -2204,9 +2240,9 @@ } }, "node_modules/micromatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "dev": true, "license": "MIT", "engines": { @@ -2227,9 +2263,9 @@ } }, "node_modules/minimatch": { - "version": "5.1.7", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.7.tgz", - "integrity": "sha512-FjiwU9HaHW6YB3H4a1sFudnv93lvydNjz2lmyUXR6IwKhGI+bgL3SOZrBGn6kvvX2pJvhEkGSGjyTHN47O4rqA==", + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", "dev": true, "license": "ISC", "dependencies": { @@ -2472,9 +2508,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, "license": "MIT", "engines": { @@ -2495,9 +2531,9 @@ } }, "node_modules/pretty-format": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", - "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", + "version": "30.3.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.3.0.tgz", + "integrity": "sha512-oG4T3wCbfeuvljnyAzhBvpN45E8iOTXCU/TD3zXW80HA3dQ4ahdqMkWGiPWZvjpQwlbyHrPTWUAqUzGzv4l1JQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2590,9 +2626,9 @@ } }, "node_modules/readdirp/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "dev": true, "license": "MIT", "engines": { @@ -3342,9 +3378,9 @@ } }, "node_modules/yaml": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz", - "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==", + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz", + "integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==", "dev": true, "license": "ISC", "bin": { diff --git a/sdks/typescript/package.json b/sdks/typescript/package.json index 8811f8d0c..d8a599453 100644 --- a/sdks/typescript/package.json +++ b/sdks/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@thoughtspot/rest-api-sdk", - "version": "2.22.0", + "version": "2.23.0", "description": "Api sdk for thoughtspot's public v2 rest api", "keywords": [ "fetch", diff --git a/sdks/typescript/tests/CollectionsApiTest.ts b/sdks/typescript/tests/CollectionsApiTest.ts new file mode 100644 index 000000000..c044d646e --- /dev/null +++ b/sdks/typescript/tests/CollectionsApiTest.ts @@ -0,0 +1,156 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseCollectionsApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseCollectionsApi(config); + +describe('CollectionsApi', function() { + + + describe('createCollection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createCollection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createCollection( + // createCollectionRequest CreateCollectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createCollection( + // createCollectionRequest CreateCollectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('deleteCollection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteCollection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteCollection( + // deleteCollectionRequest DeleteCollectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteCollection( + // deleteCollectionRequest DeleteCollectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchCollections', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchCollections" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchCollections( + // searchCollectionsRequest SearchCollectionsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchCollections( + // searchCollectionsRequest SearchCollectionsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('updateCollection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateCollection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateCollection( + // collectionIdentifier collection_identifier + test.Path_Variables.collection_identifier , + // updateCollectionRequest UpdateCollectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateCollection( + // collectionIdentifier collection_identifier + test.Path_Variables.collection_identifier , + // updateCollectionRequest UpdateCollectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/JobsApiTest.ts b/sdks/typescript/tests/JobsApiTest.ts new file mode 100644 index 000000000..59161b1d1 --- /dev/null +++ b/sdks/typescript/tests/JobsApiTest.ts @@ -0,0 +1,56 @@ +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import { createBearerAuthenticationConfig } from "../utils/config"; +import { PromiseJobsApi } from "../types/PromiseAPI"; +import requestBodies from "./testDataUpdated.json"; + +chai.use(chaiAsPromised); +const expect = chai.expect; + + + +const baseUrlFromCli = process.argv.filter(s => s.startsWith("--baseUrl="))?.[0]?.split("=")?.[1] +const BASE_URL = baseUrlFromCli || "http://127.0.0.1:4123" +const config = createBearerAuthenticationConfig(BASE_URL, { + username: "tsadmin", + password: "admin", +}); + + +const instance = new PromiseJobsApi(config); + +describe('JobsApi', function() { + + + describe('searchChannelHistory', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchChannelHistory" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchChannelHistory( + // searchChannelHistoryRequest SearchChannelHistoryRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchChannelHistory( + // searchChannelHistoryRequest SearchChannelHistoryRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); +}); diff --git a/sdks/typescript/tests/MetadataApiTest.ts b/sdks/typescript/tests/MetadataApiTest.ts index 58da08876..9e16e425f 100644 --- a/sdks/typescript/tests/MetadataApiTest.ts +++ b/sdks/typescript/tests/MetadataApiTest.ts @@ -374,6 +374,38 @@ describe('MetadataApi', function() { }); }); + describe('parameterizeMetadataFields', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "parameterizeMetadataFields" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.parameterizeMetadataFields( + // parameterizeMetadataFieldsRequest ParameterizeMetadataFieldsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.parameterizeMetadataFields( + // parameterizeMetadataFieldsRequest ParameterizeMetadataFieldsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + describe('searchMetadata', function() { const testReqBodies = requestBodies.filter( diff --git a/sdks/typescript/tests/SystemApiTest.ts b/sdks/typescript/tests/SystemApiTest.ts index d20f60d90..7e77dc726 100644 --- a/sdks/typescript/tests/SystemApiTest.ts +++ b/sdks/typescript/tests/SystemApiTest.ts @@ -265,4 +265,36 @@ describe('SystemApi', function() { }); }); }); + + describe('validateCommunicationChannel', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "validateCommunicationChannel" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.validateCommunicationChannel( + // validateCommunicationChannelRequest ValidateCommunicationChannelRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.validateCommunicationChannel( + // validateCommunicationChannelRequest ValidateCommunicationChannelRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); }); diff --git a/sdks/typescript/tests/ThoughtSpotRestApiTest.ts b/sdks/typescript/tests/ThoughtSpotRestApiTest.ts index 58e9419e3..fea5e5214 100644 --- a/sdks/typescript/tests/ThoughtSpotRestApiTest.ts +++ b/sdks/typescript/tests/ThoughtSpotRestApiTest.ts @@ -406,6 +406,38 @@ describe('ThoughtSpotRestApi', function() { }); }); + describe('createCollection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "createCollection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.createCollection( + // createCollectionRequest CreateCollectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.createCollection( + // createCollectionRequest CreateCollectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + describe('createConfig', function() { const testReqBodies = requestBodies.filter( @@ -1098,6 +1130,38 @@ describe('ThoughtSpotRestApi', function() { }); }); + describe('deleteCollection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteCollection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteCollection( + // deleteCollectionRequest DeleteCollectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteCollection( + // deleteCollectionRequest DeleteCollectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + describe('deleteConfig', function() { const testReqBodies = requestBodies.filter( @@ -1610,6 +1674,38 @@ describe('ThoughtSpotRestApi', function() { }); }); + describe('deleteVariables', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteVariables" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteVariables( + // deleteVariablesRequest DeleteVariablesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteVariables( + // deleteVariablesRequest DeleteVariablesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + describe('deleteWebhookConfigurations', function() { const testReqBodies = requestBodies.filter( @@ -2834,6 +2930,38 @@ describe('ThoughtSpotRestApi', function() { }); }); + describe('parameterizeMetadataFields', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "parameterizeMetadataFields" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.parameterizeMetadataFields( + // parameterizeMetadataFieldsRequest ParameterizeMetadataFieldsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.parameterizeMetadataFields( + // parameterizeMetadataFieldsRequest ParameterizeMetadataFieldsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + describe('publishMetadata', function() { const testReqBodies = requestBodies.filter( @@ -2866,6 +2994,42 @@ describe('ThoughtSpotRestApi', function() { }); }); + describe('putVariableValues', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "putVariableValues" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.putVariableValues( + // identifier identifier + test.Path_Variables.identifier , + // putVariableValuesRequest PutVariableValuesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.putVariableValues( + // identifier identifier + test.Path_Variables.identifier , + // putVariableValuesRequest PutVariableValuesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + describe('queryGetDecomposedQuery', function() { const testReqBodies = requestBodies.filter( @@ -3066,6 +3230,70 @@ describe('ThoughtSpotRestApi', function() { }); }); + describe('searchChannelHistory', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchChannelHistory" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchChannelHistory( + // searchChannelHistoryRequest SearchChannelHistoryRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchChannelHistory( + // searchChannelHistoryRequest SearchChannelHistoryRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('searchCollections', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "searchCollections" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.searchCollections( + // searchCollectionsRequest SearchCollectionsRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.searchCollections( + // searchCollectionsRequest SearchCollectionsRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + describe('searchCommits', function() { const testReqBodies = requestBodies.filter( @@ -3942,6 +4170,42 @@ describe('ThoughtSpotRestApi', function() { }); }); + describe('updateCollection', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "updateCollection" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.updateCollection( + // collectionIdentifier collection_identifier + test.Path_Variables.collection_identifier , + // updateCollectionRequest UpdateCollectionRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.updateCollection( + // collectionIdentifier collection_identifier + test.Path_Variables.collection_identifier , + // updateCollectionRequest UpdateCollectionRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + describe('updateColumnSecurityRules', function() { const testReqBodies = requestBodies.filter( @@ -4666,6 +4930,38 @@ describe('ThoughtSpotRestApi', function() { }); }); + describe('validateCommunicationChannel', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "validateCommunicationChannel" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.validateCommunicationChannel( + // validateCommunicationChannelRequest ValidateCommunicationChannelRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.validateCommunicationChannel( + // validateCommunicationChannelRequest ValidateCommunicationChannelRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + describe('validateEmailCustomization', function() { const testReqBodies = requestBodies.filter( diff --git a/sdks/typescript/tests/VariableApiTest.ts b/sdks/typescript/tests/VariableApiTest.ts index 2e86317ac..b2363def0 100644 --- a/sdks/typescript/tests/VariableApiTest.ts +++ b/sdks/typescript/tests/VariableApiTest.ts @@ -86,6 +86,74 @@ describe('VariableApi', function() { }); }); + describe('deleteVariables', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "deleteVariables" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.deleteVariables( + // deleteVariablesRequest DeleteVariablesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.deleteVariables( + // deleteVariablesRequest DeleteVariablesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + + describe('putVariableValues', function() { + + const testReqBodies = requestBodies.filter( + (body: any) => body.Metadata.operationId === "putVariableValues" + ); + testReqBodies.forEach(async (test: any) => { + it(`${test.Metadata.operationId} - ${test.Metadata.scenario} : Testid - ${test.Metadata.testId}`, async function () { + + if (test.Metadata.scenario === "positive") { + var data; + try { + data = await instance.putVariableValues( + // identifier identifier + test.Path_Variables.identifier , + // putVariableValuesRequest PutVariableValuesRequest + test.Body + ) + } catch (er) { + console.error(er, "Response", data) + expect(er).to.be.undefined + } + } else { + await expect( + instance.putVariableValues( + // identifier identifier + test.Path_Variables.identifier , + // putVariableValuesRequest PutVariableValuesRequest + test.Body + ) + ).to.be.rejectedWith(Error); + } + + }); + }); + }); + describe('searchVariables', function() { const testReqBodies = requestBodies.filter( diff --git a/sdks/typescript/types/ObjectParamAPI.ts b/sdks/typescript/types/ObjectParamAPI.ts index 6e212d4b5..6f440106b 100644 --- a/sdks/typescript/types/ObjectParamAPI.ts +++ b/sdks/typescript/types/ObjectParamAPI.ts @@ -34,8 +34,20 @@ import { CALLBACKInput } from '../models/CALLBACKInput'; import { CALLBACKInputMandatory } from '../models/CALLBACKInputMandatory'; import { CalendarResponse } from '../models/CalendarResponse'; import { ChangeUserPasswordRequest } from '../models/ChangeUserPasswordRequest'; +import { ChannelHistoryEventInfo } from '../models/ChannelHistoryEventInfo'; +import { ChannelHistoryEventInput } from '../models/ChannelHistoryEventInput'; +import { ChannelHistoryJob } from '../models/ChannelHistoryJob'; +import { ChannelValidationAwsS3Info } from '../models/ChannelValidationAwsS3Info'; +import { ChannelValidationDetail } from '../models/ChannelValidationDetail'; import { ClusterNonEmbedAccess } from '../models/ClusterNonEmbedAccess'; import { ClusterNonEmbedAccessInput } from '../models/ClusterNonEmbedAccessInput'; +import { Collection } from '../models/Collection'; +import { CollectionDeleteResponse } from '../models/CollectionDeleteResponse'; +import { CollectionDeleteTypeIdentifiers } from '../models/CollectionDeleteTypeIdentifiers'; +import { CollectionEntityIdentifier } from '../models/CollectionEntityIdentifier'; +import { CollectionMetadataInput } from '../models/CollectionMetadataInput'; +import { CollectionMetadataItem } from '../models/CollectionMetadataItem'; +import { CollectionSearchResponse } from '../models/CollectionSearchResponse'; import { Column } from '../models/Column'; import { ColumnSecurityRule } from '../models/ColumnSecurityRule'; import { ColumnSecurityRuleColumn } from '../models/ColumnSecurityRuleColumn'; @@ -51,6 +63,7 @@ import { CommitHistoryResponse } from '../models/CommitHistoryResponse'; import { CommitResponse } from '../models/CommitResponse'; import { CommiterType } from '../models/CommiterType'; import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { CommunicationChannelValidateResponse } from '../models/CommunicationChannelValidateResponse'; import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; import { ConfigureSecuritySettingsRequest } from '../models/ConfigureSecuritySettingsRequest'; import { ConfigureSecuritySettingsRequestClusterPreferences } from '../models/ConfigureSecuritySettingsRequestClusterPreferences'; @@ -67,6 +80,7 @@ import { CreateAgentConversationRequestConversationSettings } from '../models/Cr import { CreateAgentConversationRequestMetadataContext } from '../models/CreateAgentConversationRequestMetadataContext'; import { CreateCalendarRequest } from '../models/CreateCalendarRequest'; import { CreateCalendarRequestTableReference } from '../models/CreateCalendarRequestTableReference'; +import { CreateCollectionRequest } from '../models/CreateCollectionRequest'; import { CreateConfigRequest } from '../models/CreateConfigRequest'; import { CreateConnectionConfigurationRequest } from '../models/CreateConnectionConfigurationRequest'; import { CreateConnectionConfigurationRequestPolicyProcessOptions } from '../models/CreateConnectionConfigurationRequestPolicyProcessOptions'; @@ -110,12 +124,14 @@ import { DefaultActionConfig } from '../models/DefaultActionConfig'; import { DefaultActionConfigInput } from '../models/DefaultActionConfigInput'; import { DefaultActionConfigInputCreate } from '../models/DefaultActionConfigInputCreate'; import { DefaultActionConfigSearchInput } from '../models/DefaultActionConfigSearchInput'; +import { DeleteCollectionRequest } from '../models/DeleteCollectionRequest'; import { DeleteConfigRequest } from '../models/DeleteConfigRequest'; import { DeleteConnectionConfigurationRequest } from '../models/DeleteConnectionConfigurationRequest'; import { DeleteConnectionRequest } from '../models/DeleteConnectionRequest'; import { DeleteMetadataRequest } from '../models/DeleteMetadataRequest'; import { DeleteMetadataTypeInput } from '../models/DeleteMetadataTypeInput'; import { DeleteOrgEmailCustomizationRequest } from '../models/DeleteOrgEmailCustomizationRequest'; +import { DeleteVariablesRequest } from '../models/DeleteVariablesRequest'; import { DeleteWebhookConfigurationsRequest } from '../models/DeleteWebhookConfigurationsRequest'; import { DeployCommitRequest } from '../models/DeployCommitRequest'; import { DeployResponse } from '../models/DeployResponse'; @@ -193,6 +209,7 @@ import { JWTMetadataObject } from '../models/JWTMetadataObject'; import { JWTParameter } from '../models/JWTParameter'; import { JWTUserOptions } from '../models/JWTUserOptions'; import { JWTUserOptionsFull } from '../models/JWTUserOptionsFull'; +import { JobRecipient } from '../models/JobRecipient'; import { LBContextInput } from '../models/LBContextInput'; import { LiveboardContent } from '../models/LiveboardContent'; import { LiveboardDataResponse } from '../models/LiveboardDataResponse'; @@ -226,6 +243,7 @@ import { OrgPreferenceSearchCriteriaInput } from '../models/OrgPreferenceSearchC import { OrgResponse } from '../models/OrgResponse'; import { OrgType } from '../models/OrgType'; import { ParameterValues } from '../models/ParameterValues'; +import { ParameterizeMetadataFieldsRequest } from '../models/ParameterizeMetadataFieldsRequest'; import { ParameterizeMetadataRequest } from '../models/ParameterizeMetadataRequest'; import { ParametersListItem } from '../models/ParametersListItem'; import { ParametersListItemInput } from '../models/ParametersListItemInput'; @@ -243,6 +261,7 @@ import { PrincipalsListItem } from '../models/PrincipalsListItem'; import { PrincipalsListItemInput } from '../models/PrincipalsListItemInput'; import { PublishMetadataListItem } from '../models/PublishMetadataListItem'; import { PublishMetadataRequest } from '../models/PublishMetadataRequest'; +import { PutVariableValuesRequest } from '../models/PutVariableValuesRequest'; import { QueryGetDecomposedQueryRequest } from '../models/QueryGetDecomposedQueryRequest'; import { QueryGetDecomposedQueryRequestNlsRequest } from '../models/QueryGetDecomposedQueryRequestNlsRequest'; import { RecipientDetails } from '../models/RecipientDetails'; @@ -289,6 +308,10 @@ import { ScriptSrcUrls } from '../models/ScriptSrcUrls'; import { ScriptSrcUrlsInput } from '../models/ScriptSrcUrlsInput'; import { SearchCalendarsRequest } from '../models/SearchCalendarsRequest'; import { SearchCalendarsRequestSortOptions } from '../models/SearchCalendarsRequestSortOptions'; +import { SearchChannelHistoryRequest } from '../models/SearchChannelHistoryRequest'; +import { SearchChannelHistoryResponse } from '../models/SearchChannelHistoryResponse'; +import { SearchCollectionsRequest } from '../models/SearchCollectionsRequest'; +import { SearchCollectionsRequestSortOptions } from '../models/SearchCollectionsRequestSortOptions'; import { SearchCommitsRequest } from '../models/SearchCommitsRequest'; import { SearchCommunicationChannelPreferencesRequest } from '../models/SearchCommunicationChannelPreferencesRequest'; import { SearchConfigRequest } from '../models/SearchConfigRequest'; @@ -314,7 +337,6 @@ import { SearchTagsRequest } from '../models/SearchTagsRequest'; import { SearchUserGroupsRequest } from '../models/SearchUserGroupsRequest'; import { SearchUserGroupsRequestSortOptions } from '../models/SearchUserGroupsRequestSortOptions'; import { SearchUsersRequest } from '../models/SearchUsersRequest'; -import { SearchUsersRequestSortOptions } from '../models/SearchUsersRequestSortOptions'; import { SearchVariablesRequest } from '../models/SearchVariablesRequest'; import { SearchWebhookConfigurationsRequest } from '../models/SearchWebhookConfigurationsRequest'; import { SearchWebhookConfigurationsRequestSortOptions } from '../models/SearchWebhookConfigurationsRequestSortOptions'; @@ -361,6 +383,7 @@ import { UnparameterizeMetadataRequest } from '../models/UnparameterizeMetadataR import { UnpublishMetadataRequest } from '../models/UnpublishMetadataRequest'; import { UpdateCalendarRequest } from '../models/UpdateCalendarRequest'; import { UpdateCalendarRequestTableReference } from '../models/UpdateCalendarRequestTableReference'; +import { UpdateCollectionRequest } from '../models/UpdateCollectionRequest'; import { UpdateColumnSecurityRulesRequest } from '../models/UpdateColumnSecurityRulesRequest'; import { UpdateConfigRequest } from '../models/UpdateConfigRequest'; import { UpdateConnectionConfigurationRequest } from '../models/UpdateConnectionConfigurationRequest'; @@ -394,11 +417,13 @@ import { UserInfo } from '../models/UserInfo'; import { UserObject } from '../models/UserObject'; import { UserParameterOptions } from '../models/UserParameterOptions'; import { UserPrincipal } from '../models/UserPrincipal'; +import { ValidateCommunicationChannelRequest } from '../models/ValidateCommunicationChannelRequest'; import { ValidateMergeRequest } from '../models/ValidateMergeRequest'; import { ValidateTokenRequest } from '../models/ValidateTokenRequest'; import { ValueScopeInput } from '../models/ValueScopeInput'; import { Variable } from '../models/Variable'; import { VariableDetailInput } from '../models/VariableDetailInput'; +import { VariablePutAssignmentInput } from '../models/VariablePutAssignmentInput'; import { VariableUpdateAssignmentInput } from '../models/VariableUpdateAssignmentInput'; import { VariableUpdateScopeInput } from '../models/VariableUpdateScopeInput'; import { VariableValue } from '../models/VariableValue'; @@ -413,6 +438,8 @@ import { WebhookAuthentication } from '../models/WebhookAuthentication'; import { WebhookAuthenticationInput } from '../models/WebhookAuthenticationInput'; import { WebhookDeleteFailure } from '../models/WebhookDeleteFailure'; import { WebhookDeleteResponse } from '../models/WebhookDeleteResponse'; +import { WebhookKeyValuePair } from '../models/WebhookKeyValuePair'; +import { WebhookKeyValuePairInput } from '../models/WebhookKeyValuePairInput'; import { WebhookOrg } from '../models/WebhookOrg'; import { WebhookPagination } from '../models/WebhookPagination'; import { WebhookResponse } from '../models/WebhookResponse'; @@ -544,7 +571,7 @@ export class ObjectAIApi { } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param param the request object */ public createAgentConversation(param: AIApiCreateAgentConversationRequest, options?: Configuration): Promise { @@ -552,7 +579,7 @@ export class ObjectAIApi { } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param param the request object */ public createConversation(param: AIApiCreateConversationRequest, options?: Configuration): Promise { @@ -560,7 +587,7 @@ export class ObjectAIApi { } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param param the request object */ public getDataSourceSuggestions(param: AIApiGetDataSourceSuggestionsRequest, options?: Configuration): Promise { @@ -568,7 +595,7 @@ export class ObjectAIApi { } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param param the request object */ public getNLInstructions(param: AIApiGetNLInstructionsRequest, options?: Configuration): Promise { @@ -576,7 +603,7 @@ export class ObjectAIApi { } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param param the request object */ public getRelevantQuestions(param: AIApiGetRelevantQuestionsRequest, options?: Configuration): Promise { @@ -584,7 +611,7 @@ export class ObjectAIApi { } /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param param the request object */ public queryGetDecomposedQuery(param: AIApiQueryGetDecomposedQueryRequest, options?: Configuration): Promise { @@ -592,7 +619,7 @@ export class ObjectAIApi { } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param param the request object */ public sendAgentMessage(param: AIApiSendAgentMessageRequest, options?: Configuration): Promise { @@ -600,7 +627,7 @@ export class ObjectAIApi { } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param param the request object */ public sendAgentMessageStreaming(param: AIApiSendAgentMessageStreamingRequest, options?: Configuration): Promise { @@ -608,7 +635,7 @@ export class ObjectAIApi { } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param param the request object */ public sendMessage(param: AIApiSendMessageRequest, options?: Configuration): Promise> { @@ -616,7 +643,7 @@ export class ObjectAIApi { } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param param the request object */ public setNLInstructions(param: AIApiSetNLInstructionsRequest, options?: Configuration): Promise { @@ -624,7 +651,7 @@ export class ObjectAIApi { } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param param the request object */ public singleAnswer(param: AIApiSingleAnswerRequest, options?: Configuration): Promise { @@ -780,6 +807,92 @@ export class ObjectAuthenticationApi { } +import { ObservableCollectionsApi } from "./ObservableAPI"; +import { CollectionsApiRequestFactory, CollectionsApiResponseProcessor} from "../apis/CollectionsApi"; + +export interface CollectionsApiCreateCollectionRequest { + /** + * + * @type CreateCollectionRequest + * @memberof CollectionsApicreateCollection + */ + createCollectionRequest: CreateCollectionRequest +} + +export interface CollectionsApiDeleteCollectionRequest { + /** + * + * @type DeleteCollectionRequest + * @memberof CollectionsApideleteCollection + */ + deleteCollectionRequest: DeleteCollectionRequest +} + +export interface CollectionsApiSearchCollectionsRequest { + /** + * + * @type SearchCollectionsRequest + * @memberof CollectionsApisearchCollections + */ + searchCollectionsRequest: SearchCollectionsRequest +} + +export interface CollectionsApiUpdateCollectionRequest { + /** + * Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @type string + * @memberof CollectionsApiupdateCollection + */ + collectionIdentifier: string + /** + * + * @type UpdateCollectionRequest + * @memberof CollectionsApiupdateCollection + */ + updateCollectionRequest: UpdateCollectionRequest +} + +export class ObjectCollectionsApi { + private api: ObservableCollectionsApi + + public constructor(configuration: Configuration, requestFactory?: CollectionsApiRequestFactory, responseProcessor?: CollectionsApiResponseProcessor) { + this.api = new ObservableCollectionsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param param the request object + */ + public createCollection(param: CollectionsApiCreateCollectionRequest, options?: Configuration): Promise { + return this.api.createCollection(param.createCollectionRequest, options).toPromise(); + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param param the request object + */ + public deleteCollection(param: CollectionsApiDeleteCollectionRequest, options?: Configuration): Promise { + return this.api.deleteCollection(param.deleteCollectionRequest, options).toPromise(); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param param the request object + */ + public searchCollections(param: CollectionsApiSearchCollectionsRequest, options?: Configuration): Promise { + return this.api.searchCollections(param.searchCollectionsRequest, options).toPromise(); + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param param the request object + */ + public updateCollection(param: CollectionsApiUpdateCollectionRequest, options?: Configuration): Promise { + return this.api.updateCollection(param.collectionIdentifier, param.updateCollectionRequest, options).toPromise(); + } + +} + import { ObservableConnectionConfigurationsApi } from "./ObservableAPI"; import { ConnectionConfigurationsApiRequestFactory, ConnectionConfigurationsApiResponseProcessor} from "../apis/ConnectionConfigurationsApi"; @@ -970,7 +1083,7 @@ export class ObjectConnectionsApi { } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param param the request object */ public createConnection(param: ConnectionsApiCreateConnectionRequest, options?: Configuration): Promise { @@ -1758,6 +1871,35 @@ export class ObjectGroupsApi { } +import { ObservableJobsApi } from "./ObservableAPI"; +import { JobsApiRequestFactory, JobsApiResponseProcessor} from "../apis/JobsApi"; + +export interface JobsApiSearchChannelHistoryRequest { + /** + * + * @type SearchChannelHistoryRequest + * @memberof JobsApisearchChannelHistory + */ + searchChannelHistoryRequest: SearchChannelHistoryRequest +} + +export class ObjectJobsApi { + private api: ObservableJobsApi + + public constructor(configuration: Configuration, requestFactory?: JobsApiRequestFactory, responseProcessor?: JobsApiResponseProcessor) { + this.api = new ObservableJobsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param param the request object + */ + public searchChannelHistory(param: JobsApiSearchChannelHistoryRequest, options?: Configuration): Promise { + return this.api.searchChannelHistory(param.searchChannelHistoryRequest, options).toPromise(); + } + +} + import { ObservableLogApi } from "./ObservableAPI"; import { LogApiRequestFactory, LogApiResponseProcessor} from "../apis/LogApi"; @@ -1889,6 +2031,15 @@ export interface MetadataApiParameterizeMetadataRequest { parameterizeMetadataRequest: ParameterizeMetadataRequest } +export interface MetadataApiParameterizeMetadataFieldsRequest { + /** + * + * @type ParameterizeMetadataFieldsRequest + * @memberof MetadataApiparameterizeMetadataFields + */ + parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest +} + export interface MetadataApiSearchMetadataRequest { /** * @@ -2013,13 +2164,21 @@ export class ObjectMetadataApi { } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param param the request object */ public parameterizeMetadata(param: MetadataApiParameterizeMetadataRequest, options?: Configuration): Promise { return this.api.parameterizeMetadata(param.parameterizeMetadataRequest, options).toPromise(); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param param the request object + */ + public parameterizeMetadataFields(param: MetadataApiParameterizeMetadataFieldsRequest, options?: Configuration): Promise { + return this.api.parameterizeMetadataFields(param.parameterizeMetadataFieldsRequest, options).toPromise(); + } + /** * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. * @param param the request object @@ -2597,6 +2756,15 @@ export interface SystemApiUpdateSystemConfigRequest { updateSystemConfigRequest: UpdateSystemConfigRequest } +export interface SystemApiValidateCommunicationChannelRequest { + /** + * + * @type ValidateCommunicationChannelRequest + * @memberof SystemApivalidateCommunicationChannel + */ + validateCommunicationChannelRequest: ValidateCommunicationChannelRequest +} + export class ObjectSystemApi { private api: ObservableSystemApi @@ -2668,6 +2836,14 @@ export class ObjectSystemApi { return this.api.updateSystemConfig(param.updateSystemConfigRequest, options).toPromise(); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public validateCommunicationChannel(param: SystemApiValidateCommunicationChannelRequest, options?: Configuration): Promise { + return this.api.validateCommunicationChannel(param.validateCommunicationChannelRequest, options).toPromise(); + } + } import { ObservableTagsApi } from "./ObservableAPI"; @@ -2901,6 +3077,15 @@ export interface ThoughtSpotRestApiCreateCalendarRequest { createCalendarRequest: CreateCalendarRequest } +export interface ThoughtSpotRestApiCreateCollectionRequest { + /** + * + * @type CreateCollectionRequest + * @memberof ThoughtSpotRestApicreateCollection + */ + createCollectionRequest: CreateCollectionRequest +} + export interface ThoughtSpotRestApiCreateConfigRequest { /** * @@ -3159,6 +3344,15 @@ export interface ThoughtSpotRestApiDeleteCalendarRequest { calendarIdentifier: string } +export interface ThoughtSpotRestApiDeleteCollectionRequest { + /** + * + * @type DeleteCollectionRequest + * @memberof ThoughtSpotRestApideleteCollection + */ + deleteCollectionRequest: DeleteCollectionRequest +} + export interface ThoughtSpotRestApiDeleteConfigRequest { /** * @@ -3303,6 +3497,15 @@ export interface ThoughtSpotRestApiDeleteVariableRequest { identifier: string } +export interface ThoughtSpotRestApiDeleteVariablesRequest { + /** + * + * @type DeleteVariablesRequest + * @memberof ThoughtSpotRestApideleteVariables + */ + deleteVariablesRequest: DeleteVariablesRequest +} + export interface ThoughtSpotRestApiDeleteWebhookConfigurationsRequest { /** * @@ -3618,6 +3821,15 @@ export interface ThoughtSpotRestApiParameterizeMetadataRequest { parameterizeMetadataRequest: ParameterizeMetadataRequest } +export interface ThoughtSpotRestApiParameterizeMetadataFieldsRequest { + /** + * + * @type ParameterizeMetadataFieldsRequest + * @memberof ThoughtSpotRestApiparameterizeMetadataFields + */ + parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest +} + export interface ThoughtSpotRestApiPublishMetadataRequest { /** * @@ -3627,6 +3839,21 @@ export interface ThoughtSpotRestApiPublishMetadataRequest { publishMetadataRequest: PublishMetadataRequest } +export interface ThoughtSpotRestApiPutVariableValuesRequest { + /** + * Unique ID or name of the variable + * @type string + * @memberof ThoughtSpotRestApiputVariableValues + */ + identifier: string + /** + * + * @type PutVariableValuesRequest + * @memberof ThoughtSpotRestApiputVariableValues + */ + putVariableValuesRequest: PutVariableValuesRequest +} + export interface ThoughtSpotRestApiQueryGetDecomposedQueryRequest { /** * @@ -3693,6 +3920,24 @@ export interface ThoughtSpotRestApiSearchCalendarsRequest { searchCalendarsRequest: SearchCalendarsRequest } +export interface ThoughtSpotRestApiSearchChannelHistoryRequest { + /** + * + * @type SearchChannelHistoryRequest + * @memberof ThoughtSpotRestApisearchChannelHistory + */ + searchChannelHistoryRequest: SearchChannelHistoryRequest +} + +export interface ThoughtSpotRestApiSearchCollectionsRequest { + /** + * + * @type SearchCollectionsRequest + * @memberof ThoughtSpotRestApisearchCollections + */ + searchCollectionsRequest: SearchCollectionsRequest +} + export interface ThoughtSpotRestApiSearchCommitsRequest { /** * @@ -3954,6 +4199,21 @@ export interface ThoughtSpotRestApiUpdateCalendarRequest { updateCalendarRequest: UpdateCalendarRequest } +export interface ThoughtSpotRestApiUpdateCollectionRequest { + /** + * Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @type string + * @memberof ThoughtSpotRestApiupdateCollection + */ + collectionIdentifier: string + /** + * + * @type UpdateCollectionRequest + * @memberof ThoughtSpotRestApiupdateCollection + */ + updateCollectionRequest: UpdateCollectionRequest +} + export interface ThoughtSpotRestApiUpdateColumnSecurityRulesRequest { /** * @@ -4260,6 +4520,15 @@ export interface ThoughtSpotRestApiUpdateWebhookConfigurationRequest { updateWebhookConfigurationRequest: UpdateWebhookConfigurationRequest } +export interface ThoughtSpotRestApiValidateCommunicationChannelRequest { + /** + * + * @type ValidateCommunicationChannelRequest + * @memberof ThoughtSpotRestApivalidateCommunicationChannel + */ + validateCommunicationChannelRequest: ValidateCommunicationChannelRequest +} + export interface ThoughtSpotRestApiValidateEmailCustomizationRequest { } @@ -4369,7 +4638,7 @@ export class ObjectThoughtSpotRestApi { } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param param the request object */ public createAgentConversation(param: ThoughtSpotRestApiCreateAgentConversationRequest, options?: Configuration): Promise { @@ -4384,6 +4653,14 @@ export class ObjectThoughtSpotRestApi { return this.api.createCalendar(param.createCalendarRequest, options).toPromise(); } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param param the request object + */ + public createCollection(param: ThoughtSpotRestApiCreateCollectionRequest, options?: Configuration): Promise { + return this.api.createCollection(param.createCollectionRequest, options).toPromise(); + } + /** * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. * @param param the request object @@ -4393,7 +4670,7 @@ export class ObjectThoughtSpotRestApi { } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param param the request object */ public createConnection(param: ThoughtSpotRestApiCreateConnectionRequest, options?: Configuration): Promise { @@ -4409,7 +4686,7 @@ export class ObjectThoughtSpotRestApi { } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param param the request object */ public createConversation(param: ThoughtSpotRestApiCreateConversationRequest, options?: Configuration): Promise { @@ -4544,6 +4821,14 @@ export class ObjectThoughtSpotRestApi { return this.api.deleteCalendar(param.calendarIdentifier, options).toPromise(); } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param param the request object + */ + public deleteCollection(param: ThoughtSpotRestApiDeleteCollectionRequest, options?: Configuration): Promise { + return this.api.deleteCollection(param.deleteCollectionRequest, options).toPromise(); + } + /** * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param param the request object @@ -4665,13 +4950,21 @@ export class ObjectThoughtSpotRestApi { } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param param the request object */ public deleteVariable(param: ThoughtSpotRestApiDeleteVariableRequest, options?: Configuration): Promise { return this.api.deleteVariable(param.identifier, options).toPromise(); } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param param the request object + */ + public deleteVariables(param: ThoughtSpotRestApiDeleteVariablesRequest, options?: Configuration): Promise { + return this.api.deleteVariables(param.deleteVariablesRequest, options).toPromise(); + } + /** * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. * @param param the request object @@ -4857,7 +5150,7 @@ export class ObjectThoughtSpotRestApi { } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param param the request object */ public getDataSourceSuggestions(param: ThoughtSpotRestApiGetDataSourceSuggestionsRequest, options?: Configuration): Promise { @@ -4873,7 +5166,7 @@ export class ObjectThoughtSpotRestApi { } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param param the request object */ public getNLInstructions(param: ThoughtSpotRestApiGetNLInstructionsRequest, options?: Configuration): Promise { @@ -4889,7 +5182,7 @@ export class ObjectThoughtSpotRestApi { } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param param the request object */ public getRelevantQuestions(param: ThoughtSpotRestApiGetRelevantQuestionsRequest, options?: Configuration): Promise { @@ -4977,13 +5270,21 @@ export class ObjectThoughtSpotRestApi { } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param param the request object */ public parameterizeMetadata(param: ThoughtSpotRestApiParameterizeMetadataRequest, options?: Configuration): Promise { return this.api.parameterizeMetadata(param.parameterizeMetadataRequest, options).toPromise(); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param param the request object + */ + public parameterizeMetadataFields(param: ThoughtSpotRestApiParameterizeMetadataFieldsRequest, options?: Configuration): Promise { + return this.api.parameterizeMetadataFields(param.parameterizeMetadataFieldsRequest, options).toPromise(); + } + /** * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. * @param param the request object @@ -4993,7 +5294,15 @@ export class ObjectThoughtSpotRestApi { } /** - * Version: 10.7.0.cl or later + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param param the request object + */ + public putVariableValues(param: ThoughtSpotRestApiPutVariableValuesRequest, options?: Configuration): Promise { + return this.api.putVariableValues(param.identifier, param.putVariableValuesRequest, options).toPromise(); + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param param the request object */ public queryGetDecomposedQuery(param: ThoughtSpotRestApiQueryGetDecomposedQueryRequest, options?: Configuration): Promise { @@ -5040,6 +5349,22 @@ export class ObjectThoughtSpotRestApi { return this.api.searchCalendars(param.searchCalendarsRequest, options).toPromise(); } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param param the request object + */ + public searchChannelHistory(param: ThoughtSpotRestApiSearchChannelHistoryRequest, options?: Configuration): Promise { + return this.api.searchChannelHistory(param.searchChannelHistoryRequest, options).toPromise(); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param param the request object + */ + public searchCollections(param: ThoughtSpotRestApiSearchCollectionsRequest, options?: Configuration): Promise { + return this.api.searchCollections(param.searchCollectionsRequest, options).toPromise(); + } + /** * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. * @param param the request object @@ -5177,7 +5502,7 @@ export class ObjectThoughtSpotRestApi { } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param param the request object */ public sendAgentMessage(param: ThoughtSpotRestApiSendAgentMessageRequest, options?: Configuration): Promise { @@ -5185,7 +5510,7 @@ export class ObjectThoughtSpotRestApi { } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param param the request object */ public sendAgentMessageStreaming(param: ThoughtSpotRestApiSendAgentMessageStreamingRequest, options?: Configuration): Promise { @@ -5193,7 +5518,7 @@ export class ObjectThoughtSpotRestApi { } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param param the request object */ public sendMessage(param: ThoughtSpotRestApiSendMessageRequest, options?: Configuration): Promise> { @@ -5201,7 +5526,7 @@ export class ObjectThoughtSpotRestApi { } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param param the request object */ public setNLInstructions(param: ThoughtSpotRestApiSetNLInstructionsRequest, options?: Configuration): Promise { @@ -5217,7 +5542,7 @@ export class ObjectThoughtSpotRestApi { } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param param the request object */ public singleAnswer(param: ThoughtSpotRestApiSingleAnswerRequest, options?: Configuration): Promise { @@ -5256,6 +5581,14 @@ export class ObjectThoughtSpotRestApi { return this.api.updateCalendar(param.calendarIdentifier, param.updateCalendarRequest, options).toPromise(); } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param param the request object + */ + public updateCollection(param: ThoughtSpotRestApiUpdateCollectionRequest, options?: Configuration): Promise { + return this.api.updateCollection(param.collectionIdentifier, param.updateCollectionRequest, options).toPromise(); + } + /** * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups * @param param the request object @@ -5401,7 +5734,7 @@ export class ObjectThoughtSpotRestApi { } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param param the request object */ public updateVariableValues(param: ThoughtSpotRestApiUpdateVariableValuesRequest, options?: Configuration): Promise { @@ -5416,6 +5749,14 @@ export class ObjectThoughtSpotRestApi { return this.api.updateWebhookConfiguration(param.webhookIdentifier, param.updateWebhookConfigurationRequest, options).toPromise(); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param param the request object + */ + public validateCommunicationChannel(param: ThoughtSpotRestApiValidateCommunicationChannelRequest, options?: Configuration): Promise { + return this.api.validateCommunicationChannel(param.validateCommunicationChannelRequest, options).toPromise(); + } + /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. * @param param the request object @@ -5651,6 +5992,30 @@ export interface VariableApiDeleteVariableRequest { identifier: string } +export interface VariableApiDeleteVariablesRequest { + /** + * + * @type DeleteVariablesRequest + * @memberof VariableApideleteVariables + */ + deleteVariablesRequest: DeleteVariablesRequest +} + +export interface VariableApiPutVariableValuesRequest { + /** + * Unique ID or name of the variable + * @type string + * @memberof VariableApiputVariableValues + */ + identifier: string + /** + * + * @type PutVariableValuesRequest + * @memberof VariableApiputVariableValues + */ + putVariableValuesRequest: PutVariableValuesRequest +} + export interface VariableApiSearchVariablesRequest { /** * @@ -5700,13 +6065,29 @@ export class ObjectVariableApi { } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param param the request object */ public deleteVariable(param: VariableApiDeleteVariableRequest, options?: Configuration): Promise { return this.api.deleteVariable(param.identifier, options).toPromise(); } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param param the request object + */ + public deleteVariables(param: VariableApiDeleteVariablesRequest, options?: Configuration): Promise { + return this.api.deleteVariables(param.deleteVariablesRequest, options).toPromise(); + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param param the request object + */ + public putVariableValues(param: VariableApiPutVariableValuesRequest, options?: Configuration): Promise { + return this.api.putVariableValues(param.identifier, param.putVariableValuesRequest, options).toPromise(); + } + /** * Search variables Version: 10.14.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier * @param param the request object @@ -5724,7 +6105,7 @@ export class ObjectVariableApi { } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param param the request object */ public updateVariableValues(param: VariableApiUpdateVariableValuesRequest, options?: Configuration): Promise { diff --git a/sdks/typescript/types/ObservableAPI.ts b/sdks/typescript/types/ObservableAPI.ts index 6b5e44e7f..af99cf1cd 100644 --- a/sdks/typescript/types/ObservableAPI.ts +++ b/sdks/typescript/types/ObservableAPI.ts @@ -35,8 +35,20 @@ import { CALLBACKInput } from '../models/CALLBACKInput'; import { CALLBACKInputMandatory } from '../models/CALLBACKInputMandatory'; import { CalendarResponse } from '../models/CalendarResponse'; import { ChangeUserPasswordRequest } from '../models/ChangeUserPasswordRequest'; +import { ChannelHistoryEventInfo } from '../models/ChannelHistoryEventInfo'; +import { ChannelHistoryEventInput } from '../models/ChannelHistoryEventInput'; +import { ChannelHistoryJob } from '../models/ChannelHistoryJob'; +import { ChannelValidationAwsS3Info } from '../models/ChannelValidationAwsS3Info'; +import { ChannelValidationDetail } from '../models/ChannelValidationDetail'; import { ClusterNonEmbedAccess } from '../models/ClusterNonEmbedAccess'; import { ClusterNonEmbedAccessInput } from '../models/ClusterNonEmbedAccessInput'; +import { Collection } from '../models/Collection'; +import { CollectionDeleteResponse } from '../models/CollectionDeleteResponse'; +import { CollectionDeleteTypeIdentifiers } from '../models/CollectionDeleteTypeIdentifiers'; +import { CollectionEntityIdentifier } from '../models/CollectionEntityIdentifier'; +import { CollectionMetadataInput } from '../models/CollectionMetadataInput'; +import { CollectionMetadataItem } from '../models/CollectionMetadataItem'; +import { CollectionSearchResponse } from '../models/CollectionSearchResponse'; import { Column } from '../models/Column'; import { ColumnSecurityRule } from '../models/ColumnSecurityRule'; import { ColumnSecurityRuleColumn } from '../models/ColumnSecurityRuleColumn'; @@ -52,6 +64,7 @@ import { CommitHistoryResponse } from '../models/CommitHistoryResponse'; import { CommitResponse } from '../models/CommitResponse'; import { CommiterType } from '../models/CommiterType'; import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { CommunicationChannelValidateResponse } from '../models/CommunicationChannelValidateResponse'; import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; import { ConfigureSecuritySettingsRequest } from '../models/ConfigureSecuritySettingsRequest'; import { ConfigureSecuritySettingsRequestClusterPreferences } from '../models/ConfigureSecuritySettingsRequestClusterPreferences'; @@ -68,6 +81,7 @@ import { CreateAgentConversationRequestConversationSettings } from '../models/Cr import { CreateAgentConversationRequestMetadataContext } from '../models/CreateAgentConversationRequestMetadataContext'; import { CreateCalendarRequest } from '../models/CreateCalendarRequest'; import { CreateCalendarRequestTableReference } from '../models/CreateCalendarRequestTableReference'; +import { CreateCollectionRequest } from '../models/CreateCollectionRequest'; import { CreateConfigRequest } from '../models/CreateConfigRequest'; import { CreateConnectionConfigurationRequest } from '../models/CreateConnectionConfigurationRequest'; import { CreateConnectionConfigurationRequestPolicyProcessOptions } from '../models/CreateConnectionConfigurationRequestPolicyProcessOptions'; @@ -111,12 +125,14 @@ import { DefaultActionConfig } from '../models/DefaultActionConfig'; import { DefaultActionConfigInput } from '../models/DefaultActionConfigInput'; import { DefaultActionConfigInputCreate } from '../models/DefaultActionConfigInputCreate'; import { DefaultActionConfigSearchInput } from '../models/DefaultActionConfigSearchInput'; +import { DeleteCollectionRequest } from '../models/DeleteCollectionRequest'; import { DeleteConfigRequest } from '../models/DeleteConfigRequest'; import { DeleteConnectionConfigurationRequest } from '../models/DeleteConnectionConfigurationRequest'; import { DeleteConnectionRequest } from '../models/DeleteConnectionRequest'; import { DeleteMetadataRequest } from '../models/DeleteMetadataRequest'; import { DeleteMetadataTypeInput } from '../models/DeleteMetadataTypeInput'; import { DeleteOrgEmailCustomizationRequest } from '../models/DeleteOrgEmailCustomizationRequest'; +import { DeleteVariablesRequest } from '../models/DeleteVariablesRequest'; import { DeleteWebhookConfigurationsRequest } from '../models/DeleteWebhookConfigurationsRequest'; import { DeployCommitRequest } from '../models/DeployCommitRequest'; import { DeployResponse } from '../models/DeployResponse'; @@ -194,6 +210,7 @@ import { JWTMetadataObject } from '../models/JWTMetadataObject'; import { JWTParameter } from '../models/JWTParameter'; import { JWTUserOptions } from '../models/JWTUserOptions'; import { JWTUserOptionsFull } from '../models/JWTUserOptionsFull'; +import { JobRecipient } from '../models/JobRecipient'; import { LBContextInput } from '../models/LBContextInput'; import { LiveboardContent } from '../models/LiveboardContent'; import { LiveboardDataResponse } from '../models/LiveboardDataResponse'; @@ -227,6 +244,7 @@ import { OrgPreferenceSearchCriteriaInput } from '../models/OrgPreferenceSearchC import { OrgResponse } from '../models/OrgResponse'; import { OrgType } from '../models/OrgType'; import { ParameterValues } from '../models/ParameterValues'; +import { ParameterizeMetadataFieldsRequest } from '../models/ParameterizeMetadataFieldsRequest'; import { ParameterizeMetadataRequest } from '../models/ParameterizeMetadataRequest'; import { ParametersListItem } from '../models/ParametersListItem'; import { ParametersListItemInput } from '../models/ParametersListItemInput'; @@ -244,6 +262,7 @@ import { PrincipalsListItem } from '../models/PrincipalsListItem'; import { PrincipalsListItemInput } from '../models/PrincipalsListItemInput'; import { PublishMetadataListItem } from '../models/PublishMetadataListItem'; import { PublishMetadataRequest } from '../models/PublishMetadataRequest'; +import { PutVariableValuesRequest } from '../models/PutVariableValuesRequest'; import { QueryGetDecomposedQueryRequest } from '../models/QueryGetDecomposedQueryRequest'; import { QueryGetDecomposedQueryRequestNlsRequest } from '../models/QueryGetDecomposedQueryRequestNlsRequest'; import { RecipientDetails } from '../models/RecipientDetails'; @@ -290,6 +309,10 @@ import { ScriptSrcUrls } from '../models/ScriptSrcUrls'; import { ScriptSrcUrlsInput } from '../models/ScriptSrcUrlsInput'; import { SearchCalendarsRequest } from '../models/SearchCalendarsRequest'; import { SearchCalendarsRequestSortOptions } from '../models/SearchCalendarsRequestSortOptions'; +import { SearchChannelHistoryRequest } from '../models/SearchChannelHistoryRequest'; +import { SearchChannelHistoryResponse } from '../models/SearchChannelHistoryResponse'; +import { SearchCollectionsRequest } from '../models/SearchCollectionsRequest'; +import { SearchCollectionsRequestSortOptions } from '../models/SearchCollectionsRequestSortOptions'; import { SearchCommitsRequest } from '../models/SearchCommitsRequest'; import { SearchCommunicationChannelPreferencesRequest } from '../models/SearchCommunicationChannelPreferencesRequest'; import { SearchConfigRequest } from '../models/SearchConfigRequest'; @@ -315,7 +338,6 @@ import { SearchTagsRequest } from '../models/SearchTagsRequest'; import { SearchUserGroupsRequest } from '../models/SearchUserGroupsRequest'; import { SearchUserGroupsRequestSortOptions } from '../models/SearchUserGroupsRequestSortOptions'; import { SearchUsersRequest } from '../models/SearchUsersRequest'; -import { SearchUsersRequestSortOptions } from '../models/SearchUsersRequestSortOptions'; import { SearchVariablesRequest } from '../models/SearchVariablesRequest'; import { SearchWebhookConfigurationsRequest } from '../models/SearchWebhookConfigurationsRequest'; import { SearchWebhookConfigurationsRequestSortOptions } from '../models/SearchWebhookConfigurationsRequestSortOptions'; @@ -362,6 +384,7 @@ import { UnparameterizeMetadataRequest } from '../models/UnparameterizeMetadataR import { UnpublishMetadataRequest } from '../models/UnpublishMetadataRequest'; import { UpdateCalendarRequest } from '../models/UpdateCalendarRequest'; import { UpdateCalendarRequestTableReference } from '../models/UpdateCalendarRequestTableReference'; +import { UpdateCollectionRequest } from '../models/UpdateCollectionRequest'; import { UpdateColumnSecurityRulesRequest } from '../models/UpdateColumnSecurityRulesRequest'; import { UpdateConfigRequest } from '../models/UpdateConfigRequest'; import { UpdateConnectionConfigurationRequest } from '../models/UpdateConnectionConfigurationRequest'; @@ -395,11 +418,13 @@ import { UserInfo } from '../models/UserInfo'; import { UserObject } from '../models/UserObject'; import { UserParameterOptions } from '../models/UserParameterOptions'; import { UserPrincipal } from '../models/UserPrincipal'; +import { ValidateCommunicationChannelRequest } from '../models/ValidateCommunicationChannelRequest'; import { ValidateMergeRequest } from '../models/ValidateMergeRequest'; import { ValidateTokenRequest } from '../models/ValidateTokenRequest'; import { ValueScopeInput } from '../models/ValueScopeInput'; import { Variable } from '../models/Variable'; import { VariableDetailInput } from '../models/VariableDetailInput'; +import { VariablePutAssignmentInput } from '../models/VariablePutAssignmentInput'; import { VariableUpdateAssignmentInput } from '../models/VariableUpdateAssignmentInput'; import { VariableUpdateScopeInput } from '../models/VariableUpdateScopeInput'; import { VariableValue } from '../models/VariableValue'; @@ -414,6 +439,8 @@ import { WebhookAuthentication } from '../models/WebhookAuthentication'; import { WebhookAuthenticationInput } from '../models/WebhookAuthenticationInput'; import { WebhookDeleteFailure } from '../models/WebhookDeleteFailure'; import { WebhookDeleteResponse } from '../models/WebhookDeleteResponse'; +import { WebhookKeyValuePair } from '../models/WebhookKeyValuePair'; +import { WebhookKeyValuePairInput } from '../models/WebhookKeyValuePairInput'; import { WebhookOrg } from '../models/WebhookOrg'; import { WebhookPagination } from '../models/WebhookPagination'; import { WebhookResponse } from '../models/WebhookResponse'; @@ -440,7 +467,7 @@ export class ObservableAIApi { } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ public createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Observable { @@ -463,7 +490,7 @@ export class ObservableAIApi { } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ public createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Observable { @@ -486,7 +513,7 @@ export class ObservableAIApi { } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ public getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Observable { @@ -509,7 +536,7 @@ export class ObservableAIApi { } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ public getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Observable { @@ -532,7 +559,7 @@ export class ObservableAIApi { } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ public getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Observable { @@ -555,7 +582,7 @@ export class ObservableAIApi { } /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ public queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Observable { @@ -578,7 +605,7 @@ export class ObservableAIApi { } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -602,7 +629,7 @@ export class ObservableAIApi { } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ public sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Observable { @@ -625,7 +652,7 @@ export class ObservableAIApi { } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -649,7 +676,7 @@ export class ObservableAIApi { } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ public setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Observable { @@ -672,7 +699,7 @@ export class ObservableAIApi { } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ public singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Observable { @@ -918,6 +945,117 @@ export class ObservableAuthenticationApi { } +import { CollectionsApiRequestFactory, CollectionsApiResponseProcessor} from "../apis/CollectionsApi"; +export class ObservableCollectionsApi { + private requestFactory: CollectionsApiRequestFactory; + private responseProcessor: CollectionsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: CollectionsApiRequestFactory, + responseProcessor?: CollectionsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new CollectionsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new CollectionsApiResponseProcessor(); + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + public createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createCollection(createCollectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createCollection(rsp))); + })); + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + public deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteCollection(deleteCollectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollection(rsp))); + })); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + public searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchCollections(searchCollectionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchCollections(rsp))); + })); + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + public updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateCollection(rsp))); + })); + } + +} + import { ConnectionConfigurationsApiRequestFactory, ConnectionConfigurationsApiResponseProcessor} from "../apis/ConnectionConfigurationsApi"; export class ObservableConnectionConfigurationsApi { private requestFactory: ConnectionConfigurationsApiRequestFactory; @@ -1046,7 +1184,7 @@ export class ObservableConnectionsApi { } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ public createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Observable { @@ -2056,6 +2194,47 @@ export class ObservableGroupsApi { } +import { JobsApiRequestFactory, JobsApiResponseProcessor} from "../apis/JobsApi"; +export class ObservableJobsApi { + private requestFactory: JobsApiRequestFactory; + private responseProcessor: JobsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: JobsApiRequestFactory, + responseProcessor?: JobsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = requestFactory || new JobsApiRequestFactory(configuration); + this.responseProcessor = responseProcessor || new JobsApiResponseProcessor(); + } + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + public searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchChannelHistory(searchChannelHistoryRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchChannelHistory(rsp))); + })); + } + +} + import { LogApiRequestFactory, LogApiResponseProcessor} from "../apis/LogApi"; export class ObservableLogApi { private requestFactory: LogApiRequestFactory; @@ -2344,7 +2523,7 @@ export class ObservableMetadataApi { } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ public parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Observable { @@ -2366,6 +2545,29 @@ export class ObservableMetadataApi { })); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + public parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.parameterizeMetadataFields(rsp))); + })); + } + /** * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. * @param searchMetadataRequest @@ -3302,6 +3504,29 @@ export class ObservableSystemApi { })); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + public validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.validateCommunicationChannel(rsp))); + })); + } + } import { TagsApiRequestFactory, TagsApiResponseProcessor} from "../apis/TagsApi"; @@ -3708,7 +3933,7 @@ export class ObservableThoughtSpotRestApi { } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ public createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Observable { @@ -3753,6 +3978,29 @@ export class ObservableThoughtSpotRestApi { })); } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + public createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.createCollection(createCollectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createCollection(rsp))); + })); + } + /** * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. * @param createConfigRequest @@ -3777,7 +4025,7 @@ export class ObservableThoughtSpotRestApi { } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ public createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Observable { @@ -3823,7 +4071,7 @@ export class ObservableThoughtSpotRestApi { } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ public createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Observable { @@ -4226,6 +4474,29 @@ export class ObservableThoughtSpotRestApi { })); } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + public deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteCollection(deleteCollectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteCollection(rsp))); + })); + } + /** * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param deleteConfigRequest @@ -4572,7 +4843,7 @@ export class ObservableThoughtSpotRestApi { } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ public deleteVariable(identifier: string, _options?: Configuration): Observable { @@ -4594,6 +4865,29 @@ export class ObservableThoughtSpotRestApi { })); } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + public deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteVariables(deleteVariablesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteVariables(rsp))); + })); + } + /** * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. * @param deleteWebhookConfigurationsRequest @@ -5122,7 +5416,7 @@ export class ObservableThoughtSpotRestApi { } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ public getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Observable { @@ -5168,7 +5462,7 @@ export class ObservableThoughtSpotRestApi { } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ public getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Observable { @@ -5214,7 +5508,7 @@ export class ObservableThoughtSpotRestApi { } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ public getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Observable { @@ -5463,7 +5757,7 @@ export class ObservableThoughtSpotRestApi { } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ public parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Observable { @@ -5485,6 +5779,29 @@ export class ObservableThoughtSpotRestApi { })); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + public parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.parameterizeMetadataFields(rsp))); + })); + } + /** * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. * @param publishMetadataRequest @@ -5509,7 +5826,31 @@ export class ObservableThoughtSpotRestApi { } /** - * Version: 10.7.0.cl or later + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + public putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.putVariableValues(identifier, putVariableValuesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.putVariableValues(rsp))); + })); + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ public queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Observable { @@ -5648,6 +5989,52 @@ export class ObservableThoughtSpotRestApi { })); } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + public searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchChannelHistory(searchChannelHistoryRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchChannelHistory(rsp))); + })); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + public searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.searchCollections(searchCollectionsRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.searchCollections(rsp))); + })); + } + /** * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. * @param searchCommitsRequest @@ -6040,7 +6427,7 @@ export class ObservableThoughtSpotRestApi { } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -6064,7 +6451,7 @@ export class ObservableThoughtSpotRestApi { } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ public sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Observable { @@ -6087,7 +6474,7 @@ export class ObservableThoughtSpotRestApi { } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -6111,7 +6498,7 @@ export class ObservableThoughtSpotRestApi { } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ public setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Observable { @@ -6157,7 +6544,7 @@ export class ObservableThoughtSpotRestApi { } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ public singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Observable { @@ -6272,6 +6659,30 @@ export class ObservableThoughtSpotRestApi { })); } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + public updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateCollection(rsp))); + })); + } + /** * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups * @param updateColumnSecurityRulesRequest @@ -6707,7 +7118,7 @@ export class ObservableThoughtSpotRestApi { } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ public updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Observable { @@ -6753,6 +7164,29 @@ export class ObservableThoughtSpotRestApi { })); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + public validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.validateCommunicationChannel(rsp))); + })); + } + /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -7112,7 +7546,7 @@ export class ObservableVariableApi { } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ public deleteVariable(identifier: string, _options?: Configuration): Observable { @@ -7134,6 +7568,53 @@ export class ObservableVariableApi { })); } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + public deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.deleteVariables(deleteVariablesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteVariables(rsp))); + })); + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + public putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.putVariableValues(identifier, putVariableValuesRequest, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (let middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (let middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.putVariableValues(rsp))); + })); + } + /** * Search variables Version: 10.14.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier * @param searchVariablesRequest @@ -7182,7 +7663,7 @@ export class ObservableVariableApi { } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ public updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Observable { diff --git a/sdks/typescript/types/PromiseAPI.ts b/sdks/typescript/types/PromiseAPI.ts index de0d9d8ec..2d985ea6c 100644 --- a/sdks/typescript/types/PromiseAPI.ts +++ b/sdks/typescript/types/PromiseAPI.ts @@ -34,8 +34,20 @@ import { CALLBACKInput } from '../models/CALLBACKInput'; import { CALLBACKInputMandatory } from '../models/CALLBACKInputMandatory'; import { CalendarResponse } from '../models/CalendarResponse'; import { ChangeUserPasswordRequest } from '../models/ChangeUserPasswordRequest'; +import { ChannelHistoryEventInfo } from '../models/ChannelHistoryEventInfo'; +import { ChannelHistoryEventInput } from '../models/ChannelHistoryEventInput'; +import { ChannelHistoryJob } from '../models/ChannelHistoryJob'; +import { ChannelValidationAwsS3Info } from '../models/ChannelValidationAwsS3Info'; +import { ChannelValidationDetail } from '../models/ChannelValidationDetail'; import { ClusterNonEmbedAccess } from '../models/ClusterNonEmbedAccess'; import { ClusterNonEmbedAccessInput } from '../models/ClusterNonEmbedAccessInput'; +import { Collection } from '../models/Collection'; +import { CollectionDeleteResponse } from '../models/CollectionDeleteResponse'; +import { CollectionDeleteTypeIdentifiers } from '../models/CollectionDeleteTypeIdentifiers'; +import { CollectionEntityIdentifier } from '../models/CollectionEntityIdentifier'; +import { CollectionMetadataInput } from '../models/CollectionMetadataInput'; +import { CollectionMetadataItem } from '../models/CollectionMetadataItem'; +import { CollectionSearchResponse } from '../models/CollectionSearchResponse'; import { Column } from '../models/Column'; import { ColumnSecurityRule } from '../models/ColumnSecurityRule'; import { ColumnSecurityRuleColumn } from '../models/ColumnSecurityRuleColumn'; @@ -51,6 +63,7 @@ import { CommitHistoryResponse } from '../models/CommitHistoryResponse'; import { CommitResponse } from '../models/CommitResponse'; import { CommiterType } from '../models/CommiterType'; import { CommunicationChannelPreferencesResponse } from '../models/CommunicationChannelPreferencesResponse'; +import { CommunicationChannelValidateResponse } from '../models/CommunicationChannelValidateResponse'; import { ConfigureCommunicationChannelPreferencesRequest } from '../models/ConfigureCommunicationChannelPreferencesRequest'; import { ConfigureSecuritySettingsRequest } from '../models/ConfigureSecuritySettingsRequest'; import { ConfigureSecuritySettingsRequestClusterPreferences } from '../models/ConfigureSecuritySettingsRequestClusterPreferences'; @@ -67,6 +80,7 @@ import { CreateAgentConversationRequestConversationSettings } from '../models/Cr import { CreateAgentConversationRequestMetadataContext } from '../models/CreateAgentConversationRequestMetadataContext'; import { CreateCalendarRequest } from '../models/CreateCalendarRequest'; import { CreateCalendarRequestTableReference } from '../models/CreateCalendarRequestTableReference'; +import { CreateCollectionRequest } from '../models/CreateCollectionRequest'; import { CreateConfigRequest } from '../models/CreateConfigRequest'; import { CreateConnectionConfigurationRequest } from '../models/CreateConnectionConfigurationRequest'; import { CreateConnectionConfigurationRequestPolicyProcessOptions } from '../models/CreateConnectionConfigurationRequestPolicyProcessOptions'; @@ -110,12 +124,14 @@ import { DefaultActionConfig } from '../models/DefaultActionConfig'; import { DefaultActionConfigInput } from '../models/DefaultActionConfigInput'; import { DefaultActionConfigInputCreate } from '../models/DefaultActionConfigInputCreate'; import { DefaultActionConfigSearchInput } from '../models/DefaultActionConfigSearchInput'; +import { DeleteCollectionRequest } from '../models/DeleteCollectionRequest'; import { DeleteConfigRequest } from '../models/DeleteConfigRequest'; import { DeleteConnectionConfigurationRequest } from '../models/DeleteConnectionConfigurationRequest'; import { DeleteConnectionRequest } from '../models/DeleteConnectionRequest'; import { DeleteMetadataRequest } from '../models/DeleteMetadataRequest'; import { DeleteMetadataTypeInput } from '../models/DeleteMetadataTypeInput'; import { DeleteOrgEmailCustomizationRequest } from '../models/DeleteOrgEmailCustomizationRequest'; +import { DeleteVariablesRequest } from '../models/DeleteVariablesRequest'; import { DeleteWebhookConfigurationsRequest } from '../models/DeleteWebhookConfigurationsRequest'; import { DeployCommitRequest } from '../models/DeployCommitRequest'; import { DeployResponse } from '../models/DeployResponse'; @@ -193,6 +209,7 @@ import { JWTMetadataObject } from '../models/JWTMetadataObject'; import { JWTParameter } from '../models/JWTParameter'; import { JWTUserOptions } from '../models/JWTUserOptions'; import { JWTUserOptionsFull } from '../models/JWTUserOptionsFull'; +import { JobRecipient } from '../models/JobRecipient'; import { LBContextInput } from '../models/LBContextInput'; import { LiveboardContent } from '../models/LiveboardContent'; import { LiveboardDataResponse } from '../models/LiveboardDataResponse'; @@ -226,6 +243,7 @@ import { OrgPreferenceSearchCriteriaInput } from '../models/OrgPreferenceSearchC import { OrgResponse } from '../models/OrgResponse'; import { OrgType } from '../models/OrgType'; import { ParameterValues } from '../models/ParameterValues'; +import { ParameterizeMetadataFieldsRequest } from '../models/ParameterizeMetadataFieldsRequest'; import { ParameterizeMetadataRequest } from '../models/ParameterizeMetadataRequest'; import { ParametersListItem } from '../models/ParametersListItem'; import { ParametersListItemInput } from '../models/ParametersListItemInput'; @@ -243,6 +261,7 @@ import { PrincipalsListItem } from '../models/PrincipalsListItem'; import { PrincipalsListItemInput } from '../models/PrincipalsListItemInput'; import { PublishMetadataListItem } from '../models/PublishMetadataListItem'; import { PublishMetadataRequest } from '../models/PublishMetadataRequest'; +import { PutVariableValuesRequest } from '../models/PutVariableValuesRequest'; import { QueryGetDecomposedQueryRequest } from '../models/QueryGetDecomposedQueryRequest'; import { QueryGetDecomposedQueryRequestNlsRequest } from '../models/QueryGetDecomposedQueryRequestNlsRequest'; import { RecipientDetails } from '../models/RecipientDetails'; @@ -289,6 +308,10 @@ import { ScriptSrcUrls } from '../models/ScriptSrcUrls'; import { ScriptSrcUrlsInput } from '../models/ScriptSrcUrlsInput'; import { SearchCalendarsRequest } from '../models/SearchCalendarsRequest'; import { SearchCalendarsRequestSortOptions } from '../models/SearchCalendarsRequestSortOptions'; +import { SearchChannelHistoryRequest } from '../models/SearchChannelHistoryRequest'; +import { SearchChannelHistoryResponse } from '../models/SearchChannelHistoryResponse'; +import { SearchCollectionsRequest } from '../models/SearchCollectionsRequest'; +import { SearchCollectionsRequestSortOptions } from '../models/SearchCollectionsRequestSortOptions'; import { SearchCommitsRequest } from '../models/SearchCommitsRequest'; import { SearchCommunicationChannelPreferencesRequest } from '../models/SearchCommunicationChannelPreferencesRequest'; import { SearchConfigRequest } from '../models/SearchConfigRequest'; @@ -314,7 +337,6 @@ import { SearchTagsRequest } from '../models/SearchTagsRequest'; import { SearchUserGroupsRequest } from '../models/SearchUserGroupsRequest'; import { SearchUserGroupsRequestSortOptions } from '../models/SearchUserGroupsRequestSortOptions'; import { SearchUsersRequest } from '../models/SearchUsersRequest'; -import { SearchUsersRequestSortOptions } from '../models/SearchUsersRequestSortOptions'; import { SearchVariablesRequest } from '../models/SearchVariablesRequest'; import { SearchWebhookConfigurationsRequest } from '../models/SearchWebhookConfigurationsRequest'; import { SearchWebhookConfigurationsRequestSortOptions } from '../models/SearchWebhookConfigurationsRequestSortOptions'; @@ -361,6 +383,7 @@ import { UnparameterizeMetadataRequest } from '../models/UnparameterizeMetadataR import { UnpublishMetadataRequest } from '../models/UnpublishMetadataRequest'; import { UpdateCalendarRequest } from '../models/UpdateCalendarRequest'; import { UpdateCalendarRequestTableReference } from '../models/UpdateCalendarRequestTableReference'; +import { UpdateCollectionRequest } from '../models/UpdateCollectionRequest'; import { UpdateColumnSecurityRulesRequest } from '../models/UpdateColumnSecurityRulesRequest'; import { UpdateConfigRequest } from '../models/UpdateConfigRequest'; import { UpdateConnectionConfigurationRequest } from '../models/UpdateConnectionConfigurationRequest'; @@ -394,11 +417,13 @@ import { UserInfo } from '../models/UserInfo'; import { UserObject } from '../models/UserObject'; import { UserParameterOptions } from '../models/UserParameterOptions'; import { UserPrincipal } from '../models/UserPrincipal'; +import { ValidateCommunicationChannelRequest } from '../models/ValidateCommunicationChannelRequest'; import { ValidateMergeRequest } from '../models/ValidateMergeRequest'; import { ValidateTokenRequest } from '../models/ValidateTokenRequest'; import { ValueScopeInput } from '../models/ValueScopeInput'; import { Variable } from '../models/Variable'; import { VariableDetailInput } from '../models/VariableDetailInput'; +import { VariablePutAssignmentInput } from '../models/VariablePutAssignmentInput'; import { VariableUpdateAssignmentInput } from '../models/VariableUpdateAssignmentInput'; import { VariableUpdateScopeInput } from '../models/VariableUpdateScopeInput'; import { VariableValue } from '../models/VariableValue'; @@ -413,6 +438,8 @@ import { WebhookAuthentication } from '../models/WebhookAuthentication'; import { WebhookAuthenticationInput } from '../models/WebhookAuthenticationInput'; import { WebhookDeleteFailure } from '../models/WebhookDeleteFailure'; import { WebhookDeleteResponse } from '../models/WebhookDeleteResponse'; +import { WebhookKeyValuePair } from '../models/WebhookKeyValuePair'; +import { WebhookKeyValuePairInput } from '../models/WebhookKeyValuePairInput'; import { WebhookOrg } from '../models/WebhookOrg'; import { WebhookPagination } from '../models/WebhookPagination'; import { WebhookResponse } from '../models/WebhookResponse'; @@ -436,7 +463,7 @@ export class PromiseAIApi { } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ public createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise { @@ -445,7 +472,7 @@ export class PromiseAIApi { } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ public createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise { @@ -454,7 +481,7 @@ export class PromiseAIApi { } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ public getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise { @@ -463,7 +490,7 @@ export class PromiseAIApi { } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ public getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise { @@ -472,7 +499,7 @@ export class PromiseAIApi { } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ public getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise { @@ -481,7 +508,7 @@ export class PromiseAIApi { } /** - * Version: 10.7.0.cl or later + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ public queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise { @@ -490,7 +517,7 @@ export class PromiseAIApi { } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -500,7 +527,7 @@ export class PromiseAIApi { } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ public sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise { @@ -509,7 +536,7 @@ export class PromiseAIApi { } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -519,7 +546,7 @@ export class PromiseAIApi { } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ public setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise { @@ -528,7 +555,7 @@ export class PromiseAIApi { } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ public singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise { @@ -638,6 +665,62 @@ export class PromiseAuthenticationApi { +import { ObservableCollectionsApi } from './ObservableAPI'; + +import { CollectionsApiRequestFactory, CollectionsApiResponseProcessor} from "../apis/CollectionsApi"; +export class PromiseCollectionsApi { + private api: ObservableCollectionsApi + + public constructor( + configuration: Configuration, + requestFactory?: CollectionsApiRequestFactory, + responseProcessor?: CollectionsApiResponseProcessor + ) { + this.api = new ObservableCollectionsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + public createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise { + const result = this.api.createCollection(createCollectionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + public deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise { + const result = this.api.deleteCollection(deleteCollectionRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + public searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise { + const result = this.api.searchCollections(searchCollectionsRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + public updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise { + const result = this.api.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + return result.toPromise(); + } + + +} + + + import { ObservableConnectionConfigurationsApi } from './ObservableAPI'; import { ConnectionConfigurationsApiRequestFactory, ConnectionConfigurationsApiResponseProcessor} from "../apis/ConnectionConfigurationsApi"; @@ -709,7 +792,7 @@ export class PromiseConnectionsApi { } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ public createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise { @@ -1196,6 +1279,34 @@ export class PromiseGroupsApi { +import { ObservableJobsApi } from './ObservableAPI'; + +import { JobsApiRequestFactory, JobsApiResponseProcessor} from "../apis/JobsApi"; +export class PromiseJobsApi { + private api: ObservableJobsApi + + public constructor( + configuration: Configuration, + requestFactory?: JobsApiRequestFactory, + responseProcessor?: JobsApiResponseProcessor + ) { + this.api = new ObservableJobsApi(configuration, requestFactory, responseProcessor); + } + + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + public searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise { + const result = this.api.searchChannelHistory(searchChannelHistoryRequest, _options); + return result.toPromise(); + } + + +} + + + import { ObservableLogApi } from './ObservableAPI'; import { LogApiRequestFactory, LogApiResponseProcessor} from "../apis/LogApi"; @@ -1329,7 +1440,7 @@ export class PromiseMetadataApi { } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ public parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise { @@ -1337,6 +1448,15 @@ export class PromiseMetadataApi { return result.toPromise(); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + public parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise { + const result = this.api.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + return result.toPromise(); + } + /** * Version: 9.0.0.cl or later Gets a list of metadata objects available on the ThoughtSpot system. This API endpoint is available to all users who have view access to the object. Users with `ADMINISTRATION` (**Can administer ThoughtSpot**) privileges can view data for all metadata objects, including users and groups. #### Usage guidelines - To get all metadata objects, send the API request without any attributes. - To get metadata objects of a specific type, set the `type` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE`. - To filter metadata objects within type `LOGICAL_TABLE`, set the `subtypes` attribute. For example, to fetch a Worksheet, set the type as `LOGICAL_TABLE` & subtypes as `[WORKSHEET]`. - To get a specific metadata object, specify the GUID. - To customize your search and filter the API response, you can use several parameters. You can search for objects created or modified by specific users, by tags applied to the objects, or by using the include parameters like `include_auto_created_objects`, `include_dependent_objects`, `include_headers`, `include_incomplete_objects`, and so on. You can also define sorting options to sort the data retrieved in the API response. - To get discoverable objects when linientmodel is enabled you can use `include_discoverable_objects` as true else false. Default value is true. - For liveboard metadata type, to get the newer format, set the `liveboard_response_format` as V2. Default value is V1. - To retrieve only objects that are published, set the `include_only_published_objects` as true. Default value is false. **NOTE**: The following parameters support pagination of metadata records: - `tag_identifiers` - `type` - `subtypes` - `created_by_user_identifiers` - `modified_by_user_identifiers` - `owned_by_user_identifiers` - `exclude_objects` - `include_auto_created_objects` - `favorite_object_options` - `include_only_published_objects` If you are using other parameters to search metadata, set `record_size` to `-1` and `record_offset` to `0`. * @param searchMetadataRequest @@ -1775,6 +1895,15 @@ export class PromiseSystemApi { return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + public validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise { + const result = this.api.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + return result.toPromise(); + } + } @@ -1959,7 +2088,7 @@ export class PromiseThoughtSpotRestApi { } /** - * Version: 10.13.0.cl or later + * Version: 26.2.0.cl or later Creates a new Spotter agent conversation based on the provided context and settings. The endpoint was in Beta from 26.2.0.cl through 26.4.0.cl. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include the `metadata_context` parameter to define the conversation context. The context type can be one of: - `DATA_SOURCE` *(available from 26.5.0.cl)*: targets a specific data source. Provide `data_source_identifier` in `data_source_context` for a single data source, or `data_source_identifiers` for multi-data-source context. The deprecated `guid` field is accepted for backwards compatibility. - `AUTO_MODE` *(available from 26.5.0.cl)*: automatically discovers and selects the most relevant datasets for the user\'s queries. > **Note for callers on versions 26.2.0.cl – 26.4.0.cl (Beta):** use the lowercase `data_source` enum value with the `guid` field instead of the above. Example: `{ \"type\": \"data_source\", \"data_source_context\": { \"guid\": \"\" } }`. The `conversation_settings` parameter controls which Spotter capabilities are enabled for the conversation: - `enable_contextual_change_analysis` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_natural_language_answer_generation` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_reasoning` (default: `true`, **deprecated from 26.2.0.cl**) — always enabled in Spotter 3; setting this to `false` has no effect on versions >= 26.2.0.cl - `enable_save_chat` (default: `false`, *available from 26.5.0.cl*) — enables saving the conversation for later retrieval via conversation history If the request is successful, the response includes a unique `conversation_identifier` that must be passed to `sendAgentConversationMessage` or `sendAgentConversationMessageStreaming` to send messages within this conversation. The response also includes `conversation_id` with the same value for backwards compatibility; use `conversation_identifier` for new integrations. #### Example request ```json { \"metadata_context\": { \"type\": \"DATA_SOURCE\", \"data_source_context\": { \"data_source_identifier\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\" } }, \"conversation_settings\": {} } ``` #### Error responses | Code | Description | | ---- | --------------------------------------------------------------------------------------------------------------------------------------- | | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > > - This endpoint was in Beta from 26.2.0.cl through 26.4.0.cl and is Generally Available from version 26.5.0.cl. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createAgentConversationRequest */ public createAgentConversation(createAgentConversationRequest: CreateAgentConversationRequest, _options?: Configuration): Promise { @@ -1976,6 +2105,15 @@ export class PromiseThoughtSpotRestApi { return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Creates a new collection in ThoughtSpot. Collections allow you to organize and group related metadata objects such as Liveboards, Answers, worksheets, and other data objects. You can also create nested collections (sub-collections) to build a hierarchical structure. #### Supported operations The API endpoint lets you perform the following operations: * Create a new collection * Add metadata objects (Liveboards, Answers, Logical Tables) to the collection * Create nested collections by adding sub-collections + * @param createCollectionRequest + */ + public createCollection(createCollectionRequest: CreateCollectionRequest, _options?: Configuration): Promise { + const result = this.api.createCollection(createCollectionRequest, _options); + return result.toPromise(); + } + /** * Version: 9.2.0.cl or later Allows you to connect a ThoughtSpot instance to a Git repository. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. You can use this API endpoint to connect your ThoughtSpot development and production environments to the development and production branches of a Git repository. Before using this endpoint to connect your ThoughtSpot instance to a Git repository, check the following prerequisites: * You have a Git repository. If you are using GitHub, make sure you have a valid account and an access token to connect ThoughtSpot to GitHub. For information about generating a token, see [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). * Your access token has `repo` scope that grants full access to public and private repositories. * Your Git repository has a branch that can be configured as a default branch in ThoughtSpot. For more information, see [Git integration documentation](https://developers.thoughtspot.com/docs/?pageid=git-integration). **Note**: ThoughtSpot supports only GitHub / itHub Enterprise for CI/CD. * @param createConfigRequest @@ -1986,7 +2124,7 @@ export class PromiseThoughtSpotRestApi { } /** - * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. #### Create a connection with tables To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. + * Version: 9.2.0.cl or later Creates a connection to a data warehouse for live query services. Requires `DATAMANAGEMENT` (**Can manage data**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) privilege is required. #### Create a connection without tables To create a connection without tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes in `data_warehouse_config`. The following example shows the configuration attributes for a SnowFlake connection: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ ] } ``` 2. Set `validate` to `false`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. #### Create a connection with tables If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `CAN_CREATE_OR_EDIT_CONNECTIONS` (**Can create/edit Connections**) and `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege is required. To create a connection with tables: 1. Pass these parameters in your API request. * Name of the connection. * Type of the data warehouse to connect to. * A JSON map of configuration attributes, database details, and table properties in `data_warehouse_config` as shown in the following example: ``` { \"configuration\":{ \"accountName\":\"thoughtspot_partner\", \"user\":\"tsadmin\", \"password\":\"TestConn123\", \"role\":\"sysadmin\", \"warehouse\":\"MEDIUM_WH\" }, \"authenticationType\": \"SERVICE_ACCOUNT\", \"externalDatabases\":[ { \"name\":\"AllDatatypes\", \"isAutoCreated\":false, \"schemas\":[ { \"name\":\"alldatatypes\", \"tables\":[ { \"name\":\"allDatatypes\", \"type\":\"TABLE\", \"description\":\"\", \"selected\":true, \"linked\":true, \"columns\":[ { \"name\":\"CNUMBER\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" }, { \"name\":\"CDECIMAL\", \"type\":\"INT64\", \"canImport\":true, \"selected\":true, \"isLinkedActive\":true, \"isImported\":false, \"tableName\":\"allDatatypes\", \"schemaName\":\"alldatatypes\", \"dbName\":\"AllDatatypes\" } ] } ] } ] } ] } ``` 2. Set `validate` to `true`. **NOTE:** If the `authentication_type` is anything other than SERVICE_ACCOUNT, you must explicitly provide the authenticationType property in the payload. If you do not specify authenticationType, the API will default to SERVICE_ACCOUNT as the authentication type. * @param createConnectionRequest */ public createConnection(createConnectionRequest: CreateConnectionRequest, _options?: Configuration): Promise { @@ -2004,7 +2142,7 @@ export class PromiseThoughtSpotRestApi { } /** - * Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Creates a new conversation session tied to a specific data model for AI-driven natural language querying. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `metadata_identifier`: the unique ID of the data source that provides context for the conversation Optionally, you can provide: - `tokens`: a token string to set initial context for the conversation (e.g., `\"[sales],[item type],[state]\"`) If the request is successful, ThoughtSpot returns a unique `conversation_identifier` that must be passed to `sendMessage` to continue the conversation. #### Error responses | Code | Description | |------|-------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param createConversationRequest */ public createConversation(createConversationRequest: CreateConversationRequest, _options?: Configuration): Promise { @@ -2169,6 +2307,15 @@ export class PromiseThoughtSpotRestApi { return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Deletes one or more collections from ThoughtSpot. #### Delete options * **delete_children**: When set to `true`, deletes the child objects (metadata items) within the collection that the user has access to. Objects that the user does not have permission to delete will be skipped. * **dry_run**: When set to `true`, performs a preview of the deletion operation without actually deleting anything. The response shows what would be deleted, allowing you to review before committing the deletion. #### Response The response includes: * **metadata_deleted**: List of metadata objects that were successfully deleted * **metadata_skipped**: List of metadata objects that were skipped due to lack of permissions or other constraints + * @param deleteCollectionRequest + */ + public deleteCollection(deleteCollectionRequest: DeleteCollectionRequest, _options?: Configuration): Promise { + const result = this.api.deleteCollection(deleteCollectionRequest, _options); + return result.toPromise(); + } + /** * Version: 9.2.0.cl or later Deletes Git repository configuration from your ThoughtSpot instance. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_SETUP_VERSION_CONTROL` (**Can set up version control**) privilege. * @param deleteConfigRequest @@ -2305,7 +2452,7 @@ export class PromiseThoughtSpotRestApi { } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ public deleteVariable(identifier: string, _options?: Configuration): Promise { @@ -2313,6 +2460,15 @@ export class PromiseThoughtSpotRestApi { return result.toPromise(); } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + public deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise { + const result = this.api.deleteVariables(deleteVariablesRequest, _options); + return result.toPromise(); + } + /** * Version: 10.14.0.cl or later Deletes one or more webhook configurations by their unique id or name. Returns status of each deletion operation, including successfully deleted webhooks and any failures with error details. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. * @param deleteWebhookConfigurationsRequest @@ -2519,7 +2675,7 @@ export class PromiseThoughtSpotRestApi { } /** - * Version: 10.15.0.cl or later Provides relevant data source recommendations for a user-submitted natural language query. To use this API, the user must have at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include a `query` string via the request body. The returned results include metadata such as: - `confidence`: a float indicating the model\'s confidence in the relevance of each recommendation - `details`: includes `data_source_identifier`, `data_source_name`, and `description` of each recommended data source - `reasoning`: rationale provided by the LLM to explain why each data source was recommended If the API request is successful, ThoughtSpot returns a ranked list of data sources, each annotated with relevant reasoning. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later Suggests the most relevant data sources for a given natural language query, ranked by confidence with LLM-generated reasoning. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the underlying metadata entities referenced in the response. #### Usage guidelines The request must include: - `query`: the natural language question to find relevant data sources for If the request is successful, the API returns a ranked list of suggested data sources, each containing: - `confidence`: a float score indicating the model\'s confidence in the relevance of the suggestion - `details`: metadata about the data source - `data_source_identifier`: the unique ID of the data source - `data_source_name`: the display name of the data source - `description`: a description of the data source - `reasoning`: LLM-generated rationale explaining why the data source was recommended #### Error responses | Code | Description | |------|--------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the underlying metadata entities. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before it is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. * @param getDataSourceSuggestionsRequest */ public getDataSourceSuggestions(getDataSourceSuggestionsRequest: GetDataSourceSuggestionsRequest, _options?: Configuration): Promise { @@ -2537,7 +2693,7 @@ export class PromiseThoughtSpotRestApi { } /** - * Version: 10.15.0.cl or later This API allows users to retrieve existing natural language (NL) instructions for a specific data-model. These instructions guide the AI system in understanding data context and generating more accurate responses when processing natural language queries. #### Usage guidelines To retrieve NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model to retrieve NL instructions The API returns a response object with: - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for natural language processing - `scope`: The scope of the instruction (`GLOBAL`). It can be extended to data-model-user scope in future. #### Instructions Scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) > ###### Note: > * To use this API, the user needs atleast view access on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Use this API to view currently configured instructions before modifying them with `setNLInstructions`. + * Version: 10.15.0.cl or later Retrieves existing natural language (NL) instructions configured for a specific data model. These instructions guide the AI system in understanding data context and generating more accurate responses. Requires `CAN_USE_SPOTTER` privilege, at least view access on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines The request must include: - `data_source_identifier`: the unique ID of the data model to retrieve instructions for If the request is successful, the API returns: - `nl_instructions_info`: an array of instruction objects, each containing: - `instructions`: the configured text instructions for AI processing - `scope`: the scope of the instruction — currently only `GLOBAL` is supported #### Instructions scope - **GLOBAL**: Instructions that apply globally across the system on the given data-model (currently only global instructions are supported) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks view access on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs at least view access on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Use this API to review currently configured instructions before modifying them with `setNLInstructions`. * @param getNLInstructionsRequest */ public getNLInstructions(getNLInstructionsRequest: GetNLInstructionsRequest, _options?: Configuration): Promise { @@ -2555,7 +2711,7 @@ export class PromiseThoughtSpotRestApi { } /** - * Version: 10.13.0.cl or later Breaks down a user-submitted query into a series of analytical sub-questions using relevant contextual metadata. To use this API, the user must have at least view-level access to the referenced metadata objects. #### Usage guidelines To accurately generate relevant questions, the request must include at least one of the following metadata identifiers within `metadata_context` : `conversation_identifier`, `answer_identifiers`, `liveboard_identifiers`, or `data_source_identifiers`. You can further enhance the quality and precision of breakdown by providing additional `ai_context` such as: - `content`: User provided content like text data, csv data as a string message to provide context & potentially improve the quality of the response. - `instructions`: User specific text instructions sent to AI system for processing the query. Additional optional parameters include: - `limit_relevant_questions`: Controls the maximum number of relevant questions returned. Defaults to 5 if not specified. - `bypass_cache`: If set to true, forces fresh computation instead of returning cached results. If the API request is successful, ThoughtSpot returns a list of relevant analytical queries, each aligned with the user\'s original question. Each returned question includes the query string, along with the identifier and name of the corresponding data source. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.13.0.cl or later Breaks down a natural language query into a series of smaller analytical sub-questions, each mapped to a relevant data source. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request must include: - `query`: the natural language question to decompose into analytical sub-questions - `metadata_context`: at least one of the following context identifiers to guide question generation: - `conversation_identifier` — an existing conversation session ID - `answer_identifiers` — a list of Answer GUIDs - `liveboard_identifiers` — a list of Liveboard GUIDs - `data_source_identifiers` — a list of data source GUIDs Optional parameters for refining the output: - `ai_context`: additional context to improve response quality - `content` — supplementary text or CSV data as string input - `instructions` — custom text instructions for the AI system - `limit_relevant_questions`: maximum number of questions to return (default: `5`) - `bypass_cache`: if `true`, forces fresh computation instead of returning cached results If the request is successful, the API returns a list of relevant analytical questions, each containing: - `query`: the generated sub-question - `data_source_identifier`: the unique ID of the data source the question targets - `data_source_name`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param getRelevantQuestionsRequest */ public getRelevantQuestions(getRelevantQuestionsRequest: GetRelevantQuestionsRequest, _options?: Configuration): Promise { @@ -2650,7 +2806,7 @@ export class PromiseThoughtSpotRestApi { } /** - * Parameterize fields in metadata objects. Version: 10.9.0.cl or later Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user + * Parameterize fields in metadata objects. Version: 10.9.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/metadata/parameterize-fields](/api/rest/2.0/metadata/parameterize-fields) instead. Allows parameterizing fields in metadata objects in ThoughtSpot. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table the field type must be `ATTRIBUTE` and field name can be one of: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_name specifies the exact property of the Connection or Connection Config that needs to be parameterized. For Connection Config, the only supported field name is: * impersonate_user * @param parameterizeMetadataRequest */ public parameterizeMetadata(parameterizeMetadataRequest: ParameterizeMetadataRequest, _options?: Configuration): Promise { @@ -2658,6 +2814,15 @@ export class PromiseThoughtSpotRestApi { return result.toPromise(); } + /** + * Parameterize multiple fields of metadata objects. For example [schemaName, databaseName] for LOGICAL_TABLE. Version: 26.4.0.cl or later Allows parameterizing multiple fields of metadata objects in ThoughtSpot. For example, you can parameterize [schemaName, databaseName] for LOGICAL_TABLE. Requires appropriate permissions to modify the metadata object. The API endpoint allows parameterizing the following types of metadata objects: * Logical Tables * Connections * Connection Configs For a Logical Table, the field type must be `ATTRIBUTE` and field names can include: * databaseName * schemaName * tableName For a Connection or Connection Config, the field type is always `CONNECTION_PROPERTY`. In this case, field_names specifies the exact properties of the Connection or Connection Config that need to be parameterized. For Connection Config, supported field names include: * impersonate_user You can parameterize multiple fields at once by providing an array of field names. + * @param parameterizeMetadataFieldsRequest + */ + public parameterizeMetadataFields(parameterizeMetadataFieldsRequest: ParameterizeMetadataFieldsRequest, _options?: Configuration): Promise { + const result = this.api.parameterizeMetadataFields(parameterizeMetadataFieldsRequest, _options); + return result.toPromise(); + } + /** * Version: 10.9.0.cl or later Allows publishing metadata objects across organizations in ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The API endpoint allows publishing the following types of metadata objects: * Liveboards * Answers * Logical Tables This API will essentially share the objects along with it\'s dependencies to the org admins of the orgs to which it is being published. * @param publishMetadataRequest @@ -2668,7 +2833,17 @@ export class PromiseThoughtSpotRestApi { } /** - * Version: 10.7.0.cl or later + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + public putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise { + const result = this.api.putVariableValues(identifier, putVariableValuesRequest, _options); + return result.toPromise(); + } + + /** + * Version: 10.7.0.cl or later **Deprecated** — Use `getRelevantQuestions` instead (available from 10.13.0.cl). Breaks down a topical or goal-oriented natural language question into smaller, actionable analytical sub-questions, each mapped to a relevant data source for independent execution. Requires `CAN_USE_SPOTTER` privilege and at least view-level access to the referenced metadata objects. #### Usage guidelines The request accepts the following parameters: - `nlsRequest`: contains the user `query` to decompose, along with optional `instructions` and `bypassCache` flag - `worksheetIds`: list of data source identifiers to scope the decomposition - `answerIds`: list of Answer GUIDs whose data guides the response - `liveboardIds`: list of Liveboard GUIDs whose data guides the response - `conversationId`: an existing conversation session ID for context continuity - `content`: supplementary text or CSV data to improve response quality - `maxDecomposedQueries`: maximum number of sub-questions to return (default: `5`) If the request is successful, the API returns a `decomposedQueryResponse` containing a list of `decomposedQueries`, each with: - `query`: the generated analytical sub-question - `worksheetId`: the unique ID of the data source the question targets - `worksheetName`: the display name of the corresponding data source #### Error responses | Code | Description | |------|---------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view access to the referenced metadata objects. | > ###### Note: > * This endpoint is deprecated since 10.13.0.cl. Use `getRelevantQuestions` for new integrations. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter — please contact ThoughtSpot support to enable Spotter on your cluster. * @param queryGetDecomposedQueryRequest */ public queryGetDecomposedQuery(queryGetDecomposedQueryRequest: QueryGetDecomposedQueryRequest, _options?: Configuration): Promise { @@ -2723,6 +2898,24 @@ export class PromiseThoughtSpotRestApi { return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Searches delivery history for communication channels such as webhooks. Returns channel-level delivery status for each job execution record. Use this to monitor channel health and delivery success rates across events. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. **NOTE**: When `channel_type` is `WEBHOOK`, the following constraints apply: - `job_ids`, `channel_identifiers`, and `events` each accept at most one element. - When `job_ids` is provided, it is used as the sole lookup key and other filter fields are ignored. - When `job_ids` is not provided, `channel_identifiers` and `events` are both required. Each must contain exactly one element, and the event object must include the `identifier` field. - Records older than the configured retention period are not returned. + * @param searchChannelHistoryRequest + */ + public searchChannelHistory(searchChannelHistoryRequest: SearchChannelHistoryRequest, _options?: Configuration): Promise { + const result = this.api.searchChannelHistory(searchChannelHistoryRequest, _options); + return result.toPromise(); + } + + /** + * Version: 26.4.0.cl or later Gets a list of collections available in ThoughtSpot. To get details of a specific collection, specify the collection GUID or name. You can also filter the API response based on the collection name pattern, author, and other criteria. #### Search options * **name_pattern**: Use \'%\' as a wildcard character to match collection names * **collection_identifiers**: Search for specific collections by their GUIDs or names * **include_metadata**: When set to `true`, includes the metadata objects within each collection in the response **NOTE**: If the API returns an empty list, consider increasing the value of the `record_size` parameter. To search across all available collections, set `record_size` to `-1`. + * @param searchCollectionsRequest + */ + public searchCollections(searchCollectionsRequest: SearchCollectionsRequest, _options?: Configuration): Promise { + const result = this.api.searchCollections(searchCollectionsRequest, _options); + return result.toPromise(); + } + /** * Version: 9.2.0.cl or later Gets a list of commits for a given metadata object. Requires `DATAMANAGEMENT` (**Can manage data**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance on your instance, the `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` (**Can manage data models**) privilege and edit access to the metadata objects. * @param searchCommitsRequest @@ -2877,7 +3070,7 @@ export class PromiseThoughtSpotRestApi { } /** - * Version: 10.15.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type The API returns a array of object with a type, message, and metadata. - `type`: Type of the message — text, answer, or error. - `message`: Main content of the response. - `metadata`: Additional info depending on the message type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.15.0.cl or later **Deprecated** — Use `sendAgentConversationMessage` instead. Send natural language messages to an existing Spotter agent conversation and returns the complete response synchronously. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent The API returns an array of response objects, each containing: - `type`: the kind of response — `text`, `answer`, or `error` - `message`: the main content of the response - `metadata`: additional information depending on the message type (e.g., answer metadata includes analytics and visualization details) #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessage` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier for the conversation (used to track context) * @param sendAgentMessageRequest */ @@ -2887,7 +3080,7 @@ export class PromiseThoughtSpotRestApi { } /** - * Version: 10.13.0.cl or later This API allows users to initiate or continue an agent (Spotter) conversation by submitting one or more natural language messages. To use this API, the user must have access to the relevant conversational session (via conversation_identifier) and submit at least one message. #### Usage guidelines To initiate or continue a conversation, the request must include: - `conversation_identifier`: a unique session ID for continuity and message tracking - `messages`: an array of one or more text messages, each with a value and type Additionally, user can specify what tool can be included `conversation_settings` parameter, which supports: - `enable_contextual_change_analysis` (default: false) - `enable_natural_language_answer_generation` (default: true) - `enable_reasoning` (default: false) If the request is valid, the API returns a stream of messages in real time, including: - `ack`: confirms receipt of the request - `text / text-chunk`: content chunks, optionally formatted (e.g., markdown) - `answer`: the final structured response with metadata and analytics - `error`: if a failure occurs - `notification`: notification messages for operation being performed > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > * The streaming protocol uses Server-Sent Events (SSE) + * Version: 10.13.0.cl or later **Deprecated** — Use `sendAgentConversationMessageStreaming` instead. Sends one or more natural language messages to an existing Spotter agent conversation and returns the response as a real-time Server-Sent Events stream. Requires `CAN_USE_SPOTTER` privilege and access to the metadata object associated with the conversation. The user must have access to the conversation session referenced by `conversation_identifier`. A conversation must first be created using the `createAgentConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createAgentConversation`, used for context continuity and message tracking - `messages`: an array of one or more text messages to send to the agent If the request is valid, the API returns a Server-Sent Events (SSE) stream. Each line has the form `data: [{\"type\": \"...\", ...}]` — a JSON array of event objects. Event types include: - `ack`: confirms receipt of the request (`node_id`) - `conv_title`: conversation title (`title`, `conv_id`) - `notification`: status updates on operations (`group_id`, `metadata`, `code` — e.g. `TOOL_CALL_NOTIFICATION`, `nls_start`, `FINAL_RESPONSE_NOTIFICATION`) - `text-chunk`: incremental content chunks (`id`, `group_id`, `metadata` with `format` and `type` such as `thinking` or `text`, `content`) - `text`: full text block with same structure as `text-chunk` - `answer`: structured answer with metadata (`id`, `group_id`, `metadata` with `sage_query`, `session_id`, `title`, etc., `title`) - `error`: if a failure occurs #### Error responses | Code | Description | |------|----------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks permission on the referenced conversation. | > ###### Note: > > - This endpoint is deprecated. Use `sendAgentConversationMessageStreaming` for new integrations. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. > - The streaming protocol uses Server-Sent Events (SSE). * @param sendAgentMessageStreamingRequest */ public sendAgentMessageStreaming(sendAgentMessageStreamingRequest: SendAgentMessageStreamingRequest, _options?: Configuration): Promise { @@ -2896,7 +3089,7 @@ export class PromiseThoughtSpotRestApi { } /** - * Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Sends a follow-up message to an existing conversation within the context of a data model. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. A conversation must first be created using the `createConversation` API. #### Usage guidelines The request must include: - `conversation_identifier`: the unique session ID returned by `createConversation` - `metadata_identifier`: the unique ID of the data source used for the conversation - `message`: a natural language string with the follow-up question If the request is successful, the API returns an array of response messages, each containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param conversationIdentifier Unique identifier of the conversation. * @param sendMessageRequest */ @@ -2906,7 +3099,7 @@ export class PromiseThoughtSpotRestApi { } /** - * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. The API returns a response object with: - `success`: Boolean indicating whether the operation was successful #### Instructions Scope - **GLOBAL**: Instructions that apply globally for that data-model across the system > ###### Note: > * To use this API, the user needs either edit access or SPOTTER_COACHING_PRIVILEGE on the data-model and they must use corresponding org related bearerToken where the data-model exists. > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * Available from version 10.15.0.cl and later. > * This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > * Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. + * Version: 10.15.0.cl or later This API allows users to set natural language (NL) instructions for a specific data-model to improve AI-generated answers and query processing. These instructions help guide the AI system to better understand the data context and provide more accurate responses. Requires `CAN_USE_SPOTTER` privilege, either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and a bearer token corresponding to the org where the data model exists. #### Usage guidelines To set NL instructions for a data-model, the request must include: - `data_source_identifier`: The unique ID of the data-model for which to set NL instructions - `nl_instructions_info`: An array of instruction objects, each containing: - `instructions`: Array of text instructions for the LLM - `scope`: The scope of the instruction (`GLOBAL`). Currently only `GLOBAL` is supported. It can be extended to data-model-user scope in future. #### Instructions scope - **GLOBAL**: instructions that apply to all users querying this data model If the request is successful, the API returns: - `success`: a boolean indicating whether the operation completed successfully #### Error responses | Code | Description | |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege, lacks edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, or the bearer token does not correspond to the org where the data model exists. | > ###### Note: > > - To use this API, the user needs either edit access or `SPOTTER_COACHING_PRIVILEGE` on the data model, and must use the bearer token corresponding to the org where the data model exists. > - This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > - Available from version 10.15.0.cl and later. > - This endpoint requires Spotter — please contact ThoughtSpot Support to enable Spotter on your cluster. > - Instructions help improve the accuracy and relevance of AI-generated responses for the specified data-model. * @param setNLInstructionsRequest */ public setNLInstructions(setNLInstructionsRequest: SetNLInstructionsRequest, _options?: Configuration): Promise { @@ -2924,7 +3117,7 @@ export class PromiseThoughtSpotRestApi { } /** - * Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. + * Version: 10.4.0.cl or later Processes a natural language query against a specified data model and returns a single AI-generated answer without requiring a conversation session. Requires `CAN_USE_SPOTTER` privilege and at least view access to the metadata object specified in the request. #### Usage guidelines The request must include: - `query`: a natural language question (e.g., \"What were total sales last quarter?\") - `metadata_identifier`: the unique ID of the data source to query against If the request is successful, the API returns a response message containing: - `session_identifier`: the unique ID of the generated response - `generation_number`: the generation number of the response - `message_type`: the type of the response (e.g., `TSAnswer`) - `visualization_type`: the generated visualization type (`Chart`, `Table`, or `Undefined`) - `tokens` / `display_tokens`: the search tokens and user-friendly display tokens for the response #### Error responses | Code | Description | |------|-----------------------------------------------------------------------------------------------------------------------------------------| | 401 | Unauthorized — authentication token is missing, expired, or invalid. | | 403 | Forbidden — the authenticated user does not have `CAN_USE_SPOTTER` privilege or lacks view permission on the specified metadata object. | > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. * @param singleAnswerRequest */ public singleAnswer(singleAnswerRequest: SingleAnswerRequest, _options?: Configuration): Promise { @@ -2969,6 +3162,16 @@ export class PromiseThoughtSpotRestApi { return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Updates an existing collection in ThoughtSpot. #### Supported operations This API endpoint lets you perform the following operations: * Update collection name and description * Change visibility settings * Add metadata objects to the collection (operation: ADD) * Remove metadata objects from the collection (operation: REMOVE) * Replace all metadata objects in the collection (operation: REPLACE) #### Operation types * **ADD**: Adds the specified metadata objects to the existing collection without removing current items * **REMOVE**: Removes only the specified metadata objects from the collection * **REPLACE**: Replaces all existing metadata objects with the specified items (default behavior) + * @param collectionIdentifier Unique GUID of the collection. Note: Collection names cannot be used as identifiers since duplicate names are allowed. + * @param updateCollectionRequest + */ + public updateCollection(collectionIdentifier: string, updateCollectionRequest: UpdateCollectionRequest, _options?: Configuration): Promise { + const result = this.api.updateCollection(collectionIdentifier, updateCollectionRequest, _options); + return result.toPromise(); + } + /** * Version: 10.12.0.cl or later Creates, updates, or deletes column security rules for specified tables. This API endpoint allows you to create, update, or delete column-level security rules on columns of a table. The operation follows an \"all or none\" policy: if defining security rules for any of the provided columns fails, the entire operation will be rolled back, and no rules will be created. #### Usage guidelines - Provide table identifier using either `identifier` (GUID or name) or `obj_identifier` (object ID) - Use `clear_csr: true` to remove all column security rules from the table - For each column, specify the security rule using `column_security_rules` array - Use `is_unsecured: true` to mark a specific column as unprotected - Use `group_access` operations to manage group associations: - `ADD`: Add groups to the column\'s access list - `REMOVE`: Remove groups from the column\'s access list - `REPLACE`: Replace all existing groups with the specified groups #### Required permissions - `ADMINISTRATION` - Can administer ThoughtSpot - `DATAMANAGEMENT` - Can manage data (if RBAC is disabled) - `CAN_MANAGE_WORKSHEET_VIEWS_TABLES` - Can manage worksheet views and tables (if RBAC is enabled) #### Example request ```json { \"identifier\": \"table-guid\", \"obj_identifier\": \"table-object-id\", \"clear_csr\": false, \"column_security_rules\": [ { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"ADD\", \"group_identifiers\": [\"hr_group_id\", \"hr_group_name\", \"finance_group_id\"] } ] }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": true }, { \"column_identifier\": \"col id or col name\", \"is_unsecured\": false, \"group_access\": [ { \"operation\": \"REPLACE\", \"group_identifiers\": [\"management_group_id\", \"management_group_name\"] } ] } ] } ``` #### Request Body Schema - `identifier` (string, optional): GUID or name of the table for which we want to create column security rules - `obj_identifier` (string, optional): The object ID of the table - `clear_csr` (boolean, optional): If true, then all the secured columns will be marked as unprotected, and all the group associations will be removed - `column_security_rules` (array of objects, required): An array where each object defines the security rule for a specific column Each column security rule object contains: - `column_identifier` (string, required): Column identifier (col_id or name) - `is_unsecured` (boolean, optional): If true, the column will be marked as unprotected and all groups associated with it will be removed - `group_access` (array of objects, optional): Array of group operation objects Each group operation object contains: - `operation` (string, required): Operation type - ADD, REMOVE, or REPLACE - `group_identifiers` (array of strings, required): Array of group identifiers (name or GUID) on which the operation will be performed #### Response This API does not return any response body. A successful operation returns HTTP 200 status code. #### Operation Types - **ADD**: Adds the specified groups to the column\'s access list - **REMOVE**: Removes the specified groups from the column\'s access list - **REPLACE**: Replaces all existing groups with the specified groups * @param updateColumnSecurityRulesRequest @@ -3152,7 +3355,7 @@ export class PromiseThoughtSpotRestApi { } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ public updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise { @@ -3170,6 +3373,15 @@ export class PromiseThoughtSpotRestApi { return result.toPromise(); } + /** + * Version: 26.4.0.cl or later Validates a communication channel configuration to ensure it is properly set up and can receive events. - Use `channel_type` to specify the type of communication channel to validate (e.g., WEBHOOK). - Use `channel_identifier` to provide the unique identifier or name for the communication channel. - Use `event_type` to specify the event type to validate for this channel. Requires `ADMINISTRATION` (**Can administer ThoughtSpot**) or `DEVELOPER` (**Has developer privilege**) privilege. For webhook channels, users with `CAN_MANAGE_WEBHOOKS` (**Can manage webhooks**) privilege are also authorized to perform this action. + * @param validateCommunicationChannelRequest + */ + public validateCommunicationChannel(validateCommunicationChannelRequest: ValidateCommunicationChannelRequest, _options?: Configuration): Promise { + const result = this.api.validateCommunicationChannel(validateCommunicationChannelRequest, _options); + return result.toPromise(); + } + /** * Version: 10.10.0.cl or later Validates the email customization configuration if any set for the ThoughtSpot system. #### Pre-requisites Requires `DEVELOPER` (**has developer privilege**) or `ADMINISTRATION` (**Can administer ThoughtSpot**) privilege. If [Role-Based Access Control (RBAC)](https://developers.thoughtspot.com/docs/rbac) is enabled on your instance, the `DEVELOPER` (**Has developer privilege**) privilege is required. **NOTE**:This endpoint in currently in beta. Contact ThoughtSpot support to enable this on your instance. */ @@ -3335,7 +3547,7 @@ export class PromiseVariableApi { } /** - * Delete a variable Version: 10.14.0.cl or later Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects + * Delete a variable Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/delete](/api/rest/2.0/template/variables/delete) instead. Allows deleting a variable from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifier (ID or name) The operation will fail if: * The user lacks required permissions * The variable doesn\'t exist * The variable is being used by other objects * @param identifier Unique id or name of the variable */ public deleteVariable(identifier: string, _options?: Configuration): Promise { @@ -3343,6 +3555,25 @@ export class PromiseVariableApi { return result.toPromise(); } + /** + * Delete variable(s) Version: 26.4.0.cl or later Allows deleting multiple variables from ThoughtSpot. Requires ADMINISTRATION role and TENANT scope. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint requires: * The variable identifiers (IDs or names) The operation will fail if: * The user lacks required permissions * Any of the variables don\'t exist * Any of the variables are being used by other objects + * @param deleteVariablesRequest + */ + public deleteVariables(deleteVariablesRequest: DeleteVariablesRequest, _options?: Configuration): Promise { + const result = this.api.deleteVariables(deleteVariablesRequest, _options); + return result.toPromise(); + } + + /** + * Update values for a variable Version: 26.4.0.cl or later Allows updating values for a specific variable in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to the variable * Replacing existing values * Deleting values from the variable * Resetting all values When updating variable values, you need to specify: * The variable identifier (ID or name) * The values to add/replace/remove * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constraints for the given variable, scope is ignored + * @param identifier Unique ID or name of the variable + * @param putVariableValuesRequest + */ + public putVariableValues(identifier: string, putVariableValuesRequest: PutVariableValuesRequest, _options?: Configuration): Promise { + const result = this.api.putVariableValues(identifier, putVariableValuesRequest, _options); + return result.toPromise(); + } + /** * Search variables Version: 10.14.0.cl or later Allows searching for variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint supports searching variables by: * Variable identifier (ID or name) * Variable type * Name pattern (case-insensitive, supports % for wildcard) The search results can be formatted in three ways: * METADATA - Returns only variable metadata (default) * METADATA_AND_VALUES - Returns variable metadata and values The values can be filtered by scope: * org_identifier * principal_identifier * model_identifier * @param searchVariablesRequest @@ -3363,7 +3594,7 @@ export class PromiseVariableApi { } /** - * Update values for multiple variables Version: 10.14.0.cl or later Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored + * Update values for multiple variables Version: 10.14.0.cl or later **Note:** This API endpoint is deprecated and will be removed from ThoughtSpot in a future release. Use [POST /api/rest/2.0/template/variables/{identifier}/update-values](/api/rest/2.0/template/variables/%7Bidentifier%7D/update-values) instead. Allows updating values for multiple variables in ThoughtSpot. Requires ADMINISTRATION role. The CAN_MANAGE_VARIABLES permission allows you to manage Formula Variables in the current organization scope. The API endpoint allows: * Adding new values to variables * Replacing existing values * Deleting values from variables When updating variable values, you need to specify: * The variable identifiers * The values to add/replace/remove for each variable * The operation to perform (ADD, REPLACE, REMOVE, RESET) Behaviour based on operation type: * ADD - Adds values to the variable if this is a list type variable, else same as replace. * REPLACE - Replaces all values of a given set of constraints with the current set of values. * REMOVE - Removes any values which match the set of conditions of the variables if this is a list type variable, else clears value. * RESET - Removes all constrains for a given variable, scope is ignored * @param updateVariableValuesRequest */ public updateVariableValues(updateVariableValuesRequest: UpdateVariableValuesRequest, _options?: Configuration): Promise {