Skip to content

Commit ba45671

Browse files
box-sdk-buildbox-sdk-build
andauthored
feat: add Integration Mappings Teams API (box/box-openapi#517) (#244)
Co-authored-by: box-sdk-build <[email protected]>
1 parent d81c700 commit ba45671

22 files changed

+1645
-1
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "41feeaa", "specHash": "1080bb4", "version": "0.5.0" }
1+
{ "engineHash": "41feeaa", "specHash": "c303afc", "version": "0.5.0" }

docs/integrationmappings.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
- [Create Slack integration mapping](#create-slack-integration-mapping)
66
- [Update Slack integration mapping](#update-slack-integration-mapping)
77
- [Delete Slack integration mapping](#delete-slack-integration-mapping)
8+
- [List Teams integration mappings](#list-teams-integration-mappings)
9+
- [Create Teams integration mapping](#create-teams-integration-mapping)
10+
- [Update Teams integration mapping](#update-teams-integration-mapping)
11+
- [Delete Teams integration mapping](#delete-teams-integration-mapping)
812

913
## List Slack integration mappings
1014

@@ -133,3 +137,119 @@ This function returns a value of type `void`.
133137
Empty body in response
134138

135139

140+
## List Teams integration mappings
141+
142+
Lists [Teams integration mappings](https://support.box.com/hc/en-us/articles/360044681474-Using-Box-for-Teams) in a users' enterprise.
143+
You need Admin or Co-Admin role to
144+
use this endpoint.
145+
146+
This operation is performed by calling function `getIntegrationMappingTeams`.
147+
148+
See the endpoint docs at
149+
[API Reference](https://developer.box.com/reference/get-integration-mappings-teams/).
150+
151+
*Currently we don't have an example for calling `getIntegrationMappingTeams` in integration tests*
152+
153+
### Arguments
154+
155+
- queryParams `GetIntegrationMappingTeamsQueryParams`
156+
- Query parameters of getIntegrationMappingTeams method
157+
- headers `GetIntegrationMappingTeamsHeaders`
158+
- Headers of getIntegrationMappingTeams method
159+
160+
161+
### Returns
162+
163+
This function returns a value of type `IntegrationMappingsTeams`.
164+
165+
Returns a collection of integration mappings
166+
167+
168+
## Create Teams integration mapping
169+
170+
Creates a [Teams integration mapping](https://support.box.com/hc/en-us/articles/360044681474-Using-Box-for-Teams)
171+
by mapping a Teams channel to a Box item.
172+
You need Admin or Co-Admin role to
173+
use this endpoint.
174+
175+
This operation is performed by calling function `createIntegrationMappingTeams`.
176+
177+
See the endpoint docs at
178+
[API Reference](https://developer.box.com/reference/post-integration-mappings-teams/).
179+
180+
*Currently we don't have an example for calling `createIntegrationMappingTeams` in integration tests*
181+
182+
### Arguments
183+
184+
- requestBody `IntegrationMappingTeamsCreateRequest`
185+
- Request body of createIntegrationMappingTeams method
186+
- headers `CreateIntegrationMappingTeamsHeaders`
187+
- Headers of createIntegrationMappingTeams method
188+
189+
190+
### Returns
191+
192+
This function returns a value of type `IntegrationMappingTeams`.
193+
194+
Returns the created integration mapping.
195+
196+
197+
## Update Teams integration mapping
198+
199+
Updates a [Teams integration mapping](https://support.box.com/hc/en-us/articles/360044681474-Using-Box-for-Teams).
200+
Supports updating the Box folder ID and options.
201+
You need Admin or Co-Admin role to
202+
use this endpoint.
203+
204+
This operation is performed by calling function `updateIntegrationMappingTeamsById`.
205+
206+
See the endpoint docs at
207+
[API Reference](https://developer.box.com/reference/put-integration-mappings-teams-id/).
208+
209+
*Currently we don't have an example for calling `updateIntegrationMappingTeamsById` in integration tests*
210+
211+
### Arguments
212+
213+
- integrationMappingId `String`
214+
- An ID of an integration mapping Example: "11235432"
215+
- requestBody `UpdateIntegrationMappingTeamsByIdRequestBody`
216+
- Request body of updateIntegrationMappingTeamsById method
217+
- headers `UpdateIntegrationMappingTeamsByIdHeaders`
218+
- Headers of updateIntegrationMappingTeamsById method
219+
220+
221+
### Returns
222+
223+
This function returns a value of type `IntegrationMappingTeams`.
224+
225+
Returns the updated integration mapping object.
226+
227+
228+
## Delete Teams integration mapping
229+
230+
Deletes a [Teams integration mapping](https://support.box.com/hc/en-us/articles/360044681474-Using-Box-for-Teams).
231+
You need Admin or Co-Admin role to
232+
use this endpoint.
233+
234+
This operation is performed by calling function `deleteIntegrationMappingTeamsById`.
235+
236+
See the endpoint docs at
237+
[API Reference](https://developer.box.com/reference/delete-integration-mappings-teams-id/).
238+
239+
*Currently we don't have an example for calling `deleteIntegrationMappingTeamsById` in integration tests*
240+
241+
### Arguments
242+
243+
- integrationMappingId `String`
244+
- An ID of an integration mapping Example: "11235432"
245+
- headers `DeleteIntegrationMappingTeamsByIdHeaders`
246+
- Headers of deleteIntegrationMappingTeamsById method
247+
248+
249+
### Returns
250+
251+
This function returns a value of type `void`.
252+
253+
Empty body in response
254+
255+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package com.box.sdkgen.managers.integrationmappings;
2+
3+
import static com.box.sdkgen.internal.utils.UtilsManager.mapOf;
4+
5+
import java.util.Map;
6+
7+
public class CreateIntegrationMappingTeamsHeaders {
8+
9+
public Map<String, String> extraHeaders;
10+
11+
public CreateIntegrationMappingTeamsHeaders() {
12+
this.extraHeaders = mapOf();
13+
}
14+
15+
protected CreateIntegrationMappingTeamsHeaders(
16+
CreateIntegrationMappingTeamsHeadersBuilder builder) {
17+
this.extraHeaders = builder.extraHeaders;
18+
}
19+
20+
public Map<String, String> getExtraHeaders() {
21+
return extraHeaders;
22+
}
23+
24+
public static class CreateIntegrationMappingTeamsHeadersBuilder {
25+
26+
protected Map<String, String> extraHeaders;
27+
28+
public CreateIntegrationMappingTeamsHeadersBuilder extraHeaders(
29+
Map<String, String> extraHeaders) {
30+
this.extraHeaders = extraHeaders;
31+
return this;
32+
}
33+
34+
public CreateIntegrationMappingTeamsHeaders build() {
35+
return new CreateIntegrationMappingTeamsHeaders(this);
36+
}
37+
}
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package com.box.sdkgen.managers.integrationmappings;
2+
3+
import static com.box.sdkgen.internal.utils.UtilsManager.mapOf;
4+
5+
import java.util.Map;
6+
7+
public class DeleteIntegrationMappingTeamsByIdHeaders {
8+
9+
public Map<String, String> extraHeaders;
10+
11+
public DeleteIntegrationMappingTeamsByIdHeaders() {
12+
this.extraHeaders = mapOf();
13+
}
14+
15+
protected DeleteIntegrationMappingTeamsByIdHeaders(
16+
DeleteIntegrationMappingTeamsByIdHeadersBuilder builder) {
17+
this.extraHeaders = builder.extraHeaders;
18+
}
19+
20+
public Map<String, String> getExtraHeaders() {
21+
return extraHeaders;
22+
}
23+
24+
public static class DeleteIntegrationMappingTeamsByIdHeadersBuilder {
25+
26+
protected Map<String, String> extraHeaders;
27+
28+
public DeleteIntegrationMappingTeamsByIdHeadersBuilder extraHeaders(
29+
Map<String, String> extraHeaders) {
30+
this.extraHeaders = extraHeaders;
31+
return this;
32+
}
33+
34+
public DeleteIntegrationMappingTeamsByIdHeaders build() {
35+
return new DeleteIntegrationMappingTeamsByIdHeaders(this);
36+
}
37+
}
38+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package com.box.sdkgen.managers.integrationmappings;
2+
3+
import static com.box.sdkgen.internal.utils.UtilsManager.mapOf;
4+
5+
import java.util.Map;
6+
7+
public class GetIntegrationMappingTeamsHeaders {
8+
9+
public Map<String, String> extraHeaders;
10+
11+
public GetIntegrationMappingTeamsHeaders() {
12+
this.extraHeaders = mapOf();
13+
}
14+
15+
protected GetIntegrationMappingTeamsHeaders(GetIntegrationMappingTeamsHeadersBuilder builder) {
16+
this.extraHeaders = builder.extraHeaders;
17+
}
18+
19+
public Map<String, String> getExtraHeaders() {
20+
return extraHeaders;
21+
}
22+
23+
public static class GetIntegrationMappingTeamsHeadersBuilder {
24+
25+
protected Map<String, String> extraHeaders;
26+
27+
public GetIntegrationMappingTeamsHeadersBuilder extraHeaders(Map<String, String> extraHeaders) {
28+
this.extraHeaders = extraHeaders;
29+
return this;
30+
}
31+
32+
public GetIntegrationMappingTeamsHeaders build() {
33+
return new GetIntegrationMappingTeamsHeaders(this);
34+
}
35+
}
36+
}
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
package com.box.sdkgen.managers.integrationmappings;
2+
3+
import com.box.sdkgen.serialization.json.EnumWrapper;
4+
5+
public class GetIntegrationMappingTeamsQueryParams {
6+
7+
public EnumWrapper<GetIntegrationMappingTeamsQueryParamsPartnerItemTypeField> partnerItemType;
8+
9+
public String partnerItemId;
10+
11+
public String boxItemId;
12+
13+
public EnumWrapper<GetIntegrationMappingTeamsQueryParamsBoxItemTypeField> boxItemType;
14+
15+
public GetIntegrationMappingTeamsQueryParams() {}
16+
17+
protected GetIntegrationMappingTeamsQueryParams(
18+
GetIntegrationMappingTeamsQueryParamsBuilder builder) {
19+
this.partnerItemType = builder.partnerItemType;
20+
this.partnerItemId = builder.partnerItemId;
21+
this.boxItemId = builder.boxItemId;
22+
this.boxItemType = builder.boxItemType;
23+
}
24+
25+
public EnumWrapper<GetIntegrationMappingTeamsQueryParamsPartnerItemTypeField>
26+
getPartnerItemType() {
27+
return partnerItemType;
28+
}
29+
30+
public String getPartnerItemId() {
31+
return partnerItemId;
32+
}
33+
34+
public String getBoxItemId() {
35+
return boxItemId;
36+
}
37+
38+
public EnumWrapper<GetIntegrationMappingTeamsQueryParamsBoxItemTypeField> getBoxItemType() {
39+
return boxItemType;
40+
}
41+
42+
public static class GetIntegrationMappingTeamsQueryParamsBuilder {
43+
44+
protected EnumWrapper<GetIntegrationMappingTeamsQueryParamsPartnerItemTypeField>
45+
partnerItemType;
46+
47+
protected String partnerItemId;
48+
49+
protected String boxItemId;
50+
51+
protected EnumWrapper<GetIntegrationMappingTeamsQueryParamsBoxItemTypeField> boxItemType;
52+
53+
public GetIntegrationMappingTeamsQueryParamsBuilder partnerItemType(
54+
GetIntegrationMappingTeamsQueryParamsPartnerItemTypeField partnerItemType) {
55+
this.partnerItemType =
56+
new EnumWrapper<GetIntegrationMappingTeamsQueryParamsPartnerItemTypeField>(
57+
partnerItemType);
58+
return this;
59+
}
60+
61+
public GetIntegrationMappingTeamsQueryParamsBuilder partnerItemType(
62+
EnumWrapper<GetIntegrationMappingTeamsQueryParamsPartnerItemTypeField> partnerItemType) {
63+
this.partnerItemType = partnerItemType;
64+
return this;
65+
}
66+
67+
public GetIntegrationMappingTeamsQueryParamsBuilder partnerItemId(String partnerItemId) {
68+
this.partnerItemId = partnerItemId;
69+
return this;
70+
}
71+
72+
public GetIntegrationMappingTeamsQueryParamsBuilder boxItemId(String boxItemId) {
73+
this.boxItemId = boxItemId;
74+
return this;
75+
}
76+
77+
public GetIntegrationMappingTeamsQueryParamsBuilder boxItemType(
78+
GetIntegrationMappingTeamsQueryParamsBoxItemTypeField boxItemType) {
79+
this.boxItemType =
80+
new EnumWrapper<GetIntegrationMappingTeamsQueryParamsBoxItemTypeField>(boxItemType);
81+
return this;
82+
}
83+
84+
public GetIntegrationMappingTeamsQueryParamsBuilder boxItemType(
85+
EnumWrapper<GetIntegrationMappingTeamsQueryParamsBoxItemTypeField> boxItemType) {
86+
this.boxItemType = boxItemType;
87+
return this;
88+
}
89+
90+
public GetIntegrationMappingTeamsQueryParams build() {
91+
return new GetIntegrationMappingTeamsQueryParams(this);
92+
}
93+
}
94+
}

0 commit comments

Comments
 (0)