MCPcopy Create free account
hub / github.com/bitwarden/clients / confirmCommand

Method confirmCommand

apps/cli/src/vault.program.ts:548–581  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

546 }
547
548 private confirmCommand(): Command {
549 const confirmObjects = ["org-member"];
550 return new Command("confirm")
551 .argument("<object>", "Valid objects are: " + confirmObjects.join(", "))
552 .argument("<id>", "Object's globally unique `id`.")
553 .description("Confirm an object to the organization.")
554 .option("--organizationid <organizationid>", "Organization id for an organization object.")
555 .on("--help", () => {
556 writeLn("\n Examples:");
557 writeLn("");
558 writeLn(
559 " bw confirm org-member 7063feab-4b10-472e-b64c-785e2b870b92 " +
560 "--organizationid 310d5ffd-e9a2-4451-af87-ea054dce0f78",
561 );
562 writeLn("", true);
563 })
564 .action(async (object, id, cmd) => {
565 if (!this.validateObject(object, confirmObjects)) {
566 return;
567 }
568
569 await this.exitIfLocked();
570 const command = new ConfirmCommand(
571 this.serviceContainer.apiService,
572 this.serviceContainer.keyService,
573 this.serviceContainer.encryptService,
574 this.serviceContainer.organizationUserApiService,
575 this.serviceContainer.accountService,
576 this.serviceContainer.i18nService,
577 );
578 const response = await command.run(object, id, cmd);
579 this.processResponse(response);
580 });
581 }
582
583 private importCommand(): Command {
584 return new Command("import")

Callers 1

registerMethod · 0.95

Calls 5

validateObjectMethod · 0.95
runMethod · 0.95
actionMethod · 0.80
descriptionMethod · 0.45
processResponseMethod · 0.45

Tested by

no test coverage detected