Skip to content

Commit

Permalink
Merge pull request #43 from JohnOnSoftware/develop
Browse files Browse the repository at this point in the history
Migrate to SDK aps_sdk/construction-account-admin
  • Loading branch information
JohnOnSoftware authored Aug 12, 2024
2 parents efd2a3d + 05c137c commit 4cc97db
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { SdkManagerBuilder } = require('@aps_sdk/autodesk-sdkmanager');
const { AuthenticationClient, Scopes, ResponseType } = require('@aps_sdk/authentication');
const { DataManagementClient } = require('@aps_sdk/data-management');
// highlight-start
const { AdminClient } = require('@aps_sdk/account-admin');
const { AdminClient } = require('@aps_sdk/construction-account-admin');
// highlight-end
const { APS_CLIENT_ID, APS_CLIENT_SECRET, APS_CALLBACK_URL } = require('../config.js');

Expand Down Expand Up @@ -81,9 +81,9 @@ service.importProjectUsersACC = async (projectId, projectUsers, token) => {
```

:::tip
The method adminClient.getProjects will return all the production projects of this hub,
it's different from the Data Management GET Projects API which
returns only returns the projects the current user is involved.
The method adminClient.getProjects() returns all the production projects within this hub,
it's different from the Data Management GET Projects API which only returns these projects
the current user is involved.
:::


Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ service.getProjects = async (hubId, token) => {
};
```
:::tip
The method dataManagementClient.getHubProjects() will return the projects which
The method dataManagementClient.getHubProjects() returns these projects that
the current user is involed, it's different from the ACC Admin GET Projects API which
returns all the projects including those the user is not involved.
:::
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ npm init -y
Next, install all the Node.js dependencies we're going to use. In this case it will be [dotenv](https://www.npmjs.com/package/dotenv)
(utility for initializing environment variables from a file), [Express.js](https://expressjs.com) (web framework),
and [cookie-session](https://www.npmjs.com/package/cookie-session) for handling cookie-based sessions, and finally the necessary APS SDK including:
- [@aps_sdk/autodesk-sdkmanager](https://www.npmjs.com/package/@aps_sdk/autodesk-sdkmanager),
- [@aps_sdk/authentication](https://www.npmjs.com/package/@aps_sdk/authentication),
- [@aps_sdk/data-management](https://www.npmjs.com/package/@aps_sdk/data-management),
- [@aps_sdk/account-admin](https://www.npmjs.com/package/@aps_sdk/account-admin):
- [@aps_sdk/autodesk-sdkmanager](https://www.npmjs.com/package/@aps_sdk/autodesk-sdkmanager)
- [@aps_sdk/authentication](https://www.npmjs.com/package/@aps_sdk/authentication)
- [@aps_sdk/data-management](https://www.npmjs.com/package/@aps_sdk/data-management)
- [@aps_sdk/construction-account-admin](https://www.npmjs.com/package/@aps_sdk/construction-account-admin)


:::caution
Expand All @@ -22,10 +22,10 @@ the specific versions of these packages as shown below.

```bash
npm install --save dotenv express cookie-session
npm install --save @aps_sdk/autodesk-sdkmanager@0.0.7-beta.1
npm install --save @aps_sdk/authentication@0.1.0-beta.1
npm install --save @aps_sdk/autodesk-sdkmanager@1.0.0-beta.1
npm install --save @aps_sdk/authentication@1.0.0-beta.1
npm install --save @aps_sdk/[email protected]
npm install --save @aps_sdk/account-admin@0.1.0-beta.1
npm install --save @aps_sdk/construction-[email protected].0-beta.2
```

The `"dependencies"` in your `package.json` file should now look something like this
Expand All @@ -34,10 +34,10 @@ The `"dependencies"` in your `package.json` file should now look something like
```json
// ...
"dependencies": {
"@aps_sdk/authentication": "^0.1.0-beta.1",
"@aps_sdk/autodesk-sdkmanager": "^0.0.7-beta.1",
"@aps_sdk/authentication": "^1.0.0-beta.1",
"@aps_sdk/autodesk-sdkmanager": "^1.0.0-beta.1",
"@aps_sdk/data-management": "^0.1.0-beta.1",
"@aps_sdk/account-admin": "^0.1.0-beta.1",
"@aps_sdk/construction-account-admin": "^1.0.0-beta.2",
"cookie-session": "^2.1.0",
"dotenv": "^16.4.5",
"express": "^4.19.2"
Expand Down

0 comments on commit 4cc97db

Please sign in to comment.