Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/imodel/populate.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ itp imodel populate --imodel-id c2d3e4f5-6789-01ab-cdef-2345678901bc --file site
# Example 3: Synchronizing CSV and IFC Files
itp imodel populate --imodel-id d3e4f5g6-7890-12ab-cdef-3456789012cd --file data1.csv --file data2.csv --file model.ifc

# Example: Synchronizing Revit and DGN Files
# Example 4: Synchronizing Revit and DGN Files
itp imodel populate --imodel-id i9j0k1l2-3456-78ab-cdef-9012345678ij --file model.rvt --file design.dgn
```

Expand Down
2 changes: 1 addition & 1 deletion docs/user/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Retrieve information about specific users based on their user IDs.
## Examples

```bash
# Example: Retrieve information about specific users by their user IDs
# Example 1: Retrieve information about specific users by their user IDs
itp user info --user-id user1-id --user-id user2-id --user-id user3-id
```

Expand Down
7 changes: 7 additions & 0 deletions src/commands/access-control/group/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ import BaseCommand from "../../../extensions/base-command.js";
export default class CreateAccessControlGroup extends BaseCommand {
static description = 'Create a new group for an iTwin.';

static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51 --name "Engineering Team" --description "Group handling engineering tasks"`,
description: 'Example 1:'
}
];

