Skip to content

Commit

Permalink
Fix request type
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x committed Oct 3, 2023
1 parent 5e39fc9 commit ed5c6aa
Show file tree
Hide file tree
Showing 20 changed files with 133 additions and 267 deletions.
4 changes: 1 addition & 3 deletions generate-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,7 @@ export type ${renderRequestType({
name,
namespace,
requestFormat,
})} = SetNonNullable<
Required<RouteRequest${pascalCase(requestFormat)}<'${path}'>>
>
})} = RouteRequest${pascalCase(requestFormat)}<'${path}'>
export type ${renderResponseType({ name, namespace })}= SetNonNullable<
Required<RouteResponse<'${path}'>>
Expand Down
25 changes: 10 additions & 15 deletions src/lib/seam/connect/routes/access-codes-unmanaged.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,41 +116,36 @@ export class SeamHttpAccessCodesUnmanaged {
}
}

export type AccessCodesUnmanagedConvertToManagedBody = SetNonNullable<
Required<RouteRequestBody<'/access_codes/unmanaged/convert_to_managed'>>
>
export type AccessCodesUnmanagedConvertToManagedBody =
RouteRequestBody<'/access_codes/unmanaged/convert_to_managed'>

export type AccessCodesUnmanagedConvertToManagedResponse = SetNonNullable<
Required<RouteResponse<'/access_codes/unmanaged/convert_to_managed'>>
>

export type AccessCodesUnmanagedDeleteBody = SetNonNullable<
Required<RouteRequestBody<'/access_codes/unmanaged/delete'>>
>
export type AccessCodesUnmanagedDeleteBody =
RouteRequestBody<'/access_codes/unmanaged/delete'>

export type AccessCodesUnmanagedDeleteResponse = SetNonNullable<
Required<RouteResponse<'/access_codes/unmanaged/delete'>>
>

export type AccessCodesUnmanagedGetBody = SetNonNullable<
Required<RouteRequestBody<'/access_codes/unmanaged/get'>>
>
export type AccessCodesUnmanagedGetBody =
RouteRequestBody<'/access_codes/unmanaged/get'>

export type AccessCodesUnmanagedGetResponse = SetNonNullable<
Required<RouteResponse<'/access_codes/unmanaged/get'>>
>

export type AccessCodesUnmanagedListBody = SetNonNullable<
Required<RouteRequestBody<'/access_codes/unmanaged/list'>>
>
export type AccessCodesUnmanagedListBody =
RouteRequestBody<'/access_codes/unmanaged/list'>

export type AccessCodesUnmanagedListResponse = SetNonNullable<
Required<RouteResponse<'/access_codes/unmanaged/list'>>
>

export type AccessCodesUnmanagedUpdateBody = SetNonNullable<
Required<RouteRequestBody<'/access_codes/unmanaged/update'>>
>
export type AccessCodesUnmanagedUpdateBody =
RouteRequestBody<'/access_codes/unmanaged/update'>

export type AccessCodesUnmanagedUpdateResponse = SetNonNullable<
Required<RouteResponse<'/access_codes/unmanaged/update'>>
Expand Down
35 changes: 11 additions & 24 deletions src/lib/seam/connect/routes/access-codes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,65 +161,52 @@ export class SeamHttpAccessCodes {
}
}

export type AccessCodesCreateBody = SetNonNullable<
Required<RouteRequestBody<'/access_codes/create'>>
>
export type AccessCodesCreateBody = RouteRequestBody<'/access_codes/create'>

export type AccessCodesCreateResponse = SetNonNullable<
Required<RouteResponse<'/access_codes/create'>>
>

export type AccessCodesCreateMultipleBody = SetNonNullable<
Required<RouteRequestBody<'/access_codes/create_multiple'>>
>
export type AccessCodesCreateMultipleBody =
RouteRequestBody<'/access_codes/create_multiple'>

