• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

box / box-typescript-sdk-gen / 14911073858

08 May 2025 04:13PM UTC coverage: 42.213%. First build
14911073858

Pull #603

github

web-flow
Merge a68e85372 into 979ff2c82
Pull Request #603: chore: Update .codegen.json with commit hash of codegen and openapi spec

4201 of 17119 branches covered (24.54%)

Branch coverage included in aggregate %.

138 of 467 new or added lines in 21 files covered. (29.55%)

15182 of 28798 relevant lines covered (52.72%)

140.62 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

12.66
/src/schemas/aiStudioAgentBasicTextToolResponse.generated.ts
1
import { serializeAiLlmEndpointParams } from './aiLlmEndpointParams.generated.js';
2
import { deserializeAiLlmEndpointParams } from './aiLlmEndpointParams.generated.js';
225✔
3
import { serializeAiAgentBasicTextToolBase } from './aiAgentBasicTextToolBase.generated.js';
4
import { deserializeAiAgentBasicTextToolBase } from './aiAgentBasicTextToolBase.generated.js';
5
import { serializeAiAgentBasicTextTool } from './aiAgentBasicTextTool.generated.js';
6
import { deserializeAiAgentBasicTextTool } from './aiAgentBasicTextTool.generated.js';
7
import { serializeAiStudioAgentBasicTextTool } from './aiStudioAgentBasicTextTool.generated.js';
225✔
8
import { deserializeAiStudioAgentBasicTextTool } from './aiStudioAgentBasicTextTool.generated.js';
9
import { AiLlmEndpointParams } from './aiLlmEndpointParams.generated.js';
10
import { AiAgentBasicTextToolBase } from './aiAgentBasicTextToolBase.generated.js';
11
import { AiAgentBasicTextTool } from './aiAgentBasicTextTool.generated.js';
12
import { AiStudioAgentBasicTextTool } from './aiStudioAgentBasicTextTool.generated.js';
13
import { BoxSdkError } from '../box/errors.js';
225✔
14
import { SerializedData } from '../serialization/json.js';
15
import { sdIsEmpty } from '../serialization/json.js';
16
import { sdIsBoolean } from '../serialization/json.js';
225✔
17
import { sdIsNumber } from '../serialization/json.js';
225✔
18
import { sdIsString } from '../serialization/json.js';
225✔
19
import { sdIsList } from '../serialization/json.js';
225✔
20
import { sdIsMap } from '../serialization/json.js';
225✔
21
export type AiStudioAgentBasicTextToolResponse = AiStudioAgentBasicTextTool & {
22
  /**
23
   * Warnings concerning tool */
24
  readonly warnings?: readonly string[];
25
};
26
export function serializeAiStudioAgentBasicTextToolResponse(
225✔
27
  val: AiStudioAgentBasicTextToolResponse,
28
): SerializedData {
NEW
29
  const base: any = serializeAiStudioAgentBasicTextTool(val);
×
NEW
30
  if (!sdIsMap(base)) {
×
NEW
31
    throw new BoxSdkError({
×
32
      message: 'Expecting a map for "AiStudioAgentBasicTextToolResponse"',
33
    });
34
  }
NEW
35
  return {
×
36
    ...base,
37
    ...{
38
      ['warnings']:
39
        val.warnings == void 0
×
40
          ? val.warnings
41
          : (val.warnings.map(function (item: string): SerializedData {
NEW
42
              return item;
×
43
            }) as readonly any[]),
44
    },
45
  };
46
}
47
export function deserializeAiStudioAgentBasicTextToolResponse(
225✔
48
  val: SerializedData,
49
): AiStudioAgentBasicTextToolResponse {
NEW
50
  if (!sdIsMap(val)) {
×
NEW
51
    throw new BoxSdkError({
×
52
      message: 'Expecting a map for "AiStudioAgentBasicTextToolResponse"',
53
    });
54
  }
NEW
55
  if (!(val.warnings == void 0) && !sdIsList(val.warnings)) {
×
NEW
56
    throw new BoxSdkError({
×
57
      message:
58
        'Expecting array for "warnings" of type "AiStudioAgentBasicTextToolResponse"',
59
    });
60
  }
61
  const warnings: undefined | readonly string[] =
NEW
62
    val.warnings == void 0
×
63
      ? void 0
64
      : sdIsList(val.warnings)
×
65
        ? (val.warnings.map(function (itm: SerializedData): string {
NEW
66
            if (!sdIsString(itm)) {
×
NEW
67
              throw new BoxSdkError({
×
68
                message:
69
                  'Expecting string for "AiStudioAgentBasicTextToolResponse"',
70
              });
71
            }
NEW
72
            return itm;
×
73
          }) as readonly any[])
74
        : [];
NEW
75
  if (
×
76
    !(val.is_custom_instructions_included == void 0) &&
×
77
    !sdIsBoolean(val.is_custom_instructions_included)
78
  ) {
NEW
79
    throw new BoxSdkError({
×
80
      message:
81
        'Expecting boolean for "is_custom_instructions_included" of type "AiStudioAgentBasicTextToolResponse"',
82
    });
83
  }
84
  const isCustomInstructionsIncluded: undefined | boolean =
NEW
85
    val.is_custom_instructions_included == void 0
×
86
      ? void 0
87
      : val.is_custom_instructions_included;
NEW
88
  if (!(val.system_message == void 0) && !sdIsString(val.system_message)) {
×
NEW
89
    throw new BoxSdkError({
×
90
      message:
91
        'Expecting string for "system_message" of type "AiStudioAgentBasicTextToolResponse"',
92
    });
93
  }
94
  const systemMessage: undefined | string =
NEW
95
    val.system_message == void 0 ? void 0 : val.system_message;
×
NEW
96
  if (!(val.prompt_template == void 0) && !sdIsString(val.prompt_template)) {
×
NEW
97
    throw new BoxSdkError({
×
98
      message:
99
        'Expecting string for "prompt_template" of type "AiStudioAgentBasicTextToolResponse"',
100
    });
101
  }
102
  const promptTemplate: undefined | string =
NEW
103
    val.prompt_template == void 0 ? void 0 : val.prompt_template;
×
NEW
104
  if (!(val.model == void 0) && !sdIsString(val.model)) {
×
NEW
105
    throw new BoxSdkError({
×
106
      message:
107
        'Expecting string for "model" of type "AiStudioAgentBasicTextToolResponse"',
108
    });
109
  }
NEW
110
  const model: undefined | string = val.model == void 0 ? void 0 : val.model;
×
NEW
111
  if (
×
112
    !(val.num_tokens_for_completion == void 0) &&
×
113
    !sdIsNumber(val.num_tokens_for_completion)
114
  ) {
NEW
115
    throw new BoxSdkError({
×
116
      message:
117
        'Expecting number for "num_tokens_for_completion" of type "AiStudioAgentBasicTextToolResponse"',
118
    });
119
  }
120
  const numTokensForCompletion: undefined | number =
NEW
121
    val.num_tokens_for_completion == void 0
×
122
      ? void 0
123
      : val.num_tokens_for_completion;
124
  const llmEndpointParams: undefined | AiLlmEndpointParams =
NEW
125
    val.llm_endpoint_params == void 0
×
126
      ? void 0
127
      : deserializeAiLlmEndpointParams(val.llm_endpoint_params);
NEW
128
  return {
×
129
    warnings: warnings,
130
    isCustomInstructionsIncluded: isCustomInstructionsIncluded,
131
    systemMessage: systemMessage,
132
    promptTemplate: promptTemplate,
133
    model: model,
134
    numTokensForCompletion: numTokensForCompletion,
135
    llmEndpointParams: llmEndpointParams,
136
  } satisfies AiStudioAgentBasicTextToolResponse;
137
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc