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

box / box-typescript-sdk-gen / 13417170404

19 Feb 2025 04:12PM UTC coverage: 42.256% (-0.4%) from 42.608%
13417170404

Pull #520

github

web-flow
Merge 7711e5736 into 98b6a90da
Pull Request #520: test: Add AI studio tests (box/box-codegen#626)

4104 of 16572 branches covered (24.76%)

Branch coverage included in aggregate %.

378 of 832 new or added lines in 22 files covered. (45.43%)

14682 of 27886 relevant lines covered (52.65%)

92.64 hits per line

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

32.0
/src/schemas/aiAgentExtractStructuredOrAiAgentReference.generated.ts
1
import { serializeAiAgentExtractStructured } from './aiAgentExtractStructured.generated.js';
146✔
2
import { deserializeAiAgentExtractStructured } from './aiAgentExtractStructured.generated.js';
146✔
3
import { serializeAiAgentReference } from './aiAgentReference.generated.js';
146✔
4
import { deserializeAiAgentReference } from './aiAgentReference.generated.js';
146✔
5
import { AiAgentExtractStructured } from './aiAgentExtractStructured.generated.js';
6
import { AiAgentReference } from './aiAgentReference.generated.js';
7
import { BoxSdkError } from '../box/errors.js';
146✔
8
import { SerializedData } from '../serialization/json.js';
9
import { sdIsEmpty } from '../serialization/json.js';
10
import { sdIsBoolean } from '../serialization/json.js';
11
import { sdIsNumber } from '../serialization/json.js';
12
import { sdIsString } from '../serialization/json.js';
13
import { sdIsList } from '../serialization/json.js';
14
import { sdIsMap } from '../serialization/json.js';
146✔
15
export type AiAgentExtractStructuredOrAiAgentReference =
16
  | AiAgentExtractStructured
17
  | AiAgentReference;
18
export function serializeAiAgentExtractStructuredOrAiAgentReference(
146✔
19
  val: any,
20
): SerializedData {
NEW
21
  if (val.type == 'ai_agent_extract_structured') {
×
NEW
22
    return serializeAiAgentExtractStructured(val);
×
23
  }
NEW
24
  if (val.type == 'ai_agent_id') {
×
NEW
25
    return serializeAiAgentReference(val);
×
26
  }
NEW
27
  throw new BoxSdkError({ message: 'unknown type' });
×
28
}
29
export function deserializeAiAgentExtractStructuredOrAiAgentReference(
146✔
30
  val: SerializedData,
31
): AiAgentExtractStructuredOrAiAgentReference {
NEW
32
  if (!sdIsMap(val)) {
×
NEW
33
    throw new BoxSdkError({
×
34
      message:
35
        'Expecting a map for "AiAgentExtractStructuredOrAiAgentReference"',
36
    });
37
  }
NEW
38
  if (val.type == 'ai_agent_extract_structured') {
×
NEW
39
    return deserializeAiAgentExtractStructured(val);
×
40
  }
NEW
41
  if (val.type == 'ai_agent_id') {
×
NEW
42
    return deserializeAiAgentReference(val);
×
43
  }
NEW
44
  throw new BoxSdkError({
×
45
    message: "Can't deserialize AiAgentExtractStructuredOrAiAgentReference",
46
  });
47
}
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