export type AccessCodesCreateMultipleResponse = SetNonNullable<
Required<RouteResponse<'/access_codes/create_multiple'>>
>

export type AccessCodesDeleteBody = SetNonNullable<
Required<RouteRequestBody<'/access_codes/delete'>>
>
export type AccessCodesDeleteBody = RouteRequestBody<'/access_codes/delete'>

export type AccessCodesDeleteResponse = SetNonNullable<
Required<RouteResponse<'/access_codes/delete'>>
>

export type AccessCodesGenerateCodeParams = SetNonNullable<
Required<RouteRequestParams<'/access_codes/generate_code'>>
>
export type AccessCodesGenerateCodeParams =
RouteRequestParams<'/access_codes/generate_code'>

export type AccessCodesGenerateCodeResponse = SetNonNullable<
Required<RouteResponse<'/access_codes/generate_code'>>
>

export type AccessCodesGetBody = SetNonNullable<
Required<RouteRequestBody<'/access_codes/get'>>
>
export type AccessCodesGetBody = RouteRequestBody<'/access_codes/get'>

export type AccessCodesGetResponse = SetNonNullable<
Required<RouteResponse<'/access_codes/get'>>
>

export type AccessCodesListBody = SetNonNullable<
Required<RouteRequestBody<'/access_codes/list'>>
>
export type AccessCodesListBody = RouteRequestBody<'/access_codes/list'>

export type AccessCodesListResponse = SetNonNullable<
Required<RouteResponse<'/access_codes/list'>>
>

export type AccessCodesPullBackupAccessCodeBody = SetNonNullable<
Required<RouteRequestBody<'/access_codes/pull_backup_access_code'>>
>
export type AccessCodesPullBackupAccessCodeBody =
RouteRequestBody<'/access_codes/pull_backup_access_code'>

export type AccessCodesPullBackupAccessCodeResponse = SetNonNullable<
Required<RouteResponse<'/access_codes/pull_backup_access_code'>>
>

export type AccessCodesUpdateBody = SetNonNullable<
Required<RouteRequestBody<'/access_codes/update'>>
>
export type AccessCodesUpdateBody = RouteRequestBody<'/access_codes/update'>

export type AccessCodesUpdateResponse = SetNonNullable<
Required<RouteResponse<'/access_codes/update'>>
Expand Down
39 changes: 15 additions & 24 deletions src/lib/seam/connect/routes/acs-access-groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,65 +142,56 @@ export class SeamHttpAcsAccessGroups {
}
}

export type AcsAccessGroupsAddUserBody = SetNonNullable<
Required<RouteRequestBody<'/acs/access_groups/add_user'>>
>
export type AcsAccessGroupsAddUserBody =
RouteRequestBody<'/acs/access_groups/add_user'>

export type AcsAccessGroupsAddUserResponse = SetNonNullable<
Required<RouteResponse<'/acs/access_groups/add_user'>>
>

export type AcsAccessGroupsCreateBody = SetNonNullable<
Required<RouteRequestBody<'/acs/access_groups/create'>>
>
export type AcsAccessGroupsCreateBody =
RouteRequestBody<'/acs/access_groups/create'>

export type AcsAccessGroupsCreateResponse = SetNonNullable<
Required<RouteResponse<'/acs/access_groups/create'>>
>

export type AcsAccessGroupsDeleteBody = SetNonNullable<
Required<RouteRequestBody<'/acs/access_groups/delete'>>
>
export type AcsAccessGroupsDeleteBody =
RouteRequestBody<'/acs/access_groups/delete'>

export type AcsAccessGroupsDeleteResponse = SetNonNullable<
Required<RouteResponse<'/acs/access_groups/delete'>>
>

export type AcsAccessGroupsGetBody = SetNonNullable<
Required<RouteRequestBody<'/acs/access_groups/get'>>
>
export type AcsAccessGroupsGetBody = RouteRequestBody<'/acs/access_groups/get'>

