1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-12 14:34:02 +00:00

rename new integration types to extension types

The first pass of the integration logic mixed names between
"integration" and "extension". For example, the remote service
has an "IntegrationId" whereas the part of the password manager
it extended has an "ExtensionPointId".

The new types have a more consistent approach. The remote
service now distinguishes the integrated product from the
vendor providing it, and the logic within the password manager
is now all the "extension". The specific location being extended
is now called the "site" or "extension site".

The main reason "extension" was chosen over "integration" is simply
so that the new and old types remain distinct in the folder hierarchy.
This commit is contained in:
✨ Audrey ✨
2024-12-27 11:32:36 -05:00
parent 54b2be3707
commit b8d5d3c0a6
24 changed files with 519 additions and 289 deletions

View File

@@ -0,0 +1,49 @@
import { RpcConfiguration } from "@bitwarden/common/tools/integration/rpc";
import { GenerationRequest } from "@bitwarden/common/tools/types";
import { ForwarderContext } from "../engine";
import { GeneratorMetadata } from "../metadata/generator-metadata";
import { NoPolicy } from "../types";
/** Fields that may be requested by a forwarder integration */
export type ForwarderSettings = {
/** bearer token that authenticates bitwarden to the forwarder.
* This is required to issue an API request.
*/
token: string;
/** The base URL of the forwarder's API.
* When this is empty, the forwarder's default production API is used.
*/
baseUrl: string;
/** The domain part of the generated email address.
* @remarks The domain should be authorized by the forwarder before
* submitting a request through bitwarden.
* @example If the domain is `domain.io` and the generated username
* is `jd`, then the generated email address will be `jd@domain.io`
*/
domain: string;
/** A prefix joined to the generated email address' username.
* @example If the prefix is `foo`, the generated username is `bar`,
* and the domain is `domain.io`, then the generated email address is `
* then the generated username is `foobar@domain.io`.
*/
prefix: string;
};
/** Forwarder-specific static definition */
export type ForwarderMetadata = GeneratorMetadata<ForwarderSettings, NoPolicy> & {
/** createForwardingEmail RPC definition */
createForwardingEmail: RpcConfiguration<
GenerationRequest,
ForwarderContext<ForwarderSettings>,
string
>;
/** getAccountId RPC definition; the response updates `accountId` which has a
* structural mixin type `RequestAccount`.
*/
getAccountId?: RpcConfiguration<GenerationRequest, ForwarderContext<ForwarderSettings>, string>;
};

View File

@@ -47,6 +47,7 @@ export type GeneratorMetadata<Options, Policy> = AlgorithmMetadata & {
};
};
/** Defines parameters for policy transformations */
policy: {
/** Combines multiple policies set by the administrative console into
* a single policy.