|
| 1 | +/* istanbul ignore file */ |
| 2 | +/* tslint:disable */ |
| 3 | +/* eslint-disable */ |
| 4 | + |
| 5 | +/* |
| 6 | + * https://www.npmjs.com/package/openapi-typescript-codegen |
| 7 | + * sudo npm install openapi-typescript-codegen -g |
| 8 | + * openapi -i https://open-api.netlify.com/swagger.json -o netlify -c fetch --name NetlifyClient --useOptions --indent 2 |
| 9 | + */ |
| 10 | + |
| 11 | +import type { BaseHttpRequest } from "./core/BaseHttpRequest.ts"; |
| 12 | +import type { OpenAPIConfig } from "./core/OpenAPI.ts"; |
| 13 | +import { FetchHttpRequest } from "./core/FetchHttpRequest.ts"; |
| 14 | + |
| 15 | +import { AccessTokenService } from "./services/AccessTokenService.ts"; |
| 16 | +import { AccountMembershipService } from "./services/AccountMembershipService.ts"; |
| 17 | +import { AccountTypeService } from "./services/AccountTypeService.ts"; |
| 18 | +import { AssetService } from "./services/AssetService.ts"; |
| 19 | +import { AssetPublicSignatureService } from "./services/AssetPublicSignatureService.ts"; |
| 20 | +import { AuditLogService } from "./services/AuditLogService.ts"; |
| 21 | +import { BuildService } from "./services/BuildService.ts"; |
| 22 | +import { BuildHookService } from "./services/BuildHookService.ts"; |
| 23 | +import { BuildLogMsgService } from "./services/BuildLogMsgService.ts"; |
| 24 | +import { DeployService } from "./services/DeployService.ts"; |
| 25 | +import { DeployedBranchService } from "./services/DeployedBranchService.ts"; |
| 26 | +import { DeployKeyService } from "./services/DeployKeyService.ts"; |
| 27 | +import { DnsZoneService } from "./services/DnsZoneService.ts"; |
| 28 | +import { FileService } from "./services/FileService.ts"; |
| 29 | +import { FormService } from "./services/FormService.ts"; |
| 30 | +import { FunctionService } from "./services/FunctionService.ts"; |
| 31 | +import { HookService } from "./services/HookService.ts"; |
| 32 | +import { HookTypeService } from "./services/HookTypeService.ts"; |
| 33 | +import { MemberService } from "./services/MemberService.ts"; |
| 34 | +import { MetadataService } from "./services/MetadataService.ts"; |
| 35 | +import { PaymentMethodService } from "./services/PaymentMethodService.ts"; |
| 36 | +import { ServiceService } from "./services/ServiceService.ts"; |
| 37 | +import { ServiceInstanceService } from "./services/ServiceInstanceService.ts"; |
| 38 | +import { SiteService } from "./services/SiteService.ts"; |
| 39 | +import { SniCertificateService } from "./services/SniCertificateService.ts"; |
| 40 | +import { SnippetService } from "./services/SnippetService.ts"; |
| 41 | +import { SplitTestService } from "./services/SplitTestService.ts"; |
| 42 | +import { SubmissionService } from "./services/SubmissionService.ts"; |
| 43 | +import { TicketService } from "./services/TicketService.ts"; |
| 44 | +import { UserService } from "./services/UserService.ts"; |
| 45 | +import { XInternalService } from "./services/XInternalService.ts"; |
| 46 | + |
| 47 | +type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; |
| 48 | + |
| 49 | +export class NetlifyClient { |
| 50 | + public readonly accessToken: AccessTokenService; |
| 51 | + public readonly accountMembership: AccountMembershipService; |
| 52 | + public readonly accountType: AccountTypeService; |
| 53 | + public readonly asset: AssetService; |
| 54 | + public readonly assetPublicSignature: AssetPublicSignatureService; |
| 55 | + public readonly auditLog: AuditLogService; |
| 56 | + public readonly build: BuildService; |
| 57 | + public readonly buildHook: BuildHookService; |
| 58 | + public readonly buildLogMsg: BuildLogMsgService; |
| 59 | + public readonly deploy: DeployService; |
| 60 | + public readonly deployedBranch: DeployedBranchService; |
| 61 | + public readonly deployKey: DeployKeyService; |
| 62 | + public readonly dnsZone: DnsZoneService; |
| 63 | + public readonly file: FileService; |
| 64 | + public readonly form: FormService; |
| 65 | + public readonly function: FunctionService; |
| 66 | + public readonly hook: HookService; |
| 67 | + public readonly hookType: HookTypeService; |
| 68 | + public readonly member: MemberService; |
| 69 | + public readonly metadata: MetadataService; |
| 70 | + public readonly paymentMethod: PaymentMethodService; |
| 71 | + public readonly service: ServiceService; |
| 72 | + public readonly serviceInstance: ServiceInstanceService; |
| 73 | + public readonly site: SiteService; |
| 74 | + public readonly sniCertificate: SniCertificateService; |
| 75 | + public readonly snippet: SnippetService; |
| 76 | + public readonly splitTest: SplitTestService; |
| 77 | + public readonly submission: SubmissionService; |
| 78 | + public readonly ticket: TicketService; |
| 79 | + public readonly user: UserService; |
| 80 | + public readonly xInternal: XInternalService; |
| 81 | + |
| 82 | + public readonly request: BaseHttpRequest; |
| 83 | + |
| 84 | + constructor( |
| 85 | + config?: Partial<OpenAPIConfig>, |
| 86 | + HttpRequest: HttpRequestConstructor = FetchHttpRequest, |
| 87 | + ) { |
| 88 | + this.request = new HttpRequest({ |
| 89 | + BASE: config?.BASE ?? "https://api.netlify.com/api/v1", |
| 90 | + VERSION: config?.VERSION ?? "2.9.0", |
| 91 | + WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false, |
| 92 | + CREDENTIALS: config?.CREDENTIALS ?? "include", |
| 93 | + TOKEN: config?.TOKEN, |
| 94 | + USERNAME: config?.USERNAME, |
| 95 | + PASSWORD: config?.PASSWORD, |
| 96 | + HEADERS: config?.HEADERS, |
| 97 | + ENCODE_PATH: config?.ENCODE_PATH, |
| 98 | + }); |
| 99 | + |
| 100 | + this.accessToken = new AccessTokenService(this.request); |
| 101 | + this.accountMembership = new AccountMembershipService(this.request); |
| 102 | + this.accountType = new AccountTypeService(this.request); |
| 103 | + this.asset = new AssetService(this.request); |
| 104 | + this.assetPublicSignature = new AssetPublicSignatureService(this.request); |
| 105 | + this.auditLog = new AuditLogService(this.request); |
| 106 | + this.build = new BuildService(this.request); |
| 107 | + this.buildHook = new BuildHookService(this.request); |
| 108 | + this.buildLogMsg = new BuildLogMsgService(this.request); |
| 109 | + this.deploy = new DeployService(this.request); |
| 110 | + this.deployedBranch = new DeployedBranchService(this.request); |
| 111 | + this.deployKey = new DeployKeyService(this.request); |
| 112 | + this.dnsZone = new DnsZoneService(this.request); |
| 113 | + this.file = new FileService(this.request); |
| 114 | + this.form = new FormService(this.request); |
| 115 | + this.function = new FunctionService(this.request); |
| 116 | + this.hook = new HookService(this.request); |
| 117 | + this.hookType = new HookTypeService(this.request); |
| 118 | + this.member = new MemberService(this.request); |
| 119 | + this.metadata = new MetadataService(this.request); |
| 120 | + this.paymentMethod = new PaymentMethodService(this.request); |
| 121 | + this.service = new ServiceService(this.request); |
| 122 | + this.serviceInstance = new ServiceInstanceService(this.request); |
| 123 | + this.site = new SiteService(this.request); |
| 124 | + this.sniCertificate = new SniCertificateService(this.request); |
| 125 | + this.snippet = new SnippetService(this.request); |
| 126 | + this.splitTest = new SplitTestService(this.request); |
| 127 | + this.submission = new SubmissionService(this.request); |
| 128 | + this.ticket = new TicketService(this.request); |
| 129 | + this.user = new UserService(this.request); |
| 130 | + this.xInternal = new XInternalService(this.request); |
| 131 | + } |
| 132 | +} |
0 commit comments