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

box / box-typescript-sdk-gen / 11447392710

21 Oct 2024 07:39PM UTC coverage: 41.761% (+0.02%) from 41.744%
11447392710

Pull #379

github

web-flow
Merge 8959801b4 into 02ff276c5
Pull Request #379: feat: Modify schema for teams for integration mapping api (box/box-openapi#463)

4059 of 16792 branches covered (24.17%)

Branch coverage included in aggregate %.

4 of 10 new or added lines in 1 file covered. (40.0%)

9 existing lines in 3 files now uncovered.

13342 of 24876 relevant lines covered (53.63%)

78.23 hits per line

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

54.17
/src/schemas/metadataQueryResults.generated.ts
1
import { serializeFileFullOrFolderFull } from './fileFullOrFolderFull.generated.js';
140✔
2
import { deserializeFileFullOrFolderFull } from './fileFullOrFolderFull.generated.js';
140✔
3
import { FileFullOrFolderFull } from './fileFullOrFolderFull.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';
140✔
9
import { sdIsString } from '../serialization/json.js';
140✔
10
import { sdIsList } from '../serialization/json.js';
140✔
11
import { sdIsMap } from '../serialization/json.js';
140✔
12
export interface MetadataQueryResults {
13
  /**
14
   * The mini representation of the files and folders that match the search
15
   * terms.
16
   *
17
   * By default, this endpoint returns only the most basic info about the
18
   * items. To get additional fields for each item, including any of the
19
   * metadata, use the `fields` attribute in the query. */
20
  readonly entries?: readonly FileFullOrFolderFull[];
21
  /**
22
   * The limit that was used for this search. This will be the same as the
23
   * `limit` query parameter unless that value exceeded the maximum value
24
   * allowed. */
25
  readonly limit?: number;
26
  /**
27
   * The marker for the start of the next page of results. */
28
  readonly nextMarker?: string;
29
  readonly rawData?: SerializedData;
30
}
31
export function serializeMetadataQueryResults(
140✔
32
  val: MetadataQueryResults
33
): SerializedData {
34
  return {
×
35
    ['entries']:
36
      val.entries == void 0
×
37
        ? void 0
38
        : (val.entries.map(function (
39
            item: FileFullOrFolderFull
40
          ): SerializedData {
41
            return serializeFileFullOrFolderFull(item);
×
42
          }) as readonly any[]),
43
    ['limit']: val.limit == void 0 ? void 0 : val.limit,
×
44
    ['next_marker']: val.nextMarker == void 0 ? void 0 : val.nextMarker,
×
45
  };
46
}
47
export function deserializeMetadataQueryResults(
140✔
48
  val: SerializedData
49
): MetadataQueryResults {
50
  if (!sdIsMap(val)) {
2!
51
    throw new BoxSdkError({
×
52
      message: 'Expecting a map for "MetadataQueryResults"',
53
    });
54
  }
55
  if (!(val.entries == void 0) && !sdIsList(val.entries)) {
2!
56
    throw new BoxSdkError({
×
57
      message: 'Expecting array for "entries" of type "MetadataQueryResults"',
58
    });
59
  }
60
  const entries: undefined | readonly FileFullOrFolderFull[] =
61
    val.entries == void 0
2!
62
      ? void 0
63
      : sdIsList(val.entries)
2!
64
      ? (val.entries.map(function (itm: SerializedData): FileFullOrFolderFull {
UNCOV
65
          return deserializeFileFullOrFolderFull(itm);
×
66
        }) as readonly any[])
67
      : [];
68
  if (!(val.limit == void 0) && !sdIsNumber(val.limit)) {
2!
69
    throw new BoxSdkError({
×
70
      message: 'Expecting number for "limit" of type "MetadataQueryResults"',
71
    });
72
  }
73
  const limit: undefined | number = val.limit == void 0 ? void 0 : val.limit;
2!
74
  if (!(val.next_marker == void 0) && !sdIsString(val.next_marker)) {
2!
75
    throw new BoxSdkError({
×
76
      message:
77
        'Expecting string for "next_marker" of type "MetadataQueryResults"',
78
    });
79
  }
80
  const nextMarker: undefined | string =
81
    val.next_marker == void 0 ? void 0 : val.next_marker;
2!
82
  return {
2✔
83
    entries: entries,
84
    limit: limit,
85
    nextMarker: nextMarker,
86
  } satisfies MetadataQueryResults;
87
}
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