@dynamic-labs/sdk-api
Advanced tools
Comparing version 0.0.21 to 0.0.22
{ | ||
"name": "@dynamic-labs/sdk-api", | ||
"version": "0.0.21", | ||
"version": "0.0.22", | ||
"author": "Dynamic Labs", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -21,2 +21,9 @@ /** | ||
} | ||
export interface GetOrganizationUsersRequest { | ||
organizationId: string; | ||
filter?: object; | ||
orderBy?: string; | ||
offset?: number; | ||
limit?: number; | ||
} | ||
export interface GetUserRequest { | ||
@@ -42,2 +49,10 @@ userId: string; | ||
/** | ||
* Get all users that are admins or have access to the dashboard | ||
*/ | ||
getOrganizationUsersRaw(requestParameters: GetOrganizationUsersRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<UsersResponse>>; | ||
/** | ||
* Get all users that are admins or have access to the dashboard | ||
*/ | ||
getOrganizationUsers(requestParameters: GetOrganizationUsersRequest, initOverrides?: RequestInit): Promise<UsersResponse>; | ||
/** | ||
* Get a user by Id | ||
@@ -44,0 +59,0 @@ */ |
@@ -103,2 +103,49 @@ "use strict"; | ||
/** | ||
* Get all users that are admins or have access to the dashboard | ||
*/ | ||
getOrganizationUsersRaw(requestParameters, initOverrides) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (requestParameters.organizationId === null || requestParameters.organizationId === undefined) { | ||
throw new runtime.RequiredError('organizationId', 'Required parameter requestParameters.organizationId was null or undefined when calling getOrganizationUsers.'); | ||
} | ||
const queryParameters = {}; | ||
if (requestParameters.filter !== undefined) { | ||
queryParameters['filter'] = requestParameters.filter; | ||
} | ||
if (requestParameters.orderBy !== undefined) { | ||
queryParameters['orderBy'] = requestParameters.orderBy; | ||
} | ||
if (requestParameters.offset !== undefined) { | ||
queryParameters['offset'] = requestParameters.offset; | ||
} | ||
if (requestParameters.limit !== undefined) { | ||
queryParameters['limit'] = requestParameters.limit; | ||
} | ||
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: `/organizations/{organizationId}/users`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters.organizationId))), | ||
method: 'GET', | ||
headers: headerParameters, | ||
query: queryParameters, | ||
}, initOverrides); | ||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.UsersResponseFromJSON)(jsonValue)); | ||
}); | ||
} | ||
/** | ||
* Get all users that are admins or have access to the dashboard | ||
*/ | ||
getOrganizationUsers(requestParameters, initOverrides) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const response = yield this.getOrganizationUsersRaw(requestParameters, initOverrides); | ||
return yield response.value(); | ||
}); | ||
} | ||
/** | ||
* Get a user by Id | ||
@@ -105,0 +152,0 @@ */ |
@@ -14,2 +14,3 @@ export * from './BadRequest'; | ||
export * from './Filter'; | ||
export * from './Filter1'; | ||
export * from './Forbidden'; | ||
@@ -16,0 +17,0 @@ export * from './ForbiddenWithErrorAndPayload'; |
@@ -32,2 +32,3 @@ "use strict"; | ||
__exportStar(require("./Filter"), exports); | ||
__exportStar(require("./Filter1"), exports); | ||
__exportStar(require("./Forbidden"), exports); | ||
@@ -34,0 +35,0 @@ __exportStar(require("./ForbiddenWithErrorAndPayload"), 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
385636
231
7604
18
0
254