@dynamic-labs/sdk-api
Advanced tools
Comparing version 0.0.30 to 0.0.31
{ | ||
"name": "@dynamic-labs/sdk-api", | ||
"version": "0.0.30", | ||
"version": "0.0.31", | ||
"author": "Dynamic Labs", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -13,3 +13,3 @@ /** | ||
import * as runtime from '../runtime'; | ||
import { KeyResponse, ProjectEnvironment, ProjectSettings } from '../models'; | ||
import { EnvironmentVisitorsResponse, KeyResponse, ProjectEnvironment, ProjectSettings } from '../models'; | ||
export interface DeleteEnvironmentByIdRequest { | ||
@@ -24,2 +24,5 @@ environmentId: string; | ||
} | ||
export interface GetVisitorsCountByEnvironmentIdRequest { | ||
environmentId: string; | ||
} | ||
export interface UpdateProjectSettingsRequest { | ||
@@ -58,2 +61,10 @@ environmentId: string; | ||
/** | ||
* Get the unique number of visitors for an environment by environment ID | ||
*/ | ||
getVisitorsCountByEnvironmentIdRaw(requestParameters: GetVisitorsCountByEnvironmentIdRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<EnvironmentVisitorsResponse>>; | ||
/** | ||
* Get the unique number of visitors for an environment by environment ID | ||
*/ | ||
getVisitorsCountByEnvironmentId(requestParameters: GetVisitorsCountByEnvironmentIdRequest, initOverrides?: RequestInit): Promise<EnvironmentVisitorsResponse>; | ||
/** | ||
* Updates the environment settings | ||
@@ -60,0 +71,0 @@ */ |
@@ -160,2 +160,37 @@ "use strict"; | ||
/** | ||
* Get the unique number of visitors for an environment by environment ID | ||
*/ | ||
getVisitorsCountByEnvironmentIdRaw(requestParameters, initOverrides) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) { | ||
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getVisitorsCountByEnvironmentId.'); | ||
} | ||
const queryParameters = {}; | ||
const headerParameters = {}; | ||
if (this.configuration && this.configuration.accessToken) { | ||
const token = this.configuration.accessToken; | ||
const tokenString = yield token("bearerAuth", []); | ||
if (tokenString) { | ||
headerParameters["Authorization"] = `Bearer ${tokenString}`; | ||
} | ||
} | ||
const response = yield this.request({ | ||
path: `/environments/{environmentId}/statistics/visitors`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))), | ||
method: 'GET', | ||
headers: headerParameters, | ||
query: queryParameters, | ||
}, initOverrides); | ||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.EnvironmentVisitorsResponseFromJSON)(jsonValue)); | ||
}); | ||
} | ||
/** | ||
* Get the unique number of visitors for an environment by environment ID | ||
*/ | ||
getVisitorsCountByEnvironmentId(requestParameters, initOverrides) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const response = yield this.getVisitorsCountByEnvironmentIdRaw(requestParameters, initOverrides); | ||
return yield response.value(); | ||
}); | ||
} | ||
/** | ||
* Updates the environment settings | ||
@@ -162,0 +197,0 @@ */ |
@@ -9,2 +9,3 @@ export * from './BadRequest'; | ||
export * from './EnvironmentEnum'; | ||
export * from './EnvironmentVisitorsResponse'; | ||
export * from './EnvironmentsResponse'; | ||
@@ -11,0 +12,0 @@ export * from './EnvironmentsResponseEnvironments'; |
@@ -27,2 +27,3 @@ "use strict"; | ||
__exportStar(require("./EnvironmentEnum"), exports); | ||
__exportStar(require("./EnvironmentVisitorsResponse"), exports); | ||
__exportStar(require("./EnvironmentsResponse"), exports); | ||
@@ -29,0 +30,0 @@ __exportStar(require("./EnvironmentsResponseEnvironments"), exports); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
434929
252
8567