@bitwarden/sdk-napi
Advanced tools
| import * as rust from "../../binding"; | ||
| import { LogLevel } from "../../binding"; | ||
| import { ClientSettings, ResponseForAPIKeyLoginResponse, ResponseForPasswordLoginResponse, ResponseForSecretIdentifiersResponse, ResponseForSecretResponse, ResponseForSecretsDeleteResponse, ResponseForSyncResponse } from "./schemas"; | ||
| import { ClientSettings, ResponseForAPIKeyLoginResponse, ResponseForPasswordLoginResponse, ResponseForSecretIdentifiersResponse, ResponseForSecretResponse, ResponseForSecretsDeleteResponse } from "./schemas"; | ||
| export declare class BitwardenClient { | ||
@@ -9,3 +9,2 @@ client: rust.BitwardenClient; | ||
| loginWithAccessToken(accessToken: string): Promise<ResponseForAPIKeyLoginResponse>; | ||
| sync(excludeSubdomains?: boolean): Promise<ResponseForSyncResponse>; | ||
| secrets(): SecretsClient; | ||
@@ -12,0 +11,0 @@ } |
@@ -65,12 +65,15 @@ "use strict"; | ||
| } | ||
| sync(excludeSubdomains = false) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| const response = yield this.client.runCommand(schemas_1.Convert.commandToJson({ | ||
| sync: { | ||
| excludeSubdomains, | ||
| }, | ||
| })); | ||
| return schemas_1.Convert.toResponseForSyncResponse(response); | ||
| }); | ||
| /* | ||
| async sync(excludeSubdomains = false): Promise<ResponseForSyncResponse> { | ||
| const response = await this.client.runCommand( | ||
| Convert.commandToJson({ | ||
| sync: { | ||
| excludeSubdomains, | ||
| }, | ||
| }) | ||
| ); | ||
| return Convert.toResponseForSyncResponse(response); | ||
| } | ||
| */ | ||
| secrets() { | ||
@@ -77,0 +80,0 @@ return new SecretsClient(this.client); |
@@ -8,3 +8,3 @@ /** | ||
| * | ||
| * ``` # use bitwarden::sdk::request::client_settings::{ClientSettings, DeviceType}; # use | ||
| * ``` # use bitwarden::client::client_settings::{ClientSettings, DeviceType}; # use | ||
| * assert_matches::assert_matches; let settings = ClientSettings { identity_url: | ||
@@ -73,3 +73,3 @@ * "https://identity.bitwarden.com".to_string(), api_url: | ||
| * | ||
| * Returns: [PasswordLoginResponse](crate::sdk::auth::response::PasswordLoginResponse) | ||
| * Returns: [PasswordLoginResponse](bitwarden::auth::response::PasswordLoginResponse) | ||
| * | ||
@@ -80,3 +80,3 @@ * Login with API Key | ||
| * | ||
| * Returns: [ApiKeyLoginResponse](crate::sdk::auth::response::ApiKeyLoginResponse) | ||
| * Returns: [ApiKeyLoginResponse](bitwarden::auth::response::ApiKeyLoginResponse) | ||
| * | ||
@@ -87,13 +87,16 @@ * Login with Secrets Manager Access Token | ||
| * | ||
| * Returns: [ApiKeyLoginResponse](crate::sdk::auth::response::ApiKeyLoginResponse) | ||
| * Returns: [ApiKeyLoginResponse](bitwarden::auth::response::ApiKeyLoginResponse) | ||
| * | ||
| * > Requires Authentication Get the API key of the currently authenticated user | ||
| * | ||
| * Returns: | ||
| * [UserApiKeyResponse](crate::sdk::response::user_api_key_response::UserApiKeyResponse) | ||
| * Returns: [UserApiKeyResponse](bitwarden::platform::UserApiKeyResponse) | ||
| * | ||
| * Get the user's passphrase | ||
| * | ||
| * Returns: String | ||
| * | ||
| * > Requires Authentication Retrieve all user data, ciphers and organizations the user is a | ||
| * part of | ||
| * | ||
| * Returns: [SyncResponse](crate::sdk::response::sync_response::SyncResponse) | ||
| * Returns: [SyncResponse](bitwarden::platform::SyncResponse) | ||
| */ | ||
@@ -105,5 +108,7 @@ export interface Command { | ||
| getUserApiKey?: SecretVerificationRequest; | ||
| fingerprint?: FingerprintRequest; | ||
| sync?: SyncRequest; | ||
| secrets?: SecretsCommand; | ||
| projects?: ProjectsCommand; | ||
| mobile?: MobileCommand; | ||
| } | ||
@@ -136,2 +141,12 @@ /** | ||
| } | ||
| export interface FingerprintRequest { | ||
| /** | ||
| * The input material, used in the fingerprint generation process. | ||
| */ | ||
| fingerprintMaterial: string; | ||
| /** | ||
| * The user's public key | ||
| */ | ||
| publicKey: string; | ||
| } | ||
| export interface SecretVerificationRequest { | ||
@@ -150,3 +165,111 @@ /** | ||
| } | ||
| export interface MobileCommand { | ||
| kdf?: MobileKdfCommand; | ||
| crypto?: MobileCryptoCommand; | ||
| vault?: MobileVaultCommand; | ||
| } | ||
| /** | ||
| * Decrypts the users keys and initializes the user crypto, allowing for the | ||
| * encryption/decryption of the users vault | ||
| */ | ||
| export interface MobileCryptoCommand { | ||
| initCrypto: InitCryptoRequest; | ||
| } | ||
| export interface InitCryptoRequest { | ||
| /** | ||
| * The user's email address | ||
| */ | ||
| email: string; | ||
| /** | ||
| * The user's KDF parameters, as received from the prelogin request | ||
| */ | ||
| kdfParams: Kdf; | ||
| /** | ||
| * The encryption keys for all the organizations the user is a part of | ||
| */ | ||
| organizationKeys: { | ||
| [key: string]: string; | ||
| }; | ||
| /** | ||
| * The user's master password | ||
| */ | ||
| password: string; | ||
| /** | ||
| * The user's encryptred private key | ||
| */ | ||
| privateKey: string; | ||
| /** | ||
| * The user's encrypted symmetric crypto key | ||
| */ | ||
| userKey: string; | ||
| } | ||
| /** | ||
| * The user's KDF parameters, as received from the prelogin request | ||
| */ | ||
| export interface Kdf { | ||
| pBKDF2?: PBKDF2; | ||
| argon2id?: Argon2ID; | ||
| } | ||
| export interface Argon2ID { | ||
| iterations: number; | ||
| memory: number; | ||
| parallelism: number; | ||
| } | ||
| export interface PBKDF2 { | ||
| iterations: number; | ||
| } | ||
| /** | ||
| * Calculates the user master password hash based on the provided password and KDF | ||
| * parametes | ||
| * | ||
| * Returns: String | ||
| */ | ||
| export interface MobileKdfCommand { | ||
| hashPassword: PasswordHashRequest; | ||
| } | ||
| export interface PasswordHashRequest { | ||
| /** | ||
| * The user's email address | ||
| */ | ||
| email: string; | ||
| /** | ||
| * The user's KDF parameters, as received from the prelogin request | ||
| */ | ||
| kdfParams: Kdf; | ||
| /** | ||
| * The user's master password | ||
| */ | ||
| password: string; | ||
| } | ||
| export interface MobileVaultCommand { | ||
| folders: MobileFoldersCommand; | ||
| } | ||
| /** | ||
| * > Requires having previously initialized the cryptography parameters Decrypts the | ||
| * provided folder | ||
| * | ||
| * Returns: [FolderDecryptResponse](bitwarden::mobile::vault::FolderDecryptResponse) | ||
| * | ||
| * > Requires having previously initialized the cryptography parameters Decrypts the | ||
| * provided folders | ||
| * | ||
| * Returns: [FolderDecryptListResponse](bitwarden::mobile::vault::FolderDecryptListResponse) | ||
| */ | ||
| export interface MobileFoldersCommand { | ||
| decrypt?: FolderDecryptRequest; | ||
| decryptList?: FolderDecryptListRequest; | ||
| } | ||
| export interface FolderDecryptRequest { | ||
| folder: Folder; | ||
| } | ||
| export interface Folder { | ||
| id: string; | ||
| name: string; | ||
| revisionDate: Date; | ||
| [property: string]: any; | ||
| } | ||
| export interface FolderDecryptListRequest { | ||
| folders: Folder[]; | ||
| } | ||
| /** | ||
| * Login to Bitwarden with Username and Password | ||
@@ -168,13 +291,45 @@ */ | ||
| * | ||
| * Returns: [ProjectResponse](crate::sdk::response::projects_response::ProjectResponse) | ||
| * Returns: [ProjectResponse](bitwarden::secrets_manager::projects::ProjectResponse) | ||
| * | ||
| * > Requires Authentication > Requires using an Access Token for login or calling Sync at | ||
| * least once Creates a new project in the provided organization using the given data | ||
| * | ||
| * Returns: [ProjectResponse](bitwarden::secrets_manager::projects::ProjectResponse) | ||
| * | ||
| * > Requires Authentication > Requires using an Access Token for login or calling Sync at | ||
| * least once Lists all projects of the given organization | ||
| * | ||
| * Returns: [ProjectsResponse](crate::sdk::response::projects_response::ProjectsResponse) | ||
| * Returns: [ProjectsResponse](bitwarden::secrets_manager::projects::ProjectsResponse) | ||
| * | ||
| * > Requires Authentication > Requires using an Access Token for login or calling Sync at | ||
| * least once Updates an existing project with the provided ID using the given data | ||
| * | ||
| * Returns: [ProjectResponse](bitwarden::secrets_manager::projects::ProjectResponse) | ||
| * | ||
| * > Requires Authentication > Requires using an Access Token for login or calling Sync at | ||
| * least once Deletes all the projects whose IDs match the provided ones | ||
| * | ||
| * Returns: | ||
| * [ProjectsDeleteResponse](bitwarden::secrets_manager::projects::ProjectsDeleteResponse) | ||
| */ | ||
| export interface ProjectsCommand { | ||
| get?: ProjectGetRequest; | ||
| create?: ProjectCreateRequest; | ||
| list?: ProjectsListRequest; | ||
| update?: ProjectPutRequest; | ||
| delete?: ProjectsDeleteRequest; | ||
| } | ||
| export interface ProjectCreateRequest { | ||
| name: string; | ||
| /** | ||
| * Organization where the project will be created | ||
| */ | ||
| organizationId: string; | ||
| } | ||
| export interface ProjectsDeleteRequest { | ||
| /** | ||
| * IDs of the projects to delete | ||
| */ | ||
| ids: string[]; | ||
| } | ||
| export interface ProjectGetRequest { | ||
@@ -192,2 +347,13 @@ /** | ||
| } | ||
| export interface ProjectPutRequest { | ||
| /** | ||
| * ID of the project to modify | ||
| */ | ||
| id: string; | ||
| name: string; | ||
| /** | ||
| * Organization ID of the project to modify | ||
| */ | ||
| organizationId: string; | ||
| } | ||
| /** | ||
@@ -197,3 +363,3 @@ * > Requires Authentication > Requires using an Access Token for login or calling Sync at | ||
| * | ||
| * Returns: [SecretResponse](crate::sdk::response::secrets_response::SecretResponse) | ||
| * Returns: [SecretResponse](bitwarden::secrets_manager::secrets::SecretResponse) | ||
| * | ||
@@ -203,3 +369,3 @@ * > Requires Authentication > Requires using an Access Token for login or calling Sync at | ||
| * | ||
| * Returns: [SecretResponse](crate::sdk::response::secrets_response::SecretResponse) | ||
| * Returns: [SecretResponse](bitwarden::secrets_manager::secrets::SecretResponse) | ||
| * | ||
@@ -211,3 +377,3 @@ * > Requires Authentication > Requires using an Access Token for login or calling Sync at | ||
| * Returns: | ||
| * [SecretIdentifiersResponse](crate::sdk::response::secrets_response::SecretIdentifiersResponse) | ||
| * [SecretIdentifiersResponse](bitwarden::secrets_manager::secrets::SecretIdentifiersResponse) | ||
| * | ||
@@ -217,3 +383,3 @@ * > Requires Authentication > Requires using an Access Token for login or calling Sync at | ||
| * | ||
| * Returns: [SecretResponse](crate::sdk::response::secrets_response::SecretResponse) | ||
| * Returns: [SecretResponse](bitwarden::secrets_manager::secrets::SecretResponse) | ||
| * | ||
@@ -224,3 +390,3 @@ * > Requires Authentication > Requires using an Access Token for login or calling Sync at | ||
| * Returns: | ||
| * [SecretsDeleteResponse](crate::sdk::response::secrets_response::SecretsDeleteResponse) | ||
| * [SecretsDeleteResponse](bitwarden::secrets_manager::secrets::SecretsDeleteResponse) | ||
| */ | ||
@@ -241,2 +407,6 @@ export interface SecretsCommand { | ||
| organizationId: string; | ||
| /** | ||
| * IDs of the projects that this secret will belong to | ||
| */ | ||
| projectIds?: string[] | null; | ||
| value: string; | ||
@@ -273,2 +443,3 @@ } | ||
| organizationId: string; | ||
| projectIds?: string[] | null; | ||
| value: string; | ||
@@ -447,39 +618,2 @@ } | ||
| } | ||
| export interface ResponseForSecretDeleteResponse { | ||
| /** | ||
| * The response data. Populated if `success` is true. | ||
| */ | ||
| data?: SecretDeleteResponse | null; | ||
| /** | ||
| * A message for any error that may occur. Populated if `success` is false. | ||
| */ | ||
| errorMessage?: null | string; | ||
| /** | ||
| * Whether or not the SDK request succeeded. | ||
| */ | ||
| success: boolean; | ||
| } | ||
| export interface SecretDeleteResponse { | ||
| error?: null | string; | ||
| id: string; | ||
| } | ||
| export interface ResponseForSecretIdentifierResponse { | ||
| /** | ||
| * The response data. Populated if `success` is true. | ||
| */ | ||
| data?: SecretIdentifierResponse | null; | ||
| /** | ||
| * A message for any error that may occur. Populated if `success` is false. | ||
| */ | ||
| errorMessage?: null | string; | ||
| /** | ||
| * Whether or not the SDK request succeeded. | ||
| */ | ||
| success: boolean; | ||
| } | ||
| export interface SecretIdentifierResponse { | ||
| id: string; | ||
| key: string; | ||
| organizationId: string; | ||
| } | ||
| export interface ResponseForSecretIdentifiersResponse { | ||
@@ -500,5 +634,5 @@ /** | ||
| export interface SecretIdentifiersResponse { | ||
| data: DatumElement[]; | ||
| data: SecretIdentifierResponse[]; | ||
| } | ||
| export interface DatumElement { | ||
| export interface SecretIdentifierResponse { | ||
| id: string; | ||
@@ -548,68 +682,8 @@ key: string; | ||
| export interface SecretsDeleteResponse { | ||
| data: DatumClass[]; | ||
| data: SecretDeleteResponse[]; | ||
| } | ||
| export interface DatumClass { | ||
| export interface SecretDeleteResponse { | ||
| error?: null | string; | ||
| id: string; | ||
| } | ||
| export interface ResponseForSyncResponse { | ||
| /** | ||
| * The response data. Populated if `success` is true. | ||
| */ | ||
| data?: SyncResponse | null; | ||
| /** | ||
| * A message for any error that may occur. Populated if `success` is false. | ||
| */ | ||
| errorMessage?: null | string; | ||
| /** | ||
| * Whether or not the SDK request succeeded. | ||
| */ | ||
| success: boolean; | ||
| } | ||
| export interface SyncResponse { | ||
| /** | ||
| * List of ciphers accesible by the user | ||
| */ | ||
| ciphers: CipherDetailsResponse[]; | ||
| /** | ||
| * Data about the user, including their encryption keys and the organizations they are a | ||
| * part of | ||
| */ | ||
| profile: ProfileResponse; | ||
| } | ||
| export interface CipherDetailsResponse { | ||
| } | ||
| /** | ||
| * Data about the user, including their encryption keys and the organizations they are a | ||
| * part of | ||
| */ | ||
| export interface ProfileResponse { | ||
| email: string; | ||
| id: string; | ||
| name: string; | ||
| organizations: ProfileOrganizationResponse[]; | ||
| } | ||
| export interface ProfileOrganizationResponse { | ||
| id: string; | ||
| } | ||
| export interface ResponseForUserAPIKeyResponse { | ||
| /** | ||
| * The response data. Populated if `success` is true. | ||
| */ | ||
| data?: UserAPIKeyResponse | null; | ||
| /** | ||
| * A message for any error that may occur. Populated if `success` is false. | ||
| */ | ||
| errorMessage?: null | string; | ||
| /** | ||
| * Whether or not the SDK request succeeded. | ||
| */ | ||
| success: boolean; | ||
| } | ||
| export interface UserAPIKeyResponse { | ||
| /** | ||
| * The user's API key, which represents the client_secret portion of an oauth request. | ||
| */ | ||
| apiKey: string; | ||
| } | ||
| export declare class Convert { | ||
@@ -624,6 +698,2 @@ static toClientSettings(json: string): ClientSettings; | ||
| static responseForPasswordLoginResponseToJson(value: ResponseForPasswordLoginResponse): string; | ||
| static toResponseForSecretDeleteResponse(json: string): ResponseForSecretDeleteResponse; | ||
| static responseForSecretDeleteResponseToJson(value: ResponseForSecretDeleteResponse): string; | ||
| static toResponseForSecretIdentifierResponse(json: string): ResponseForSecretIdentifierResponse; | ||
| static responseForSecretIdentifierResponseToJson(value: ResponseForSecretIdentifierResponse): string; | ||
| static toResponseForSecretIdentifiersResponse(json: string): ResponseForSecretIdentifiersResponse; | ||
@@ -635,6 +705,2 @@ static responseForSecretIdentifiersResponseToJson(value: ResponseForSecretIdentifiersResponse): string; | ||
| static responseForSecretsDeleteResponseToJson(value: ResponseForSecretsDeleteResponse): string; | ||
| static toResponseForSyncResponse(json: string): ResponseForSyncResponse; | ||
| static responseForSyncResponseToJson(value: ResponseForSyncResponse): string; | ||
| static toResponseForUserAPIKeyResponse(json: string): ResponseForUserAPIKeyResponse; | ||
| static responseForUserAPIKeyResponseToJson(value: ResponseForUserAPIKeyResponse): string; | ||
| } |
| "use strict"; | ||
| // To parse this data: | ||
| // | ||
| // import { Convert, ClientSettings, Command, ResponseForAPIKeyLoginResponse, ResponseForPasswordLoginResponse, ResponseForSecretDeleteResponse, ResponseForSecretIdentifierResponse, ResponseForSecretIdentifiersResponse, ResponseForSecretResponse, ResponseForSecretsDeleteResponse, ResponseForSyncResponse, ResponseForUserAPIKeyResponse } from "./file"; | ||
| // import { Convert, ClientSettings, Command, ResponseForAPIKeyLoginResponse, ResponseForPasswordLoginResponse, ResponseForSecretIdentifiersResponse, ResponseForSecretResponse, ResponseForSecretsDeleteResponse } from "./file"; | ||
| // | ||
@@ -10,9 +10,5 @@ // const clientSettings = Convert.toClientSettings(json); | ||
| // const responseForPasswordLoginResponse = Convert.toResponseForPasswordLoginResponse(json); | ||
| // const responseForSecretDeleteResponse = Convert.toResponseForSecretDeleteResponse(json); | ||
| // const responseForSecretIdentifierResponse = Convert.toResponseForSecretIdentifierResponse(json); | ||
| // const responseForSecretIdentifiersResponse = Convert.toResponseForSecretIdentifiersResponse(json); | ||
| // const responseForSecretResponse = Convert.toResponseForSecretResponse(json); | ||
| // const responseForSecretsDeleteResponse = Convert.toResponseForSecretsDeleteResponse(json); | ||
| // const responseForSyncResponse = Convert.toResponseForSyncResponse(json); | ||
| // const responseForUserAPIKeyResponse = Convert.toResponseForUserAPIKeyResponse(json); | ||
| // | ||
@@ -50,3 +46,3 @@ // These functions will throw an error if the JSON doesn't | ||
| DeviceType["WindowsDesktop"] = "WindowsDesktop"; | ||
| })(DeviceType = exports.DeviceType || (exports.DeviceType = {})); | ||
| })(DeviceType || (exports.DeviceType = DeviceType = {})); | ||
| // Converts JSON strings to/from your types | ||
@@ -79,14 +75,2 @@ // and asserts the results of JSON.parse at runtime | ||
| } | ||
| static toResponseForSecretDeleteResponse(json) { | ||
| return cast(JSON.parse(json), r("ResponseForSecretDeleteResponse")); | ||
| } | ||
| static responseForSecretDeleteResponseToJson(value) { | ||
| return JSON.stringify(uncast(value, r("ResponseForSecretDeleteResponse")), null, 2); | ||
| } | ||
| static toResponseForSecretIdentifierResponse(json) { | ||
| return cast(JSON.parse(json), r("ResponseForSecretIdentifierResponse")); | ||
| } | ||
| static responseForSecretIdentifierResponseToJson(value) { | ||
| return JSON.stringify(uncast(value, r("ResponseForSecretIdentifierResponse")), null, 2); | ||
| } | ||
| static toResponseForSecretIdentifiersResponse(json) { | ||
@@ -110,14 +94,2 @@ return cast(JSON.parse(json), r("ResponseForSecretIdentifiersResponse")); | ||
| } | ||
| static toResponseForSyncResponse(json) { | ||
| return cast(JSON.parse(json), r("ResponseForSyncResponse")); | ||
| } | ||
| static responseForSyncResponseToJson(value) { | ||
| return JSON.stringify(uncast(value, r("ResponseForSyncResponse")), null, 2); | ||
| } | ||
| static toResponseForUserAPIKeyResponse(json) { | ||
| return cast(JSON.parse(json), r("ResponseForUserAPIKeyResponse")); | ||
| } | ||
| static responseForUserAPIKeyResponseToJson(value) { | ||
| return JSON.stringify(uncast(value, r("ResponseForUserAPIKeyResponse")), null, 2); | ||
| } | ||
| } | ||
@@ -282,5 +254,7 @@ exports.Convert = Convert; | ||
| { json: "getUserApiKey", js: "getUserApiKey", typ: u(undefined, r("SecretVerificationRequest")) }, | ||
| { json: "fingerprint", js: "fingerprint", typ: u(undefined, r("FingerprintRequest")) }, | ||
| { json: "sync", js: "sync", typ: u(undefined, r("SyncRequest")) }, | ||
| { json: "secrets", js: "secrets", typ: u(undefined, r("SecretsCommand")) }, | ||
| { json: "projects", js: "projects", typ: u(undefined, r("ProjectsCommand")) }, | ||
| { json: "mobile", js: "mobile", typ: u(undefined, r("MobileCommand")) }, | ||
| ], false), | ||
@@ -295,2 +269,6 @@ "AccessTokenLoginRequest": o([ | ||
| ], false), | ||
| "FingerprintRequest": o([ | ||
| { json: "fingerprintMaterial", js: "fingerprintMaterial", typ: "" }, | ||
| { json: "publicKey", js: "publicKey", typ: "" }, | ||
| ], false), | ||
| "SecretVerificationRequest": o([ | ||
@@ -300,2 +278,56 @@ { json: "masterPassword", js: "masterPassword", typ: u(undefined, u(null, "")) }, | ||
| ], false), | ||
| "MobileCommand": o([ | ||
| { json: "kdf", js: "kdf", typ: u(undefined, r("MobileKdfCommand")) }, | ||
| { json: "crypto", js: "crypto", typ: u(undefined, r("MobileCryptoCommand")) }, | ||
| { json: "vault", js: "vault", typ: u(undefined, r("MobileVaultCommand")) }, | ||
| ], false), | ||
| "MobileCryptoCommand": o([ | ||
| { json: "initCrypto", js: "initCrypto", typ: r("InitCryptoRequest") }, | ||
| ], false), | ||
| "InitCryptoRequest": o([ | ||
| { json: "email", js: "email", typ: "" }, | ||
| { json: "kdfParams", js: "kdfParams", typ: r("Kdf") }, | ||
| { json: "organizationKeys", js: "organizationKeys", typ: m("") }, | ||
| { json: "password", js: "password", typ: "" }, | ||
| { json: "privateKey", js: "privateKey", typ: "" }, | ||
| { json: "userKey", js: "userKey", typ: "" }, | ||
| ], false), | ||
| "Kdf": o([ | ||
| { json: "pBKDF2", js: "pBKDF2", typ: u(undefined, r("PBKDF2")) }, | ||
| { json: "argon2id", js: "argon2id", typ: u(undefined, r("Argon2ID")) }, | ||
| ], false), | ||
| "Argon2ID": o([ | ||
| { json: "iterations", js: "iterations", typ: 0 }, | ||
| { json: "memory", js: "memory", typ: 0 }, | ||
| { json: "parallelism", js: "parallelism", typ: 0 }, | ||
| ], false), | ||
| "PBKDF2": o([ | ||
| { json: "iterations", js: "iterations", typ: 0 }, | ||
| ], false), | ||
| "MobileKdfCommand": o([ | ||
| { json: "hashPassword", js: "hashPassword", typ: r("PasswordHashRequest") }, | ||
| ], false), | ||
| "PasswordHashRequest": o([ | ||
| { json: "email", js: "email", typ: "" }, | ||
| { json: "kdfParams", js: "kdfParams", typ: r("Kdf") }, | ||
| { json: "password", js: "password", typ: "" }, | ||
| ], false), | ||
| "MobileVaultCommand": o([ | ||
| { json: "folders", js: "folders", typ: r("MobileFoldersCommand") }, | ||
| ], false), | ||
| "MobileFoldersCommand": o([ | ||
| { json: "decrypt", js: "decrypt", typ: u(undefined, r("FolderDecryptRequest")) }, | ||
| { json: "decryptList", js: "decryptList", typ: u(undefined, r("FolderDecryptListRequest")) }, | ||
| ], false), | ||
| "FolderDecryptRequest": o([ | ||
| { json: "folder", js: "folder", typ: r("Folder") }, | ||
| ], false), | ||
| "Folder": o([ | ||
| { json: "id", js: "id", typ: "" }, | ||
| { json: "name", js: "name", typ: "" }, | ||
| { json: "revisionDate", js: "revisionDate", typ: Date }, | ||
| ], "any"), | ||
| "FolderDecryptListRequest": o([ | ||
| { json: "folders", js: "folders", typ: a(r("Folder")) }, | ||
| ], false), | ||
| "PasswordLoginRequest": o([ | ||
@@ -307,4 +339,14 @@ { json: "email", js: "email", typ: "" }, | ||
| { json: "get", js: "get", typ: u(undefined, r("ProjectGetRequest")) }, | ||
| { json: "create", js: "create", typ: u(undefined, r("ProjectCreateRequest")) }, | ||
| { json: "list", js: "list", typ: u(undefined, r("ProjectsListRequest")) }, | ||
| { json: "update", js: "update", typ: u(undefined, r("ProjectPutRequest")) }, | ||
| { json: "delete", js: "delete", typ: u(undefined, r("ProjectsDeleteRequest")) }, | ||
| ], false), | ||
| "ProjectCreateRequest": o([ | ||
| { json: "name", js: "name", typ: "" }, | ||
| { json: "organizationId", js: "organizationId", typ: "" }, | ||
| ], false), | ||
| "ProjectsDeleteRequest": o([ | ||
| { json: "ids", js: "ids", typ: a("") }, | ||
| ], false), | ||
| "ProjectGetRequest": o([ | ||
@@ -316,2 +358,7 @@ { json: "id", js: "id", typ: "" }, | ||
| ], false), | ||
| "ProjectPutRequest": o([ | ||
| { json: "id", js: "id", typ: "" }, | ||
| { json: "name", js: "name", typ: "" }, | ||
| { json: "organizationId", js: "organizationId", typ: "" }, | ||
| ], false), | ||
| "SecretsCommand": o([ | ||
@@ -328,2 +375,3 @@ { json: "get", js: "get", typ: u(undefined, r("SecretGetRequest")) }, | ||
| { json: "organizationId", js: "organizationId", typ: "" }, | ||
| { json: "projectIds", js: "projectIds", typ: u(undefined, u(a(""), null)) }, | ||
| { json: "value", js: "value", typ: "" }, | ||
@@ -345,2 +393,3 @@ ], false), | ||
| { json: "organizationId", js: "organizationId", typ: "" }, | ||
| { json: "projectIds", js: "projectIds", typ: u(undefined, u(a(""), null)) }, | ||
| { json: "value", js: "value", typ: "" }, | ||
@@ -421,21 +470,2 @@ ], false), | ||
| ], false), | ||
| "ResponseForSecretDeleteResponse": o([ | ||
| { json: "data", js: "data", typ: u(undefined, u(r("SecretDeleteResponse"), null)) }, | ||
| { json: "errorMessage", js: "errorMessage", typ: u(undefined, u(null, "")) }, | ||
| { json: "success", js: "success", typ: true }, | ||
| ], false), | ||
| "SecretDeleteResponse": o([ | ||
| { json: "error", js: "error", typ: u(undefined, u(null, "")) }, | ||
| { json: "id", js: "id", typ: "" }, | ||
| ], false), | ||
| "ResponseForSecretIdentifierResponse": o([ | ||
| { json: "data", js: "data", typ: u(undefined, u(r("SecretIdentifierResponse"), null)) }, | ||
| { json: "errorMessage", js: "errorMessage", typ: u(undefined, u(null, "")) }, | ||
| { json: "success", js: "success", typ: true }, | ||
| ], false), | ||
| "SecretIdentifierResponse": o([ | ||
| { json: "id", js: "id", typ: "" }, | ||
| { json: "key", js: "key", typ: "" }, | ||
| { json: "organizationId", js: "organizationId", typ: "" }, | ||
| ], false), | ||
| "ResponseForSecretIdentifiersResponse": o([ | ||
@@ -447,5 +477,5 @@ { json: "data", js: "data", typ: u(undefined, u(r("SecretIdentifiersResponse"), null)) }, | ||
| "SecretIdentifiersResponse": o([ | ||
| { json: "data", js: "data", typ: a(r("DatumElement")) }, | ||
| { json: "data", js: "data", typ: a(r("SecretIdentifierResponse")) }, | ||
| ], false), | ||
| "DatumElement": o([ | ||
| "SecretIdentifierResponse": o([ | ||
| { json: "id", js: "id", typ: "" }, | ||
@@ -477,35 +507,8 @@ { json: "key", js: "key", typ: "" }, | ||
| "SecretsDeleteResponse": o([ | ||
| { json: "data", js: "data", typ: a(r("DatumClass")) }, | ||
| { json: "data", js: "data", typ: a(r("SecretDeleteResponse")) }, | ||
| ], false), | ||
| "DatumClass": o([ | ||
| "SecretDeleteResponse": o([ | ||
| { json: "error", js: "error", typ: u(undefined, u(null, "")) }, | ||
| { json: "id", js: "id", typ: "" }, | ||
| ], false), | ||
| "ResponseForSyncResponse": o([ | ||
| { json: "data", js: "data", typ: u(undefined, u(r("SyncResponse"), null)) }, | ||
| { json: "errorMessage", js: "errorMessage", typ: u(undefined, u(null, "")) }, | ||
| { json: "success", js: "success", typ: true }, | ||
| ], false), | ||
| "SyncResponse": o([ | ||
| { json: "ciphers", js: "ciphers", typ: a(r("CipherDetailsResponse")) }, | ||
| { json: "profile", js: "profile", typ: r("ProfileResponse") }, | ||
| ], false), | ||
| "CipherDetailsResponse": o([], false), | ||
| "ProfileResponse": o([ | ||
| { json: "email", js: "email", typ: "" }, | ||
| { json: "id", js: "id", typ: "" }, | ||
| { json: "name", js: "name", typ: "" }, | ||
| { json: "organizations", js: "organizations", typ: a(r("ProfileOrganizationResponse")) }, | ||
| ], false), | ||
| "ProfileOrganizationResponse": o([ | ||
| { json: "id", js: "id", typ: "" }, | ||
| ], false), | ||
| "ResponseForUserAPIKeyResponse": o([ | ||
| { json: "data", js: "data", typ: u(undefined, u(r("UserAPIKeyResponse"), null)) }, | ||
| { json: "errorMessage", js: "errorMessage", typ: u(undefined, u(null, "")) }, | ||
| { json: "success", js: "success", typ: true }, | ||
| ], false), | ||
| "UserAPIKeyResponse": o([ | ||
| { json: "apiKey", js: "apiKey", typ: "" }, | ||
| ], false), | ||
| "DeviceType": [ | ||
@@ -512,0 +515,0 @@ "Android", |
+6
-6
| { | ||
| "name": "@bitwarden/sdk-napi", | ||
| "version": "0.2.1", | ||
| "version": "0.3.0", | ||
| "homepage": "https://github.com/bitwarden/sdk#readme", | ||
@@ -34,3 +34,3 @@ "bugs": { | ||
| "ts-node": "10.9.1", | ||
| "typescript": "^4.9.4" | ||
| "typescript": "^5.0.0" | ||
| }, | ||
@@ -53,7 +53,7 @@ "engines": { | ||
| "optionalDependencies": { | ||
| "@bitwarden/sdk-napi-win32-x64-msvc": "0.2.1", | ||
| "@bitwarden/sdk-napi-darwin-x64": "0.2.1", | ||
| "@bitwarden/sdk-napi-linux-x64-gnu": "0.2.1", | ||
| "@bitwarden/sdk-napi-darwin-arm64": "0.2.1" | ||
| "@bitwarden/sdk-napi-win32-x64-msvc": "0.3.0", | ||
| "@bitwarden/sdk-napi-darwin-x64": "0.3.0", | ||
| "@bitwarden/sdk-napi-linux-x64-gnu": "0.3.0", | ||
| "@bitwarden/sdk-napi-darwin-arm64": "0.3.0" | ||
| } | ||
| } |
76006
1.11%1617
4.46%