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

box / box-typescript-sdk-gen / 16500038122

24 Jul 2025 02:42PM UTC coverage: 42.377% (-0.1%) from 42.481%
16500038122

Pull #674

github

web-flow
Merge b97a4a593 into 52c4e2f80
Pull Request #674: feat: Archive Public API (box/box-openapi#540)

4462 of 18307 branches covered (24.37%)

Branch coverage included in aggregate %.

47 of 180 new or added lines in 5 files covered. (26.11%)

1 existing line in 1 file now uncovered.

16490 of 31135 relevant lines covered (52.96%)

151.28 hits per line

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

20.45
/src/schemas/v2025R0/archivesV2025R0.generated.ts
1
import { serializeArchiveV2025R0 } from './archiveV2025R0.generated.js';
237✔
2
import { deserializeArchiveV2025R0 } from './archiveV2025R0.generated.js';
237✔
3
import { ArchiveV2025R0 } from './archiveV2025R0.generated.js';
4
import { BoxSdkError } from '../../box/errors.js';
237✔
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';
237✔
9
import { sdIsString } from '../../serialization/json.js';
237✔
10
import { sdIsList } from '../../serialization/json.js';
237✔
11
import { sdIsMap } from '../../serialization/json.js';
237✔
12
export interface ArchivesV2025R0 {
13
  /**
14
   * A list in which each entry represents an archive object. */
15
  readonly entries?: readonly ArchiveV2025R0[];
16
  /**
17
   * The limit that was used for these entries. This will be the same as the
18
   * `limit` query parameter unless that value exceeded the maximum value
19
   * allowed. The maximum value varies by API. */
20
  readonly limit?: number;
21
  /**
22
   * The marker for the start of the next page of results. */
23
  readonly nextMarker?: string | null;
24
  readonly rawData?: SerializedData;
25
}
26
export function serializeArchivesV2025R0(val: ArchivesV2025R0): SerializedData {
237✔
NEW
27
  return {
×
28
    ['entries']:
29
      val.entries == void 0
×
30
        ? val.entries
31
        : (val.entries.map(function (item: ArchiveV2025R0): SerializedData {
NEW
32
            return serializeArchiveV2025R0(item);
×
33
          }) as readonly any[]),
34
    ['limit']: val.limit,
35
    ['next_marker']: val.nextMarker,
36
  };
37
}
38
export function deserializeArchivesV2025R0(
237✔
39
  val: SerializedData,
40
): ArchivesV2025R0 {
NEW
41
  if (!sdIsMap(val)) {
×
NEW
42
    throw new BoxSdkError({ message: 'Expecting a map for "ArchivesV2025R0"' });
×
43
  }
NEW
44
  if (!(val.entries == void 0) && !sdIsList(val.entries)) {
×
NEW
45
    throw new BoxSdkError({
×
46
      message: 'Expecting array for "entries" of type "ArchivesV2025R0"',
47
    });
48
  }
49
  const entries: undefined | readonly ArchiveV2025R0[] =
NEW
50
    val.entries == void 0
×
51
      ? void 0
52
      : sdIsList(val.entries)
×
53
        ? (val.entries.map(function (itm: SerializedData): ArchiveV2025R0 {
NEW
54
            return deserializeArchiveV2025R0(itm);
×
55
          }) as readonly any[])
56
        : [];
NEW
57
  if (!(val.limit == void 0) && !sdIsNumber(val.limit)) {
×
NEW
58
    throw new BoxSdkError({
×
59
      message: 'Expecting number for "limit" of type "ArchivesV2025R0"',
60
    });
61
  }
NEW
62
  const limit: undefined | number = val.limit == void 0 ? void 0 : val.limit;
×
NEW
63
  if (!(val.next_marker == void 0) && !sdIsString(val.next_marker)) {
×
NEW
64
    throw new BoxSdkError({
×
65
      message: 'Expecting string for "next_marker" of type "ArchivesV2025R0"',
66
    });
67
  }
68
  const nextMarker: undefined | string =
NEW
69
    val.next_marker == void 0 ? void 0 : val.next_marker;
×
NEW
70
  return {
×
71
    entries: entries,
72
    limit: limit,
73
    nextMarker: nextMarker,
74
  } satisfies ArchivesV2025R0;
75
}
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