@equinor/fusion
Advanced tools
Comparing version 2.3.2 to 2.3.3
@@ -8,4 +8,6 @@ import BaseApiClient from './BaseApiClient'; | ||
async getProjectAsync(projectId, snapshotId) { | ||
const { project, snapshotProject } = this.resourceCollections.org; | ||
const url = snapshotId ? snapshotProject(snapshotId) : project(projectId); | ||
const orgResources = this.resourceCollections.org; | ||
const url = snapshotId | ||
? orgResources.snapshotProject(snapshotId) | ||
: orgResources.project(projectId); | ||
return this.httpClient.getAsync(url, { | ||
@@ -32,6 +34,6 @@ headers: { | ||
async getPositionsAsync(projectId, expandProperties, snapshotId) { | ||
const { positions, snapshotPositions } = this.resourceCollections.org; | ||
const orgResources = this.resourceCollections.org; | ||
const url = snapshotId | ||
? snapshotPositions(snapshotId, expandProperties) | ||
: positions(projectId, expandProperties); | ||
? orgResources.snapshotPositions(snapshotId, expandProperties) | ||
: orgResources.positions(projectId, expandProperties); | ||
return this.httpClient.getAsync(url, { | ||
@@ -44,6 +46,6 @@ headers: { | ||
async getPositionAsync(projectId, positionId, snapshotId) { | ||
const { position, snapshotPosition } = this.resourceCollections.org; | ||
const orgResources = this.resourceCollections.org; | ||
const url = snapshotId | ||
? snapshotPosition(snapshotId, positionId) | ||
: position(projectId, positionId); | ||
? orgResources.snapshotPosition(snapshotId, positionId) | ||
: orgResources.position(projectId, positionId); | ||
return this.httpClient.getAsync(url, { | ||
@@ -113,6 +115,6 @@ headers: { | ||
async getPositionReportPathAsync(projectId, positionId, date, snapshotId) { | ||
const { reportsTo, snapshotReportsTo } = this.resourceCollections.org; | ||
const orgResources = this.resourceCollections.org; | ||
const url = snapshotId | ||
? snapshotReportsTo(projectId, positionId, date) | ||
: reportsTo(projectId, positionId, date); | ||
? orgResources.snapshotReportsTo(projectId, positionId, date) | ||
: orgResources.reportsTo(projectId, positionId, date); | ||
return this.httpClient.getAsync(url, { | ||
@@ -137,6 +139,6 @@ headers: { | ||
async getRoleDescriptionV2Async(projectId, positionId, snapshotId) { | ||
const { roleDescriptionV2, snapshotRoleDescription } = this.resourceCollections.org; | ||
const orgResources = this.resourceCollections.org; | ||
const url = snapshotId | ||
? snapshotRoleDescription(snapshotId, positionId) | ||
: roleDescriptionV2(projectId, positionId); | ||
? orgResources.snapshotRoleDescription(snapshotId, positionId) | ||
: orgResources.roleDescriptionV2(projectId, positionId); | ||
return this.httpClient.getAsync(url, { | ||
@@ -143,0 +145,0 @@ headers: { |
@@ -1,2 +0,2 @@ | ||
declare const _default: "2.3.2"; | ||
declare const _default: "2.3.3"; | ||
export default _default; |
@@ -1,1 +0,1 @@ | ||
export default '2.3.2'; | ||
export default '2.3.3'; |
{ | ||
"name": "@equinor/fusion", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"description": "Everything a Fusion app needs to communicate with the core", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
318799
7535