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

box / box-typescript-sdk-gen / 11616599821

31 Oct 2024 05:11PM UTC coverage: 41.667% (-0.06%) from 41.724%
11616599821

Pull #393

github

web-flow
Merge 7c00c545e into 6ec417e6f
Pull Request #393: test: Expanding test in search manager (box/box-codegen#593)

4050 of 16840 branches covered (24.05%)

Branch coverage included in aggregate %.

2 of 2 new or added lines in 1 file covered. (100.0%)

17 existing lines in 5 files now uncovered.

13362 of 24948 relevant lines covered (53.56%)

77.88 hits per line

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

18.92
/src/schemas/searchResultWithSharedLink.generated.ts
1
import { serializeFileFullOrFolderFullOrWebLink } from './fileFullOrFolderFullOrWebLink.generated.js';
140✔
2
import { deserializeFileFullOrFolderFullOrWebLink } from './fileFullOrFolderFullOrWebLink.generated.js';
140✔
3
import { FileFullOrFolderFullOrWebLink } from './fileFullOrFolderFullOrWebLink.generated.js';
4
import { BoxSdkError } from '../box/errors.js';
140✔
5
import { SerializedData } from '../serialization/json.js';
6
import { sdIsEmpty } from '../serialization/json.js';
7
import { sdIsBoolean } from '../serialization/json.js';
8
import { sdIsNumber } from '../serialization/json.js';
9
import { sdIsString } from '../serialization/json.js';
140✔
10
import { sdIsList } from '../serialization/json.js';
11
import { sdIsMap } from '../serialization/json.js';
140✔
12
export interface SearchResultWithSharedLink {
13
  /**
14
   * The optional shared link through which the user has access to this
15
   * item. This value is only returned for items for which the user has
16
   * recently accessed the file through a shared link. For all other
17
   * items this value will return `null`. */
18
  readonly accessibleViaSharedLink?: string;
19
  readonly item?: FileFullOrFolderFullOrWebLink;
20
  /**
21
   * The result type. The value is always `search_result`. */
22
  readonly type?: string;
23
  readonly rawData?: SerializedData;
24
}
25
export function serializeSearchResultWithSharedLink(
140✔
26
  val: SearchResultWithSharedLink
27
): SerializedData {
28
  return {
×
29
    ['accessible_via_shared_link']:
30
      val.accessibleViaSharedLink == void 0
×
31
        ? void 0
32
        : val.accessibleViaSharedLink,
33
    ['item']:
34
      val.item == void 0
×
35
        ? void 0
36
        : serializeFileFullOrFolderFullOrWebLink(val.item),
37
    ['type']: val.type == void 0 ? void 0 : val.type,
×
38
  };
39
}
40
export function deserializeSearchResultWithSharedLink(
140✔
41
  val: SerializedData
42
): SearchResultWithSharedLink {
UNCOV
43
  if (!sdIsMap(val)) {
×
44
    throw new BoxSdkError({
×
45
      message: 'Expecting a map for "SearchResultWithSharedLink"',
46
    });
47
  }
UNCOV
48
  if (
×
49
    !(val.accessible_via_shared_link == void 0) &&
×
50
    !sdIsString(val.accessible_via_shared_link)
51
  ) {
52
    throw new BoxSdkError({
×
53
      message:
54
        'Expecting string for "accessible_via_shared_link" of type "SearchResultWithSharedLink"',
55
    });
56
  }
57
  const accessibleViaSharedLink: undefined | string =
UNCOV
58
    val.accessible_via_shared_link == void 0
×
59
      ? void 0
60
      : val.accessible_via_shared_link;
61
  const item: undefined | FileFullOrFolderFullOrWebLink =
UNCOV
62
    val.item == void 0
×
63
      ? void 0
64
      : deserializeFileFullOrFolderFullOrWebLink(val.item);
UNCOV
65
  if (!(val.type == void 0) && !sdIsString(val.type)) {
×
66
    throw new BoxSdkError({
×
67
      message:
68
        'Expecting string for "type" of type "SearchResultWithSharedLink"',
69
    });
70
  }
UNCOV
71
  const type: undefined | string = val.type == void 0 ? void 0 : val.type;
×
UNCOV
72
  return {
×
73
    accessibleViaSharedLink: accessibleViaSharedLink,
74
    item: item,
75
    type: type,
76
  } satisfies SearchResultWithSharedLink;
77
}
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

© 2025 Coveralls, Inc