Skip to content

Commit 6779837

Browse files
box-sdk-buildbox-sdk-build
andauthored
test: Test Integration Mapping for Teams (box/box-codegen#668) (#552)
Co-authored-by: box-sdk-build <[email protected]>
1 parent 039f7b9 commit 6779837

File tree

4 files changed

+240
-110
lines changed

4 files changed

+240
-110
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "be67a6e", "specHash": "c303afc", "version": "1.13.2" }
1+
{ "engineHash": "3d68c3f", "specHash": "c303afc", "version": "1.13.2" }

docs/integrationMappings.md

Lines changed: 68 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,18 @@ This operation is performed by calling function `updateSlackIntegrationMappingBy
9393
See the endpoint docs at
9494
[API Reference](https://developer.box.com/reference/put-integration-mappings-slack-id/).
9595

96-
_Currently we don't have an example for calling `updateSlackIntegrationMappingById` in integration tests_
96+
<!-- sample put_integration_mappings_slack_id -->
97+
98+
```ts
99+
await userClient.integrationMappings.updateSlackIntegrationMappingById(
100+
integrationMappingId,
101+
{
102+
requestBody: {
103+
boxItem: new IntegrationMappingBoxItemSlack({ id: '1234567' }),
104+
} satisfies UpdateSlackIntegrationMappingByIdRequestBody,
105+
} satisfies UpdateSlackIntegrationMappingByIdOptionalsInput,
106+
);
107+
```
97108

98109
### Arguments
99110

@@ -120,7 +131,13 @@ This operation is performed by calling function `deleteSlackIntegrationMappingBy
120131
See the endpoint docs at
121132
[API Reference](https://developer.box.com/reference/delete-integration-mappings-slack-id/).
122133

123-
_Currently we don't have an example for calling `deleteSlackIntegrationMappingById` in integration tests_
134+
<!-- sample delete_integration_mappings_slack_id -->
135+
136+
```ts
137+
await userClient.integrationMappings.deleteSlackIntegrationMappingById(
138+
integrationMappingId,
139+
);
140+
```
124141

125142
### Arguments
126143

@@ -141,19 +158,23 @@ Lists [Teams integration mappings](https://support.box.com/hc/en-us/articles/360
141158
You need Admin or Co-Admin role to
142159
use this endpoint.
143160

144-
This operation is performed by calling function `getIntegrationMappingTeams`.
161+
This operation is performed by calling function `getTeamsIntegrationMapping`.
145162

146163
See the endpoint docs at
147164
[API Reference](https://developer.box.com/reference/get-integration-mappings-teams/).
148165

149-
_Currently we don't have an example for calling `getIntegrationMappingTeams` in integration tests_
166+
<!-- sample get_integration_mappings_teams -->
167+
168+
```ts
169+
await userClient.integrationMappings.getTeamsIntegrationMapping();
170+
```
150171

151172
### Arguments
152173

153-
- queryParams `GetIntegrationMappingTeamsQueryParams`
154-
- Query parameters of getIntegrationMappingTeams method
155-
- headersInput `GetIntegrationMappingTeamsHeadersInput`
156-
- Headers of getIntegrationMappingTeams method
174+
- queryParams `GetTeamsIntegrationMappingQueryParams`
175+
- Query parameters of getTeamsIntegrationMapping method
176+
- headersInput `GetTeamsIntegrationMappingHeadersInput`
177+
- Headers of getTeamsIntegrationMapping method
157178
- cancellationToken `undefined | CancellationToken`
158179
- Token used for request cancellation.
159180

@@ -170,18 +191,30 @@ by mapping a Teams channel to a Box item.
170191
You need Admin or Co-Admin role to
171192
use this endpoint.
172193

173-
This operation is performed by calling function `createIntegrationMappingTeams`.
194+
This operation is performed by calling function `createTeamsIntegrationMapping`.
174195

175196
See the endpoint docs at
176197
[API Reference](https://developer.box.com/reference/post-integration-mappings-teams/).
177198

178-
_Currently we don't have an example for calling `createIntegrationMappingTeams` in integration tests_
199+
<!-- sample post_integration_mappings_teams -->
200+
201+
```ts
202+
await userClient.integrationMappings.createTeamsIntegrationMapping({
203+
partnerItem: {
204+
type: 'channel' as IntegrationMappingPartnerItemTeamsCreateRequestTypeField,
205+
id: partnerItemId,
206+
tenantId: tenantId,
207+
teamId: teamId,
208+
} satisfies IntegrationMappingPartnerItemTeamsCreateRequest,
209+
boxItem: new FolderReference({ id: folder.id }),
210+
} satisfies IntegrationMappingTeamsCreateRequest);
211+
```
179212

180213
### Arguments
181214

182215
- requestBody `IntegrationMappingTeamsCreateRequest`
183-
- Request body of createIntegrationMappingTeams method
184-
- optionalsInput `CreateIntegrationMappingTeamsOptionalsInput`
216+
- Request body of createTeamsIntegrationMapping method
217+
- optionalsInput `CreateTeamsIntegrationMappingOptionalsInput`
185218
-
186219

187220
### Returns
@@ -197,18 +230,29 @@ Supports updating the Box folder ID and options.
197230
You need Admin or Co-Admin role to
198231
use this endpoint.
199232

200-
This operation is performed by calling function `updateIntegrationMappingTeamsById`.
233+
This operation is performed by calling function `updateTeamsIntegrationMappingById`.
201234

202235
See the endpoint docs at
203236
[API Reference](https://developer.box.com/reference/put-integration-mappings-teams-id/).
204237

205-
_Currently we don't have an example for calling `updateIntegrationMappingTeamsById` in integration tests_
238+
<!-- sample put_integration_mappings_teams_id -->
239+
240+
```ts
241+
await userClient.integrationMappings.updateTeamsIntegrationMappingById(
242+
integrationMappingId,
243+
{
244+
requestBody: {
245+
boxItem: new FolderReference({ id: '1234567' }),
246+
} satisfies UpdateTeamsIntegrationMappingByIdRequestBody,
247+
} satisfies UpdateTeamsIntegrationMappingByIdOptionalsInput,
248+
);
249+
```
206250

207251
### Arguments
208252

209253
- integrationMappingId `string`
210254
- An ID of an integration mapping Example: "11235432"
211-
- optionalsInput `UpdateIntegrationMappingTeamsByIdOptionalsInput`
255+
- optionalsInput `UpdateTeamsIntegrationMappingByIdOptionalsInput`
212256
-
213257

214258
### Returns
@@ -223,18 +267,24 @@ Deletes a [Teams integration mapping](https://support.box.com/hc/en-us/articles/
223267
You need Admin or Co-Admin role to
224268
use this endpoint.
225269

226-
This operation is performed by calling function `deleteIntegrationMappingTeamsById`.
270+
This operation is performed by calling function `deleteTeamsIntegrationMappingById`.
227271

228272
See the endpoint docs at
229273
[API Reference](https://developer.box.com/reference/delete-integration-mappings-teams-id/).
230274

231-
_Currently we don't have an example for calling `deleteIntegrationMappingTeamsById` in integration tests_
275+
<!-- sample delete_integration_mappings_teams_id -->
276+
277+
```ts
278+
await userClient.integrationMappings.deleteTeamsIntegrationMappingById(
279+
integrationMappingId,
280+
);
281+
```
232282

233283
### Arguments
234284

235285
- integrationMappingId `string`
236286
- An ID of an integration mapping Example: "11235432"
237-
- optionalsInput `DeleteIntegrationMappingTeamsByIdOptionalsInput`
287+
- optionalsInput `DeleteTeamsIntegrationMappingByIdOptionalsInput`
238288
-
239289

240290
### Returns

0 commit comments

Comments
 (0)