From 638fcf35a81708203c601ce27bb79f0f4239d264 Mon Sep 17 00:00:00 2001 From: Yerti <36551149+UZ9@users.noreply.github.com> Date: Tue, 4 Nov 2025 05:01:36 -0500 Subject: [PATCH 1/3] Add rest of File API to SDK --- package.json | 2 +- src/lib/file.ts | 165 ++++++++++++++++++++++++++++++++++++++++++++++++ src/lib/juno.ts | 11 ++++ 3 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 src/lib/file.ts diff --git a/package.json b/package.json index 653d8cc..90da5a3 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "test": "run-s build test:*", "test:lint": "eslint src --ext .ts", "test:prettier": "prettier \"src/**/*.ts\" --list-different", - "format": "prettier \"src/**/*.ts\" --list-different", + "format": "prettier \"src/**/*.ts\" --write", "test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.ts}\"", "test:unit": "jest", "check-cli": "run-s test diff-integration-tests check-integration-tests", diff --git a/src/lib/file.ts b/src/lib/file.ts new file mode 100644 index 0000000..ccadc9b --- /dev/null +++ b/src/lib/file.ts @@ -0,0 +1,165 @@ +import { + DownloadFileModel, + DownloadFileResponse, + FileBucket, + FileBucketApi, + FileConfigApi, + FileConfigResponse, + FileDownloadApi, + FileProviderApi, + FileProviderResponse, + RegisterFileBucketModel, + RegisterFileProviderModel, + SetupFileServiceResponse, + FileUploadApi, + UploadFileModel, + UploadFileResponse, +} from '../internal/api'; +import { validateString } from './validators'; + +export class FileAPI { + private configApi: FileConfigApi; + private uploadApi: FileUploadApi; + private downloadApi: FileDownloadApi; + private bucketApi: FileBucketApi; + private providerApi: FileProviderApi; + + constructor(baseURL?: string, apiKey?: string) { + this.configApi = new FileConfigApi(baseURL); + this.uploadApi = new FileUploadApi(baseURL); + this.downloadApi = new FileDownloadApi(baseURL); + this.bucketApi = new FileBucketApi(baseURL); + this.providerApi = new FileProviderApi(baseURL); + + this.configApi.accessToken = apiKey; + this.uploadApi.accessToken = apiKey; + this.downloadApi.accessToken = apiKey; + this.bucketApi.accessToken = apiKey; + this.providerApi.accessToken = apiKey; + } + + async setup(): Promise { + const res = await this.configApi.fileConfigControllerSetup(); + return res.body; + } + + async getConfigByProjectId(projectId: string): Promise { + validateString(projectId, 'Project ID must be non-empty'); + const res = + await this.configApi.fileConfigControllerGetFileConfigByProjectId( + projectId + ); + return res.body; + } + + async registerProvider(options: { + baseUrl: string; + providerName: string; + type: RegisterFileProviderModel.TypeEnum; + accessKey: { accessKeyId: string; secretAccessKey: string }; + }): Promise { + const { baseUrl, providerName, type, accessKey } = options; + + validateString(baseUrl, 'baseUrl must be non-empty'); + validateString(providerName, 'providerName must be non-empty'); + validateString(accessKey?.accessKeyId, 'accessKeyId must be non-empty'); + validateString( + accessKey?.secretAccessKey, + 'secretAccessKey must be non-empty' + ); + + const model = new RegisterFileProviderModel(); + (model as any).accessKey = accessKey as any; + model.baseUrl = baseUrl; + model.providerName = providerName; + model.type = type; + + const res = + await this.providerApi.fileProviderControllerRegisterFileProvider(model); + return res.body; + } + + async registerBucket(options: { + name: string; + configId: number; + fileProviderName: string; + fileServiceFile?: Array; + }): Promise { + const { name, configId, fileProviderName, fileServiceFile } = options; + + validateString(name, 'Bucket name must be non-empty'); + if (typeof configId !== 'number') { + throw new Error('configId must be a number'); + } + validateString(fileProviderName, 'fileProviderName must be non-empty'); + + const model = new RegisterFileBucketModel(); + model.name = name; + model.configId = configId; + model.fileProviderName = fileProviderName; + model.fileServiceFile = fileServiceFile ?? []; + + const res = await this.bucketApi.fileBucketControllerRegisterFileBucket( + model + ); + return res.body; + } + + async uploadFile(options: { + fileName: string; + bucketName: string; + providerName: string; + configId: number; + region?: string; + }): Promise { + const { fileName, bucketName, providerName, configId, region } = options; + + validateString(fileName, 'fileName must be non-empty'); + validateString(bucketName, 'bucketName must be non-empty'); + validateString(providerName, 'providerName must be non-empty'); + if (typeof configId !== 'number') { + throw new Error('configId must be a number'); + } + if (region) validateString(region, 'region must be non-empty'); + + const model = new UploadFileModel(); + model.fileName = fileName; + model.bucketName = bucketName; + model.providerName = providerName; + model.configId = configId; + if (region) model.region = region; + + const res = await this.uploadApi.fileUploadControllerUploadFile(model); + return res.body; + } + + async downloadFile(options: { + bucketName: string; + configId: number; + fileName: string; + providerName: string; + region?: string; + }): Promise { + const { bucketName, configId, fileName, providerName, region } = options; + + validateString(bucketName, 'bucketName must be non-empty'); + if (typeof configId !== 'number') { + throw new Error('configId must be a number'); + } + validateString(fileName, 'fileName must be non-empty'); + validateString(providerName, 'providerName must be non-empty'); + if (region) validateString(region, 'region must be non-empty'); + + const model = new DownloadFileModel(); + model.bucketName = bucketName; + model.configId = configId; + model.fileName = fileName; + model.providerName = providerName; + if (region) model.region = region; + + const res = await this.downloadApi.fileDownloadControllerDownloadFile( + model + ); + return res.body; + } +} diff --git a/src/lib/juno.ts b/src/lib/juno.ts index f422930..9f8e926 100644 --- a/src/lib/juno.ts +++ b/src/lib/juno.ts @@ -2,6 +2,7 @@ import { AnalyticsAPI } from './analytics'; import { AnalyticsConfigAPI } from './analyticsConfig'; import { AuthAPI } from './auth'; import { EmailAPI } from './email'; +import { FileAPI } from './file'; import { JunoValidationError } from './errors'; import { ProjectAPI } from './project'; import { SettingsAPI } from './settings'; @@ -16,6 +17,7 @@ class JunoAPI { private settingsAPI?: SettingsAPI; private analyticsAPI?: AnalyticsAPI; private analyticsConfigAPI?: AnalyticsConfigAPI; + private fileAPI?: FileAPI; get analyticsConfig(): AnalyticsConfigAPI { if (!this.analyticsConfigAPI) { @@ -70,6 +72,14 @@ class JunoAPI { } return this.projectAPI; } + get file(): FileAPI { + if (!this.fileAPI) { + throw new JunoValidationError( + 'juno.init() must be called before using the Juno SDK' + ); + } + return this.fileAPI; + } get auth(): AuthAPI { if (!this.authAPI) { throw new JunoValidationError( @@ -91,6 +101,7 @@ class JunoAPI { options.baseURL, this.apiKey ); + this.fileAPI = new FileAPI(options.baseURL, this.apiKey); } } From 603f8ec5a9d702fe6337803eeed976213c3010e2 Mon Sep 17 00:00:00 2001 From: Yerti <36551149+UZ9@users.noreply.github.com> Date: Tue, 4 Nov 2025 05:47:14 -0500 Subject: [PATCH 2/3] nit: replace error with juno validation error --- src/lib/file.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/file.ts b/src/lib/file.ts index ccadc9b..af70f40 100644 --- a/src/lib/file.ts +++ b/src/lib/file.ts @@ -15,6 +15,7 @@ import { UploadFileModel, UploadFileResponse, } from '../internal/api'; +import { JunoValidationError } from './errors'; import { validateString } from './validators'; export class FileAPI { @@ -89,7 +90,7 @@ export class FileAPI { validateString(name, 'Bucket name must be non-empty'); if (typeof configId !== 'number') { - throw new Error('configId must be a number'); + throw new JunoValidationError('configId must be a number'); } validateString(fileProviderName, 'fileProviderName must be non-empty'); @@ -118,7 +119,7 @@ export class FileAPI { validateString(bucketName, 'bucketName must be non-empty'); validateString(providerName, 'providerName must be non-empty'); if (typeof configId !== 'number') { - throw new Error('configId must be a number'); + throw new JunoValidationError('configId must be a number'); } if (region) validateString(region, 'region must be non-empty'); @@ -144,7 +145,7 @@ export class FileAPI { validateString(bucketName, 'bucketName must be non-empty'); if (typeof configId !== 'number') { - throw new Error('configId must be a number'); + throw new JunoValidationError('configId must be a number'); } validateString(fileName, 'fileName must be non-empty'); validateString(providerName, 'providerName must be non-empty'); From c8b39186f1d85b83f1b710f395ee82da836f7d3f Mon Sep 17 00:00:00 2001 From: Yerti <36551149+UZ9@users.noreply.github.com> Date: Mon, 10 Nov 2025 13:13:07 -0500 Subject: [PATCH 3/3] Update sdk, multi-analytics --- src/internal/api/analyticsApi.ts | 23 ++++++----- src/internal/api/analyticsConfigApi.ts | 15 ++++--- src/internal/api/apis.ts | 22 +++++------ src/internal/api/authApi.ts | 15 ++++--- src/internal/api/emailApi.ts | 15 ++++--- src/internal/api/fileBucketApi.ts | 15 ++++--- src/internal/api/fileConfigApi.ts | 15 ++++--- src/internal/api/fileDownloadApi.ts | 15 ++++--- src/internal/api/fileProviderApi.ts | 15 ++++--- src/internal/api/fileUploadApi.ts | 15 ++++--- src/internal/api/projectApi.ts | 15 ++++--- src/internal/api/userApi.ts | 15 ++++--- src/internal/model/accessKey.ts | 2 + src/internal/model/aggregateInterval.ts | 2 + src/internal/model/analyticsConfigResponse.ts | 2 + src/internal/model/clickEventProperties.ts | 2 + src/internal/model/clickEventResponse.ts | 1 + .../model/createAnalyticsConfigModel.ts | 2 + src/internal/model/createProjectModel.ts | 2 + src/internal/model/createUserModel.ts | 2 + src/internal/model/customEventResponse.ts | 2 + src/internal/model/customEventTypeResponse.ts | 2 + src/internal/model/customGraphType.ts | 2 + src/internal/model/customGraphTypeResponse.ts | 1 + src/internal/model/downloadFileModel.ts | 2 + src/internal/model/downloadFileResponse.ts | 2 + src/internal/model/emailConfigResponse.ts | 1 + src/internal/model/emailContent.ts | 2 + src/internal/model/emailDomain.ts | 2 + src/internal/model/emailRecipient.ts | 2 + src/internal/model/emailSender.ts | 2 + .../model/emailSenderSendEmailModel.ts | 2 + src/internal/model/fileBucket.ts | 2 + src/internal/model/fileConfigResponse.ts | 1 + src/internal/model/fileProviderResponse.ts | 2 + .../model/getAllClickEventsResponse.ts | 1 + .../model/getAllCustomEventTypeResponse.ts | 39 +++++++++++++++++++ .../model/getAllCustomEventsResponse.ts | 1 + .../model/getAllInputEventsResponse.ts | 1 + .../model/getAllVisitEventsResponse.ts | 1 + src/internal/model/getClickEventsResponse.ts | 1 + src/internal/model/getCustomEventsResponse.ts | 1 + src/internal/model/getInputEventsResponse.ts | 1 + src/internal/model/getVisitEventsResponse.ts | 1 + src/internal/model/inputEventProperties.ts | 2 + src/internal/model/inputEventResponse.ts | 1 + src/internal/model/issueApiKeyRequest.ts | 2 + src/internal/model/issueApiKeyResponse.ts | 2 + src/internal/model/issueJWTResponse.ts | 2 + src/internal/model/linkProjectModel.ts | 2 + src/internal/model/linkUserModel.ts | 2 + src/internal/model/logClickEventRequest.ts | 2 + src/internal/model/logCustomEventRequest.ts | 2 + src/internal/model/logInputEventRequest.ts | 2 + src/internal/model/logVisitEventRequest.ts | 2 + src/internal/model/modelFile.ts | 2 + src/internal/model/models.ts | 3 ++ src/internal/model/projectResponse.ts | 2 + src/internal/model/registerDomainModel.ts | 2 + src/internal/model/registerDomainResponse.ts | 1 + src/internal/model/registerEmailModel.ts | 2 + src/internal/model/registerEmailResponse.ts | 2 + src/internal/model/registerFileBucketModel.ts | 2 + .../model/registerFileProviderModel.ts | 1 + src/internal/model/sendEmailModel.ts | 1 + src/internal/model/sendEmailResponse.ts | 2 + .../model/sendEmailStatisticsResponse.ts | 2 + .../model/sendEmailStatisticsResponses.ts | 1 + src/internal/model/sendGridDNSRecord.ts | 2 + src/internal/model/sendGridDNSResponse.ts | 1 + src/internal/model/setUserTypeModel.ts | 2 + src/internal/model/setupEmailResponse.ts | 2 + src/internal/model/setupEmailServiceModel.ts | 2 + .../model/setupFileServiceResponse.ts | 2 + src/internal/model/unlinkProjectModel.ts | 2 + .../model/updateAnalyticsConfigModel.ts | 2 + src/internal/model/uploadFileModel.ts | 2 + src/internal/model/uploadFileResponse.ts | 2 + src/internal/model/userResponse.ts | 2 + src/internal/model/userResponses.ts | 1 + src/internal/model/verifyDomainModel.ts | 2 + src/internal/model/visitEventProperties.ts | 2 + src/internal/model/visitEventResponse.ts | 1 + src/lib/analytics.ts | 5 ++- 84 files changed, 288 insertions(+), 72 deletions(-) create mode 100644 src/internal/model/getAllCustomEventTypeResponse.ts diff --git a/src/internal/api/analyticsApi.ts b/src/internal/api/analyticsApi.ts index 131d0f6..a3670a8 100644 --- a/src/internal/api/analyticsApi.ts +++ b/src/internal/api/analyticsApi.ts @@ -10,15 +10,15 @@ * Do not edit the class manually. */ -import http from 'http'; import localVarRequest from 'request'; +import http from 'http'; /* tslint:disable:no-unused-locals */ import { ClickEventResponse } from '../model/clickEventResponse'; import { CustomEventResponse } from '../model/customEventResponse'; -import { CustomEventTypeResponse } from '../model/customEventTypeResponse'; import { CustomGraphTypeResponse } from '../model/customGraphTypeResponse'; import { GetAllClickEventsResponse } from '../model/getAllClickEventsResponse'; +import { GetAllCustomEventTypeResponse } from '../model/getAllCustomEventTypeResponse'; import { GetAllCustomEventsResponse } from '../model/getAllCustomEventsResponse'; import { GetAllInputEventsResponse } from '../model/getAllInputEventsResponse'; import { GetAllVisitEventsResponse } from '../model/getAllVisitEventsResponse'; @@ -34,14 +34,19 @@ import { LogVisitEventRequest } from '../model/logVisitEventRequest'; import { VisitEventResponse } from '../model/visitEventResponse'; import { - Authentication, - HttpBearerAuth, - Interceptor, ObjectSerializer, + Authentication, VoidAuth, + Interceptor, +} from '../model/models'; +import { + HttpBasicAuth, + HttpBearerAuth, + ApiKeyAuth, + OAuth, } from '../model/models'; -import { HttpError } from './apis'; +import { HttpError, RequestFile } from './apis'; let defaultBasePath = 'http://localhost'; @@ -788,7 +793,7 @@ export class AnalyticsApi { options: { headers: { [name: string]: string } } = { headers: {} } ): Promise<{ response: http.IncomingMessage; - body: CustomEventTypeResponse; + body: GetAllCustomEventTypeResponse; }> { const localVarPath = this.basePath + '/analytics/custom-event-types'; let localVarQueryParameters: any = {}; @@ -859,7 +864,7 @@ export class AnalyticsApi { } return new Promise<{ response: http.IncomingMessage; - body: CustomEventTypeResponse; + body: GetAllCustomEventTypeResponse; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { @@ -872,7 +877,7 @@ export class AnalyticsApi { ) { body = ObjectSerializer.deserialize( body, - 'CustomEventTypeResponse' + 'GetAllCustomEventTypeResponse' ); resolve({ response: response, body: body }); } else { diff --git a/src/internal/api/analyticsConfigApi.ts b/src/internal/api/analyticsConfigApi.ts index 3ef718f..afd6ef6 100644 --- a/src/internal/api/analyticsConfigApi.ts +++ b/src/internal/api/analyticsConfigApi.ts @@ -10,8 +10,8 @@ * Do not edit the class manually. */ -import http from 'http'; import localVarRequest from 'request'; +import http from 'http'; /* tslint:disable:no-unused-locals */ import { AnalyticsConfigResponse } from '../model/analyticsConfigResponse'; @@ -19,14 +19,19 @@ import { CreateAnalyticsConfigModel } from '../model/createAnalyticsConfigModel' import { UpdateAnalyticsConfigModel } from '../model/updateAnalyticsConfigModel'; import { - Authentication, - HttpBearerAuth, - Interceptor, ObjectSerializer, + Authentication, VoidAuth, + Interceptor, +} from '../model/models'; +import { + HttpBasicAuth, + HttpBearerAuth, + ApiKeyAuth, + OAuth, } from '../model/models'; -import { HttpError } from './apis'; +import { HttpError, RequestFile } from './apis'; let defaultBasePath = 'http://localhost'; diff --git a/src/internal/api/apis.ts b/src/internal/api/apis.ts index 716e96c..1389143 100644 --- a/src/internal/api/apis.ts +++ b/src/internal/api/apis.ts @@ -1,26 +1,26 @@ export * from './analyticsApi'; -export * from './analyticsConfigApi'; -export * from './authApi'; -export * from './emailApi'; -export * from './fileBucketApi'; -export * from './fileConfigApi'; -export * from './fileDownloadApi'; -export * from './fileProviderApi'; -export * from './fileUploadApi'; -export * from './projectApi'; -export * from './userApi'; -import * as http from 'http'; import { AnalyticsApi } from './analyticsApi'; +export * from './analyticsConfigApi'; import { AnalyticsConfigApi } from './analyticsConfigApi'; +export * from './authApi'; import { AuthApi } from './authApi'; +export * from './emailApi'; import { EmailApi } from './emailApi'; +export * from './fileBucketApi'; import { FileBucketApi } from './fileBucketApi'; +export * from './fileConfigApi'; import { FileConfigApi } from './fileConfigApi'; +export * from './fileDownloadApi'; import { FileDownloadApi } from './fileDownloadApi'; +export * from './fileProviderApi'; import { FileProviderApi } from './fileProviderApi'; +export * from './fileUploadApi'; import { FileUploadApi } from './fileUploadApi'; +export * from './projectApi'; import { ProjectApi } from './projectApi'; +export * from './userApi'; import { UserApi } from './userApi'; +import * as http from 'http'; export class HttpError extends Error { constructor( diff --git a/src/internal/api/authApi.ts b/src/internal/api/authApi.ts index 4b83525..b2ac7ac 100644 --- a/src/internal/api/authApi.ts +++ b/src/internal/api/authApi.ts @@ -10,8 +10,8 @@ * Do not edit the class manually. */ -import http from 'http'; import localVarRequest from 'request'; +import http from 'http'; /* tslint:disable:no-unused-locals */ import { IssueApiKeyRequest } from '../model/issueApiKeyRequest'; @@ -19,14 +19,19 @@ import { IssueApiKeyResponse } from '../model/issueApiKeyResponse'; import { IssueJWTResponse } from '../model/issueJWTResponse'; import { - Authentication, - HttpBearerAuth, - Interceptor, ObjectSerializer, + Authentication, VoidAuth, + Interceptor, +} from '../model/models'; +import { + HttpBasicAuth, + HttpBearerAuth, + ApiKeyAuth, + OAuth, } from '../model/models'; -import { HttpError } from './apis'; +import { HttpError, RequestFile } from './apis'; let defaultBasePath = 'http://localhost'; diff --git a/src/internal/api/emailApi.ts b/src/internal/api/emailApi.ts index 3702894..89145d5 100644 --- a/src/internal/api/emailApi.ts +++ b/src/internal/api/emailApi.ts @@ -10,8 +10,8 @@ * Do not edit the class manually. */ -import http from 'http'; import localVarRequest from 'request'; +import http from 'http'; /* tslint:disable:no-unused-locals */ import { AggregateInterval } from '../model/aggregateInterval'; @@ -28,14 +28,19 @@ import { SetupEmailServiceModel } from '../model/setupEmailServiceModel'; import { VerifyDomainModel } from '../model/verifyDomainModel'; import { - Authentication, - HttpBearerAuth, - Interceptor, ObjectSerializer, + Authentication, VoidAuth, + Interceptor, +} from '../model/models'; +import { + HttpBasicAuth, + HttpBearerAuth, + ApiKeyAuth, + OAuth, } from '../model/models'; -import { HttpError } from './apis'; +import { HttpError, RequestFile } from './apis'; let defaultBasePath = 'http://localhost'; diff --git a/src/internal/api/fileBucketApi.ts b/src/internal/api/fileBucketApi.ts index e4010eb..09bcb79 100644 --- a/src/internal/api/fileBucketApi.ts +++ b/src/internal/api/fileBucketApi.ts @@ -10,22 +10,27 @@ * Do not edit the class manually. */ -import http from 'http'; import localVarRequest from 'request'; +import http from 'http'; /* tslint:disable:no-unused-locals */ import { FileBucket } from '../model/fileBucket'; import { RegisterFileBucketModel } from '../model/registerFileBucketModel'; import { - Authentication, - HttpBearerAuth, - Interceptor, ObjectSerializer, + Authentication, VoidAuth, + Interceptor, +} from '../model/models'; +import { + HttpBasicAuth, + HttpBearerAuth, + ApiKeyAuth, + OAuth, } from '../model/models'; -import { HttpError } from './apis'; +import { HttpError, RequestFile } from './apis'; let defaultBasePath = 'http://localhost'; diff --git a/src/internal/api/fileConfigApi.ts b/src/internal/api/fileConfigApi.ts index dae14f7..6c98565 100644 --- a/src/internal/api/fileConfigApi.ts +++ b/src/internal/api/fileConfigApi.ts @@ -10,22 +10,27 @@ * Do not edit the class manually. */ -import http from 'http'; import localVarRequest from 'request'; +import http from 'http'; /* tslint:disable:no-unused-locals */ import { FileConfigResponse } from '../model/fileConfigResponse'; import { SetupFileServiceResponse } from '../model/setupFileServiceResponse'; import { - Authentication, - HttpBearerAuth, - Interceptor, ObjectSerializer, + Authentication, VoidAuth, + Interceptor, +} from '../model/models'; +import { + HttpBasicAuth, + HttpBearerAuth, + ApiKeyAuth, + OAuth, } from '../model/models'; -import { HttpError } from './apis'; +import { HttpError, RequestFile } from './apis'; let defaultBasePath = 'http://localhost'; diff --git a/src/internal/api/fileDownloadApi.ts b/src/internal/api/fileDownloadApi.ts index b8a78c9..936a04c 100644 --- a/src/internal/api/fileDownloadApi.ts +++ b/src/internal/api/fileDownloadApi.ts @@ -10,22 +10,27 @@ * Do not edit the class manually. */ -import http from 'http'; import localVarRequest from 'request'; +import http from 'http'; /* tslint:disable:no-unused-locals */ import { DownloadFileModel } from '../model/downloadFileModel'; import { DownloadFileResponse } from '../model/downloadFileResponse'; import { - Authentication, - HttpBearerAuth, - Interceptor, ObjectSerializer, + Authentication, VoidAuth, + Interceptor, +} from '../model/models'; +import { + HttpBasicAuth, + HttpBearerAuth, + ApiKeyAuth, + OAuth, } from '../model/models'; -import { HttpError } from './apis'; +import { HttpError, RequestFile } from './apis'; let defaultBasePath = 'http://localhost'; diff --git a/src/internal/api/fileProviderApi.ts b/src/internal/api/fileProviderApi.ts index 5d0a1e8..3db402e 100644 --- a/src/internal/api/fileProviderApi.ts +++ b/src/internal/api/fileProviderApi.ts @@ -10,22 +10,27 @@ * Do not edit the class manually. */ -import http from 'http'; import localVarRequest from 'request'; +import http from 'http'; /* tslint:disable:no-unused-locals */ import { FileProviderResponse } from '../model/fileProviderResponse'; import { RegisterFileProviderModel } from '../model/registerFileProviderModel'; import { - Authentication, - HttpBearerAuth, - Interceptor, ObjectSerializer, + Authentication, VoidAuth, + Interceptor, +} from '../model/models'; +import { + HttpBasicAuth, + HttpBearerAuth, + ApiKeyAuth, + OAuth, } from '../model/models'; -import { HttpError } from './apis'; +import { HttpError, RequestFile } from './apis'; let defaultBasePath = 'http://localhost'; diff --git a/src/internal/api/fileUploadApi.ts b/src/internal/api/fileUploadApi.ts index 0d98d36..ad83337 100644 --- a/src/internal/api/fileUploadApi.ts +++ b/src/internal/api/fileUploadApi.ts @@ -10,22 +10,27 @@ * Do not edit the class manually. */ -import http from 'http'; import localVarRequest from 'request'; +import http from 'http'; /* tslint:disable:no-unused-locals */ import { UploadFileModel } from '../model/uploadFileModel'; import { UploadFileResponse } from '../model/uploadFileResponse'; import { - Authentication, - HttpBearerAuth, - Interceptor, ObjectSerializer, + Authentication, VoidAuth, + Interceptor, +} from '../model/models'; +import { + HttpBasicAuth, + HttpBearerAuth, + ApiKeyAuth, + OAuth, } from '../model/models'; -import { HttpError } from './apis'; +import { HttpError, RequestFile } from './apis'; let defaultBasePath = 'http://localhost'; diff --git a/src/internal/api/projectApi.ts b/src/internal/api/projectApi.ts index 5b85b9e..457d960 100644 --- a/src/internal/api/projectApi.ts +++ b/src/internal/api/projectApi.ts @@ -10,8 +10,8 @@ * Do not edit the class manually. */ -import http from 'http'; import localVarRequest from 'request'; +import http from 'http'; /* tslint:disable:no-unused-locals */ import { CreateProjectModel } from '../model/createProjectModel'; @@ -20,14 +20,19 @@ import { ProjectResponse } from '../model/projectResponse'; import { UserResponses } from '../model/userResponses'; import { - Authentication, - HttpBearerAuth, - Interceptor, ObjectSerializer, + Authentication, VoidAuth, + Interceptor, +} from '../model/models'; +import { + HttpBasicAuth, + HttpBearerAuth, + ApiKeyAuth, + OAuth, } from '../model/models'; -import { HttpError } from './apis'; +import { HttpError, RequestFile } from './apis'; let defaultBasePath = 'http://localhost'; diff --git a/src/internal/api/userApi.ts b/src/internal/api/userApi.ts index 9bc8e80..1c63e49 100644 --- a/src/internal/api/userApi.ts +++ b/src/internal/api/userApi.ts @@ -10,8 +10,8 @@ * Do not edit the class manually. */ -import http from 'http'; import localVarRequest from 'request'; +import http from 'http'; /* tslint:disable:no-unused-locals */ import { CreateUserModel } from '../model/createUserModel'; @@ -22,14 +22,19 @@ import { UserResponse } from '../model/userResponse'; import { UserResponses } from '../model/userResponses'; import { - Authentication, - HttpBearerAuth, - Interceptor, ObjectSerializer, + Authentication, VoidAuth, + Interceptor, +} from '../model/models'; +import { + HttpBasicAuth, + HttpBearerAuth, + ApiKeyAuth, + OAuth, } from '../model/models'; -import { HttpError } from './apis'; +import { HttpError, RequestFile } from './apis'; let defaultBasePath = 'http://localhost'; diff --git a/src/internal/model/accessKey.ts b/src/internal/model/accessKey.ts index 7f942ea..2eb8c32 100644 --- a/src/internal/model/accessKey.ts +++ b/src/internal/model/accessKey.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class AccessKey { /** * Client public access key diff --git a/src/internal/model/aggregateInterval.ts b/src/internal/model/aggregateInterval.ts index 38f7c06..611b723 100644 --- a/src/internal/model/aggregateInterval.ts +++ b/src/internal/model/aggregateInterval.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export enum AggregateInterval { Day = 'day', Week = 'week', diff --git a/src/internal/model/analyticsConfigResponse.ts b/src/internal/model/analyticsConfigResponse.ts index d1dcbd9..756790a 100644 --- a/src/internal/model/analyticsConfigResponse.ts +++ b/src/internal/model/analyticsConfigResponse.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class AnalyticsConfigResponse { 'id': number; 'environment': string; diff --git a/src/internal/model/clickEventProperties.ts b/src/internal/model/clickEventProperties.ts index c297f9a..7f77dac 100644 --- a/src/internal/model/clickEventProperties.ts +++ b/src/internal/model/clickEventProperties.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class ClickEventProperties { /** * Object ID diff --git a/src/internal/model/clickEventResponse.ts b/src/internal/model/clickEventResponse.ts index 3bc7350..a0cd9cc 100644 --- a/src/internal/model/clickEventResponse.ts +++ b/src/internal/model/clickEventResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { ClickEventProperties } from './clickEventProperties'; export class ClickEventResponse { diff --git a/src/internal/model/createAnalyticsConfigModel.ts b/src/internal/model/createAnalyticsConfigModel.ts index 5f7bd41..9ee2f9f 100644 --- a/src/internal/model/createAnalyticsConfigModel.ts +++ b/src/internal/model/createAnalyticsConfigModel.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class CreateAnalyticsConfigModel { 'serverAnalyticsKey': string; 'clientAnalyticsKey': string; diff --git a/src/internal/model/createProjectModel.ts b/src/internal/model/createProjectModel.ts index 47a2853..2167c57 100644 --- a/src/internal/model/createProjectModel.ts +++ b/src/internal/model/createProjectModel.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class CreateProjectModel { /** * The name of the project diff --git a/src/internal/model/createUserModel.ts b/src/internal/model/createUserModel.ts index 918e8f9..47082d6 100644 --- a/src/internal/model/createUserModel.ts +++ b/src/internal/model/createUserModel.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class CreateUserModel { /** * User email diff --git a/src/internal/model/customEventResponse.ts b/src/internal/model/customEventResponse.ts index 6aa61cf..a38fece 100644 --- a/src/internal/model/customEventResponse.ts +++ b/src/internal/model/customEventResponse.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class CustomEventResponse { /** * Event ID diff --git a/src/internal/model/customEventTypeResponse.ts b/src/internal/model/customEventTypeResponse.ts index f911452..898e132 100644 --- a/src/internal/model/customEventTypeResponse.ts +++ b/src/internal/model/customEventTypeResponse.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class CustomEventTypeResponse { /** * Event type ID diff --git a/src/internal/model/customGraphType.ts b/src/internal/model/customGraphType.ts index 727f264..284d3cd 100644 --- a/src/internal/model/customGraphType.ts +++ b/src/internal/model/customGraphType.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class CustomGraphType { /** * Graph ID diff --git a/src/internal/model/customGraphTypeResponse.ts b/src/internal/model/customGraphTypeResponse.ts index c0301c8..c5f7120 100644 --- a/src/internal/model/customGraphTypeResponse.ts +++ b/src/internal/model/customGraphTypeResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { CustomGraphType } from './customGraphType'; export class CustomGraphTypeResponse { diff --git a/src/internal/model/downloadFileModel.ts b/src/internal/model/downloadFileModel.ts index 99c81a4..cff80ca 100644 --- a/src/internal/model/downloadFileModel.ts +++ b/src/internal/model/downloadFileModel.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class DownloadFileModel { /** * The name of the bucket to use for downloading diff --git a/src/internal/model/downloadFileResponse.ts b/src/internal/model/downloadFileResponse.ts index f6ef27b..b226e45 100644 --- a/src/internal/model/downloadFileResponse.ts +++ b/src/internal/model/downloadFileResponse.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class DownloadFileResponse { /** * The url for file download diff --git a/src/internal/model/emailConfigResponse.ts b/src/internal/model/emailConfigResponse.ts index 379a86c..78fec3b 100644 --- a/src/internal/model/emailConfigResponse.ts +++ b/src/internal/model/emailConfigResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { EmailDomain } from './emailDomain'; import { EmailSender } from './emailSender'; diff --git a/src/internal/model/emailContent.ts b/src/internal/model/emailContent.ts index 5b80e39..61a4654 100644 --- a/src/internal/model/emailContent.ts +++ b/src/internal/model/emailContent.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class EmailContent { /** * MIME type for the content diff --git a/src/internal/model/emailDomain.ts b/src/internal/model/emailDomain.ts index 6931761..0bf43ab 100644 --- a/src/internal/model/emailDomain.ts +++ b/src/internal/model/emailDomain.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class EmailDomain { 'domain': string; 'subdomain'?: string; diff --git a/src/internal/model/emailRecipient.ts b/src/internal/model/emailRecipient.ts index 398e302..3114065 100644 --- a/src/internal/model/emailRecipient.ts +++ b/src/internal/model/emailRecipient.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class EmailRecipient { /** * Recipient email address diff --git a/src/internal/model/emailSender.ts b/src/internal/model/emailSender.ts index 08e5396..22f48cc 100644 --- a/src/internal/model/emailSender.ts +++ b/src/internal/model/emailSender.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class EmailSender { 'username': string; 'description'?: string; diff --git a/src/internal/model/emailSenderSendEmailModel.ts b/src/internal/model/emailSenderSendEmailModel.ts index 28cb4b6..111dbc8 100644 --- a/src/internal/model/emailSenderSendEmailModel.ts +++ b/src/internal/model/emailSenderSendEmailModel.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class EmailSenderSendEmailModel { /** * Sender email address diff --git a/src/internal/model/fileBucket.ts b/src/internal/model/fileBucket.ts index a271a31..9f65a8f 100644 --- a/src/internal/model/fileBucket.ts +++ b/src/internal/model/fileBucket.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class FileBucket { /** * The unique name of the registered bucket diff --git a/src/internal/model/fileConfigResponse.ts b/src/internal/model/fileConfigResponse.ts index ca66636..95f06a0 100644 --- a/src/internal/model/fileConfigResponse.ts +++ b/src/internal/model/fileConfigResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { FileBucket } from './fileBucket'; export class FileConfigResponse { diff --git a/src/internal/model/fileProviderResponse.ts b/src/internal/model/fileProviderResponse.ts index e198077..27c5cf4 100644 --- a/src/internal/model/fileProviderResponse.ts +++ b/src/internal/model/fileProviderResponse.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class FileProviderResponse { /** * The unique provider name of the file provider diff --git a/src/internal/model/getAllClickEventsResponse.ts b/src/internal/model/getAllClickEventsResponse.ts index 672136d..1ca27eb 100644 --- a/src/internal/model/getAllClickEventsResponse.ts +++ b/src/internal/model/getAllClickEventsResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { ClickEventResponse } from './clickEventResponse'; export class GetAllClickEventsResponse { diff --git a/src/internal/model/getAllCustomEventTypeResponse.ts b/src/internal/model/getAllCustomEventTypeResponse.ts new file mode 100644 index 0000000..55ba3b9 --- /dev/null +++ b/src/internal/model/getAllCustomEventTypeResponse.ts @@ -0,0 +1,39 @@ +/** + * Juno + * Juno Public API Docs + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { CustomEventTypeResponse } from './customEventTypeResponse'; + +export class GetAllCustomEventTypeResponse { + /** + * All custom event types + */ + 'eventTypes': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + }> = [ + { + name: 'eventTypes', + baseName: 'eventTypes', + type: 'Array', + }, + ]; + + static getAttributeTypeMap() { + return GetAllCustomEventTypeResponse.attributeTypeMap; + } +} diff --git a/src/internal/model/getAllCustomEventsResponse.ts b/src/internal/model/getAllCustomEventsResponse.ts index 2d6dbfb..d4601d8 100644 --- a/src/internal/model/getAllCustomEventsResponse.ts +++ b/src/internal/model/getAllCustomEventsResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { CustomEventResponse } from './customEventResponse'; export class GetAllCustomEventsResponse { diff --git a/src/internal/model/getAllInputEventsResponse.ts b/src/internal/model/getAllInputEventsResponse.ts index ad5a116..8a854a0 100644 --- a/src/internal/model/getAllInputEventsResponse.ts +++ b/src/internal/model/getAllInputEventsResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { InputEventResponse } from './inputEventResponse'; export class GetAllInputEventsResponse { diff --git a/src/internal/model/getAllVisitEventsResponse.ts b/src/internal/model/getAllVisitEventsResponse.ts index b182448..af854e4 100644 --- a/src/internal/model/getAllVisitEventsResponse.ts +++ b/src/internal/model/getAllVisitEventsResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { VisitEventResponse } from './visitEventResponse'; export class GetAllVisitEventsResponse { diff --git a/src/internal/model/getClickEventsResponse.ts b/src/internal/model/getClickEventsResponse.ts index ce030f5..9b8e407 100644 --- a/src/internal/model/getClickEventsResponse.ts +++ b/src/internal/model/getClickEventsResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { ClickEventResponse } from './clickEventResponse'; export class GetClickEventsResponse { diff --git a/src/internal/model/getCustomEventsResponse.ts b/src/internal/model/getCustomEventsResponse.ts index 245f6fb..5f2ebbf 100644 --- a/src/internal/model/getCustomEventsResponse.ts +++ b/src/internal/model/getCustomEventsResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { CustomEventResponse } from './customEventResponse'; export class GetCustomEventsResponse { diff --git a/src/internal/model/getInputEventsResponse.ts b/src/internal/model/getInputEventsResponse.ts index 81d6396..acc7b22 100644 --- a/src/internal/model/getInputEventsResponse.ts +++ b/src/internal/model/getInputEventsResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { InputEventResponse } from './inputEventResponse'; export class GetInputEventsResponse { diff --git a/src/internal/model/getVisitEventsResponse.ts b/src/internal/model/getVisitEventsResponse.ts index 1ffa7b4..5ce1eee 100644 --- a/src/internal/model/getVisitEventsResponse.ts +++ b/src/internal/model/getVisitEventsResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { VisitEventResponse } from './visitEventResponse'; export class GetVisitEventsResponse { diff --git a/src/internal/model/inputEventProperties.ts b/src/internal/model/inputEventProperties.ts index 0b6d220..1e8f1c3 100644 --- a/src/internal/model/inputEventProperties.ts +++ b/src/internal/model/inputEventProperties.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class InputEventProperties { /** * Object ID diff --git a/src/internal/model/inputEventResponse.ts b/src/internal/model/inputEventResponse.ts index 18c935d..5b1f4a8 100644 --- a/src/internal/model/inputEventResponse.ts +++ b/src/internal/model/inputEventResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { InputEventProperties } from './inputEventProperties'; export class InputEventResponse { diff --git a/src/internal/model/issueApiKeyRequest.ts b/src/internal/model/issueApiKeyRequest.ts index 3c58710..779b139 100644 --- a/src/internal/model/issueApiKeyRequest.ts +++ b/src/internal/model/issueApiKeyRequest.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class IssueApiKeyRequest { /** * Optional description for key diff --git a/src/internal/model/issueApiKeyResponse.ts b/src/internal/model/issueApiKeyResponse.ts index 16f79ba..dc65b00 100644 --- a/src/internal/model/issueApiKeyResponse.ts +++ b/src/internal/model/issueApiKeyResponse.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class IssueApiKeyResponse { /** * The generated API key diff --git a/src/internal/model/issueJWTResponse.ts b/src/internal/model/issueJWTResponse.ts index a494d32..8766f24 100644 --- a/src/internal/model/issueJWTResponse.ts +++ b/src/internal/model/issueJWTResponse.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class IssueJWTResponse { /** * Created JWT token diff --git a/src/internal/model/linkProjectModel.ts b/src/internal/model/linkProjectModel.ts index d7aeb9b..792a1e5 100644 --- a/src/internal/model/linkProjectModel.ts +++ b/src/internal/model/linkProjectModel.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class LinkProjectModel { /** * ID of project to be linked diff --git a/src/internal/model/linkUserModel.ts b/src/internal/model/linkUserModel.ts index f73db59..c56f819 100644 --- a/src/internal/model/linkUserModel.ts +++ b/src/internal/model/linkUserModel.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class LinkUserModel { /** * The ID of the user diff --git a/src/internal/model/logClickEventRequest.ts b/src/internal/model/logClickEventRequest.ts index f50226d..656fbfc 100644 --- a/src/internal/model/logClickEventRequest.ts +++ b/src/internal/model/logClickEventRequest.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class LogClickEventRequest { /** * The ID of the object that was clicked diff --git a/src/internal/model/logCustomEventRequest.ts b/src/internal/model/logCustomEventRequest.ts index 7af3870..8562348 100644 --- a/src/internal/model/logCustomEventRequest.ts +++ b/src/internal/model/logCustomEventRequest.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class LogCustomEventRequest { /** * The category of the custom event diff --git a/src/internal/model/logInputEventRequest.ts b/src/internal/model/logInputEventRequest.ts index 7f5863a..c23cc1c 100644 --- a/src/internal/model/logInputEventRequest.ts +++ b/src/internal/model/logInputEventRequest.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class LogInputEventRequest { /** * The ID of the input object diff --git a/src/internal/model/logVisitEventRequest.ts b/src/internal/model/logVisitEventRequest.ts index a01eaa0..6057a3d 100644 --- a/src/internal/model/logVisitEventRequest.ts +++ b/src/internal/model/logVisitEventRequest.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class LogVisitEventRequest { /** * The URL of the page that was visited diff --git a/src/internal/model/modelFile.ts b/src/internal/model/modelFile.ts index e80800c..5110c24 100644 --- a/src/internal/model/modelFile.ts +++ b/src/internal/model/modelFile.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class ModelFile { 'fileId': object; 'metadata': string; diff --git a/src/internal/model/models.ts b/src/internal/model/models.ts index f76fb69..ca90a55 100644 --- a/src/internal/model/models.ts +++ b/src/internal/model/models.ts @@ -24,6 +24,7 @@ export * from './fileBucket'; export * from './fileConfigResponse'; export * from './fileProviderResponse'; export * from './getAllClickEventsResponse'; +export * from './getAllCustomEventTypeResponse'; export * from './getAllCustomEventsResponse'; export * from './getAllInputEventsResponse'; export * from './getAllVisitEventsResponse'; @@ -106,6 +107,7 @@ import { FileBucket } from './fileBucket'; import { FileConfigResponse } from './fileConfigResponse'; import { FileProviderResponse } from './fileProviderResponse'; import { GetAllClickEventsResponse } from './getAllClickEventsResponse'; +import { GetAllCustomEventTypeResponse } from './getAllCustomEventTypeResponse'; import { GetAllCustomEventsResponse } from './getAllCustomEventsResponse'; import { GetAllInputEventsResponse } from './getAllInputEventsResponse'; import { GetAllVisitEventsResponse } from './getAllVisitEventsResponse'; @@ -195,6 +197,7 @@ let typeMap: { [index: string]: any } = { FileConfigResponse: FileConfigResponse, FileProviderResponse: FileProviderResponse, GetAllClickEventsResponse: GetAllClickEventsResponse, + GetAllCustomEventTypeResponse: GetAllCustomEventTypeResponse, GetAllCustomEventsResponse: GetAllCustomEventsResponse, GetAllInputEventsResponse: GetAllInputEventsResponse, GetAllVisitEventsResponse: GetAllVisitEventsResponse, diff --git a/src/internal/model/projectResponse.ts b/src/internal/model/projectResponse.ts index 0503eae..16cfbec 100644 --- a/src/internal/model/projectResponse.ts +++ b/src/internal/model/projectResponse.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class ProjectResponse { /** * The ID of the project diff --git a/src/internal/model/registerDomainModel.ts b/src/internal/model/registerDomainModel.ts index ed6d292..eae5188 100644 --- a/src/internal/model/registerDomainModel.ts +++ b/src/internal/model/registerDomainModel.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class RegisterDomainModel { /** * Domain to be registered diff --git a/src/internal/model/registerDomainResponse.ts b/src/internal/model/registerDomainResponse.ts index 029d4ce..3368ac6 100644 --- a/src/internal/model/registerDomainResponse.ts +++ b/src/internal/model/registerDomainResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { SendGridDNSResponse } from './sendGridDNSResponse'; export class RegisterDomainResponse { diff --git a/src/internal/model/registerEmailModel.ts b/src/internal/model/registerEmailModel.ts index 4f02a5a..15a0448 100644 --- a/src/internal/model/registerEmailModel.ts +++ b/src/internal/model/registerEmailModel.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class RegisterEmailModel { /** * The email to register diff --git a/src/internal/model/registerEmailResponse.ts b/src/internal/model/registerEmailResponse.ts index 0a31945..9af810e 100644 --- a/src/internal/model/registerEmailResponse.ts +++ b/src/internal/model/registerEmailResponse.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class RegisterEmailResponse { /** * The email registered diff --git a/src/internal/model/registerFileBucketModel.ts b/src/internal/model/registerFileBucketModel.ts index 9b6da05..fbcd835 100644 --- a/src/internal/model/registerFileBucketModel.ts +++ b/src/internal/model/registerFileBucketModel.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class RegisterFileBucketModel { /** * The unique name of the bucket diff --git a/src/internal/model/registerFileProviderModel.ts b/src/internal/model/registerFileProviderModel.ts index 3976536..c0fd10e 100644 --- a/src/internal/model/registerFileProviderModel.ts +++ b/src/internal/model/registerFileProviderModel.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { AccessKey } from './accessKey'; export class RegisterFileProviderModel { diff --git a/src/internal/model/sendEmailModel.ts b/src/internal/model/sendEmailModel.ts index dd3d5f1..cd23042 100644 --- a/src/internal/model/sendEmailModel.ts +++ b/src/internal/model/sendEmailModel.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { EmailContent } from './emailContent'; import { EmailRecipient } from './emailRecipient'; import { EmailSenderSendEmailModel } from './emailSenderSendEmailModel'; diff --git a/src/internal/model/sendEmailResponse.ts b/src/internal/model/sendEmailResponse.ts index b5f617c..59c0d8d 100644 --- a/src/internal/model/sendEmailResponse.ts +++ b/src/internal/model/sendEmailResponse.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class SendEmailResponse { /** * Whether an email was successfully sent diff --git a/src/internal/model/sendEmailStatisticsResponse.ts b/src/internal/model/sendEmailStatisticsResponse.ts index b1df29f..7e77298 100644 --- a/src/internal/model/sendEmailStatisticsResponse.ts +++ b/src/internal/model/sendEmailStatisticsResponse.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class SendEmailStatisticsResponse { /** * Date diff --git a/src/internal/model/sendEmailStatisticsResponses.ts b/src/internal/model/sendEmailStatisticsResponses.ts index 86b5ec2..381263f 100644 --- a/src/internal/model/sendEmailStatisticsResponses.ts +++ b/src/internal/model/sendEmailStatisticsResponses.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { SendEmailStatisticsResponse } from './sendEmailStatisticsResponse'; export class SendEmailStatisticsResponses { diff --git a/src/internal/model/sendGridDNSRecord.ts b/src/internal/model/sendGridDNSRecord.ts index d6c8713..9343553 100644 --- a/src/internal/model/sendGridDNSRecord.ts +++ b/src/internal/model/sendGridDNSRecord.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class SendGridDNSRecord { 'valid': boolean; 'type': string; diff --git a/src/internal/model/sendGridDNSResponse.ts b/src/internal/model/sendGridDNSResponse.ts index 29aeec5..7500e78 100644 --- a/src/internal/model/sendGridDNSResponse.ts +++ b/src/internal/model/sendGridDNSResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { SendGridDNSRecord } from './sendGridDNSRecord'; export class SendGridDNSResponse { diff --git a/src/internal/model/setUserTypeModel.ts b/src/internal/model/setUserTypeModel.ts index ac9a7f5..57efdf8 100644 --- a/src/internal/model/setUserTypeModel.ts +++ b/src/internal/model/setUserTypeModel.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class SetUserTypeModel { /** * User email diff --git a/src/internal/model/setupEmailResponse.ts b/src/internal/model/setupEmailResponse.ts index 7a0247e..b0f3fdd 100644 --- a/src/internal/model/setupEmailResponse.ts +++ b/src/internal/model/setupEmailResponse.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class SetupEmailResponse { /** * Whether an email was successfully setup diff --git a/src/internal/model/setupEmailServiceModel.ts b/src/internal/model/setupEmailServiceModel.ts index 347a014..5080ea7 100644 --- a/src/internal/model/setupEmailServiceModel.ts +++ b/src/internal/model/setupEmailServiceModel.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class SetupEmailServiceModel { /** * The sendgrid API Key to use diff --git a/src/internal/model/setupFileServiceResponse.ts b/src/internal/model/setupFileServiceResponse.ts index 4837ba1..f669211 100644 --- a/src/internal/model/setupFileServiceResponse.ts +++ b/src/internal/model/setupFileServiceResponse.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class SetupFileServiceResponse { /** * Whether file services were successfully setup diff --git a/src/internal/model/unlinkProjectModel.ts b/src/internal/model/unlinkProjectModel.ts index a22bfb1..88dabe2 100644 --- a/src/internal/model/unlinkProjectModel.ts +++ b/src/internal/model/unlinkProjectModel.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class UnlinkProjectModel { /** * ID of project to be unlinked diff --git a/src/internal/model/updateAnalyticsConfigModel.ts b/src/internal/model/updateAnalyticsConfigModel.ts index 30370dc..eda9f74 100644 --- a/src/internal/model/updateAnalyticsConfigModel.ts +++ b/src/internal/model/updateAnalyticsConfigModel.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class UpdateAnalyticsConfigModel { 'serverAnalyticsKey'?: string; 'clientAnalyticsKey'?: string; diff --git a/src/internal/model/uploadFileModel.ts b/src/internal/model/uploadFileModel.ts index 1f80a4d..35da31a 100644 --- a/src/internal/model/uploadFileModel.ts +++ b/src/internal/model/uploadFileModel.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class UploadFileModel { /** * Name of file diff --git a/src/internal/model/uploadFileResponse.ts b/src/internal/model/uploadFileResponse.ts index 82057f6..18a0e8d 100644 --- a/src/internal/model/uploadFileResponse.ts +++ b/src/internal/model/uploadFileResponse.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class UploadFileResponse { /** * Pre-signed URL used in file upload diff --git a/src/internal/model/userResponse.ts b/src/internal/model/userResponse.ts index a307428..abb99f8 100644 --- a/src/internal/model/userResponse.ts +++ b/src/internal/model/userResponse.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class UserResponse { /** * User id diff --git a/src/internal/model/userResponses.ts b/src/internal/model/userResponses.ts index b99803a..ca3233b 100644 --- a/src/internal/model/userResponses.ts +++ b/src/internal/model/userResponses.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { UserResponse } from './userResponse'; export class UserResponses { diff --git a/src/internal/model/verifyDomainModel.ts b/src/internal/model/verifyDomainModel.ts index dcbd575..692c5f7 100644 --- a/src/internal/model/verifyDomainModel.ts +++ b/src/internal/model/verifyDomainModel.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class VerifyDomainModel { /** * Domain to be verified diff --git a/src/internal/model/visitEventProperties.ts b/src/internal/model/visitEventProperties.ts index f140562..9d1fc11 100644 --- a/src/internal/model/visitEventProperties.ts +++ b/src/internal/model/visitEventProperties.ts @@ -10,6 +10,8 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; + export class VisitEventProperties { /** * Page URL diff --git a/src/internal/model/visitEventResponse.ts b/src/internal/model/visitEventResponse.ts index 9d974f0..ceba4ac 100644 --- a/src/internal/model/visitEventResponse.ts +++ b/src/internal/model/visitEventResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from './models'; import { VisitEventProperties } from './visitEventProperties'; export class VisitEventResponse { diff --git a/src/lib/analytics.ts b/src/lib/analytics.ts index 78ceb45..77b6381 100644 --- a/src/lib/analytics.ts +++ b/src/lib/analytics.ts @@ -2,7 +2,7 @@ import { AnalyticsApi, ClickEventResponse, CustomEventResponse, - CustomEventTypeResponse, + GetAllCustomEventTypeResponse, CustomGraphTypeResponse, GetAllClickEventsResponse, GetAllCustomEventsResponse, @@ -19,6 +19,7 @@ import { LogVisitEventRequest, VisitEventResponse, } from '../internal/api'; + import { validateString } from './validators'; export class AnalyticsAPI { @@ -217,7 +218,7 @@ export class AnalyticsAPI { async getCustomEventTypesByProject( projectName: string - ): Promise { + ): Promise { validateString( projectName, 'The projectName must be provided as an input and has to be nonempty.'