Skip to content

Commit 991dc29

Browse files
feat: Support nullable fields in TypeScript (box/box-codegen#612) (#425)
1 parent c3f14c6 commit 991dc29

File tree

283 files changed

+3157
-2678
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

283 files changed

+3157
-2678
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "37e1577", "specHash": "c2c76f3", "version": "1.7.0" }
1+
{ "engineHash": "f6ccea9", "specHash": "6d5f53e", "version": "1.7.0" }

.github/workflows/spell-check-lint.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- main
77
jobs:
8-
spellcheck-request-title:
8+
spellcheck-request:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout current repository
@@ -19,3 +19,5 @@ jobs:
1919
path: spellchecker
2020
- name: Execute spellchecker
2121
uses: ./spellchecker
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docs/collections.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ await client.collections.getCollectionItems(favouriteCollection.id!);
6262

6363
### Returns
6464

65-
This function returns a value of type `Items`.
65+
This function returns a value of type `ItemsOffsetPaginated`.
6666

6767
Returns an array of items in the collection.
6868

docs/fileVersions.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@ See the endpoint docs at
5454
await client.fileVersions.getFileVersionById(
5555
file.id,
5656
fileVersions.entries![0].id,
57+
{
58+
queryParams: {
59+
fields: [
60+
'trashed_at' as string,
61+
'trashed_by' as string,
62+
'restored_at' as string,
63+
'restored_by' as string,
64+
],
65+
} satisfies GetFileVersionByIdQueryParams,
66+
} satisfies GetFileVersionByIdOptionalsInput,
5767
);
5868
```
5969

@@ -121,7 +131,15 @@ This operation is performed by calling function `updateFileVersionById`.
121131
See the endpoint docs at
122132
[API Reference](https://developer.box.com/reference/put-files-id-versions-id/).
123133

124-
_Currently we don't have an example for calling `updateFileVersionById` in integration tests_
134+
<!-- sample put_files_id_versions_id -->
135+
136+
```ts
137+
await client.fileVersions.updateFileVersionById(file.id, fileVersion.id, {
138+
requestBody: {
139+
trashedAt: createNull(),
140+
} satisfies UpdateFileVersionByIdRequestBody,
141+
} satisfies UpdateFileVersionByIdOptionalsInput);
142+
```
125143

126144
### Arguments
127145

docs/listCollaborations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ await client.listCollaborations.getCollaborations({
101101

102102
### Returns
103103

104-
This function returns a value of type `Collaborations`.
104+
This function returns a value of type `CollaborationsOffsetPaginated`.
105105

106106
Returns a collection of pending collaboration objects.
107107

@@ -136,7 +136,7 @@ await client.listCollaborations.getGroupCollaborations(group.id);
136136

137137
### Returns
138138

139-
This function returns a value of type `Collaborations`.
139+
This function returns a value of type `CollaborationsOffsetPaginated`.
140140

141141
Returns a collection of collaboration objects. If there are no
142142
collaborations, an empty collection will be returned.

docs/users.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ See the endpoint docs at
172172

173173
```ts
174174
await client.users.updateUserById(user.id, {
175-
requestBody: { name: updatedUserName } satisfies UpdateUserByIdRequestBody,
175+
requestBody: {
176+
notificationEmail: createNull(),
177+
} satisfies UpdateUserByIdRequestBody,
176178
} satisfies UpdateUserByIdOptionalsInput);
177179
```
178180

0 commit comments

Comments
 (0)