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

box / box-node-sdk / 20648270307

31 Dec 2025 02:57PM UTC coverage: 40.468% (-0.4%) from 40.85%
20648270307

push

github

web-flow
test: Remove integration mappings tests (box/box-codegen#912) (#1303)

4612 of 20093 branches covered (22.95%)

Branch coverage included in aggregate %.

17136 of 33648 relevant lines covered (50.93%)

145.97 hits per line

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

15.56
/src/schemas/integrationMappingPartnerItemTeamsCreateRequest.ts
1
import { BoxSdkError } from '../box/errors';
237✔
2
import { SerializedData } from '../serialization/json';
3
import { sdIsEmpty } from '../serialization/json';
4
import { sdIsBoolean } from '../serialization/json';
5
import { sdIsNumber } from '../serialization/json';
6
import { sdIsString } from '../serialization/json';
237✔
7
import { sdIsList } from '../serialization/json';
8
import { sdIsMap } from '../serialization/json';
237✔
9
export type IntegrationMappingPartnerItemTeamsCreateRequestTypeField =
10
  | 'channel'
11
  | 'team';
12
export interface IntegrationMappingPartnerItemTeamsCreateRequest {
13
  /**
14
   * Type of the mapped item referenced in `id`. */
15
  readonly type: IntegrationMappingPartnerItemTeamsCreateRequestTypeField;
16
  /**
17
   * ID of the mapped item (of type referenced in `type`). */
18
  readonly id: string;
19
  /**
20
   * ID of the tenant that is registered with Microsoft Teams. */
21
  readonly tenantId: string;
22
  /**
23
   * ID of the team that is registered with Microsoft Teams. */
24
  readonly teamId: string;
25
  readonly rawData?: SerializedData;
26
}
27
export function serializeIntegrationMappingPartnerItemTeamsCreateRequestTypeField(
237✔
28
  val: IntegrationMappingPartnerItemTeamsCreateRequestTypeField,
29
): SerializedData {
30
  return val;
×
31
}
32
export function deserializeIntegrationMappingPartnerItemTeamsCreateRequestTypeField(
237✔
33
  val: SerializedData,
34
): IntegrationMappingPartnerItemTeamsCreateRequestTypeField {
35
  if (val == 'channel') {
×
36
    return val;
×
37
  }
38
  if (val == 'team') {
×
39
    return val;
×
40
  }
41
  throw new BoxSdkError({
×
42
    message:
43
      "Can't deserialize IntegrationMappingPartnerItemTeamsCreateRequestTypeField",
44
  });
45
}
46
export function serializeIntegrationMappingPartnerItemTeamsCreateRequest(
237✔
47
  val: IntegrationMappingPartnerItemTeamsCreateRequest,
48
): SerializedData {
49
  return {
×
50
    ['type']: serializeIntegrationMappingPartnerItemTeamsCreateRequestTypeField(
51
      val.type,
52
    ),
53
    ['id']: val.id,
54
    ['tenant_id']: val.tenantId,
55
    ['team_id']: val.teamId,
56
  };
57
}
58
export function deserializeIntegrationMappingPartnerItemTeamsCreateRequest(
237✔
59
  val: SerializedData,
60
): IntegrationMappingPartnerItemTeamsCreateRequest {
61
  if (!sdIsMap(val)) {
×
62
    throw new BoxSdkError({
×
63
      message:
64
        'Expecting a map for "IntegrationMappingPartnerItemTeamsCreateRequest"',
65
    });
66
  }
67
  if (val.type == void 0) {
×
68
    throw new BoxSdkError({
×
69
      message:
70
        'Expecting "type" of type "IntegrationMappingPartnerItemTeamsCreateRequest" to be defined',
71
    });
72
  }
73
  const type: IntegrationMappingPartnerItemTeamsCreateRequestTypeField =
74
    deserializeIntegrationMappingPartnerItemTeamsCreateRequestTypeField(
×
75
      val.type,
76
    );
77
  if (val.id == void 0) {
×
78
    throw new BoxSdkError({
×
79
      message:
80
        'Expecting "id" of type "IntegrationMappingPartnerItemTeamsCreateRequest" to be defined',
81
    });
82
  }
83
  if (!sdIsString(val.id)) {
×
84
    throw new BoxSdkError({
×
85
      message:
86
        'Expecting string for "id" of type "IntegrationMappingPartnerItemTeamsCreateRequest"',
87
    });
88
  }
89
  const id: string = val.id;
×
90
  if (val.tenant_id == void 0) {
×
91
    throw new BoxSdkError({
×
92
      message:
93
        'Expecting "tenant_id" of type "IntegrationMappingPartnerItemTeamsCreateRequest" to be defined',
94
    });
95
  }
96
  if (!sdIsString(val.tenant_id)) {
×
97
    throw new BoxSdkError({
×
98
      message:
99
        'Expecting string for "tenant_id" of type "IntegrationMappingPartnerItemTeamsCreateRequest"',
100
    });
101
  }
102
  const tenantId: string = val.tenant_id;
×
103
  if (val.team_id == void 0) {
×
104
    throw new BoxSdkError({
×
105
      message:
106
        'Expecting "team_id" of type "IntegrationMappingPartnerItemTeamsCreateRequest" to be defined',
107
    });
108
  }
109
  if (!sdIsString(val.team_id)) {
×
110
    throw new BoxSdkError({
×
111
      message:
112
        'Expecting string for "team_id" of type "IntegrationMappingPartnerItemTeamsCreateRequest"',
113
    });
114
  }
115
  const teamId: string = val.team_id;
×
116
  return {
×
117
    type: type,
118
    id: id,
119
    tenantId: tenantId,
120
    teamId: teamId,
121
  } satisfies IntegrationMappingPartnerItemTeamsCreateRequest;
122
}
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