export type AcsAccessGroupsGetResponse = SetNonNullable<
Required<RouteResponse<'/acs/access_groups/get'>>
>

export type AcsAccessGroupsListBody = SetNonNullable<
Required<RouteRequestBody<'/acs/access_groups/list'>>
>
export type AcsAccessGroupsListBody =
RouteRequestBody<'/acs/access_groups/list'>

export type AcsAccessGroupsListResponse = SetNonNullable<
Required<RouteResponse<'/acs/access_groups/list'>>
>

export type AcsAccessGroupsListUsersBody = SetNonNullable<
Required<RouteRequestBody<'/acs/access_groups/list_users'>>
>
export type AcsAccessGroupsListUsersBody =
RouteRequestBody<'/acs/access_groups/list_users'>

export type AcsAccessGroupsListUsersResponse = SetNonNullable<
Required<RouteResponse<'/acs/access_groups/list_users'>>
>

export type AcsAccessGroupsRemoveUserBody = SetNonNullable<
Required<RouteRequestBody<'/acs/access_groups/remove_user'>>
>
export type AcsAccessGroupsRemoveUserBody =
RouteRequestBody<'/acs/access_groups/remove_user'>

export type AcsAccessGroupsRemoveUserResponse = SetNonNullable<
Required<RouteResponse<'/acs/access_groups/remove_user'>>
>

export type AcsAccessGroupsUpdateBody = SetNonNullable<
Required<RouteRequestBody<'/acs/access_groups/update'>>
>
export type AcsAccessGroupsUpdateBody =
RouteRequestBody<'/acs/access_groups/update'>

export type AcsAccessGroupsUpdateResponse = SetNonNullable<
Required<RouteResponse<'/acs/access_groups/update'>>
Expand Down
18 changes: 6 additions & 12 deletions src/lib/seam/connect/routes/acs-credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,33 +106,27 @@ export class SeamHttpAcsCredentials {
}
}

export type AcsCredentialsCreateBody = SetNonNullable<
Required<RouteRequestBody<'/acs/credentials/create'>>
>
export type AcsCredentialsCreateBody =
RouteRequestBody<'/acs/credentials/create'>

export type AcsCredentialsCreateResponse = SetNonNullable<
Required<RouteResponse<'/acs/credentials/create'>>
>

export type AcsCredentialsDeleteBody = SetNonNullable<
Required<RouteRequestBody<'/acs/credentials/delete'>>
>
export type AcsCredentialsDeleteBody =
RouteRequestBody<'/acs/credentials/delete'>

export type AcsCredentialsDeleteResponse = SetNonNullable<
Required<RouteResponse<'/acs/credentials/delete'>>
>

export type AcsCredentialsGetBody = SetNonNullable<
Required<RouteRequestBody<'/acs/credentials/get'>>
>
export type AcsCredentialsGetBody = RouteRequestBody<'/acs/credentials/get'>

export type AcsCredentialsGetResponse = SetNonNullable<
Required<RouteResponse<'/acs/credentials/get'>>
>

export type AcsCredentialsListBody = SetNonNullable<
Required<RouteRequestBody<'/acs/credentials/list'>>
>
export type AcsCredentialsListBody = RouteRequestBody<'/acs/credentials/list'>

export type AcsCredentialsListResponse = SetNonNullable<
Required<RouteResponse<'/acs/credentials/list'>>
Expand Down
8 changes: 2 additions & 6 deletions src/lib/seam/connect/routes/acs-systems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,13 @@ export class SeamHttpAcsSystems {
}
}

export type AcsSystemsGetBody = SetNonNullable<
Required<RouteRequestBody<'/acs/systems/get'>>
>
export type AcsSystemsGetBody = RouteRequestBody<'/acs/systems/get'>

export type AcsSystemsGetResponse = SetNonNullable<
Required<RouteResponse<'/acs/systems/get'>>
>

