Skip to content

Commit 8dfaf99

Browse files
committed
remove redundant user_id (box/box-openapi#487)
1 parent 8d7e3b0 commit 8dfaf99

File tree

5 files changed

+9
-65
lines changed

5 files changed

+9
-65
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "5604447", "specHash": "86fde16", "version": "1.8.0" }
1+
{ "engineHash": "5604447", "specHash": "b2a3e3b", "version": "1.8.0" }

src/managers/trashedFiles.generated.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,6 @@ export interface RestoreFileFromTrashRequestBodyParentField {
130130
/**
131131
* The ID of parent item */
132132
readonly id?: string;
133-
/**
134-
* The input for `{user_id}` is optional. Moving to non-root folder is not allowed when `{user_id}` is present. Parent folder id should be zero when `{user_id}` is provided. */
135-
readonly userId?: string;
136133
readonly rawData?: SerializedData;
137134
}
138135
export interface RestoreFileFromTrashRequestBody {
@@ -446,7 +443,7 @@ export interface TrashedFilesManagerInput {
446443
export function serializeRestoreFileFromTrashRequestBodyParentField(
447444
val: RestoreFileFromTrashRequestBodyParentField,
448445
): SerializedData {
449-
return { ['id']: val.id, ['user_id']: val.userId };
446+
return { ['id']: val.id };
450447
}
451448
export function deserializeRestoreFileFromTrashRequestBodyParentField(
452449
val: SerializedData,
@@ -464,18 +461,7 @@ export function deserializeRestoreFileFromTrashRequestBodyParentField(
464461
});
465462
}
466463
const id: undefined | string = val.id == void 0 ? void 0 : val.id;
467-
if (!(val.user_id == void 0) && !sdIsString(val.user_id)) {
468-
throw new BoxSdkError({
469-
message:
470-
'Expecting string for "user_id" of type "RestoreFileFromTrashRequestBodyParentField"',
471-
});
472-
}
473-
const userId: undefined | string =
474-
val.user_id == void 0 ? void 0 : val.user_id;
475-
return {
476-
id: id,
477-
userId: userId,
478-
} satisfies RestoreFileFromTrashRequestBodyParentField;
464+
return { id: id } satisfies RestoreFileFromTrashRequestBodyParentField;
479465
}
480466
export function serializeRestoreFileFromTrashRequestBody(
481467
val: RestoreFileFromTrashRequestBody,

src/managers/trashedFolders.generated.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,6 @@ export interface RestoreFolderFromTrashRequestBodyParentField {
129129
/**
130130
* The ID of parent item */
131131
readonly id?: string;
132-
/**
133-
* The input for `{user_id}` is optional. Moving to non-root folder is not allowed when `{user_id}` is present. Parent folder id should be zero when `{user_id}` is provided. */
134-
readonly userId?: string;
135132
readonly rawData?: SerializedData;
136133
}
137134
export interface RestoreFolderFromTrashRequestBody {
@@ -461,7 +458,7 @@ export interface TrashedFoldersManagerInput {
461458
export function serializeRestoreFolderFromTrashRequestBodyParentField(
462459
val: RestoreFolderFromTrashRequestBodyParentField,
463460
): SerializedData {
464-
return { ['id']: val.id, ['user_id']: val.userId };
461+
return { ['id']: val.id };
465462
}
466463
export function deserializeRestoreFolderFromTrashRequestBodyParentField(
467464
val: SerializedData,
@@ -479,18 +476,7 @@ export function deserializeRestoreFolderFromTrashRequestBodyParentField(
479476
});
480477
}
481478
const id: undefined | string = val.id == void 0 ? void 0 : val.id;
482-
if (!(val.user_id == void 0) && !sdIsString(val.user_id)) {
483-
throw new BoxSdkError({
484-
message:
485-
'Expecting string for "user_id" of type "RestoreFolderFromTrashRequestBodyParentField"',
486-
});
487-
}
488-
const userId: undefined | string =
489-
val.user_id == void 0 ? void 0 : val.user_id;
490-
return {
491-
id: id,
492-
userId: userId,
493-
} satisfies RestoreFolderFromTrashRequestBodyParentField;
479+
return { id: id } satisfies RestoreFolderFromTrashRequestBodyParentField;
494480
}
495481
export function serializeRestoreFolderFromTrashRequestBody(
496482
val: RestoreFolderFromTrashRequestBody,

src/managers/trashedWebLinks.generated.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,6 @@ export interface RestoreWeblinkFromTrashRequestBodyParentField {
129129
/**
130130
* The ID of parent item */
131131
readonly id?: string;
132-
/**
133-
* The input for `{user_id}` is optional. Moving to non-root folder is not allowed when `{user_id}` is present. Parent folder id should be zero when `{user_id}` is provided. */
134-
readonly userId?: string;
135132
readonly rawData?: SerializedData;
136133
}
137134
export interface RestoreWeblinkFromTrashRequestBody {
@@ -417,7 +414,7 @@ export interface TrashedWebLinksManagerInput {
417414
export function serializeRestoreWeblinkFromTrashRequestBodyParentField(
418415
val: RestoreWeblinkFromTrashRequestBodyParentField,
419416
): SerializedData {
420-
return { ['id']: val.id, ['user_id']: val.userId };
417+
return { ['id']: val.id };
421418
}
422419
export function deserializeRestoreWeblinkFromTrashRequestBodyParentField(
423420
val: SerializedData,
@@ -435,18 +432,7 @@ export function deserializeRestoreWeblinkFromTrashRequestBodyParentField(
435432
});
436433
}
437434
const id: undefined | string = val.id == void 0 ? void 0 : val.id;
438-
if (!(val.user_id == void 0) && !sdIsString(val.user_id)) {
439-
throw new BoxSdkError({
440-
message:
441-
'Expecting string for "user_id" of type "RestoreWeblinkFromTrashRequestBodyParentField"',
442-
});
443-
}
444-
const userId: undefined | string =
445-
val.user_id == void 0 ? void 0 : val.user_id;
446-
return {
447-
id: id,
448-
userId: userId,
449-
} satisfies RestoreWeblinkFromTrashRequestBodyParentField;
435+
return { id: id } satisfies RestoreWeblinkFromTrashRequestBodyParentField;
450436
}
451437
export function serializeRestoreWeblinkFromTrashRequestBody(
452438
val: RestoreWeblinkFromTrashRequestBody,

src/managers/uploads.generated.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,6 @@ export interface PreflightFileUploadCheckRequestBodyParentField {
214214
/**
215215
* The ID of parent item */
216216
readonly id?: string;
217-
/**
218-
* The input for `{user_id}` is optional. Moving to non-root folder is not allowed when `{user_id}` is present. Parent folder id should be zero when `{user_id}` is provided. */
219-
readonly userId?: string;
220217
readonly rawData?: SerializedData;
221218
}
222219
export interface PreflightFileUploadCheckRequestBody {
@@ -638,7 +635,7 @@ export function deserializeUploadFileVersionRequestBodyAttributesField(
638635
export function serializePreflightFileUploadCheckRequestBodyParentField(
639636
val: PreflightFileUploadCheckRequestBodyParentField,
640637
): SerializedData {
641-
return { ['id']: val.id, ['user_id']: val.userId };
638+
return { ['id']: val.id };
642639
}
643640
export function deserializePreflightFileUploadCheckRequestBodyParentField(
644641
val: SerializedData,
@@ -656,18 +653,7 @@ export function deserializePreflightFileUploadCheckRequestBodyParentField(
656653
});
657654
}
658655
const id: undefined | string = val.id == void 0 ? void 0 : val.id;
659-
if (!(val.user_id == void 0) && !sdIsString(val.user_id)) {
660-
throw new BoxSdkError({
661-
message:
662-
'Expecting string for "user_id" of type "PreflightFileUploadCheckRequestBodyParentField"',
663-
});
664-
}
665-
const userId: undefined | string =
666-
val.user_id == void 0 ? void 0 : val.user_id;
667-
return {
668-
id: id,
669-
userId: userId,
670-
} satisfies PreflightFileUploadCheckRequestBodyParentField;
656+
return { id: id } satisfies PreflightFileUploadCheckRequestBodyParentField;
671657
}
672658
export function serializePreflightFileUploadCheckRequestBody(
673659
val: PreflightFileUploadCheckRequestBody,

0 commit comments

Comments
 (0)