Skip to content

Commit

Permalink
Merge pull request #841 from watson-developer-cloud/no-stream-return-…
Browse files Browse the repository at this point in the history
…type

refactor: remove ReadableStream as a return type for all generated me…
  • Loading branch information
dpopp07 authored Feb 20, 2019
2 parents 8466043 + 5cff833 commit 9d56d5b
Show file tree
Hide file tree
Showing 14 changed files with 219 additions and 205 deletions.
90 changes: 45 additions & 45 deletions assistant/v1.ts

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions assistant/v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class AssistantV2 extends BaseService {
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
*/
public createSession(params: AssistantV2.CreateSessionParams, callback?: AssistantV2.Callback<AssistantV2.SessionResponse>): NodeJS.ReadableStream | Promise<any> | void {
public createSession(params: AssistantV2.CreateSessionParams, callback?: AssistantV2.Callback<AssistantV2.SessionResponse>): Promise<any> | void {
const _params = extend({}, params);
const _callback = callback;
const requiredParams = ['assistant_id'];
Expand Down Expand Up @@ -134,7 +134,7 @@ class AssistantV2 extends BaseService {
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
*/
public deleteSession(params: AssistantV2.DeleteSessionParams, callback?: AssistantV2.Callback<AssistantV2.Empty>): NodeJS.ReadableStream | Promise<any> | void {
public deleteSession(params: AssistantV2.DeleteSessionParams, callback?: AssistantV2.Callback<AssistantV2.Empty>): Promise<any> | void {
const _params = extend({}, params);
const _callback = callback;
const requiredParams = ['assistant_id', 'session_id'];
Expand Down Expand Up @@ -199,7 +199,7 @@ class AssistantV2 extends BaseService {
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
*/
public message(params: AssistantV2.MessageParams, callback?: AssistantV2.Callback<AssistantV2.MessageResponse>): NodeJS.ReadableStream | Promise<any> | void {
public message(params: AssistantV2.MessageParams, callback?: AssistantV2.Callback<AssistantV2.MessageResponse>): Promise<any> | void {
const _params = extend({}, params);
const _callback = callback;
const requiredParams = ['assistant_id', 'session_id'];
Expand Down
24 changes: 12 additions & 12 deletions compare-comply/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class CompareComplyV1 extends BaseService {
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
*/
public convertToHtml(params: CompareComplyV1.ConvertToHtmlParams, callback?: CompareComplyV1.Callback<CompareComplyV1.HTMLReturn>): NodeJS.ReadableStream | Promise<any> | void {
public convertToHtml(params: CompareComplyV1.ConvertToHtmlParams, callback?: CompareComplyV1.Callback<CompareComplyV1.HTMLReturn>): Promise<any> | void {
const _params = extend({}, params);
const _callback = callback;
const requiredParams = ['file'];
Expand Down Expand Up @@ -153,7 +153,7 @@ class CompareComplyV1 extends BaseService {
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
*/
public classifyElements(params: CompareComplyV1.ClassifyElementsParams, callback?: CompareComplyV1.Callback<CompareComplyV1.ClassifyReturn>): NodeJS.ReadableStream | Promise<any> | void {
public classifyElements(params: CompareComplyV1.ClassifyElementsParams, callback?: CompareComplyV1.Callback<CompareComplyV1.ClassifyReturn>): Promise<any> | void {
const _params = extend({}, params);
const _callback = callback;
const requiredParams = ['file'];
Expand Down Expand Up @@ -224,7 +224,7 @@ class CompareComplyV1 extends BaseService {
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
*/
public extractTables(params: CompareComplyV1.ExtractTablesParams, callback?: CompareComplyV1.Callback<CompareComplyV1.TableReturn>): NodeJS.ReadableStream | Promise<any> | void {
public extractTables(params: CompareComplyV1.ExtractTablesParams, callback?: CompareComplyV1.Callback<CompareComplyV1.TableReturn>): Promise<any> | void {
const _params = extend({}, params);
const _callback = callback;
const requiredParams = ['file'];
Expand Down Expand Up @@ -300,7 +300,7 @@ class CompareComplyV1 extends BaseService {
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
*/
public compareDocuments(params: CompareComplyV1.CompareDocumentsParams, callback?: CompareComplyV1.Callback<CompareComplyV1.CompareReturn>): NodeJS.ReadableStream | Promise<any> | void {
public compareDocuments(params: CompareComplyV1.CompareDocumentsParams, callback?: CompareComplyV1.Callback<CompareComplyV1.CompareReturn>): Promise<any> | void {
const _params = extend({}, params);
const _callback = callback;
const requiredParams = ['file_1', 'file_2'];
Expand Down Expand Up @@ -376,7 +376,7 @@ class CompareComplyV1 extends BaseService {
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
*/
public addFeedback(params: CompareComplyV1.AddFeedbackParams, callback?: CompareComplyV1.Callback<CompareComplyV1.FeedbackReturn>): NodeJS.ReadableStream | Promise<any> | void {
public addFeedback(params: CompareComplyV1.AddFeedbackParams, callback?: CompareComplyV1.Callback<CompareComplyV1.FeedbackReturn>): Promise<any> | void {
const _params = extend({}, params);
const _callback = callback;
const requiredParams = ['feedback_data'];
Expand Down Expand Up @@ -433,7 +433,7 @@ class CompareComplyV1 extends BaseService {
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
*/
public deleteFeedback(params: CompareComplyV1.DeleteFeedbackParams, callback?: CompareComplyV1.Callback<CompareComplyV1.FeedbackDeleted>): NodeJS.ReadableStream | Promise<any> | void {
public deleteFeedback(params: CompareComplyV1.DeleteFeedbackParams, callback?: CompareComplyV1.Callback<CompareComplyV1.FeedbackDeleted>): Promise<any> | void {
const _params = extend({}, params);
const _callback = callback;
const requiredParams = ['feedback_id'];
Expand Down Expand Up @@ -492,7 +492,7 @@ class CompareComplyV1 extends BaseService {
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
*/
public getFeedback(params: CompareComplyV1.GetFeedbackParams, callback?: CompareComplyV1.Callback<CompareComplyV1.GetFeedback>): NodeJS.ReadableStream | Promise<any> | void {
public getFeedback(params: CompareComplyV1.GetFeedbackParams, callback?: CompareComplyV1.Callback<CompareComplyV1.GetFeedback>): Promise<any> | void {
const _params = extend({}, params);
const _callback = callback;
const requiredParams = ['feedback_id'];
Expand Down Expand Up @@ -585,7 +585,7 @@ class CompareComplyV1 extends BaseService {
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
*/
public listFeedback(params?: CompareComplyV1.ListFeedbackParams, callback?: CompareComplyV1.Callback<CompareComplyV1.FeedbackList>): NodeJS.ReadableStream | Promise<any> | void {
public listFeedback(params?: CompareComplyV1.ListFeedbackParams, callback?: CompareComplyV1.Callback<CompareComplyV1.FeedbackList>): Promise<any> | void {
const _params = (typeof params === 'function' && !callback) ? {} : extend({}, params);
const _callback = (typeof params === 'function' && !callback) ? params : callback;

Expand Down Expand Up @@ -674,7 +674,7 @@ class CompareComplyV1 extends BaseService {
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
*/
public createBatch(params: CompareComplyV1.CreateBatchParams, callback?: CompareComplyV1.Callback<CompareComplyV1.BatchStatus>): NodeJS.ReadableStream | Promise<any> | void {
public createBatch(params: CompareComplyV1.CreateBatchParams, callback?: CompareComplyV1.Callback<CompareComplyV1.BatchStatus>): Promise<any> | void {
const _params = extend({}, params);
const _callback = callback;
const requiredParams = ['_function', 'input_credentials_file', 'input_bucket_location', 'input_bucket_name', 'output_credentials_file', 'output_bucket_location', 'output_bucket_name'];
Expand Down Expand Up @@ -745,7 +745,7 @@ class CompareComplyV1 extends BaseService {
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
*/
public getBatch(params: CompareComplyV1.GetBatchParams, callback?: CompareComplyV1.Callback<CompareComplyV1.BatchStatus>): NodeJS.ReadableStream | Promise<any> | void {
public getBatch(params: CompareComplyV1.GetBatchParams, callback?: CompareComplyV1.Callback<CompareComplyV1.BatchStatus>): Promise<any> | void {
const _params = extend({}, params);
const _callback = callback;
const requiredParams = ['batch_id'];
Expand Down Expand Up @@ -796,7 +796,7 @@ class CompareComplyV1 extends BaseService {
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
*/
public listBatches(params?: CompareComplyV1.ListBatchesParams, callback?: CompareComplyV1.Callback<CompareComplyV1.Batches>): NodeJS.ReadableStream | Promise<any> | void {
public listBatches(params?: CompareComplyV1.ListBatchesParams, callback?: CompareComplyV1.Callback<CompareComplyV1.Batches>): Promise<any> | void {
const _params = (typeof params === 'function' && !callback) ? {} : extend({}, params);
const _callback = (typeof params === 'function' && !callback) ? params : callback;

Expand Down Expand Up @@ -843,7 +843,7 @@ class CompareComplyV1 extends BaseService {
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
*/
public updateBatch(params: CompareComplyV1.UpdateBatchParams, callback?: CompareComplyV1.Callback<CompareComplyV1.BatchStatus>): NodeJS.ReadableStream | Promise<any> | void {
public updateBatch(params: CompareComplyV1.UpdateBatchParams, callback?: CompareComplyV1.Callback<CompareComplyV1.BatchStatus>): Promise<any> | void {
const _params = extend({}, params);
const _callback = callback;
const requiredParams = ['batch_id', 'action'];
Expand Down
Loading

0 comments on commit 9d56d5b

Please sign in to comment.