@bitwarden/sdk-internal 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,97 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ */
5
+ export enum LogLevel {
6
+ Trace = 0,
7
+ Debug = 1,
8
+ Info = 2,
9
+ Warn = 3,
10
+ Error = 4,
11
+ }
12
+ export type DeviceType =
13
+ | "Android"
14
+ | "iOS"
15
+ | "ChromeExtension"
16
+ | "FirefoxExtension"
17
+ | "OperaExtension"
18
+ | "EdgeExtension"
19
+ | "WindowsDesktop"
20
+ | "MacOsDesktop"
21
+ | "LinuxDesktop"
22
+ | "ChromeBrowser"
23
+ | "FirefoxBrowser"
24
+ | "OperaBrowser"
25
+ | "EdgeBrowser"
26
+ | "IEBrowser"
27
+ | "UnknownBrowser"
28
+ | "AndroidAmazon"
29
+ | "UWP"
30
+ | "SafariBrowser"
31
+ | "VivaldiBrowser"
32
+ | "VivaldiExtension"
33
+ | "SafariExtension"
34
+ | "SDK"
35
+ | "Server"
36
+ | "WindowsCLI"
37
+ | "MacOsCLI"
38
+ | "LinuxCLI";
39
+
40
+ /**
41
+ * Basic client behavior settings. These settings specify the various targets and behavior of the
42
+ * Bitwarden Client. They are optional and uneditable once the client is initialized.
43
+ *
44
+ * Defaults to
45
+ *
46
+ * ```
47
+ * # use bitwarden_core::{ClientSettings, DeviceType};
48
+ * let settings = ClientSettings {
49
+ * identity_url: \"https://identity.bitwarden.com\".to_string(),
50
+ * api_url: \"https://api.bitwarden.com\".to_string(),
51
+ * user_agent: \"Bitwarden Rust-SDK\".to_string(),
52
+ * device_type: DeviceType::SDK,
53
+ * };
54
+ * let default = ClientSettings::default();
55
+ * ```
56
+ */
57
+ export interface ClientSettings {
58
+ /**
59
+ * The identity url of the targeted Bitwarden instance. Defaults to `https://identity.bitwarden.com`
60
+ */
61
+ identityUrl?: string;
62
+ /**
63
+ * The api url of the targeted Bitwarden instance. Defaults to `https://api.bitwarden.com`
64
+ */
65
+ apiUrl?: string;
66
+ /**
67
+ * The user_agent to sent to Bitwarden. Defaults to `Bitwarden Rust-SDK`
68
+ */
69
+ userAgent?: string;
70
+ /**
71
+ * Device type to send to Bitwarden. Defaults to SDK
72
+ */
73
+ deviceType?: DeviceType;
74
+ }
75
+
76
+ /**
77
+ */
78
+ export class BitwardenClient {
79
+ free(): void;
80
+ /**
81
+ * @param {ClientSettings | undefined} [settings]
82
+ * @param {LogLevel | undefined} [log_level]
83
+ */
84
+ constructor(settings?: ClientSettings, log_level?: LogLevel);
85
+ /**
86
+ * Test method, echoes back the input
87
+ * @param {string} msg
88
+ * @returns {string}
89
+ */
90
+ echo(msg: string): string;
91
+ /**
92
+ * Test method, calls http endpoint
93
+ * @param {string} url
94
+ * @returns {Promise<string>}
95
+ */
96
+ http_get(url: string): Promise<string>;
97
+ }
@@ -0,0 +1,4 @@
1
+ import * as wasm from "./bitwarden_wasm_internal_bg.wasm";
2
+ import { __wbg_set_wasm } from "./bitwarden_wasm_internal_bg.js";
3
+ __wbg_set_wasm(wasm);
4
+ export * from "./bitwarden_wasm_internal_bg.js";