()
| 450 | } |
| 451 | |
| 452 | private confirmCommand(): Command { |
| 453 | const confirmObjects = ["org-member"]; |
| 454 | return new Command("confirm") |
| 455 | .argument("<object>", "Valid objects are: " + confirmObjects.join(", ")) |
| 456 | .argument("<id>", "Object's globally unique `id`.") |
| 457 | .description("Confirm an object to the organization.") |
| 458 | .option("--organizationid <organizationid>", "Organization id for an organization object.") |
| 459 | .on("--help", () => { |
| 460 | writeLn("\n Examples:"); |
| 461 | writeLn(""); |
| 462 | writeLn( |
| 463 | " bw confirm org-member 7063feab-4b10-472e-b64c-785e2b870b92 " + |
| 464 | "--organizationid 310d5ffd-e9a2-4451-af87-ea054dce0f78", |
| 465 | ); |
| 466 | writeLn("", true); |
| 467 | }) |
| 468 | .action(async (object, id, cmd) => { |
| 469 | if (!this.validateObject(object, confirmObjects)) { |
| 470 | return; |
| 471 | } |
| 472 | |
| 473 | await this.exitIfLocked(); |
| 474 | const command = new ConfirmCommand( |
| 475 | this.serviceContainer.apiService, |
| 476 | this.serviceContainer.keyService, |
| 477 | this.serviceContainer.encryptService, |
| 478 | this.serviceContainer.organizationUserApiService, |
| 479 | this.serviceContainer.accountService, |
| 480 | this.serviceContainer.i18nService, |
| 481 | ); |
| 482 | const response = await command.run(object, id, cmd); |
| 483 | this.processResponse(response); |
| 484 | }); |
| 485 | } |
| 486 | |
| 487 | private importCommand(): Command { |
| 488 | return new Command("import") |
no test coverage detected