Skip to content

Commit

Permalink
remove redundant user_id (box/box-openapi#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
box-sdk-build committed Dec 6, 2024
1 parent 8d7e3b0 commit 8dfaf99
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "5604447", "specHash": "86fde16", "version": "1.8.0" }
{ "engineHash": "5604447", "specHash": "b2a3e3b", "version": "1.8.0" }
18 changes: 2 additions & 16 deletions src/managers/trashedFiles.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,6 @@ export interface RestoreFileFromTrashRequestBodyParentField {
/**
* The ID of parent item */
readonly id?: string;
/**
* 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. */
readonly userId?: string;
readonly rawData?: SerializedData;
}
export interface RestoreFileFromTrashRequestBody {
Expand Down Expand Up @@ -446,7 +443,7 @@ export interface TrashedFilesManagerInput {
export function serializeRestoreFileFromTrashRequestBodyParentField(
val: RestoreFileFromTrashRequestBodyParentField,
): SerializedData {
return { ['id']: val.id, ['user_id']: val.userId };
return { ['id']: val.id };
}
export function deserializeRestoreFileFromTrashRequestBodyParentField(
val: SerializedData,
Expand All @@ -464,18 +461,7 @@ export function deserializeRestoreFileFromTrashRequestBodyParentField(
});
}
const id: undefined | string = val.id == void 0 ? void 0 : val.id;
if (!(val.user_id == void 0) && !sdIsString(val.user_id)) {
throw new BoxSdkError({
message:
'Expecting string for "user_id" of type "RestoreFileFromTrashRequestBodyParentField"',
});
}
const userId: undefined | string =
val.user_id == void 0 ? void 0 : val.user_id;
return {
id: id,
userId: userId,
} satisfies RestoreFileFromTrashRequestBodyParentField;
return { id: id } satisfies RestoreFileFromTrashRequestBodyParentField;
}
export function serializeRestoreFileFromTrashRequestBody(
val: RestoreFileFromTrashRequestBody,
Expand Down
18 changes: 2 additions & 16 deletions src/managers/trashedFolders.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@ export interface RestoreFolderFromTrashRequestBodyParentField {
/**
* The ID of parent item */
readonly id?: string;
/**
* 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. */
readonly userId?: string;
readonly rawData?: SerializedData;
}
export interface RestoreFolderFromTrashRequestBody {
Expand Down Expand Up @@ -461,7 +458,7 @@ export interface TrashedFoldersManagerInput {
export function serializeRestoreFolderFromTrashRequestBodyParentField(
val: RestoreFolderFromTrashRequestBodyParentField,
): SerializedData {
return { ['id']: val.id, ['user_id']: val.userId };
return { ['id']: val.id };
}
export function deserializeRestoreFolderFromTrashRequestBodyParentField(
val: SerializedData,
Expand All @@ -479,18 +476,7 @@ export function deserializeRestoreFolderFromTrashRequestBodyParentField(
});
}
const id: undefined | string = val.id == void 0 ? void 0 : val.id;
if (!(val.user_id == void 0) && !sdIsString(val.user_id)) {
throw new BoxSdkError({
message:
'Expecting string for "user_id" of type "RestoreFolderFromTrashRequestBodyParentField"',
});
}
const userId: undefined | string =
val.user_id == void 0 ? void 0 : val.user_id;
return {
id: id,
userId: userId,
} satisfies RestoreFolderFromTrashRequestBodyParentField;
return { id: id } satisfies RestoreFolderFromTrashRequestBodyParentField;
}
export function serializeRestoreFolderFromTrashRequestBody(
val: RestoreFolderFromTrashRequestBody,
Expand Down
18 changes: 2 additions & 16 deletions src/managers/trashedWebLinks.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@ export interface RestoreWeblinkFromTrashRequestBodyParentField {
/**
* The ID of parent item */
readonly id?: string;
/**
* 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. */
readonly userId?: string;
readonly rawData?: SerializedData;
}
export interface RestoreWeblinkFromTrashRequestBody {
Expand Down Expand Up @@ -417,7 +414,7 @@ export interface TrashedWebLinksManagerInput {
export function serializeRestoreWeblinkFromTrashRequestBodyParentField(
val: RestoreWeblinkFromTrashRequestBodyParentField,
): SerializedData {
return { ['id']: val.id, ['user_id']: val.userId };
return { ['id']: val.id };
}
export function deserializeRestoreWeblinkFromTrashRequestBodyParentField(
val: SerializedData,
Expand All @@ -435,18 +432,7 @@ export function deserializeRestoreWeblinkFromTrashRequestBodyParentField(
});
}
const id: undefined | string = val.id == void 0 ? void 0 : val.id;
if (!(val.user_id == void 0) && !sdIsString(val.user_id)) {
throw new BoxSdkError({
message:
'Expecting string for "user_id" of type "RestoreWeblinkFromTrashRequestBodyParentField"',
});
}
const userId: undefined | string =
val.user_id == void 0 ? void 0 : val.user_id;
return {
id: id,
userId: userId,
} satisfies RestoreWeblinkFromTrashRequestBodyParentField;
return { id: id } satisfies RestoreWeblinkFromTrashRequestBodyParentField;
}
export function serializeRestoreWeblinkFromTrashRequestBody(
val: RestoreWeblinkFromTrashRequestBody,
Expand Down
18 changes: 2 additions & 16 deletions src/managers/uploads.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,6 @@ export interface PreflightFileUploadCheckRequestBodyParentField {
/**
* The ID of parent item */
readonly id?: string;
/**
* 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. */
readonly userId?: string;
readonly rawData?: SerializedData;
}
export interface PreflightFileUploadCheckRequestBody {
Expand Down Expand Up @@ -638,7 +635,7 @@ export function deserializeUploadFileVersionRequestBodyAttributesField(
export function serializePreflightFileUploadCheckRequestBodyParentField(
val: PreflightFileUploadCheckRequestBodyParentField,
): SerializedData {
return { ['id']: val.id, ['user_id']: val.userId };
return { ['id']: val.id };
}
export function deserializePreflightFileUploadCheckRequestBodyParentField(
val: SerializedData,
Expand All @@ -656,18 +653,7 @@ export function deserializePreflightFileUploadCheckRequestBodyParentField(
});
}
const id: undefined | string = val.id == void 0 ? void 0 : val.id;
if (!(val.user_id == void 0) && !sdIsString(val.user_id)) {
throw new BoxSdkError({
message:
'Expecting string for "user_id" of type "PreflightFileUploadCheckRequestBodyParentField"',
});
}
const userId: undefined | string =
val.user_id == void 0 ? void 0 : val.user_id;
return {
id: id,
userId: userId,
} satisfies PreflightFileUploadCheckRequestBodyParentField;
return { id: id } satisfies PreflightFileUploadCheckRequestBodyParentField;
}
export function serializePreflightFileUploadCheckRequestBody(
val: PreflightFileUploadCheckRequestBody,
Expand Down

0 comments on commit 8dfaf99

Please sign in to comment.