static flags = {
description: Flags.string({
char: 'd',
Expand Down
9 changes: 8 additions & 1 deletion src/commands/access-control/group/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import BaseCommand from "../../../extensions/base-command.js";

export default class DeleteAccessControlGroup extends BaseCommand {
static description = 'Delete an existing group from an iTwin.';


static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51 --group-id bf4d8b36-25d7-4b72-b38b-12c1f0325f42`,
description: 'Example 1:'
}
];

static flags = {
"group-id": Flags.string({
char: 'g',
Expand Down
9 changes: 8 additions & 1 deletion src/commands/access-control/group/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import BaseCommand from "../../../extensions/base-command.js";

export default class AccessControlGroupInfo extends BaseCommand {
static description = 'Retrieve details about a specific group in an iTwin.';


static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51 --group-id bf4d8b36-25d7-4b72-b38b-12c1f0325f42`,
description: 'Example 1:'
}
];

static flags = {
"group-id": Flags.string({
char: 'g',
Expand Down
9 changes: 8 additions & 1 deletion src/commands/access-control/group/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import BaseCommand from "../../../extensions/base-command.js";

export default class ListAccessControlGroups extends BaseCommand {
static description = 'List all groups for a specific iTwin.';


static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51`,
description: 'Example 1:'
}
];

static flags = {
"itwin-id": Flags.string({
char: 'i',
Expand Down
11 changes: 11 additions & 0 deletions src/commands/access-control/group/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ import BaseCommand from "../../../extensions/base-command.js";
export default class UpdateAccessControlGroup extends BaseCommand {
static description = 'Update the details of an existing group in an iTwin.';

static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51 --group-id bf4d8b36-25d7-4b72-b38b-12c1f0325f42 --name "Updated Engineering Team" --description "Updated description"`,
description: 'Example 1: Update group name and description'
},
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51 --group-id bf4d8b36-25d7-4b72-b38b-12c1f0325f42 --members [email protected] --members [email protected] --imsGroups "Sample IMS Group" --imsGroups "Sample IMS Group"`,
description: 'Example 2: Update group members and IMS groups'
}
];

static flags = {
description: Flags.string({
char: 'd',
Expand Down
8 changes: 4 additions & 4 deletions src/commands/access-control/member/group/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/

import { Command, Flags } from "@oclif/core";
import { Flags } from "@oclif/core";

import BaseCommand from "../../../../extensions/base-command.js";
import { GroupMember } from "../../../../services/access-control-client/models/group.js";

export default class AddGroupMembers extends BaseCommand {
static description = 'Add one or more groups as members to an iTwin.';

static examples: Command.Example[] = [
static examples = [
{
command: 'itp access-control member group add --itwin-id "ad0ba809-9241-48ad-9eb0-c8038c1a1d51" --groups \'[{"groupId": "group1-id", "roleIds": ["5abbfcef-0eab-472a-b5f5-5c5a43df34b1", "83ee0d80-dea3-495a-b6c0-7bb102ebbcc3"]}, {"groupId": "group2-id", "roleIds": ["5abbfcef-0eab-472a-b5f5-5c5a43df34b1"]}]\',',
description: 'Add one or more groups as members to an iTwin.'
command: `<%= config.bin %> <%= command.id %> --itwin-id "ad0ba809-9241-48ad-9eb0-c8038c1a1d51" --groups '[{"groupId": "group1-id", "roleIds": ["5abbfcef-0eab-472a-b5f5-5c5a43df34b1", "83ee0d80-dea3-495a-b6c0-7bb102ebbcc3"]}, {"groupId": "group2-id", "roleIds": ["5abbfcef-0eab-472a-b5f5-5c5a43df34b1"]}]',`,
description: 'Example 1: Add one or more groups as members to an iTwin.'
}
];

Expand Down
9 changes: 8 additions & 1 deletion src/commands/access-control/member/group/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import BaseCommand from "../../../../extensions/base-command.js";

export default class DeleteGroupMember extends BaseCommand {
static description = 'Remove a group from an iTwin.';


static examples = [
Comment thread
Nadegamra marked this conversation as resolved.
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51 --group-id group1-id`,
description: 'Example 1:'
}
];

static flags = {
"group-id": Flags.string({
char: 'g',
Expand Down
9 changes: 8 additions & 1 deletion src/commands/access-control/member/group/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import BaseCommand from "../../../../extensions/base-command.js";

export default class InfoGroupMember extends BaseCommand {
static description = 'Retrieve details about a specific group member in an iTwin.';


static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51 --group-id group1-id`,
description: 'Example 1:'
}
];

static flags = {
"group-id": Flags.string({
char: 'g',
Expand Down
7 changes: 7 additions & 0 deletions src/commands/access-control/member/group/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ import BaseCommand from "../../../../extensions/base-command.js";

export default class ListGroupMembers extends BaseCommand {
static description = 'List all group members of an iTwin.';

static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51`,
description: 'Example 1:'
}
];

static flags = {
"itwin-id": Flags.string({
Expand Down
7 changes: 7 additions & 0 deletions src/commands/access-control/member/group/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ import BaseCommand from "../../../../extensions/base-command.js";

export default class UpdateGroupMember extends BaseCommand {
static description = 'Update the role assignments for a group in an iTwin.';

static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51 --group-id group1-id --role-ids role1-id --role-ids role2-id`,
description: 'Example 1:'
}
];

static flags = {
"group-id": Flags.string({
Expand Down
9 changes: 8 additions & 1 deletion src/commands/access-control/member/invitations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import BaseCommand from "../../../extensions/base-command.js";

export default class AccessControlMemberInvitations extends BaseCommand {
static description = "Retrieve the list of pending invitations for an iTwin's members.";


static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51`,
description: 'Example 1:'
}
];

static flags = {
"itwin-id": Flags.string({
char: 'i',
Expand Down
9 changes: 8 additions & 1 deletion src/commands/access-control/member/owner/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import BaseCommand from "../../../../extensions/base-command.js";

export default class AddOwner extends BaseCommand {
static description = 'Add a new owner to an iTwin by email.';


static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51 --email [email protected]`,
description: 'Example 1:'
}
];

static flags = {
email: Flags.string({
description: 'The email address of the new owner.',
Expand Down
9 changes: 8 additions & 1 deletion src/commands/access-control/member/owner/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import BaseCommand from "../../../../extensions/base-command.js";

export default class DeleteOwner extends BaseCommand {
static description = 'Remove an owner from an iTwin by their member ID.';


static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51 --member-id user1-id`,
description: 'Example 1:'
}
];

static flags = {
"itwin-id": Flags.string({
char: 'i',
Expand Down
9 changes: 8 additions & 1 deletion src/commands/access-control/member/owner/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import BaseCommand from "../../../../extensions/base-command.js";

export default class ListOwners extends BaseCommand {
static description = 'List all owners of a specific iTwin.';


static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51`,
description: 'Example 1:'
}
];

static flags = {
"itwin-id": Flags.string({
char: 'i',
Expand Down
8 changes: 4 additions & 4 deletions src/commands/access-control/member/user/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/

import { Command, Flags } from "@oclif/core";
import { Flags } from "@oclif/core";

import BaseCommand from "../../../../extensions/base-command.js";
import { addMember } from "../../../../services/access-control-client/models/members.js";

export default class AddUserMembers extends BaseCommand {
static description = 'Add one or more user members to an iTwin.';

static examples: Command.Example[] = [
static examples = [
{
command: 'itp access-control member user add --itwin-id "ad0ba809-9241-48ad-9eb0-c8038c1a1d51" --members \'[{"email": "[email protected]", "roleIds": ["5abbfcef-0eab-472a-b5f5-5c5a43df34b1", "83ee0d80-dea3-495a-b6c0-7bb102ebbcc3"]}, {"email": "[email protected]", "roleIds": ["5abbfcef-0eab-472a-b5f5-5c5a43df34b1"]}]\',',
description: 'Add one or more user members to an iTwin.'
command: `<%= config.bin %> <%= command.id %> --itwin-id "ad0ba809-9241-48ad-9eb0-c8038c1a1d51" --members '[{"email": "[email protected]", "roleIds": ["5abbfcef-0eab-472a-b5f5-5c5a43df34b1", "83ee0d80-dea3-495a-b6c0-7bb102ebbcc3"]}, {"email": "[email protected]", "roleIds": ["5abbfcef-0eab-472a-b5f5-5c5a43df34b1"]}]'`,
description: 'Example 1: Add one or more user members to an iTwin.'
}
];

Expand Down
9 changes: 8 additions & 1 deletion src/commands/access-control/member/user/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import BaseCommand from "../../../../extensions/base-command.js";

export default class DeleteUserMember extends BaseCommand {
static description = 'Remove a user from an iTwin.';


static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51 --member-id user1-id`,
description: 'Example 1:'
}
];

static flags = {
"itwin-id": Flags.string({
char: 'i',
Expand Down
9 changes: 8 additions & 1 deletion src/commands/access-control/member/user/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import BaseCommand from "../../../../extensions/base-command.js";

export default class InfoUserMember extends BaseCommand {
static description = 'Retrieve details about a specific user member in an iTwin.';


static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51 --member-id user1-id`,
description: 'Example 1:'
}
];

static flags = {
"itwin-id": Flags.string({
char: 'i',
Expand Down
9 changes: 8 additions & 1 deletion src/commands/access-control/member/user/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import BaseCommand from "../../../../extensions/base-command.js";

export default class ListUserMembers extends BaseCommand {
static description = 'Retrieve details about a specific user member in an iTwin.';


static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51`,
description: 'Example 1:'
}
];

static flags = {
"itwin-id": Flags.string({
char: 'i',
Expand Down
9 changes: 8 additions & 1 deletion src/commands/access-control/member/user/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import BaseCommand from "../../../../extensions/base-command.js";

export default class UpdateUserMember extends BaseCommand {
static description = 'Update the role assignments for a user in an iTwin.';


static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51 --member-id user1-id --role-ids role1-id --role-ids role2-id`,
description: 'Example 1:'
}
];

static flags = {
"itwin-id": Flags.string({
char: 'i',
Expand Down
9 changes: 8 additions & 1 deletion src/commands/access-control/permissions/all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ import BaseCommand from "../../../extensions/base-command.js";

export default class ListAllPermissions extends BaseCommand {
static description = 'List all iTwin permissions.';


static examples = [
{
command: `<%= config.bin %> <%= command.id %>`,
description: 'Example 1:'
}
];

async run() {
await this.parse(ListAllPermissions);

Expand Down
9 changes: 8 additions & 1 deletion src/commands/access-control/permissions/me.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import BaseCommand from "../../../extensions/base-command.js";

export default class MyPermissions extends BaseCommand {
static description = 'Retrieve a list of your permissions on a specified iTwin.';


static examples = [
{
command: `<%= config.bin %> <%= command.id %>`,
description: 'Example 1:'
}
];

static flags = {
"itwin-id": Flags.string({
char: 'i',
Expand Down
9 changes: 8 additions & 1 deletion src/commands/access-control/role/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import BaseCommand from "../../../extensions/base-command.js";

export default class CreateRole extends BaseCommand {
static description = 'Create a new role for an iTwin. To assign permissions after creation, use itp access-control role update.';


static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51 --name "Project Manager" --description "Manages all aspects of the project"`,
description: 'Example 1:'
}
];

static flags = {
description: Flags.string({
char: 'd',
Expand Down
9 changes: 8 additions & 1 deletion src/commands/access-control/role/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import BaseCommand from "../../../extensions/base-command.js";

export default class DeleteRole extends BaseCommand {
static description = 'Delete an existing role from an iTwin.';


static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51 --role-id role1-id`,
description: 'Example 1:'
}
];

static flags = {
"itwin-id": Flags.string({
char: 'i',
Expand Down
Loading