export type AcsSystemsListParams = SetNonNullable<
Required<RouteRequestParams<'/acs/systems/list'>>
>
export type AcsSystemsListParams = RouteRequestParams<'/acs/systems/list'>

export type AcsSystemsListResponse = SetNonNullable<
Required<RouteResponse<'/acs/systems/list'>>
Expand Down
30 changes: 9 additions & 21 deletions src/lib/seam/connect/routes/acs-users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,57 +130,45 @@ export class SeamHttpAcsUsers {
}
}

export type AcsUsersAddToAccessGroupBody = SetNonNullable<
Required<RouteRequestBody<'/acs/users/add_to_access_group'>>
>
export type AcsUsersAddToAccessGroupBody =
RouteRequestBody<'/acs/users/add_to_access_group'>

export type AcsUsersAddToAccessGroupResponse = SetNonNullable<
Required<RouteResponse<'/acs/users/add_to_access_group'>>
>

export type AcsUsersCreateBody = SetNonNullable<
Required<RouteRequestBody<'/acs/users/create'>>
>
export type AcsUsersCreateBody = RouteRequestBody<'/acs/users/create'>

export type AcsUsersCreateResponse = SetNonNullable<
Required<RouteResponse<'/acs/users/create'>>
>

export type AcsUsersDeleteBody = SetNonNullable<
Required<RouteRequestBody<'/acs/users/delete'>>
>
export type AcsUsersDeleteBody = RouteRequestBody<'/acs/users/delete'>

export type AcsUsersDeleteResponse = SetNonNullable<
Required<RouteResponse<'/acs/users/delete'>>
>

export type AcsUsersGetBody = SetNonNullable<
Required<RouteRequestBody<'/acs/users/get'>>
>
export type AcsUsersGetBody = RouteRequestBody<'/acs/users/get'>

export type AcsUsersGetResponse = SetNonNullable<
Required<RouteResponse<'/acs/users/get'>>
>

export type AcsUsersListBody = SetNonNullable<
Required<RouteRequestBody<'/acs/users/list'>>
>
export type AcsUsersListBody = RouteRequestBody<'/acs/users/list'>

export type AcsUsersListResponse = SetNonNullable<
Required<RouteResponse<'/acs/users/list'>>
>

export type AcsUsersRemoveFromAccessGroupBody = SetNonNullable<
Required<RouteRequestBody<'/acs/users/remove_from_access_group'>>
>
export type AcsUsersRemoveFromAccessGroupBody =
RouteRequestBody<'/acs/users/remove_from_access_group'>

export type AcsUsersRemoveFromAccessGroupResponse = SetNonNullable<
Required<RouteResponse<'/acs/users/remove_from_access_group'>>
>

export type AcsUsersUpdateBody = SetNonNullable<
Required<RouteRequestBody<'/acs/users/update'>>
>
export type AcsUsersUpdateBody = RouteRequestBody<'/acs/users/update'>

export type AcsUsersUpdateResponse = SetNonNullable<
Required<RouteResponse<'/acs/users/update'>>
Expand Down
8 changes: 2 additions & 6 deletions src/lib/seam/connect/routes/action-attempts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,13 @@ export class SeamHttpActionAttempts {
}
}

export type ActionAttemptsGetBody = SetNonNullable<
Required<RouteRequestBody<'/action_attempts/get'>>
>
export type ActionAttemptsGetBody = RouteRequestBody<'/action_attempts/get'>

export type ActionAttemptsGetResponse = SetNonNullable<
Required<RouteResponse<'/action_attempts/get'>>
>

export type ActionAttemptsListBody = SetNonNullable<
Required<RouteRequestBody<'/action_attempts/list'>>
>
export type ActionAttemptsListBody = RouteRequestBody<'/action_attempts/list'>

export type ActionAttemptsListResponse = SetNonNullable<
Required<RouteResponse<'/action_attempts/list'>>
Expand Down
Loading

0 comments on commit ed5c6aa

Please sign in to comment.