import * as url from 'url'; export interface $FetchOptions { body?: string; headers?: $HttpHeaders; method?: $HttpMethod; } export type $FetchFunction = (url: string, options?: $FetchOptions) => Promise; export interface $HttpHeaders { [key: string]: string; } export type $HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'CONNECT' | 'OPTIONS' | 'TRACE'; export interface $HttpQuery { [key: string]: string | number | boolean | string[] | number[] | boolean[] | undefined | null; } export interface $HttpRequest { body?: any; url: string; headers: $HttpHeaders; method: $HttpMethod; } export interface $HttpRequestOptions { body?: any; endpoint: string; headers?: $HttpHeaders; method: $HttpMethod; query?: $HttpQuery; } export interface $HttpResponse { body: B; headers: $HttpHeaders; ok: O; request: $HttpRequest; status: S; statusText: string; } export type $HttpContinue = $HttpResponse; export type $HttpSwitchingProtocol = $HttpResponse; export type $HttpProcessing = $HttpResponse; export type $HttpOk = $HttpResponse; export type $HttpCreated = $HttpResponse; export type $HttpAccepted = $HttpResponse; export type $HttpNonAuthoritativeInformation = $HttpResponse; export type $HttpNoContent = $HttpResponse; export type $HttpResetContent = $HttpResponse; export type $HttpPartialContent = $HttpResponse; export type $HttpMultiStatus = $HttpResponse; export type $HttpAlreadyReported = $HttpResponse; export type $HttpImUsed = $HttpResponse; export type $HttpMultipleChoices = $HttpResponse; export type $HttpMovedPermanently = $HttpResponse; export type $HttpFound = $HttpResponse; export type $HttpSeeOther = $HttpResponse; export type $HttpNotModified = $HttpResponse; export type $HttpUseProxy = $HttpResponse; export type $HttpTemporaryRedirect = $HttpResponse; export type $HttpPermanentRedirect = $HttpResponse; export type $HttpBadRequest = $HttpResponse; export type $HttpUnauthorized = $HttpResponse; export type $HttpPaymentRequired = $HttpResponse; export type $HttpForbidden = $HttpResponse; export type $HttpNotFound = $HttpResponse; export type $HttpMethodNotAllowed = $HttpResponse; export type $HttpNotAcceptable = $HttpResponse; export type $HttpProxyAuthenticationRequired = $HttpResponse; export type $HttpRequestTimeout = $HttpResponse; export type $HttpConflict = $HttpResponse; export type $HttpGone = $HttpResponse; export type $HttpLengthRequired = $HttpResponse; export type $HttpPreconditionFailed = $HttpResponse; export type $HttpRequestEntityTooLarge = $HttpResponse; export type $HttpRequestUriTooLong = $HttpResponse; export type $HttpUnsupportedMediaType = $HttpResponse; export type $HttpRequestedRangeNotSatisfiable = $HttpResponse; export type $HttpExpectationFailed = $HttpResponse; export type $HttpMisdirectedRequest = $HttpResponse; export type $HttpUnprocessableEntity = $HttpResponse; export type $HttpLocked = $HttpResponse; export type $HttpFailedDependency = $HttpResponse; export type $HttpUpgradeRequired = $HttpResponse; export type $HttpPreconditionRequired = $HttpResponse; export type $HttpTooManyRequests = $HttpResponse; export type $HttpRequestHeaderFieldsTooLarge = $HttpResponse; export type $HttpNoResponse = $HttpResponse; export type $HttpRetryWith = $HttpResponse; export type $HttpBlockedByWindowsParentalControls = $HttpResponse; export type $HttpUnavailableForLegalReasons = $HttpResponse; export type $HttpClientClosedRequest = $HttpResponse; export type $HttpInternalServerError = $HttpResponse; export type $HttpNotImplemented = $HttpResponse; export type $HttpBadGateway = $HttpResponse; export type $HttpServiceUnavailable = $HttpResponse; export type $HttpGatewayTimeout = $HttpResponse; export type $HttpHttpVersionNotSupported = $HttpResponse; export type $HttpInsufficientStorage = $HttpResponse; export type $HttpLoopDetected = $HttpResponse; export type $HttpBandwidthLimitExceeded = $HttpResponse; export type $HttpNotExtended = $HttpResponse; export type $HttpNetworkAuthenticationRequired = $HttpResponse; export type $HttpNetworkReadTimeoutError = $HttpResponse; export type $HttpNetworkConnectTimeoutError = $HttpResponse; export interface $HttpClientOptions { fetch: $FetchFunction; } export function isResponseEmpty(response: Response): boolean { const contentLength = response.headers.get('Content-Length'); return response.status === 204 || contentLength != null && Number.parseInt(contentLength, 10) === 0; } export function isResponseJson(response: Response): boolean { const contentType = response.headers.get('Content-Type'); return contentType != null && contentType.indexOf('json') >= 0; } export function parseJson(response: Response): Promise { return !isResponseEmpty(response) && isResponseJson(response) ? response.json() : Promise.resolve(); } export function parseHeaders(response: Response): Record { const headers: Record = {}; response.headers.forEach((value, key) => { headers[key.toLowerCase()] = value; }); return headers; } export function stripQuery(query: $HttpQuery = {}): $HttpQuery { const initialValue: $HttpQuery = {}; return Object.keys(query).reduce((previousValue, key) => { const value = query[key]; if (value != null) previousValue[key] = value; return previousValue; }, initialValue); } export class $HttpClient { private options: $HttpClientOptions; constructor(options: $HttpClientOptions) { this.options = options; } public request(options: $HttpRequestOptions): Promise<$HttpResponse> { const finalUrl: string = url.format({ hostname: 'api.apibuilder.io', pathname: options.endpoint, protocol: 'https:', query: stripQuery(options.query), }); const finalHeaders: $HttpHeaders = { accept: 'application/json', 'content-type': 'application/json', ...options.headers, }; const request: $HttpRequest = { body: options.body, headers: finalHeaders, method: options.method, url: finalUrl, }; return this.options.fetch(request.url, { body: JSON.stringify(request.body), headers: request.headers, method: request.method, }).then((response) => { return parseJson(response).then((json) => { return { body: json, headers: parseHeaders(response), ok: response.ok, request, status: response.status, statusText: response.statusText, }; }); }); } } export class $Resource { protected client: $HttpClient; constructor(options: $HttpClientOptions) { this.client = new $HttpClient(options); } } export interface ApplicationsGetMetadataAndVersionsByApplicationKeyParameters { headers?: $HttpHeaders; orgKey: string; applicationKey: string; /*The number of records to return*/ limit?: number; /*Used to paginate. First page of results is 0.*/ offset?: number; } export interface ApplicationsGetMetadataAndVersionsAndLatestTxtByApplicationKeyParameters { headers?: $HttpHeaders; orgKey: string; applicationKey: string; } export interface ApplicationsGetParameters { headers?: $HttpHeaders; /*The organization key for which to search applications*/ orgKey: string; /*The name of an application. Case in-sensitive. Exact match*/ name?: string; /*The guid of an application. Exact match*/ guid?: string; /*The key of an application. Case in-sensitive. Exact match*/ key?: string; /*If true, we return applications that have at least one version. If false, we return applications that have no versions in the system*/ has_version?: boolean; /*The number of records to return*/ limit?: number; /*Used to paginate. First page of results is 0.*/ offset?: number; sort_by?: io.apibuilder.api.v0.enums.AppSortBy; order?: io.apibuilder.api.v0.enums.SortOrder; } export interface ApplicationsPostParameters { body: io.apibuilder.api.v0.models.ApplicationForm; headers?: $HttpHeaders; orgKey: string; } export interface ApplicationsPutByApplicationKeyParameters { body: io.apibuilder.api.v0.models.ApplicationForm; headers?: $HttpHeaders; orgKey: string; applicationKey: string; } export interface ApplicationsDeleteByApplicationKeyParameters { headers?: $HttpHeaders; orgKey: string; applicationKey: string; } export interface ApplicationsPostMoveByApplicationKeyParameters { body: io.apibuilder.api.v0.models.MoveForm; headers?: $HttpHeaders; orgKey: string; applicationKey: string; } export interface AttributesGetParameters { headers?: $HttpHeaders; /*Find the watch with this guid.*/ guid?: string; /*Find attributes with this name. Case in-sensitive. Exact match*/ name?: string; /*The number of records to return*/ limit?: number; /*Used to paginate. First page of results is 0.*/ offset?: number; } export interface AttributesGetByNameParameters { headers?: $HttpHeaders; name: string; } export interface AttributesPostParameters { body: io.apibuilder.api.v0.models.AttributeForm; headers?: $HttpHeaders; } export interface AttributesDeleteByNameParameters { headers?: $HttpHeaders; name: string; } export interface AuthenticationsGetSessionByIdParameters { headers?: $HttpHeaders; id: string; } export interface BatchDownloadApplicationsPostParameters { body: io.apibuilder.api.v0.models.BatchDownloadApplicationsForm; headers?: $HttpHeaders; orgKey: string; } export interface ChangesGetParameters { headers?: $HttpHeaders; /*Filter changes to those made for the organization with this key.*/ org_key?: string; /*Filter changes to those made for the application with this key.*/ application_key?: string; /*Filter changes to those made from this version.*/ from?: string; /*Filter changes to those made to this version.*/ to?: string; /*The type of diff to return.*/ type?: string; /*The number of records to return*/ limit?: number; /*Used to paginate. First page of results is 0.*/ offset?: number; } export interface CodePostFormParameters { body: io.apibuilder.api.v0.models.CodeForm; headers?: $HttpHeaders; orgKey: string; applicationKey: string; version: string; } export interface CodeGetByGeneratorKeyParameters { headers?: $HttpHeaders; /*The organization key for which to generate code*/ orgKey: string; /*The application key for which to generate code*/ applicationKey: string; /*The version of this application. Can be 'latest'*/ version: string; /*The key of the generator to invoke*/ generatorKey: string; } export interface CodePostByGeneratorKeyParameters { body: io.apibuilder.api.v0.models.CodeForm; headers?: $HttpHeaders; /*The organization key for which to generate code*/ orgKey: string; /*The application key for which to generate code*/ applicationKey: string; /*The version of this application. Can be 'latest'*/ version: string; /*The key of the generator to invoke*/ generatorKey: string; } export interface DomainsPostParameters { body: io.apibuilder.api.v0.models.Domain; headers?: $HttpHeaders; orgKey: string; } export interface DomainsDeleteByNameParameters { headers?: $HttpHeaders; orgKey: string; name: string; } export interface EmailVerificationConfirmationFormsPostParameters { body: io.apibuilder.api.v0.models.EmailVerificationConfirmationForm; headers?: $HttpHeaders; } export interface GeneratorServicesGetParameters { headers?: $HttpHeaders; guid?: string; uri?: string; generator_key?: string; /*The number of records to return*/ limit?: number; /*Used to paginate. First page of results is 0.*/ offset?: number; } export interface GeneratorServicesGetByGuidParameters { headers?: $HttpHeaders; guid: string; } export interface GeneratorServicesPostParameters { body: io.apibuilder.api.v0.models.GeneratorServiceForm; headers?: $HttpHeaders; } export interface GeneratorServicesDeleteByGuidParameters { headers?: $HttpHeaders; guid: string; } export interface GeneratorWithServicesGetParameters { headers?: $HttpHeaders; /*Filter to generator with this guid*/ guid?: string; /*Filter to generator from this service*/ service_guid?: string; /*Filter to generator from this service URI*/ service_uri?: string; /*Filter to generators that use this attribute*/ attribute_name?: string; /*Filter to generator with this key*/ key?: string; /*The number of records to return*/ limit?: number; /*Used to paginate. First page of results is 0.*/ offset?: number; } export interface GeneratorWithServicesGetByKeyParameters { headers?: $HttpHeaders; key: string; } export interface HealthchecksGetHealthcheckParameters { headers?: $HttpHeaders; } export interface ItemsGetParameters { headers?: $HttpHeaders; /*The search query. At the moment, we do case insensitive exact match search.*/ q?: string; /*The number of records to return*/ limit?: number; /*Used to paginate. First page of results is 0.*/ offset?: number; } export interface ItemsGetByGuidParameters { headers?: $HttpHeaders; guid: string; } export interface MembershipsGetParameters { headers?: $HttpHeaders; org_guid?: string; org_key?: string; user_guid?: string; role?: io.apibuilder.common.v0.enums.MembershipRole; /*The number of records to return*/ limit?: number; /*Used to paginate. First page of results is 0.*/ offset?: number; } export interface MembershipsGetByGuidParameters { headers?: $HttpHeaders; guid: string; } export interface MembershipsDeleteByGuidParameters { headers?: $HttpHeaders; guid: string; } export interface MembershipRequestsGetParameters { headers?: $HttpHeaders; org_guid?: string; org_key?: string; user_guid?: string; role?: io.apibuilder.common.v0.enums.MembershipRole; /*The number of records to return*/ limit?: number; /*Used to paginate. First page of results is 0.*/ offset?: number; } export interface MembershipRequestsPostParameters { headers?: $HttpHeaders; org_guid: string; user_guid: string; role: io.apibuilder.common.v0.enums.MembershipRole; } export interface MembershipRequestsPostAcceptByGuidParameters { headers?: $HttpHeaders; guid: string; } export interface MembershipRequestsPostDeclineByGuidParameters { headers?: $HttpHeaders; guid: string; } export interface OrganizationsGetParameters { headers?: $HttpHeaders; /*Finds the organization with this guid, if any*/ guid?: string; /*If specified, restricts to organizations that this user is specifically a member of (e.g. will exclude public organizations with which the user does not have a direct membership).*/ user_guid?: string; /*Find organizations with this key. Case in-sensitive. Exact match*/ key?: string; /*Find organizations with this name. Case in-sensitive. Exact match*/ name?: string; /*Find organizations with this namespace. Case in-sensitive. Exact match*/ namespace?: string; /*The number of records to return*/ limit?: number; /*Used to paginate. First page of results is 0.*/ offset?: number; } export interface OrganizationsGetByKeyParameters { headers?: $HttpHeaders; key: string; } export interface OrganizationsPostParameters { body: io.apibuilder.api.v0.models.OrganizationForm; headers?: $HttpHeaders; } export interface OrganizationsPutByKeyParameters { body: io.apibuilder.api.v0.models.OrganizationForm; headers?: $HttpHeaders; key: string; } export interface OrganizationsDeleteByKeyParameters { headers?: $HttpHeaders; key: string; } export interface OrganizationsGetAttributesByKeyParameters { headers?: $HttpHeaders; key: string; /*Find the values for the attribute with this name.*/ name?: string; /*The number of records to return*/ limit?: number; /*Used to paginate. First page of results is 0.*/ offset?: number; } export interface OrganizationsGetAttributesByKeyAndNameParameters { headers?: $HttpHeaders; key: string; name: string; } export interface OrganizationsPutAttributesByKeyAndNameParameters { body: io.apibuilder.api.v0.models.AttributeValueForm; headers?: $HttpHeaders; key: string; name: string; } export interface OrganizationsDeleteAttributesByKeyAndNameParameters { headers?: $HttpHeaders; key: string; name: string; } export interface PasswordResetsPostParameters { body: io.apibuilder.api.v0.models.PasswordReset; headers?: $HttpHeaders; } export interface PasswordResetRequestsPostParameters { body: io.apibuilder.api.v0.models.PasswordResetRequest; headers?: $HttpHeaders; } export interface SubscriptionsGetParameters { headers?: $HttpHeaders; /*Find the subscription with this guid.*/ guid?: string; /*Find subscriptions for this organization.*/ organization_key?: string; /*Find subscriptions for this user.*/ user_guid?: string; /*Find subscriptions for this publication.*/ publication?: io.apibuilder.api.v0.enums.Publication; /*The number of records to return*/ limit?: number; /*Used to paginate. First page of results is 0.*/ offset?: number; } export interface SubscriptionsGetByGuidParameters { headers?: $HttpHeaders; guid: string; } export interface SubscriptionsPostParameters { body: io.apibuilder.api.v0.models.SubscriptionForm; headers?: $HttpHeaders; } export interface SubscriptionsDeleteByGuidParameters { headers?: $HttpHeaders; guid: string; } export interface TokensGetUsersByUserGuidParameters { headers?: $HttpHeaders; user_guid: string; guid?: string; /*The number of records to return*/ limit?: number; /*Used to paginate. First page of results is 0.*/ offset?: number; } export interface TokensGetCleartextByGuidParameters { headers?: $HttpHeaders; guid: string; } export interface TokensPostParameters { body: io.apibuilder.api.v0.models.TokenForm; headers?: $HttpHeaders; } export interface TokensDeleteByGuidParameters { headers?: $HttpHeaders; guid: string; } export interface UsersGetParameters { headers?: $HttpHeaders; /*Find user with this guid. Exact match*/ guid?: string; /*Find user with this email address. Case in-sensitive. Exact match*/ email?: string; /*Find user with the specified nickname. For users that register via GitHub, this will be their GitHub username. Case in-sensitive. Exact match*/ nickname?: string; /*Find the user with this API token. Exact match*/ token?: string; } export interface UsersGetByGuidParameters { headers?: $HttpHeaders; guid: string; } export interface UsersPostAuthenticateParameters { headers?: $HttpHeaders; email: string; password: string; } export interface UsersPostAuthenticateGithubParameters { headers?: $HttpHeaders; /*The GitHub assigned oauth token*/ token: string; } export interface UsersPostParameters { body: io.apibuilder.api.v0.models.UserForm; headers?: $HttpHeaders; } export interface UsersPutByGuidParameters { body: io.apibuilder.api.v0.models.UserUpdateForm; headers?: $HttpHeaders; guid: string; } export interface ValidationsPostParameters { body: string; headers?: $HttpHeaders; } export interface VersionsGetByApplicationKeyParameters { headers?: $HttpHeaders; /*The organization key for which to search versions*/ orgKey: string; /*The application key for which to search versions*/ applicationKey: string; /*The number of records to return*/ limit?: number; /*Used to paginate. First page of results is 0.*/ offset?: number; } export interface VersionsGetByApplicationKeyAndVersionParameters { headers?: $HttpHeaders; orgKey: string; applicationKey: string; /*The version of tthis application to download, or the keyword latest to get the latest version*/ version: string; } export interface VersionsPostByVersionParameters { body: io.apibuilder.api.v0.models.VersionForm; headers?: $HttpHeaders; orgKey: string; version: string; } export interface VersionsPutByApplicationKeyAndVersionParameters { body: io.apibuilder.api.v0.models.VersionForm; headers?: $HttpHeaders; orgKey: string; applicationKey: string; version: string; } export interface VersionsDeleteByApplicationKeyAndVersionParameters { headers?: $HttpHeaders; orgKey: string; applicationKey: string; version: string; } export interface VersionsGetExampleByApplicationKeyAndVersionAndTypeNameParameters { headers?: $HttpHeaders; orgKey: string; applicationKey: string; /*The version of this application to download, or the keyword latest to get the latest version*/ version: string; /*The name of the type (e.g. model name) for which you would like to generate a sample json document*/ type_name: string; /*The name of the sub-type for which you would like to generate a sample json document, e.g. a specific type of a union*/ sub_type_name?: string; /*If true, we generate sample data for all optional fields. Otherwise the generated sample will contain only required fields, where applicable*/ optional_fields?: boolean; } export interface WatchesGetParameters { headers?: $HttpHeaders; /*Find the watch with this guid.*/ guid?: string; /*Find attributes for this user.*/ user_guid?: string; /*Find attributes for this organization.*/ organization_key?: string; /*Find attributes for this application.*/ application_key?: string; /*The number of records to return*/ limit?: number; /*Used to paginate. First page of results is 0.*/ offset?: number; } export interface WatchesGetByGuidParameters { headers?: $HttpHeaders; guid: string; } export interface WatchesGetCheckParameters { headers?: $HttpHeaders; /*The user for which we are checking. API returns false if the user guid is not provided*/ user_guid?: string; organization_key: string; application_key: string; } export interface WatchesPostParameters { body: io.apibuilder.api.v0.models.WatchForm; headers?: $HttpHeaders; } export interface WatchesDeleteByGuidParameters { headers?: $HttpHeaders; guid: string; } export type ApplicationsGetMetadataAndVersionsByApplicationKeyResponse = $HttpOk | $HttpUnauthorized | $HttpNotFound; export type ApplicationsGetMetadataAndVersionsAndLatestTxtByApplicationKeyResponse = $HttpOk | $HttpUnauthorized | $HttpNotFound; export type ApplicationsGetResponse = $HttpOk; export type ApplicationsPostResponse = $HttpOk | $HttpConflict; export type ApplicationsPutByApplicationKeyResponse = $HttpOk | $HttpConflict; export type ApplicationsDeleteByApplicationKeyResponse = $HttpNoContent | $HttpUnauthorized | $HttpNotFound; export type ApplicationsPostMoveByApplicationKeyResponse = $HttpOk | $HttpConflict; export type AttributesGetResponse = $HttpOk; export type AttributesGetByNameResponse = $HttpOk | $HttpNotFound; export type AttributesPostResponse = $HttpCreated | $HttpUnauthorized | $HttpConflict; export type AttributesDeleteByNameResponse = $HttpNoContent | $HttpUnauthorized | $HttpNotFound; export type AuthenticationsGetSessionByIdResponse = $HttpOk | $HttpNotFound; export type BatchDownloadApplicationsPostResponse = $HttpCreated | $HttpConflict; export type ChangesGetResponse = $HttpOk; export type CodePostFormResponse = $HttpOk | $HttpConflict; export type CodeGetByGeneratorKeyResponse = $HttpOk | $HttpConflict; export type CodePostByGeneratorKeyResponse = $HttpOk | $HttpConflict; export type DomainsPostResponse = $HttpOk | $HttpConflict; export type DomainsDeleteByNameResponse = $HttpNoContent | $HttpUnauthorized | $HttpNotFound; export type EmailVerificationConfirmationFormsPostResponse = $HttpNoContent | $HttpConflict; export type GeneratorServicesGetResponse = $HttpOk; export type GeneratorServicesGetByGuidResponse = $HttpOk | $HttpNotFound; export type GeneratorServicesPostResponse = $HttpOk | $HttpConflict; export type GeneratorServicesDeleteByGuidResponse = $HttpNoContent | $HttpUnauthorized | $HttpNotFound; export type GeneratorWithServicesGetResponse = $HttpOk; export type GeneratorWithServicesGetByKeyResponse = $HttpOk | $HttpNotFound; export type HealthchecksGetHealthcheckResponse = $HttpOk; export type ItemsGetResponse = $HttpOk; export type ItemsGetByGuidResponse = $HttpOk | $HttpNotFound; export type MembershipsGetResponse = $HttpOk; export type MembershipsGetByGuidResponse = $HttpOk | $HttpNotFound; export type MembershipsDeleteByGuidResponse = $HttpNoContent | $HttpUnauthorized | $HttpNotFound; export type MembershipRequestsGetResponse = $HttpOk; export type MembershipRequestsPostResponse = $HttpOk | $HttpConflict; export type MembershipRequestsPostAcceptByGuidResponse = $HttpNoContent | $HttpConflict; export type MembershipRequestsPostDeclineByGuidResponse = $HttpNoContent | $HttpConflict; export type OrganizationsGetResponse = $HttpOk; export type OrganizationsGetByKeyResponse = $HttpOk | $HttpNotFound; export type OrganizationsPostResponse = $HttpOk | $HttpConflict; export type OrganizationsPutByKeyResponse = $HttpOk | $HttpConflict; export type OrganizationsDeleteByKeyResponse = $HttpNoContent | $HttpUnauthorized | $HttpNotFound; export type OrganizationsGetAttributesByKeyResponse = $HttpOk; export type OrganizationsGetAttributesByKeyAndNameResponse = $HttpOk | $HttpNotFound; export type OrganizationsPutAttributesByKeyAndNameResponse = $HttpOk | $HttpCreated | $HttpNotFound | $HttpConflict; export type OrganizationsDeleteAttributesByKeyAndNameResponse = $HttpNoContent | $HttpUnauthorized | $HttpNotFound; export type PasswordResetsPostResponse = $HttpOk | $HttpConflict; export type PasswordResetRequestsPostResponse = $HttpNoContent | $HttpConflict; export type SubscriptionsGetResponse = $HttpOk; export type SubscriptionsGetByGuidResponse = $HttpOk | $HttpNotFound; export type SubscriptionsPostResponse = $HttpCreated | $HttpConflict; export type SubscriptionsDeleteByGuidResponse = $HttpNoContent | $HttpUnauthorized | $HttpNotFound; export type TokensGetUsersByUserGuidResponse = $HttpOk; export type TokensGetCleartextByGuidResponse = $HttpOk | $HttpNotFound; export type TokensPostResponse = $HttpCreated | $HttpConflict; export type TokensDeleteByGuidResponse = $HttpNoContent | $HttpUnauthorized | $HttpNotFound; export type UsersGetResponse = $HttpOk; export type UsersGetByGuidResponse = $HttpOk | $HttpNotFound; export type UsersPostAuthenticateResponse = $HttpOk | $HttpConflict; export type UsersPostAuthenticateGithubResponse = $HttpOk | $HttpConflict; export type UsersPostResponse = $HttpOk | $HttpConflict; export type UsersPutByGuidResponse = $HttpOk | $HttpConflict; export type ValidationsPostResponse = $HttpOk; export type VersionsGetByApplicationKeyResponse = $HttpOk; export type VersionsGetByApplicationKeyAndVersionResponse = $HttpOk | $HttpNotFound; export type VersionsPostByVersionResponse = $HttpOk | $HttpConflict; export type VersionsPutByApplicationKeyAndVersionResponse = $HttpOk | $HttpConflict; export type VersionsDeleteByApplicationKeyAndVersionResponse = $HttpNoContent | $HttpUnauthorized | $HttpNotFound; export type VersionsGetExampleByApplicationKeyAndVersionAndTypeNameResponse = $HttpOk | $HttpNotFound; export type WatchesGetResponse = $HttpOk; export type WatchesGetByGuidResponse = $HttpOk | $HttpNotFound; export type WatchesGetCheckResponse = $HttpOk; export type WatchesPostResponse = $HttpCreated | $HttpConflict; export type WatchesDeleteByGuidResponse = $HttpNoContent | $HttpUnauthorized | $HttpNotFound; export class ApplicationsResource extends $Resource { /*Returns the versions assocoated with the specified application. The latest version is the first result returned.*/ public getMetadataAndVersionsByApplicationKey(params: ApplicationsGetMetadataAndVersionsByApplicationKeyParameters): Promise { return this.client.request({ endpoint: `/${encodeURIComponent(params.orgKey)}/metadata/${encodeURIComponent(params.applicationKey)}/versions`, headers: params.headers, method: 'GET', query: { limit: params.limit, offset: params.offset, }, }); } /*Returns the latest version number as a string*/ public getMetadataAndVersionsAndLatestTxtByApplicationKey( params: ApplicationsGetMetadataAndVersionsAndLatestTxtByApplicationKeyParameters, ): Promise { return this.client.request({ endpoint: `/${encodeURIComponent(params.orgKey)}/metadata/${encodeURIComponent(params.applicationKey)}/versions/latest.txt`, headers: params.headers, method: 'GET', }); } /*Search all applications. Results are always paginated.*/ public get(params: ApplicationsGetParameters): Promise { return this.client.request({ endpoint: `/${encodeURIComponent(params.orgKey)}`, headers: params.headers, method: 'GET', query: { guid: params.guid, has_version: params.has_version, key: params.key, limit: params.limit, name: params.name, offset: params.offset, order: params.order, sort_by: params.sort_by, }, }); } /*Create an application.*/ public post(params: ApplicationsPostParameters): Promise { return this.client.request({ body: params.body, endpoint: `/${encodeURIComponent(params.orgKey)}`, headers: params.headers, method: 'POST', }); } /*Updates an application.*/ public putByApplicationKey(params: ApplicationsPutByApplicationKeyParameters): Promise { return this.client.request({ body: params.body, endpoint: `/${encodeURIComponent(params.orgKey)}/${encodeURIComponent(params.applicationKey)}`, headers: params.headers, method: 'PUT', }); } /*Deletes a specific application and its associated versions.*/ public deleteByApplicationKey(params: ApplicationsDeleteByApplicationKeyParameters): Promise { return this.client.request({ endpoint: `/${encodeURIComponent(params.orgKey)}/${encodeURIComponent(params.applicationKey)}`, headers: params.headers, method: 'DELETE', }); } /*Moves application to a new organization.*/ public postMoveByApplicationKey(params: ApplicationsPostMoveByApplicationKeyParameters): Promise { return this.client.request({ body: params.body, endpoint: `/${encodeURIComponent(params.orgKey)}/${encodeURIComponent(params.applicationKey)}/move`, headers: params.headers, method: 'POST', }); } } export class AttributesResource extends $Resource { /*Search all attributes. Results are always paginated.*/ public get(params: AttributesGetParameters): Promise { return this.client.request({ endpoint: '/attributes', headers: params.headers, method: 'GET', query: { guid: params.guid, limit: params.limit, name: params.name, offset: params.offset, }, }); } /*Returns the attribute with this name.*/ public getByName(params: AttributesGetByNameParameters): Promise { return this.client.request({ endpoint: `/attributes/${encodeURIComponent(params.name)}`, headers: params.headers, method: 'GET', }); } /*Create a new attribute.*/ public post(params: AttributesPostParameters): Promise { return this.client.request({ body: params.body, endpoint: '/attributes', headers: params.headers, method: 'POST', }); } /*Deletes the attribute with this name. Only the user who created an attribute can delete it.*/ public deleteByName(params: AttributesDeleteByNameParameters): Promise { return this.client.request({ endpoint: `/attributes/${encodeURIComponent(params.name)}`, headers: params.headers, method: 'DELETE', }); } } export class AuthenticationsResource extends $Resource { public getSessionById(params: AuthenticationsGetSessionByIdParameters): Promise { return this.client.request({ endpoint: `/authentications/session/${encodeURIComponent(params.id)}`, headers: params.headers, method: 'GET', }); } } export class BatchDownloadApplicationsResource extends $Resource { /*Retrieve multiple applications in one api call.*/ public post(params: BatchDownloadApplicationsPostParameters): Promise { return this.client.request({ body: params.body, endpoint: `/${encodeURIComponent(params.orgKey)}/batch/download/applications`, headers: params.headers, method: 'POST', }); } } export class ChangesResource extends $Resource { public get(params: ChangesGetParameters): Promise { return this.client.request({ endpoint: '/changes', headers: params.headers, method: 'GET', query: { application_key: params.application_key, from: params.from, limit: params.limit, offset: params.offset, org_key: params.org_key, to: params.to, type: params.type, }, }); } } export class CodeResource extends $Resource { /*Create an invocation form. This is useful primarily for debugging when you want to see exactly what content is being forwarded to the generator*/ public postForm(params: CodePostFormParameters): Promise { return this.client.request({ body: params.body, endpoint: `/${encodeURIComponent(params.orgKey)}/${encodeURIComponent(params.applicationKey)}/${encodeURIComponent(params.version)}/form`, headers: params.headers, method: 'POST', }); } /*Generate code for a specific version of an application.*/ public getByGeneratorKey(params: CodeGetByGeneratorKeyParameters): Promise { return this.client.request({ endpoint: `/${encodeURIComponent(params.orgKey)}/${encodeURIComponent(params.applicationKey)}/${encodeURIComponent(params.version)}/${encodeURIComponent(params.generatorKey)}`, headers: params.headers, method: 'GET', }); } /*Generate code for a specific version of an application.*/ public postByGeneratorKey(params: CodePostByGeneratorKeyParameters): Promise { return this.client.request({ body: params.body, endpoint: `/${encodeURIComponent(params.orgKey)}/${encodeURIComponent(params.applicationKey)}/${encodeURIComponent(params.version)}/${encodeURIComponent(params.generatorKey)}`, headers: params.headers, method: 'POST', }); } } export class DomainsResource extends $Resource { /*Add a domain to this organization*/ public post(params: DomainsPostParameters): Promise { return this.client.request({ body: params.body, endpoint: `/domains/${encodeURIComponent(params.orgKey)}`, headers: params.headers, method: 'POST', }); } /*Remove this domain from this organization*/ public deleteByName(params: DomainsDeleteByNameParameters): Promise { return this.client.request({ endpoint: `/domains/${encodeURIComponent(params.orgKey)}/${encodeURIComponent(params.name)}`, headers: params.headers, method: 'DELETE', }); } } export class EmailVerificationConfirmationFormsResource extends $Resource { /*Validate an email address using a token.*/ public post(params: EmailVerificationConfirmationFormsPostParameters): Promise { return this.client.request({ body: params.body, endpoint: '/email_verification_confirmations', headers: params.headers, method: 'POST', }); } } export class GeneratorServicesResource extends $Resource { /*List all generator services*/ public get(params: GeneratorServicesGetParameters): Promise { return this.client.request({ endpoint: '/generator_services', headers: params.headers, method: 'GET', query: { generator_key: params.generator_key, guid: params.guid, limit: params.limit, offset: params.offset, uri: params.uri, }, }); } public getByGuid(params: GeneratorServicesGetByGuidParameters): Promise { return this.client.request({ endpoint: `/generator_services/${encodeURIComponent(params.guid)}`, headers: params.headers, method: 'GET', }); } public post(params: GeneratorServicesPostParameters): Promise { return this.client.request({ body: params.body, endpoint: '/generator_services', headers: params.headers, method: 'POST', }); } /*Deletes a generator service.*/ public deleteByGuid(params: GeneratorServicesDeleteByGuidParameters): Promise { return this.client.request({ endpoint: `/generator_services/${encodeURIComponent(params.guid)}`, headers: params.headers, method: 'DELETE', }); } } export class GeneratorWithServicesResource extends $Resource { /*List all available generators*/ public get(params: GeneratorWithServicesGetParameters): Promise { return this.client.request({ endpoint: '/generators', headers: params.headers, method: 'GET', query: { attribute_name: params.attribute_name, guid: params.guid, key: params.key, limit: params.limit, offset: params.offset, service_guid: params.service_guid, service_uri: params.service_uri, }, }); } public getByKey(params: GeneratorWithServicesGetByKeyParameters): Promise { return this.client.request({ endpoint: `/generators/${encodeURIComponent(params.key)}`, headers: params.headers, method: 'GET', }); } } export class HealthchecksResource extends $Resource { public getHealthcheck(params: HealthchecksGetHealthcheckParameters = {}): Promise { return this.client.request({ endpoint: '/_internal_/healthcheck', headers: params.headers, method: 'GET', }); } } export class ItemsResource extends $Resource { public get(params: ItemsGetParameters): Promise { return this.client.request({ endpoint: '/items', headers: params.headers, method: 'GET', query: { limit: params.limit, offset: params.offset, q: params.q, }, }); } public getByGuid(params: ItemsGetByGuidParameters): Promise { return this.client.request({ endpoint: `/items/${encodeURIComponent(params.guid)}`, headers: params.headers, method: 'GET', }); } } export class MembershipsResource extends $Resource { /*Search all memberships. Results are always paginated.*/ public get(params: MembershipsGetParameters): Promise { return this.client.request({ endpoint: '/memberships', headers: params.headers, method: 'GET', query: { limit: params.limit, offset: params.offset, org_guid: params.org_guid, org_key: params.org_key, role: params.role, user_guid: params.user_guid, }, }); } public getByGuid(params: MembershipsGetByGuidParameters): Promise { return this.client.request({ endpoint: `/memberships/${encodeURIComponent(params.guid)}`, headers: params.headers, method: 'GET', }); } public deleteByGuid(params: MembershipsDeleteByGuidParameters): Promise { return this.client.request({ endpoint: `/memberships/${encodeURIComponent(params.guid)}`, headers: params.headers, method: 'DELETE', }); } } export class MembershipRequestsResource extends $Resource { /*Search all membership requests. Results are always paginated.*/ public get(params: MembershipRequestsGetParameters): Promise { return this.client.request({ endpoint: '/membership_requests', headers: params.headers, method: 'GET', query: { limit: params.limit, offset: params.offset, org_guid: params.org_guid, org_key: params.org_key, role: params.role, user_guid: params.user_guid, }, }); } /*Create a membership request*/ public post(params: MembershipRequestsPostParameters): Promise { return this.client.request({ endpoint: '/membership_requests', headers: params.headers, method: 'POST', }); } /*Accepts this membership request. User will become a member of the specified organization.*/ public postAcceptByGuid(params: MembershipRequestsPostAcceptByGuidParameters): Promise { return this.client.request({ endpoint: `/membership_requests/${encodeURIComponent(params.guid)}/accept`, headers: params.headers, method: 'POST', }); } /*Declines this membership request. User will NOT become a member of the specified organization.*/ public postDeclineByGuid(params: MembershipRequestsPostDeclineByGuidParameters): Promise { return this.client.request({ endpoint: `/membership_requests/${encodeURIComponent(params.guid)}/decline`, headers: params.headers, method: 'POST', }); } } export class OrganizationsResource extends $Resource { /*Search all organizations. Results are always paginated.*/ public get(params: OrganizationsGetParameters): Promise { return this.client.request({ endpoint: '/organizations', headers: params.headers, method: 'GET', query: { guid: params.guid, key: params.key, limit: params.limit, name: params.name, namespace: params.namespace, offset: params.offset, user_guid: params.user_guid, }, }); } /*Returns the organization with this key.*/ public getByKey(params: OrganizationsGetByKeyParameters): Promise { return this.client.request({ endpoint: `/organizations/${encodeURIComponent(params.key)}`, headers: params.headers, method: 'GET', }); } /*Create a new organization.*/ public post(params: OrganizationsPostParameters): Promise { return this.client.request({ body: params.body, endpoint: '/organizations', headers: params.headers, method: 'POST', }); } /*Update an organization.*/ public putByKey(params: OrganizationsPutByKeyParameters): Promise { return this.client.request({ body: params.body, endpoint: `/organizations/${encodeURIComponent(params.key)}`, headers: params.headers, method: 'PUT', }); } /*Deletes an organization and all of its associated applications.*/ public deleteByKey(params: OrganizationsDeleteByKeyParameters): Promise { return this.client.request({ endpoint: `/organizations/${encodeURIComponent(params.key)}`, headers: params.headers, method: 'DELETE', }); } /*Returns all attribute values for this organization. Results are always paginated.*/ public getAttributesByKey(params: OrganizationsGetAttributesByKeyParameters): Promise { return this.client.request({ endpoint: `/organizations/${encodeURIComponent(params.key)}/attributes`, headers: params.headers, method: 'GET', query: { limit: params.limit, name: params.name, offset: params.offset, }, }); } /*Returns the attribute value with this name.*/ public getAttributesByKeyAndName(params: OrganizationsGetAttributesByKeyAndNameParameters): Promise { return this.client.request({ endpoint: `/organizations/${encodeURIComponent(params.key)}/attributes/${encodeURIComponent(params.name)}`, headers: params.headers, method: 'GET', }); } /*Create or update a new attribute value.*/ public putAttributesByKeyAndName(params: OrganizationsPutAttributesByKeyAndNameParameters): Promise { return this.client.request({ body: params.body, endpoint: `/organizations/${encodeURIComponent(params.key)}/attributes/${encodeURIComponent(params.name)}`, headers: params.headers, method: 'PUT', }); } /*Deletes the attribute value with the specified name. Only the user who created an attribute value can delete it.*/ public deleteAttributesByKeyAndName(params: OrganizationsDeleteAttributesByKeyAndNameParameters): Promise { return this.client.request({ endpoint: `/organizations/${encodeURIComponent(params.key)}/attributes/${encodeURIComponent(params.name)}`, headers: params.headers, method: 'DELETE', }); } } export class PasswordResetsResource extends $Resource { /*Change the password for this token. If the token is invalid, has been used, or otherwise no longer can be applied, errors will be returned as 409s. A 204 represents that the user has successfully changed their password.*/ public post(params: PasswordResetsPostParameters): Promise { return this.client.request({ body: params.body, endpoint: '/password_resets', headers: params.headers, method: 'POST', }); } } export class PasswordResetRequestsResource extends $Resource { /*Create a new password reset. This will send the user an email with a link to reset their password.*/ public post(params: PasswordResetRequestsPostParameters): Promise { return this.client.request({ body: params.body, endpoint: '/password_reset_requests', headers: params.headers, method: 'POST', }); } } export class SubscriptionsResource extends $Resource { /*Search subscriptions. Always paginated.*/ public get(params: SubscriptionsGetParameters): Promise { return this.client.request({ endpoint: '/subscriptions', headers: params.headers, method: 'GET', query: { guid: params.guid, limit: params.limit, offset: params.offset, organization_key: params.organization_key, publication: params.publication, user_guid: params.user_guid, }, }); } /*Returns information about a specific subscription.*/ public getByGuid(params: SubscriptionsGetByGuidParameters): Promise { return this.client.request({ endpoint: `/subscriptions/${encodeURIComponent(params.guid)}`, headers: params.headers, method: 'GET', }); } /*Create a new subscription.*/ public post(params: SubscriptionsPostParameters): Promise { return this.client.request({ body: params.body, endpoint: '/subscriptions', headers: params.headers, method: 'POST', }); } public deleteByGuid(params: SubscriptionsDeleteByGuidParameters): Promise { return this.client.request({ endpoint: `/subscriptions/${encodeURIComponent(params.guid)}`, headers: params.headers, method: 'DELETE', }); } } export class TokensResource extends $Resource { public getUsersByUserGuid(params: TokensGetUsersByUserGuidParameters): Promise { return this.client.request({ endpoint: `/tokens/users/${encodeURIComponent(params.user_guid)}`, headers: params.headers, method: 'GET', query: { guid: params.guid, limit: params.limit, offset: params.offset, }, }); } /*Used to fetch the clear text token.*/ public getCleartextByGuid(params: TokensGetCleartextByGuidParameters): Promise { return this.client.request({ endpoint: `/tokens/${encodeURIComponent(params.guid)}/cleartext`, headers: params.headers, method: 'GET', }); } /*Create a new API token for this user*/ public post(params: TokensPostParameters): Promise { return this.client.request({ body: params.body, endpoint: '/tokens', headers: params.headers, method: 'POST', }); } public deleteByGuid(params: TokensDeleteByGuidParameters): Promise { return this.client.request({ endpoint: `/tokens/${encodeURIComponent(params.guid)}`, headers: params.headers, method: 'DELETE', }); } } export class UsersResource extends $Resource { /*Search for a specific user. You must specify at least 1 parameter - either a guid, email or token - and will receive back either 0 or 1 users.*/ public get(params: UsersGetParameters = {}): Promise { return this.client.request({ endpoint: '/users', headers: params.headers, method: 'GET', query: { email: params.email, guid: params.guid, nickname: params.nickname, token: params.token, }, }); } /*Returns information about the user with this guid.*/ public getByGuid(params: UsersGetByGuidParameters): Promise { return this.client.request({ endpoint: `/users/${encodeURIComponent(params.guid)}`, headers: params.headers, method: 'GET', }); } /*Used to authenticate a user with an email address and password. Successful authentication returns an instance of the user model. Failed authorizations of any kind are returned as a generic error with code user_authorization_failed.*/ public postAuthenticate(params: UsersPostAuthenticateParameters): Promise { return this.client.request({ endpoint: '/users/authenticate', headers: params.headers, method: 'POST', }); } /*Used to authenticate a user using a github access token. This is equivalent to running the following command to get the user info: curl -H 'Authorization: Bearer code' https://api.github.com/user*/ public postAuthenticateGithub(params: UsersPostAuthenticateGithubParameters): Promise { return this.client.request({ endpoint: '/users/authenticate_github', headers: params.headers, method: 'POST', }); } /*Create a new user.*/ public post(params: UsersPostParameters): Promise { return this.client.request({ body: params.body, endpoint: '/users', headers: params.headers, method: 'POST', }); } /*Updates information about the user with the specified guid.*/ public putByGuid(params: UsersPutByGuidParameters): Promise { return this.client.request({ body: params.body, endpoint: `/users/${encodeURIComponent(params.guid)}`, headers: params.headers, method: 'PUT', }); } } export class ValidationsResource extends $Resource { public post(params: ValidationsPostParameters): Promise { return this.client.request({ body: params.body, endpoint: '/validations', headers: params.headers, method: 'POST', }); } } export class VersionsResource extends $Resource { /*Search all versions of this application. Results are always paginated.*/ public getByApplicationKey(params: VersionsGetByApplicationKeyParameters): Promise { return this.client.request({ endpoint: `/${encodeURIComponent(params.orgKey)}/${encodeURIComponent(params.applicationKey)}`, headers: params.headers, method: 'GET', query: { limit: params.limit, offset: params.offset, }, }); } /*Retrieve a specific version of an application.*/ public getByApplicationKeyAndVersion(params: VersionsGetByApplicationKeyAndVersionParameters): Promise { return this.client.request({ endpoint: `/${encodeURIComponent(params.orgKey)}/${encodeURIComponent(params.applicationKey)}/${encodeURIComponent(params.version)}`, headers: params.headers, method: 'GET', }); } /*Create a new version for an application*/ public postByVersion(params: VersionsPostByVersionParameters): Promise { return this.client.request({ body: params.body, endpoint: `/${encodeURIComponent(params.orgKey)}/${encodeURIComponent(params.version)}`, headers: params.headers, method: 'POST', }); } /*Upsert a version of an application*/ public putByApplicationKeyAndVersion(params: VersionsPutByApplicationKeyAndVersionParameters): Promise { return this.client.request({ body: params.body, endpoint: `/${encodeURIComponent(params.orgKey)}/${encodeURIComponent(params.applicationKey)}/${encodeURIComponent(params.version)}`, headers: params.headers, method: 'PUT', }); } /*Deletes a specific version.*/ public deleteByApplicationKeyAndVersion(params: VersionsDeleteByApplicationKeyAndVersionParameters): Promise { return this.client.request({ endpoint: `/${encodeURIComponent(params.orgKey)}/${encodeURIComponent(params.applicationKey)}/${encodeURIComponent(params.version)}`, headers: params.headers, method: 'DELETE', }); } /*Generates an example JSON document of the type with the specified name.*/ public getExampleByApplicationKeyAndVersionAndTypeName(params: VersionsGetExampleByApplicationKeyAndVersionAndTypeNameParameters): Promise { return this.client.request({ endpoint: `/${encodeURIComponent(params.orgKey)}/${encodeURIComponent(params.applicationKey)}/${encodeURIComponent(params.version)}/example/${encodeURIComponent(params.type_name)}`, headers: params.headers, method: 'GET', query: { optional_fields: params.optional_fields, sub_type_name: params.sub_type_name, }, }); } } export class WatchesResource extends $Resource { /*Search attributes. Always paginated.*/ public get(params: WatchesGetParameters): Promise { return this.client.request({ endpoint: '/watches', headers: params.headers, method: 'GET', query: { application_key: params.application_key, guid: params.guid, limit: params.limit, offset: params.offset, organization_key: params.organization_key, user_guid: params.user_guid, }, }); } /*Returns information about a specific watch.*/ public getByGuid(params: WatchesGetByGuidParameters): Promise { return this.client.request({ endpoint: `/watches/${encodeURIComponent(params.guid)}`, headers: params.headers, method: 'GET', }); } /*Quick check if a user is watching a specific application.*/ public getCheck(params: WatchesGetCheckParameters): Promise { return this.client.request({ endpoint: '/watches/check', headers: params.headers, method: 'GET', query: { application_key: params.application_key, organization_key: params.organization_key, user_guid: params.user_guid, }, }); } /*Create a new watch.*/ public post(params: WatchesPostParameters): Promise { return this.client.request({ body: params.body, endpoint: '/watches', headers: params.headers, method: 'POST', }); } public deleteByGuid(params: WatchesDeleteByGuidParameters): Promise { return this.client.request({ endpoint: `/watches/${encodeURIComponent(params.guid)}`, headers: params.headers, method: 'DELETE', }); } } export interface ClientInstance { applications: ApplicationsResource; attributes: AttributesResource; authentications: AuthenticationsResource; batchDownloadApplications: BatchDownloadApplicationsResource; changes: ChangesResource; code: CodeResource; domains: DomainsResource; emailVerificationConfirmationForms: EmailVerificationConfirmationFormsResource; generatorServices: GeneratorServicesResource; generatorWithServices: GeneratorWithServicesResource; healthchecks: HealthchecksResource; items: ItemsResource; memberships: MembershipsResource; membershipRequests: MembershipRequestsResource; organizations: OrganizationsResource; passwordResets: PasswordResetsResource; passwordResetRequests: PasswordResetRequestsResource; subscriptions: SubscriptionsResource; tokens: TokensResource; users: UsersResource; validations: ValidationsResource; versions: VersionsResource; watches: WatchesResource; } export function createClient(options: $HttpClientOptions): ClientInstance { return { applications: new ApplicationsResource(options), attributes: new AttributesResource(options), authentications: new AuthenticationsResource(options), batchDownloadApplications: new BatchDownloadApplicationsResource(options), changes: new ChangesResource(options), code: new CodeResource(options), domains: new DomainsResource(options), emailVerificationConfirmationForms: new EmailVerificationConfirmationFormsResource(options), generatorServices: new GeneratorServicesResource(options), generatorWithServices: new GeneratorWithServicesResource(options), healthchecks: new HealthchecksResource(options), items: new ItemsResource(options), memberships: new MembershipsResource(options), membershipRequests: new MembershipRequestsResource(options), organizations: new OrganizationsResource(options), passwordResets: new PasswordResetsResource(options), passwordResetRequests: new PasswordResetRequestsResource(options), subscriptions: new SubscriptionsResource(options), tokens: new TokensResource(options), users: new UsersResource(options), validations: new ValidationsResource(options), versions: new VersionsResource(options), watches: new WatchesResource(options), }; }