Skip to content

Commit 6f5d307

Browse files
fix: Correct search content type 'tags' to match API (box/box-openapi#591) (#1382)
1 parent 466d6cf commit 6f5d307

4 files changed

Lines changed: 19 additions & 6 deletions

File tree

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "7c01dda", "specHash": "74a1e4a", "version": "10.5.0" }
1+
{ "engineHash": "02fdae4", "specHash": "c8e3a85", "version": "10.5.0" }

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/managers/search.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export type SearchForContentQueryParamsContentTypesField =
9393
| 'description'
9494
| 'file_content'
9595
| 'comments'
96-
| 'tag'
96+
| 'tags'
9797
| string;
9898
export type SearchForContentQueryParamsTypeField =
9999
| 'file'
@@ -595,7 +595,7 @@ export function deserializeSearchForContentQueryParamsContentTypesField(
595595
if (val == 'comments') {
596596
return val;
597597
}
598-
if (val == 'tag') {
598+
if (val == 'tags') {
599599
return val;
600600
}
601601
if (sdIsString(val)) {

src/schemas/v2025R0/hubItemOperationResultV2025R0.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ export interface HubItemOperationResultV2025R0 {
2323
* The action performed on the item. */
2424
readonly action?: string;
2525
readonly item?: HubItemReferenceV2025R0;
26+
/**
27+
* The ID of the parent block the item was added to. */
28+
readonly parentId?: string;
2629
/**
2730
* The HTTP status code of the operation. */
2831
readonly status?: number;
@@ -40,6 +43,7 @@ export function serializeHubItemOperationResultV2025R0(
4043
val.item == void 0
4144
? val.item
4245
: serializeHubItemReferenceV2025R0(val.item),
46+
['parent_id']: val.parentId,
4347
['status']: val.status,
4448
['error']: val.error,
4549
};
@@ -61,6 +65,14 @@ export function deserializeHubItemOperationResultV2025R0(
6165
const action: undefined | string = val.action == void 0 ? void 0 : val.action;
6266
const item: undefined | HubItemReferenceV2025R0 =
6367
val.item == void 0 ? void 0 : deserializeHubItemReferenceV2025R0(val.item);
68+
if (!(val.parent_id == void 0) && !sdIsString(val.parent_id)) {
69+
throw new BoxSdkError({
70+
message:
71+
'Expecting string for "parent_id" of type "HubItemOperationResultV2025R0"',
72+
});
73+
}
74+
const parentId: undefined | string =
75+
val.parent_id == void 0 ? void 0 : val.parent_id;
6476
if (!(val.status == void 0) && !sdIsNumber(val.status)) {
6577
throw new BoxSdkError({
6678
message:
@@ -78,6 +90,7 @@ export function deserializeHubItemOperationResultV2025R0(
7890
return {
7991
action: action,
8092
item: item,
93+
parentId: parentId,
8194
status: status,
8295
error: error,
8396
} satisfies HubItemOperationResultV2025R0;

0 commit comments

Comments
 (0)