···5050 return service.operations.map((operation) => {
5151 const clone = { ...operation };
52525353- // Parse the service parameters and results, very similar to how we parse
5353+ // Parse the service parameters and successes, very similar to how we parse
5454 // properties of models. These methods will extend the type if needed.
5555 clone.imports.push(
5656 ...clone.parameters.flatMap((parameter) => parameter.imports),
5757 );
5858- clone.imports.push(...clone.results.flatMap((result) => result.imports));
5858+ const successResponses = clone.responses.filter((response) =>
5959+ response.responseTypes.includes('success'),
6060+ );
6161+ clone.imports.push(...successResponses.flatMap((result) => result.imports));
59626063 // Check if the operation name is unique, if not then prefix this with a number
6164 const name = clone.name;