diff --git a/templates/ngx-module-export.mustache b/templates/ngx-module-export.mustache index 5ab88e45..2de36c65 100644 --- a/templates/ngx-module-export.mustache +++ b/templates/ngx-module-export.mustache @@ -10,16 +10,26 @@ export * from './models'; export { APIClient } from './api-client.service'; +/** + * provided options, headers and params will be used as default for each request + */ +export interface DefaultHttpOptions { + headers?: {[key: string]: string}; + params?: {[key: string]: string}; + reportProgress?: boolean; + withCredentials?: boolean; +} + export interface HttpOptions { - headers?: HttpHeaders, // provided headers will be used as default for each request - params?: HttpParams, // provided params will be used as default for each request - reportProgress?: boolean, - withCredentials?: boolean, + headers?: HttpHeaders; + params?: HttpParams; + reportProgress?: boolean; + withCredentials?: boolean; } export interface APIClientModuleConfig { domain?: string; - httpOptions?: HttpOptions; + httpOptions?: DefaultHttpOptions; } @NgModule({}) diff --git a/templates/ngx-service.mustache b/templates/ngx-service.mustache index ff919003..aa03592b 100644 --- a/templates/ngx-service.mustache +++ b/templates/ngx-service.mustache @@ -3,7 +3,7 @@ import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; import { Inject, Injectable, InjectionToken, Optional } from '@angular/core'; import { Observable } from 'rxjs'; -import { HttpOptions } from './'; +import { DefaultHttpOptions, HttpOptions } from './'; {{#definitions.length}} import * as models from './models'; @@ -29,15 +29,15 @@ export class APIClient { constructor(private http: HttpClient, @Optional() @Inject(USE_DOMAIN) domain: string, - @Optional() @Inject(USE_HTTP_OPTIONS) options: HttpOptions) { + @Optional() @Inject(USE_HTTP_OPTIONS) options: DefaultHttpOptions) { if (domain) { this.domain = domain; } this.options = { - headers: options && options.headers ? options.headers : new HttpHeaders(), - params: options && options.params ? options.params : new HttpParams(), + headers: new HttpHeaders(options && options.headers ? options.headers : {}), + params: new HttpParams(options && options.params ? options.params : {}), ...(options && options.reportProgress ? { reportProgress: options.reportProgress } : {}), ...(options && options.withCredentials ? { withCredentials: options.withCredentials } : {}) }; @@ -52,10 +52,10 @@ export class APIClient { {{/parameters}} }, {{/parameters.length}} - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable<{{&response}}> { const path = `{{&path}}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; {{#parameters}} {{#isQueryParameter}} diff --git a/tests/esquare/api/api-client.service.ts b/tests/esquare/api/api-client.service.ts index 21ea91e7..fabdfe4f 100644 --- a/tests/esquare/api/api-client.service.ts +++ b/tests/esquare/api/api-client.service.ts @@ -3,7 +3,7 @@ import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; import { Inject, Injectable, InjectionToken, Optional } from '@angular/core'; import { Observable } from 'rxjs'; -import { HttpOptions } from './'; +import { DefaultHttpOptions, HttpOptions } from './'; import * as models from './models'; @@ -11,8 +11,8 @@ export const USE_DOMAIN = new InjectionToken('USE_DOMAIN'); export const USE_HTTP_OPTIONS = new InjectionToken('USE_HTTP_OPTIONS'); type APIHttpOptions = HttpOptions & { - headers: HttpHeaders, - params: HttpParams, + headers: HttpHeaders; + params: HttpParams; }; /** @@ -27,15 +27,15 @@ export class APIClient { constructor(private http: HttpClient, @Optional() @Inject(USE_DOMAIN) domain: string, - @Optional() @Inject(USE_HTTP_OPTIONS) options: HttpOptions) { + @Optional() @Inject(USE_HTTP_OPTIONS) options: DefaultHttpOptions) { if (domain) { this.domain = domain; } this.options = { - headers: options && options.headers ? options.headers : new HttpHeaders(), - params: options && options.params ? options.params : new HttpParams(), + headers: new HttpHeaders(options && options.headers ? options.headers : {}), + params: new HttpParams(options && options.params ? options.params : {}), ...(options && options.reportProgress ? { reportProgress: options.reportProgress } : {}), ...(options && options.withCredentials ? { withCredentials: options.withCredentials } : {}) }; @@ -45,19 +45,19 @@ export class APIClient { args: { body: models.AuthForm, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/auth`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.body)); } authRef( - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/auth/refresh`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options); } @@ -66,10 +66,10 @@ export class APIClient { args: { body: models.RestoreForm, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/restore`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.body)); } @@ -78,10 +78,10 @@ export class APIClient { args: { body: models.RestoreRequestForm, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/restore/request`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.body)); } @@ -90,28 +90,28 @@ export class APIClient { args: { restoreGuid: string, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/restore/checkGuid`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.restoreGuid)); } getAclList( - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/acl`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } getStructureEntitiesList( - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/structure`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -120,10 +120,10 @@ export class APIClient { args: { body: models.StructureAddParameters, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/structure`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.body)); } @@ -133,10 +133,10 @@ export class APIClient { structureId: number, body: models.StructureForm, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/structure/${args.structureId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('PUT', path, options, JSON.stringify(args.body)); } @@ -145,10 +145,10 @@ export class APIClient { args: { structureId: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/structure/${args.structureId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('DELETE', path, options); } @@ -161,10 +161,10 @@ export class APIClient { orderBy: string, order?: models.Order, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('status' in args) { options.params = options.params.set('status', String(args.status)); @@ -188,10 +188,10 @@ export class APIClient { args: { id: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -204,10 +204,10 @@ export class APIClient { orderBy?: number, order?: models.Order, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report/preview/${args.templateId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('pageSize' in args) { options.params = options.params.set('pageSize', String(args.pageSize)); @@ -228,10 +228,10 @@ export class APIClient { args: { templateId: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report/history/${args.templateId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -241,10 +241,10 @@ export class APIClient { templateId: number, file: File, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report/wizard/uploadfile/${args.templateId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.file)); } @@ -253,10 +253,10 @@ export class APIClient { args: { templateId: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report/wizard/${args.templateId}/templateColumns`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -265,10 +265,10 @@ export class APIClient { args: { id: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report/wizard/${args.id}/reportColumns`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -278,10 +278,10 @@ export class APIClient { id: number, body: any, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report/wizard/${args.id}/mapping`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.body)); } @@ -290,10 +290,10 @@ export class APIClient { args: { id: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report/wizard/${args.id}/validationTable`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -303,10 +303,10 @@ export class APIClient { id: number, all?: boolean, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report/wizard/${args.id}/downloadImported`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('all' in args) { options.params = options.params.set('all', String(args.all)); @@ -318,10 +318,10 @@ export class APIClient { args: { id: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report/wizard/${args.id}/import`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options); } @@ -330,10 +330,10 @@ export class APIClient { args: { id: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report/wizard/${args.id}/downloadOriginal`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -342,10 +342,10 @@ export class APIClient { args: { id: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report/wizard/${args.id}/downloadSkipped`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -354,10 +354,10 @@ export class APIClient { args: { id: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report/wizard/${args.id}/cancelImport`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options); } @@ -368,10 +368,10 @@ export class APIClient { description: string, file: File, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report/wizard/${args.id}/override`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.description), JSON.stringify(args.file)); } @@ -380,10 +380,10 @@ export class APIClient { args: { period?: models.Period, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report/ministry/statistic`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('period' in args) { options.params = options.params.set('period', String(args.period)); @@ -400,10 +400,10 @@ export class APIClient { orderBy: string, order?: models.Order, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report/ministry/issues`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('period' in args) { options.params = options.params.set('period', String(args.period)); @@ -435,10 +435,10 @@ export class APIClient { orderBy: string, order?: models.Order, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/report/ministry/statuses`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('period' in args) { options.params = options.params.set('period', String(args.period)); @@ -472,10 +472,10 @@ export class APIClient { assignedToRole?: number, unassignedFromRole?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('period' in args) { options.params = options.params.set('period', String(args.period)); @@ -508,19 +508,19 @@ export class APIClient { args: { body: models.UserDetails, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.body)); } getAclStructure( - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/acl`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -529,10 +529,10 @@ export class APIClient { args: { id: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -542,10 +542,10 @@ export class APIClient { id: number, body: models.UserDetails, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('PUT', path, options, JSON.stringify(args.body)); } @@ -554,19 +554,19 @@ export class APIClient { args: { id: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('DELETE', path, options); } getRolesList( - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/roles`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -575,19 +575,19 @@ export class APIClient { args: { body: any, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/roles`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.body)); } getList( - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/privileges`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -596,10 +596,10 @@ export class APIClient { args: { id: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/roles/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -609,10 +609,10 @@ export class APIClient { id: number, body?: models.RoleUpdateDetails, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/roles/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('PUT', path, options, JSON.stringify(args.body)); } @@ -621,19 +621,19 @@ export class APIClient { args: { id: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/roles/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('DELETE', path, options); } getNewNotificationsList( - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications/new`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -642,10 +642,10 @@ export class APIClient { args: { body?: any, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications/markAsViewed`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('PUT', path, options, JSON.stringify(args.body)); } @@ -657,10 +657,10 @@ export class APIClient { orderBy: string, order?: models.Order, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications/all`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('pageSize' in args) { options.params = options.params.set('pageSize', String(args.pageSize)); @@ -678,19 +678,19 @@ export class APIClient { } getModulesList( - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications/modules`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } getTriggersList( - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications/triggers`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -703,10 +703,10 @@ export class APIClient { orderBy: string, order?: models.Order, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications/modules/${args.moduleId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('pageSize' in args) { options.params = options.params.set('pageSize', String(args.pageSize)); @@ -727,10 +727,10 @@ export class APIClient { args: { id: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications/enable/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('PUT', path, options); } @@ -739,10 +739,10 @@ export class APIClient { args: { id: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications/disable/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('PUT', path, options); } @@ -751,10 +751,10 @@ export class APIClient { args: { id: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -764,10 +764,10 @@ export class APIClient { id: number, body?: models.NotificationEditable, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('PUT', path, options, JSON.stringify(args.body)); } @@ -776,19 +776,19 @@ export class APIClient { args: { body?: models.NotificationEditable, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.body)); } getPassVerificationPolicies( - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/security-policy/password-verification`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -797,19 +797,19 @@ export class APIClient { args: { body?: models.PasswordVerificationPolicies, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/security-policy/password-verification`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('PUT', path, options, JSON.stringify(args.body)); } getPassCreationPolicies( - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/security-policy/password-creation`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -818,19 +818,19 @@ export class APIClient { args: { body?: models.PasswordCreationPolicies, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/security-policy/password-creation`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('PUT', path, options, JSON.stringify(args.body)); } getOtherSecuritySettings( - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/security-policy/other-settings`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('GET', path, options); } @@ -839,10 +839,10 @@ export class APIClient { args: { body?: models.OtherSecuritySettings, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/security-policy/other-settings`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('PUT', path, options, JSON.stringify(args.body)); } diff --git a/tests/esquare/api/index.ts b/tests/esquare/api/index.ts index 6e2588ec..2b559ccd 100644 --- a/tests/esquare/api/index.ts +++ b/tests/esquare/api/index.ts @@ -8,16 +8,26 @@ export * from './models'; export { APIClient } from './api-client.service'; +/** + * provided options, headers and params will be used as default for each request + */ +export interface DefaultHttpOptions { + headers?: {[key: string]: string}; + params?: {[key: string]: string}; + reportProgress?: boolean; + withCredentials?: boolean; +} + export interface HttpOptions { - headers?: HttpHeaders, // provided headers will be used as default for each request - params?: HttpParams, // provided params will be used as default for each request - reportProgress?: boolean, - withCredentials?: boolean, + headers?: HttpHeaders; + params?: HttpParams; + reportProgress?: boolean; + withCredentials?: boolean; } export interface APIClientModuleConfig { domain?: string; - httpOptions?: HttpOptions; + httpOptions?: DefaultHttpOptions; } @NgModule({}) diff --git a/tests/gcloud-firestore/api/api-client.service.ts b/tests/gcloud-firestore/api/api-client.service.ts index 00be4b05..66630cf7 100644 --- a/tests/gcloud-firestore/api/api-client.service.ts +++ b/tests/gcloud-firestore/api/api-client.service.ts @@ -3,7 +3,7 @@ import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; import { Inject, Injectable, InjectionToken, Optional } from '@angular/core'; import { Observable } from 'rxjs'; -import { HttpOptions } from './'; +import { DefaultHttpOptions, HttpOptions } from './'; import * as models from './models'; @@ -11,8 +11,8 @@ export const USE_DOMAIN = new InjectionToken('USE_DOMAIN'); export const USE_HTTP_OPTIONS = new InjectionToken('USE_HTTP_OPTIONS'); type APIHttpOptions = HttpOptions & { - headers: HttpHeaders, - params: HttpParams, + headers: HttpHeaders; + params: HttpParams; }; /** @@ -27,15 +27,15 @@ export class APIClient { constructor(private http: HttpClient, @Optional() @Inject(USE_DOMAIN) domain: string, - @Optional() @Inject(USE_HTTP_OPTIONS) options: HttpOptions) { + @Optional() @Inject(USE_HTTP_OPTIONS) options: DefaultHttpOptions) { if (domain) { this.domain = domain; } this.options = { - headers: options && options.headers ? options.headers : new HttpHeaders(), - params: options && options.params ? options.params : new HttpParams(), + headers: new HttpHeaders(options && options.headers ? options.headers : {}), + params: new HttpParams(options && options.params ? options.params : {}), ...(options && options.reportProgress ? { reportProgress: options.reportProgress } : {}), ...(options && options.withCredentials ? { withCredentials: options.withCredentials } : {}) }; @@ -46,10 +46,10 @@ export class APIClient { body?: models.BatchGetDocumentsRequest, database: string, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/${args.database}/documents:batchGet`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.body)); } @@ -59,10 +59,10 @@ export class APIClient { body?: models.BeginTransactionRequest, database: string, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/${args.database}/documents:beginTransaction`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.body)); } @@ -72,10 +72,10 @@ export class APIClient { body?: models.CommitRequest, database: string, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/${args.database}/documents:commit`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.body)); } @@ -85,10 +85,10 @@ export class APIClient { body?: models.ListenRequest, database: string, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/${args.database}/documents:listen`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.body)); } @@ -98,10 +98,10 @@ export class APIClient { body?: models.RollbackRequest, database: string, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/${args.database}/documents:rollback`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.body)); } @@ -111,10 +111,10 @@ export class APIClient { body?: models.WriteRequest, database: string, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/${args.database}/documents:write`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.body)); } @@ -125,10 +125,10 @@ export class APIClient { currentDocumentUpdateTime?: string, name: string, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/${args.name}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('currentDocumentExists' in args) { options.params = options.params.set('currentDocument.exists', String(args.currentDocumentExists)); @@ -146,10 +146,10 @@ export class APIClient { readTime?: string, transaction?: string, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/${args.name}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('maskFieldPaths' in args) { if (args.maskFieldPaths && args.maskFieldPaths.length) { @@ -174,10 +174,10 @@ export class APIClient { name: string, updateMaskFieldPaths?: string[], }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/${args.name}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('currentDocumentExists' in args) { options.params = options.params.set('currentDocument.exists', String(args.currentDocumentExists)); @@ -205,10 +205,10 @@ export class APIClient { pageToken?: string, parent: string, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/${args.parent}/indexes`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('filter' in args) { options.params = options.params.set('filter', String(args.filter)); @@ -227,10 +227,10 @@ export class APIClient { body?: models.Index, parent: string, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/${args.parent}/indexes`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.body)); } @@ -247,10 +247,10 @@ export class APIClient { showMissing?: boolean, transaction?: string, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/${args.parent}/${args.collectionId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('maskFieldPaths' in args) { if (args.maskFieldPaths && args.maskFieldPaths.length) { @@ -286,10 +286,10 @@ export class APIClient { maskFieldPaths?: string[], parent: string, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/${args.parent}/${args.collectionId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('documentId' in args) { options.params = options.params.set('documentId', String(args.documentId)); @@ -307,10 +307,10 @@ export class APIClient { body?: models.ListCollectionIdsRequest, parent: string, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/${args.parent}:listCollectionIds`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.body)); } @@ -320,10 +320,10 @@ export class APIClient { body?: models.RunQueryRequest, parent: string, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/${args.parent}:runQuery`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; return this.sendRequest('POST', path, options, JSON.stringify(args.body)); } diff --git a/tests/gcloud-firestore/api/index.ts b/tests/gcloud-firestore/api/index.ts index 6e2588ec..2b559ccd 100644 --- a/tests/gcloud-firestore/api/index.ts +++ b/tests/gcloud-firestore/api/index.ts @@ -8,16 +8,26 @@ export * from './models'; export { APIClient } from './api-client.service'; +/** + * provided options, headers and params will be used as default for each request + */ +export interface DefaultHttpOptions { + headers?: {[key: string]: string}; + params?: {[key: string]: string}; + reportProgress?: boolean; + withCredentials?: boolean; +} + export interface HttpOptions { - headers?: HttpHeaders, // provided headers will be used as default for each request - params?: HttpParams, // provided params will be used as default for each request - reportProgress?: boolean, - withCredentials?: boolean, + headers?: HttpHeaders; + params?: HttpParams; + reportProgress?: boolean; + withCredentials?: boolean; } export interface APIClientModuleConfig { domain?: string; - httpOptions?: HttpOptions; + httpOptions?: DefaultHttpOptions; } @NgModule({}) diff --git a/tests/github/api/api-client.service.ts b/tests/github/api/api-client.service.ts index e8ca447d..aa4c9ac4 100644 --- a/tests/github/api/api-client.service.ts +++ b/tests/github/api/api-client.service.ts @@ -3,7 +3,7 @@ import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; import { Inject, Injectable, InjectionToken, Optional } from '@angular/core'; import { Observable } from 'rxjs'; -import { HttpOptions } from './'; +import { DefaultHttpOptions, HttpOptions } from './'; import * as models from './models'; @@ -11,8 +11,8 @@ export const USE_DOMAIN = new InjectionToken('USE_DOMAIN'); export const USE_HTTP_OPTIONS = new InjectionToken('USE_HTTP_OPTIONS'); type APIHttpOptions = HttpOptions & { - headers: HttpHeaders, - params: HttpParams, + headers: HttpHeaders; + params: HttpParams; }; /** @@ -27,15 +27,15 @@ export class APIClient { constructor(private http: HttpClient, @Optional() @Inject(USE_DOMAIN) domain: string, - @Optional() @Inject(USE_HTTP_OPTIONS) options: HttpOptions) { + @Optional() @Inject(USE_HTTP_OPTIONS) options: DefaultHttpOptions) { if (domain) { this.domain = domain; } this.options = { - headers: options && options.headers ? options.headers : new HttpHeaders(), - params: options && options.params ? options.params : new HttpParams(), + headers: new HttpHeaders(options && options.headers ? options.headers : {}), + params: new HttpParams(options && options.params ? options.params : {}), ...(options && options.reportProgress ? { reportProgress: options.reportProgress } : {}), ...(options && options.withCredentials ? { withCredentials: options.withCredentials } : {}) }; @@ -50,10 +50,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/emojis`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -85,10 +85,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/events`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -120,10 +120,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/feeds`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -156,10 +156,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gists`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('since' in args) { options.params = options.params.set('since', String(args.since)); @@ -195,10 +195,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.PostGist, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gists`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -231,10 +231,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gists/public`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('since' in args) { options.params = options.params.set('since', String(args.since)); @@ -270,10 +270,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gists/starred`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('since' in args) { options.params = options.params.set('since', String(args.since)); @@ -309,10 +309,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gists/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -345,10 +345,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gists/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -382,10 +382,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.PatchGist, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gists/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -418,10 +418,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gists/${args.id}/comments`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -455,10 +455,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.CommentBody, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gists/${args.id}/comments`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -492,10 +492,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gists/${args.id}/comments/${args.commentId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -529,10 +529,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gists/${args.id}/comments/${args.commentId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -567,10 +567,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.Comment, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gists/${args.id}/comments/${args.commentId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -603,10 +603,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gists/${args.id}/forks`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -639,10 +639,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gists/${args.id}/star`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -675,10 +675,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gists/${args.id}/star`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -711,10 +711,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gists/${args.id}/star`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -746,10 +746,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gitignore/templates`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -782,10 +782,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/gitignore/templates/${args.language}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -823,10 +823,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/issues`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('filter' in args) { options.params = options.params.set('filter', String(args.filter)); @@ -880,10 +880,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/legacy/issues/search/${args.owner}/${args.repository}/${args.state}/${args.keyword}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -920,10 +920,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/legacy/repos/search/${args.keyword}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('order' in args) { options.params = options.params.set('order', String(args.order)); @@ -968,10 +968,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/legacy/user/email/${args.email}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1007,10 +1007,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/legacy/user/search/${args.keyword}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('order' in args) { options.params = options.params.set('order', String(args.order)); @@ -1052,10 +1052,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.Markdown, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/markdown`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1087,10 +1087,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/markdown/raw`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1122,10 +1122,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/meta`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1159,10 +1159,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/networks/${args.owner}/${args.repo}/events`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1197,10 +1197,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('all' in args) { options.params = options.params.set('all', String(args.all)); @@ -1242,10 +1242,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.NotificationMarkRead, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1278,10 +1278,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications/threads/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1314,10 +1314,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications/threads/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1350,10 +1350,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications/threads/${args.id}/subscription`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1386,10 +1386,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications/threads/${args.id}/subscription`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1423,10 +1423,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.PutSubscription, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/notifications/threads/${args.id}/subscription`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1459,10 +1459,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/orgs/${args.org}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1496,10 +1496,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.PatchOrg, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/orgs/${args.org}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1532,10 +1532,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/orgs/${args.org}/events`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1574,10 +1574,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/orgs/${args.org}/issues`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('filter' in args) { options.params = options.params.set('filter', String(args.filter)); @@ -1628,10 +1628,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/orgs/${args.org}/members`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1665,10 +1665,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/orgs/${args.org}/members/${args.username}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1702,10 +1702,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/orgs/${args.org}/members/${args.username}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1738,10 +1738,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/orgs/${args.org}/public_members`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1775,10 +1775,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/orgs/${args.org}/public_members/${args.username}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1812,10 +1812,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/orgs/${args.org}/public_members/${args.username}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1849,10 +1849,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/orgs/${args.org}/public_members/${args.username}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1886,10 +1886,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/orgs/${args.org}/repos`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('type' in args) { options.params = options.params.set('type', String(args.type)); @@ -1926,10 +1926,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.PostRepo, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/orgs/${args.org}/repos`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1962,10 +1962,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/orgs/${args.org}/teams`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -1999,10 +1999,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.OrgTeamsPost, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/orgs/${args.org}/teams`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2034,10 +2034,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/rate_limit`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2071,10 +2071,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2108,10 +2108,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2146,10 +2146,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.RepoEdit, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2183,10 +2183,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/assignees`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2221,10 +2221,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/assignees/${args.assignee}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2258,10 +2258,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/branches`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2296,10 +2296,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/branches/${args.branch}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2333,10 +2333,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/collaborators`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2371,10 +2371,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/collaborators/${args.user}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2409,10 +2409,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/collaborators/${args.user}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2447,10 +2447,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/collaborators/${args.user}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2484,10 +2484,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/comments`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2522,10 +2522,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/comments/${args.commentId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2560,10 +2560,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/comments/${args.commentId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2599,10 +2599,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.CommentBody, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/comments/${args.commentId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2641,10 +2641,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/commits`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('since' in args) { options.params = options.params.set('since', String(args.since)); @@ -2694,10 +2694,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/commits/${args.ref}/status`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2732,10 +2732,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/commits/${args.shaCode}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2770,10 +2770,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/commits/${args.shaCode}/comments`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2809,10 +2809,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.CommitBody, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/commits/${args.shaCode}/comments`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2848,10 +2848,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/compare/${args.baseId}...${args.headId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2887,10 +2887,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.DeleteFileBody, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/contents/${args.path}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -2927,10 +2927,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/contents/${args.path}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('path' in args) { options.params = options.params.set('path', String(args.path)); @@ -2972,10 +2972,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.CreateFileBody, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/contents/${args.path}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3010,10 +3010,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/contributors`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('anon' in args) { options.params = options.params.set('anon', String(args.anon)); @@ -3050,10 +3050,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/deployments`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3088,10 +3088,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.Deployment, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/deployments`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3126,10 +3126,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/deployments/${args.id}/statuses`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3165,10 +3165,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.DeploymentStatusesCreate, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/deployments/${args.id}/statuses`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3202,10 +3202,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/downloads`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3240,10 +3240,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/downloads/${args.downloadId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3278,10 +3278,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/downloads/${args.downloadId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3315,10 +3315,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/events`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3353,10 +3353,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/forks`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('sort' in args) { options.params = options.params.set('sort', String(args.sort)); @@ -3394,10 +3394,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.ForkBody, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/forks`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3432,10 +3432,10 @@ export class APIClient { xGitHubRequestId?: number, body: Blob, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/git/blobs`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3470,10 +3470,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/git/blobs/${args.shaCode}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3508,10 +3508,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.RepoCommitBody, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/git/commits`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3546,10 +3546,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/git/commits/${args.shaCode}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3583,10 +3583,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/git/refs`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3621,10 +3621,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.RefsBody, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/git/refs`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3659,10 +3659,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/git/refs/${args.ref}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3697,10 +3697,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/git/refs/${args.ref}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3736,10 +3736,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.GitRefPatch, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/git/refs/${args.ref}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3774,10 +3774,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.Tag, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/git/tags`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3812,10 +3812,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/git/tags/${args.shaCode}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3850,10 +3850,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.Tree, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/git/trees`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3889,10 +3889,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/git/trees/${args.shaCode}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('recursive' in args) { options.params = options.params.set('recursive', String(args.recursive)); @@ -3929,10 +3929,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/hooks`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -3967,10 +3967,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.HookBody, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/hooks`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4005,10 +4005,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/hooks/${args.hookId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4043,10 +4043,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/hooks/${args.hookId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4082,10 +4082,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.HookBody, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/hooks/${args.hookId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4120,10 +4120,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/hooks/${args.hookId}/tests`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4163,10 +4163,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('filter' in args) { options.params = options.params.set('filter', String(args.filter)); @@ -4219,10 +4219,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.Issue, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4259,10 +4259,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues/comments`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('direction' in args) { options.params = options.params.set('direction', String(args.direction)); @@ -4306,10 +4306,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues/comments/${args.commentId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4344,10 +4344,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues/comments/${args.commentId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4383,10 +4383,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.CommentBody, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues/comments/${args.commentId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4420,10 +4420,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues/events`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4458,10 +4458,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues/events/${args.eventId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4496,10 +4496,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues/${args.number}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4535,10 +4535,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.Issue, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues/${args.number}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4573,10 +4573,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues/${args.number}/comments`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4612,10 +4612,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.CommentBody, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues/${args.number}/comments`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4650,10 +4650,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues/${args.number}/events`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4688,10 +4688,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues/${args.number}/labels`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4726,10 +4726,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues/${args.number}/labels`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4765,10 +4765,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.EmailsPost, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues/${args.number}/labels`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4804,10 +4804,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.EmailsPost, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues/${args.number}/labels`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4843,10 +4843,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/issues/${args.number}/labels/${args.name}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4880,10 +4880,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/keys`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4918,10 +4918,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.UserKeysPost, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/keys`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4956,10 +4956,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/keys/${args.keyId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -4994,10 +4994,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/keys/${args.keyId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5031,10 +5031,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/labels`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5069,10 +5069,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.EmailsPost, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/labels`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5107,10 +5107,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/labels/${args.name}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5145,10 +5145,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/labels/${args.name}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5184,10 +5184,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.EmailsPost, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/labels/${args.name}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5221,10 +5221,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/languages`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5259,10 +5259,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.MergesBody, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/merges`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5299,10 +5299,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/milestones`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('state' in args) { options.params = options.params.set('state', String(args.state)); @@ -5346,10 +5346,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.MilestoneUpdate, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/milestones`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5384,10 +5384,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/milestones/${args.number}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5422,10 +5422,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/milestones/${args.number}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5461,10 +5461,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.MilestoneUpdate, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/milestones/${args.number}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5499,10 +5499,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/milestones/${args.number}/labels`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5539,10 +5539,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/notifications`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('all' in args) { options.params = options.params.set('all', String(args.all)); @@ -5586,10 +5586,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.NotificationMarkRead, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/notifications`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5626,10 +5626,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/pulls`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('state' in args) { options.params = options.params.set('state', String(args.state)); @@ -5673,10 +5673,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.PullsPost, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/pulls`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5713,10 +5713,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/pulls/comments`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('direction' in args) { options.params = options.params.set('direction', String(args.direction)); @@ -5760,10 +5760,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/pulls/comments/${args.commentId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5798,10 +5798,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/pulls/comments/${args.commentId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5837,10 +5837,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.CommentBody, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/pulls/comments/${args.commentId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5875,10 +5875,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/pulls/${args.number}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5914,10 +5914,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.PullUpdate, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/pulls/${args.number}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5952,10 +5952,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/pulls/${args.number}/comments`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -5991,10 +5991,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.PullsCommentPost, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/pulls/${args.number}/comments`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6029,10 +6029,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/pulls/${args.number}/commits`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6067,10 +6067,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/pulls/${args.number}/files`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6105,10 +6105,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/pulls/${args.number}/merge`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6144,10 +6144,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.MergePullBody, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/pulls/${args.number}/merge`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6182,10 +6182,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/readme`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('ref' in args) { options.params = options.params.set('ref', String(args.ref)); @@ -6222,10 +6222,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/releases`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6260,10 +6260,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.ReleaseCreate, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/releases`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6298,10 +6298,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/releases/assets/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6336,10 +6336,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/releases/assets/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6375,10 +6375,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.AssetPatch, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/releases/assets/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6413,10 +6413,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/releases/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6451,10 +6451,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/releases/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6490,10 +6490,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.ReleaseCreate, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/releases/${args.id}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6528,10 +6528,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/releases/${args.id}/assets`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6565,10 +6565,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/stargazers`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6602,10 +6602,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/stats/code_frequency`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6639,10 +6639,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/stats/commit_activity`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6676,10 +6676,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/stats/contributors`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6713,10 +6713,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/stats/participation`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6750,10 +6750,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/stats/punch_card`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6788,10 +6788,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/statuses/${args.ref}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6827,10 +6827,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.HeadBranch, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/statuses/${args.ref}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6864,10 +6864,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/subscribers`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6901,10 +6901,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/subscription`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6938,10 +6938,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/subscription`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -6976,10 +6976,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.SubscribitionBody, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/subscription`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7013,10 +7013,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/tags`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7050,10 +7050,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/teams`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7087,10 +7087,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/watchers`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7126,10 +7126,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repos/${args.owner}/${args.repo}/${args.archiveFormat}/${args.path}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7162,10 +7162,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/repositories`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('since' in args) { options.params = options.params.set('since', String(args.since)); @@ -7203,10 +7203,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/search/code`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('order' in args) { options.params = options.params.set('order', String(args.order)); @@ -7250,10 +7250,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/search/issues`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('order' in args) { options.params = options.params.set('order', String(args.order)); @@ -7297,10 +7297,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/search/repositories`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('order' in args) { options.params = options.params.set('order', String(args.order)); @@ -7344,10 +7344,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/search/users`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('order' in args) { options.params = options.params.set('order', String(args.order)); @@ -7389,10 +7389,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/teams/${args.teamId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7425,10 +7425,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/teams/${args.teamId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7462,10 +7462,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.EditTeam, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/teams/${args.teamId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7498,10 +7498,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/teams/${args.teamId}/members`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7535,10 +7535,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/teams/${args.teamId}/members/${args.username}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7572,10 +7572,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/teams/${args.teamId}/members/${args.username}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7609,10 +7609,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/teams/${args.teamId}/members/${args.username}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7646,10 +7646,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/teams/${args.teamId}/memberships/${args.username}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7683,10 +7683,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/teams/${args.teamId}/memberships/${args.username}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7720,10 +7720,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/teams/${args.teamId}/memberships/${args.username}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7756,10 +7756,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/teams/${args.teamId}/repos`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7794,10 +7794,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/teams/${args.teamId}/repos/${args.org}/${args.repo}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7832,10 +7832,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/teams/${args.teamId}/repos/${args.owner}/${args.repo}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7870,10 +7870,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/teams/${args.teamId}/repos/${args.owner}/${args.repo}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7905,10 +7905,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7941,10 +7941,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.UserUpdate, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -7977,10 +7977,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.UserEmails, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/emails`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8012,10 +8012,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/emails`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8048,10 +8048,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.EmailsPost, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/emails`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8083,10 +8083,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/followers`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8118,10 +8118,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/following`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8154,10 +8154,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/following/${args.username}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8190,10 +8190,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/following/${args.username}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8226,10 +8226,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/following/${args.username}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8267,10 +8267,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/issues`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('filter' in args) { options.params = options.params.set('filter', String(args.filter)); @@ -8320,10 +8320,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/keys`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8356,10 +8356,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.UserKeysPost, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/keys`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8392,10 +8392,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/keys/${args.keyId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8428,10 +8428,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/keys/${args.keyId}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8463,10 +8463,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/orgs`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8499,10 +8499,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/repos`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('type' in args) { options.params = options.params.set('type', String(args.type)); @@ -8538,10 +8538,10 @@ export class APIClient { xGitHubRequestId?: number, body: models.PostRepo, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/repos`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8575,10 +8575,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/starred`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('direction' in args) { options.params = options.params.set('direction', String(args.direction)); @@ -8618,10 +8618,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/starred/${args.owner}/${args.repo}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8655,10 +8655,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/starred/${args.owner}/${args.repo}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8692,10 +8692,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/starred/${args.owner}/${args.repo}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8727,10 +8727,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/subscriptions`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8764,10 +8764,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/subscriptions/${args.owner}/${args.repo}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8801,10 +8801,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/subscriptions/${args.owner}/${args.repo}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8838,10 +8838,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/subscriptions/${args.owner}/${args.repo}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8873,10 +8873,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/user/teams`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8909,10 +8909,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('since' in args) { options.params = options.params.set('since', String(args.since)); @@ -8948,10 +8948,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/${args.username}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -8984,10 +8984,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/${args.username}/events`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -9021,10 +9021,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/${args.username}/events/orgs/${args.org}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -9057,10 +9057,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/${args.username}/followers`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -9094,10 +9094,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/${args.username}/following/${args.targetUser}`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -9131,10 +9131,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/${args.username}/gists`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('since' in args) { options.params = options.params.set('since', String(args.since)); @@ -9170,10 +9170,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/${args.username}/keys`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -9206,10 +9206,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/${args.username}/orgs`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -9242,10 +9242,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/${args.username}/received_events`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -9278,10 +9278,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/${args.username}/received_events/public`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -9315,10 +9315,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/${args.username}/repos`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('type' in args) { options.params = options.params.set('type', String(args.type)); @@ -9354,10 +9354,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/${args.username}/starred`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); @@ -9390,10 +9390,10 @@ export class APIClient { xRateLimitReset?: number, xGitHubRequestId?: number, }, - passedOptions?: HttpOptions + requestHttpOptions?: HttpOptions ): Observable { const path = `/users/${args.username}/subscriptions`; - const options: APIHttpOptions = {...this.options, ...passedOptions}; + const options: APIHttpOptions = {...this.options, ...requestHttpOptions}; if ('xGitHubMediaType' in args) { options.headers = options.headers.set('X-GitHub-Media-Type', String(args.xGitHubMediaType)); diff --git a/tests/github/api/index.ts b/tests/github/api/index.ts index 6e2588ec..2b559ccd 100644 --- a/tests/github/api/index.ts +++ b/tests/github/api/index.ts @@ -8,16 +8,26 @@ export * from './models'; export { APIClient } from './api-client.service'; +/** + * provided options, headers and params will be used as default for each request + */ +export interface DefaultHttpOptions { + headers?: {[key: string]: string}; + params?: {[key: string]: string}; + reportProgress?: boolean; + withCredentials?: boolean; +} + export interface HttpOptions { - headers?: HttpHeaders, // provided headers will be used as default for each request - params?: HttpParams, // provided params will be used as default for each request - reportProgress?: boolean, - withCredentials?: boolean, + headers?: HttpHeaders; + params?: HttpParams; + reportProgress?: boolean; + withCredentials?: boolean; } export interface APIClientModuleConfig { domain?: string; - httpOptions?: HttpOptions; + httpOptions?: DefaultHttpOptions; } @NgModule({})