@1password/sdk 0.1.7 → 0.2.1
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.
- package/README.md +9 -7
- package/dist/configuration.d.ts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +25 -10
- package/dist/items.d.ts +3 -0
- package/dist/items.js +7 -4
- package/dist/items_files.d.ts +40 -0
- package/dist/items_files.js +116 -0
- package/dist/items_shares.js +4 -3
- package/dist/iterator.js +1 -0
- package/dist/sdk.js +1 -0
- package/dist/secrets.d.ts +9 -1
- package/dist/secrets.js +22 -2
- package/dist/types.d.ts +208 -1
- package/dist/types.js +36 -1
- package/dist/vaults.js +2 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -84,10 +84,10 @@ Operations:
|
|
|
84
84
|
- [x] [Create items](https://developer.1password.com/docs/sdks/manage-items#create-an-item)
|
|
85
85
|
- [x] [Update items](https://developer.1password.com/docs/sdks/manage-items#update-an-item)
|
|
86
86
|
- [x] [Delete items](https://developer.1password.com/docs/sdks/manage-items#delete-an-item)
|
|
87
|
-
- [x] Archive items
|
|
87
|
+
- [x] [Archive items](https://developer.1password.com/docs/sdks/manage-items/#archive-an-item)
|
|
88
88
|
- [x] [List items](https://developer.1password.com/docs/sdks/list-vaults-items/)
|
|
89
|
-
- [x] Share items
|
|
90
|
-
- [x] Generate PIN, random and memorable passwords
|
|
89
|
+
- [x] [Share items](https://developer.1password.com/docs/sdks/share-items)
|
|
90
|
+
- [x] [Generate PIN, random and memorable passwords](https://developer.1password.com/docs/sdks/manage-items#generate-a-password)
|
|
91
91
|
|
|
92
92
|
Field types:
|
|
93
93
|
- [x] API Keys
|
|
@@ -95,7 +95,7 @@ Field types:
|
|
|
95
95
|
- [x] Concealed fields
|
|
96
96
|
- [x] Text fields
|
|
97
97
|
- [x] Notes
|
|
98
|
-
- [x] SSH private keys, public keys, fingerprint and key type
|
|
98
|
+
- [x] SSH private keys, public keys, fingerprint and key type
|
|
99
99
|
- [x] One-time passwords
|
|
100
100
|
- [x] URLs
|
|
101
101
|
- [x] Websites (used to suggest and autofill logins)
|
|
@@ -104,9 +104,11 @@ Field types:
|
|
|
104
104
|
- [x] Credit card numbers
|
|
105
105
|
- [x] Emails
|
|
106
106
|
- [x] References to other items
|
|
107
|
-
- [
|
|
108
|
-
- [
|
|
109
|
-
- [
|
|
107
|
+
- [x] Address
|
|
108
|
+
- [x] Date
|
|
109
|
+
- [x] MM/YY
|
|
110
|
+
- [x] Files attachments and Document items
|
|
111
|
+
- [x] Menu
|
|
110
112
|
|
|
111
113
|
### Vault management
|
|
112
114
|
- [ ] Retrieve vaults
|
package/dist/configuration.d.ts
CHANGED
package/dist/core.d.ts
CHANGED
|
@@ -69,9 +69,9 @@ export interface Parameters {
|
|
|
69
69
|
* An implementation of the `Core` interface that shares resources across all clients.
|
|
70
70
|
*/
|
|
71
71
|
export declare class SharedCore implements Core {
|
|
72
|
-
invoke_sync(config: InvokeConfig): string;
|
|
73
72
|
initClient(config: ClientAuthConfig): Promise<string>;
|
|
74
73
|
invoke(config: InvokeConfig): Promise<string>;
|
|
74
|
+
invoke_sync(config: InvokeConfig): string;
|
|
75
75
|
releaseClient(clientId: number): void;
|
|
76
76
|
}
|
|
77
77
|
/**
|
package/dist/core.js
CHANGED
|
@@ -11,20 +11,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SharedCore = void 0;
|
|
13
13
|
const sdk_core_1 = require("@1password/sdk-core");
|
|
14
|
+
const types_1 = require("./types");
|
|
14
15
|
const errors_1 = require("./errors");
|
|
16
|
+
// In empirical tests, we determined that maximum message size that can cross the FFI boundary
|
|
17
|
+
// is ~64MB. Past this limit, the wasm-bingen FFI will throw an error and the program will crash.
|
|
18
|
+
// We set the limit to 50MB to be safe, to be reconsidered upon further testing.
|
|
19
|
+
const messageLimit = 50 * 1024 * 1024;
|
|
15
20
|
/**
|
|
16
21
|
* An implementation of the `Core` interface that shares resources across all clients.
|
|
17
22
|
*/
|
|
18
23
|
class SharedCore {
|
|
19
|
-
invoke_sync(config) {
|
|
20
|
-
const serializedConfig = JSON.stringify(config);
|
|
21
|
-
try {
|
|
22
|
-
return (0, sdk_core_1.invoke_sync)(serializedConfig);
|
|
23
|
-
}
|
|
24
|
-
catch (e) {
|
|
25
|
-
(0, errors_1.throwError)(e);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
24
|
initClient(config) {
|
|
29
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
26
|
const serializedConfig = JSON.stringify(config);
|
|
@@ -38,7 +34,12 @@ class SharedCore {
|
|
|
38
34
|
}
|
|
39
35
|
invoke(config) {
|
|
40
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
const serializedConfig = JSON.stringify(config);
|
|
37
|
+
const serializedConfig = JSON.stringify(config, types_1.ReplacerFunc);
|
|
38
|
+
// Encoding to bytes as JS uses UTF-16 under the hood, but the messages
|
|
39
|
+
// that are sent across the FFI boundary are encoded in UTF-8.
|
|
40
|
+
if (new TextEncoder().encode(serializedConfig).length > messageLimit) {
|
|
41
|
+
(0, errors_1.throwError)(`message size exceeds the limit of ${messageLimit} bytes, please contact 1Password at support@1password.com or https://developer.1password.com/joinslack if you need help."`);
|
|
42
|
+
}
|
|
42
43
|
try {
|
|
43
44
|
return yield (0, sdk_core_1.invoke)(serializedConfig);
|
|
44
45
|
}
|
|
@@ -47,6 +48,20 @@ class SharedCore {
|
|
|
47
48
|
}
|
|
48
49
|
});
|
|
49
50
|
}
|
|
51
|
+
invoke_sync(config) {
|
|
52
|
+
const serializedConfig = JSON.stringify(config, types_1.ReplacerFunc);
|
|
53
|
+
// Encoding to bytes as JS uses UTF-16 under the hood, but the messages
|
|
54
|
+
// that are sent across the FFI boundary are encoded in UTF-8.
|
|
55
|
+
if (new TextEncoder().encode(serializedConfig).length > messageLimit) {
|
|
56
|
+
(0, errors_1.throwError)(`message size exceeds the limit of ${messageLimit} bytes, please contact 1Password at support@1password.com or https://developer.1password.com/joinslack if you need help.`);
|
|
57
|
+
}
|
|
58
|
+
try {
|
|
59
|
+
return (0, sdk_core_1.invoke_sync)(serializedConfig);
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
(0, errors_1.throwError)(e);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
50
65
|
releaseClient(clientId) {
|
|
51
66
|
const serializedId = JSON.stringify(clientId);
|
|
52
67
|
(0, sdk_core_1.release_client)(serializedId);
|
package/dist/items.d.ts
CHANGED
|
@@ -2,11 +2,13 @@ import { InnerClient } from "./core.js";
|
|
|
2
2
|
import { SdkIterable } from "./iterator.js";
|
|
3
3
|
import { Item, ItemCreateParams, ItemOverview } from "./types.js";
|
|
4
4
|
import { ItemsSharesApi } from "./items_shares.js";
|
|
5
|
+
import { ItemsFilesApi } from "./items_files.js";
|
|
5
6
|
/**
|
|
6
7
|
* The Items API holds all operations the SDK client can perform on 1Password items.
|
|
7
8
|
*/
|
|
8
9
|
export interface ItemsApi {
|
|
9
10
|
shares: ItemsSharesApi;
|
|
11
|
+
files: ItemsFilesApi;
|
|
10
12
|
/**
|
|
11
13
|
* Create a new item.
|
|
12
14
|
*/
|
|
@@ -35,6 +37,7 @@ export interface ItemsApi {
|
|
|
35
37
|
export declare class Items implements ItemsApi {
|
|
36
38
|
#private;
|
|
37
39
|
shares: ItemsSharesApi;
|
|
40
|
+
files: ItemsFilesApi;
|
|
38
41
|
constructor(inner: InnerClient);
|
|
39
42
|
/**
|
|
40
43
|
* Create a new item.
|
package/dist/items.js
CHANGED
|
@@ -24,12 +24,15 @@ var _Items_inner;
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.Items = void 0;
|
|
26
26
|
const iterator_js_1 = require("./iterator.js");
|
|
27
|
+
const types_js_1 = require("./types.js");
|
|
27
28
|
const items_shares_js_1 = require("./items_shares.js");
|
|
29
|
+
const items_files_js_1 = require("./items_files.js");
|
|
28
30
|
class Items {
|
|
29
31
|
constructor(inner) {
|
|
30
32
|
_Items_inner.set(this, void 0);
|
|
31
33
|
__classPrivateFieldSet(this, _Items_inner, inner, "f");
|
|
32
34
|
this.shares = new items_shares_js_1.ItemsShares(inner);
|
|
35
|
+
this.files = new items_files_js_1.ItemsFiles(inner);
|
|
33
36
|
}
|
|
34
37
|
/**
|
|
35
38
|
* Create a new item.
|
|
@@ -47,7 +50,7 @@ class Items {
|
|
|
47
50
|
},
|
|
48
51
|
},
|
|
49
52
|
};
|
|
50
|
-
return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig));
|
|
53
|
+
return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc);
|
|
51
54
|
});
|
|
52
55
|
}
|
|
53
56
|
/**
|
|
@@ -67,7 +70,7 @@ class Items {
|
|
|
67
70
|
},
|
|
68
71
|
},
|
|
69
72
|
};
|
|
70
|
-
return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig));
|
|
73
|
+
return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc);
|
|
71
74
|
});
|
|
72
75
|
}
|
|
73
76
|
/**
|
|
@@ -86,7 +89,7 @@ class Items {
|
|
|
86
89
|
},
|
|
87
90
|
},
|
|
88
91
|
};
|
|
89
|
-
return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig));
|
|
92
|
+
return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc);
|
|
90
93
|
});
|
|
91
94
|
}
|
|
92
95
|
/**
|
|
@@ -145,7 +148,7 @@ class Items {
|
|
|
145
148
|
},
|
|
146
149
|
},
|
|
147
150
|
};
|
|
148
|
-
return new iterator_js_1.SdkIterable(JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig)));
|
|
151
|
+
return new iterator_js_1.SdkIterable(JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc));
|
|
149
152
|
});
|
|
150
153
|
}
|
|
151
154
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { InnerClient } from "./core.js";
|
|
2
|
+
import { DocumentCreateParams, FileAttributes, FileCreateParams, Item } from "./types.js";
|
|
3
|
+
export interface ItemsFilesApi {
|
|
4
|
+
/**
|
|
5
|
+
* Attach files to Items
|
|
6
|
+
*/
|
|
7
|
+
attach(item: Item, fileParams: FileCreateParams): Promise<Item>;
|
|
8
|
+
/**
|
|
9
|
+
* Read file content from the Item
|
|
10
|
+
*/
|
|
11
|
+
read(vaultId: string, itemId: string, attr: FileAttributes): Promise<Uint8Array>;
|
|
12
|
+
/**
|
|
13
|
+
* Delete a field file from Item using the section and field IDs
|
|
14
|
+
*/
|
|
15
|
+
delete(item: Item, sectionId: string, fieldId: string): Promise<Item>;
|
|
16
|
+
/**
|
|
17
|
+
* Replace the document file within a document item
|
|
18
|
+
*/
|
|
19
|
+
replaceDocument(item: Item, docParams: DocumentCreateParams): Promise<Item>;
|
|
20
|
+
}
|
|
21
|
+
export declare class ItemsFiles implements ItemsFilesApi {
|
|
22
|
+
#private;
|
|
23
|
+
constructor(inner: InnerClient);
|
|
24
|
+
/**
|
|
25
|
+
* Attach files to Items
|
|
26
|
+
*/
|
|
27
|
+
attach(item: Item, fileParams: FileCreateParams): Promise<Item>;
|
|
28
|
+
/**
|
|
29
|
+
* Read file content from the Item
|
|
30
|
+
*/
|
|
31
|
+
read(vaultId: string, itemId: string, attr: FileAttributes): Promise<Uint8Array>;
|
|
32
|
+
/**
|
|
33
|
+
* Delete a field file from Item using the section and field IDs
|
|
34
|
+
*/
|
|
35
|
+
delete(item: Item, sectionId: string, fieldId: string): Promise<Item>;
|
|
36
|
+
/**
|
|
37
|
+
* Replace the document file within a document item
|
|
38
|
+
*/
|
|
39
|
+
replaceDocument(item: Item, docParams: DocumentCreateParams): Promise<Item>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by op-codegen - DO NOT EDIT MANUALLY
|
|
3
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
5
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
6
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
7
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
8
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
9
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
13
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
14
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
15
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
16
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
17
|
+
};
|
|
18
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
19
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
20
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
21
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
22
|
+
};
|
|
23
|
+
var _ItemsFiles_inner;
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ItemsFiles = void 0;
|
|
26
|
+
const types_js_1 = require("./types.js");
|
|
27
|
+
class ItemsFiles {
|
|
28
|
+
constructor(inner) {
|
|
29
|
+
_ItemsFiles_inner.set(this, void 0);
|
|
30
|
+
__classPrivateFieldSet(this, _ItemsFiles_inner, inner, "f");
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Attach files to Items
|
|
34
|
+
*/
|
|
35
|
+
attach(item, fileParams) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
const invocationConfig = {
|
|
38
|
+
invocation: {
|
|
39
|
+
clientId: __classPrivateFieldGet(this, _ItemsFiles_inner, "f").id,
|
|
40
|
+
parameters: {
|
|
41
|
+
name: "ItemsFilesAttach",
|
|
42
|
+
parameters: {
|
|
43
|
+
item,
|
|
44
|
+
file_params: fileParams,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
return JSON.parse(yield __classPrivateFieldGet(this, _ItemsFiles_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Read file content from the Item
|
|
54
|
+
*/
|
|
55
|
+
read(vaultId, itemId, attr) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
const invocationConfig = {
|
|
58
|
+
invocation: {
|
|
59
|
+
clientId: __classPrivateFieldGet(this, _ItemsFiles_inner, "f").id,
|
|
60
|
+
parameters: {
|
|
61
|
+
name: "ItemsFilesRead",
|
|
62
|
+
parameters: {
|
|
63
|
+
vault_id: vaultId,
|
|
64
|
+
item_id: itemId,
|
|
65
|
+
attr,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
return JSON.parse(yield __classPrivateFieldGet(this, _ItemsFiles_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Delete a field file from Item using the section and field IDs
|
|
75
|
+
*/
|
|
76
|
+
delete(item, sectionId, fieldId) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
const invocationConfig = {
|
|
79
|
+
invocation: {
|
|
80
|
+
clientId: __classPrivateFieldGet(this, _ItemsFiles_inner, "f").id,
|
|
81
|
+
parameters: {
|
|
82
|
+
name: "ItemsFilesDelete",
|
|
83
|
+
parameters: {
|
|
84
|
+
item,
|
|
85
|
+
section_id: sectionId,
|
|
86
|
+
field_id: fieldId,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
return JSON.parse(yield __classPrivateFieldGet(this, _ItemsFiles_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Replace the document file within a document item
|
|
96
|
+
*/
|
|
97
|
+
replaceDocument(item, docParams) {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
const invocationConfig = {
|
|
100
|
+
invocation: {
|
|
101
|
+
clientId: __classPrivateFieldGet(this, _ItemsFiles_inner, "f").id,
|
|
102
|
+
parameters: {
|
|
103
|
+
name: "ItemsFilesReplaceDocument",
|
|
104
|
+
parameters: {
|
|
105
|
+
item,
|
|
106
|
+
doc_params: docParams,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
return JSON.parse(yield __classPrivateFieldGet(this, _ItemsFiles_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.ItemsFiles = ItemsFiles;
|
|
116
|
+
_ItemsFiles_inner = new WeakMap();
|
package/dist/items_shares.js
CHANGED
|
@@ -23,6 +23,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
23
23
|
var _ItemsShares_inner;
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.ItemsShares = void 0;
|
|
26
|
+
const types_js_1 = require("./types.js");
|
|
26
27
|
class ItemsShares {
|
|
27
28
|
constructor(inner) {
|
|
28
29
|
_ItemsShares_inner.set(this, void 0);
|
|
@@ -45,7 +46,7 @@ class ItemsShares {
|
|
|
45
46
|
},
|
|
46
47
|
},
|
|
47
48
|
};
|
|
48
|
-
return JSON.parse(yield __classPrivateFieldGet(this, _ItemsShares_inner, "f").core.invoke(invocationConfig));
|
|
49
|
+
return JSON.parse(yield __classPrivateFieldGet(this, _ItemsShares_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc);
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
52
|
/**
|
|
@@ -65,7 +66,7 @@ class ItemsShares {
|
|
|
65
66
|
},
|
|
66
67
|
},
|
|
67
68
|
};
|
|
68
|
-
return JSON.parse(yield __classPrivateFieldGet(this, _ItemsShares_inner, "f").core.invoke(invocationConfig));
|
|
69
|
+
return JSON.parse(yield __classPrivateFieldGet(this, _ItemsShares_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc);
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
72
|
/**
|
|
@@ -86,7 +87,7 @@ class ItemsShares {
|
|
|
86
87
|
},
|
|
87
88
|
},
|
|
88
89
|
};
|
|
89
|
-
return JSON.parse(yield __classPrivateFieldGet(this, _ItemsShares_inner, "f").core.invoke(invocationConfig));
|
|
90
|
+
return JSON.parse(yield __classPrivateFieldGet(this, _ItemsShares_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc);
|
|
90
91
|
});
|
|
91
92
|
}
|
|
92
93
|
}
|
package/dist/iterator.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// Code generated by op-codegen - DO NOT EDIT MANUALLY
|
|
2
3
|
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
|
3
4
|
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
4
5
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
package/dist/sdk.js
CHANGED
package/dist/secrets.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InnerClient } from "./core.js";
|
|
2
|
-
import { GeneratePasswordResponse, PasswordRecipe } from "./types.js";
|
|
2
|
+
import { GeneratePasswordResponse, PasswordRecipe, ResolveAllResponse } from "./types.js";
|
|
3
3
|
/**
|
|
4
4
|
* The Secrets API includes all operations the SDK client can perform on secrets.
|
|
5
5
|
* Use secret reference URIs to securely load secrets from 1Password: op://<vault-name>/<item-name>[/<section-name>]/<field-name>
|
|
@@ -9,6 +9,10 @@ export interface SecretsApi {
|
|
|
9
9
|
* Resolve returns the secret the provided secret reference points to.
|
|
10
10
|
*/
|
|
11
11
|
resolve(secretReference: string): Promise<string>;
|
|
12
|
+
/**
|
|
13
|
+
* Resolve takes in a list of secret references and returns the secrets they point to or errors if any.
|
|
14
|
+
*/
|
|
15
|
+
resolveAll(secretReferences: string[]): Promise<ResolveAllResponse>;
|
|
12
16
|
}
|
|
13
17
|
export declare class Secrets implements SecretsApi {
|
|
14
18
|
#private;
|
|
@@ -17,6 +21,10 @@ export declare class Secrets implements SecretsApi {
|
|
|
17
21
|
* Resolve returns the secret the provided secret reference points to.
|
|
18
22
|
*/
|
|
19
23
|
resolve(secretReference: string): Promise<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Resolve takes in a list of secret references and returns the secrets they point to or errors if any.
|
|
26
|
+
*/
|
|
27
|
+
resolveAll(secretReferences: string[]): Promise<ResolveAllResponse>;
|
|
20
28
|
/**
|
|
21
29
|
* Validate the secret reference to ensure there are no syntax errors.
|
|
22
30
|
*/
|
package/dist/secrets.js
CHANGED
|
@@ -24,6 +24,7 @@ var _Secrets_inner;
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.Secrets = void 0;
|
|
26
26
|
const core_js_1 = require("./core.js");
|
|
27
|
+
const types_js_1 = require("./types.js");
|
|
27
28
|
class Secrets {
|
|
28
29
|
constructor(inner) {
|
|
29
30
|
_Secrets_inner.set(this, void 0);
|
|
@@ -45,7 +46,26 @@ class Secrets {
|
|
|
45
46
|
},
|
|
46
47
|
},
|
|
47
48
|
};
|
|
48
|
-
return JSON.parse(yield __classPrivateFieldGet(this, _Secrets_inner, "f").core.invoke(invocationConfig));
|
|
49
|
+
return JSON.parse(yield __classPrivateFieldGet(this, _Secrets_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Resolve takes in a list of secret references and returns the secrets they point to or errors if any.
|
|
54
|
+
*/
|
|
55
|
+
resolveAll(secretReferences) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
const invocationConfig = {
|
|
58
|
+
invocation: {
|
|
59
|
+
clientId: __classPrivateFieldGet(this, _Secrets_inner, "f").id,
|
|
60
|
+
parameters: {
|
|
61
|
+
name: "SecretsResolveAll",
|
|
62
|
+
parameters: {
|
|
63
|
+
secret_references: secretReferences,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
return JSON.parse(yield __classPrivateFieldGet(this, _Secrets_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc);
|
|
49
69
|
});
|
|
50
70
|
}
|
|
51
71
|
/**
|
|
@@ -77,7 +97,7 @@ class Secrets {
|
|
|
77
97
|
},
|
|
78
98
|
},
|
|
79
99
|
};
|
|
80
|
-
return JSON.parse(sharedCore.invoke_sync(invocationConfig));
|
|
100
|
+
return JSON.parse(sharedCore.invoke_sync(invocationConfig), types_js_1.ReviverFunc);
|
|
81
101
|
}
|
|
82
102
|
}
|
|
83
103
|
exports.Secrets = Secrets;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
export type ErrorMessage = string;
|
|
2
|
+
/** Additional attributes for OTP fields. */
|
|
3
|
+
export interface AddressFieldDetails {
|
|
4
|
+
/** The street address */
|
|
5
|
+
street: string;
|
|
6
|
+
/** The city */
|
|
7
|
+
city: string;
|
|
8
|
+
/** The country */
|
|
9
|
+
country: string;
|
|
10
|
+
/** The ZIP code */
|
|
11
|
+
zip: string;
|
|
12
|
+
/** The state */
|
|
13
|
+
state: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DocumentCreateParams {
|
|
16
|
+
/** The name of the file */
|
|
17
|
+
name: string;
|
|
18
|
+
/** The content of the file */
|
|
19
|
+
content: Uint8Array;
|
|
20
|
+
}
|
|
21
|
+
export interface FileAttributes {
|
|
22
|
+
/** The name of the file */
|
|
23
|
+
name: string;
|
|
24
|
+
/** The ID of the file retrieved from the server */
|
|
25
|
+
id: string;
|
|
26
|
+
/** The size of the file in bytes */
|
|
27
|
+
size: number;
|
|
28
|
+
}
|
|
29
|
+
export interface FileCreateParams {
|
|
30
|
+
/** The name of the file */
|
|
31
|
+
name: string;
|
|
32
|
+
/** The content of the file */
|
|
33
|
+
content: Uint8Array;
|
|
34
|
+
/** The section id where the file should be stored */
|
|
35
|
+
sectionId: string;
|
|
36
|
+
/** The field id where the file should be stored */
|
|
37
|
+
fieldId: string;
|
|
38
|
+
}
|
|
1
39
|
/**
|
|
2
40
|
* For future use, if we want to return more information about the generated password.
|
|
3
41
|
* Currently, it only returns the password itself.
|
|
@@ -42,6 +80,11 @@ export declare enum ItemFieldType {
|
|
|
42
80
|
Totp = "Totp",
|
|
43
81
|
Email = "Email",
|
|
44
82
|
Reference = "Reference",
|
|
83
|
+
SshKey = "SshKey",
|
|
84
|
+
Menu = "Menu",
|
|
85
|
+
MonthYear = "MonthYear",
|
|
86
|
+
Address = "Address",
|
|
87
|
+
Date = "Date",
|
|
45
88
|
Unsupported = "Unsupported"
|
|
46
89
|
}
|
|
47
90
|
/** Field type-specific attributes. */
|
|
@@ -50,6 +93,16 @@ export type ItemFieldDetails =
|
|
|
50
93
|
{
|
|
51
94
|
type: "Otp";
|
|
52
95
|
content: OtpFieldDetails;
|
|
96
|
+
}
|
|
97
|
+
/** Computed SSH Key attributes */
|
|
98
|
+
| {
|
|
99
|
+
type: "SshKey";
|
|
100
|
+
content?: SshKeyAttributes;
|
|
101
|
+
}
|
|
102
|
+
/** Address components */
|
|
103
|
+
| {
|
|
104
|
+
type: "Address";
|
|
105
|
+
content?: AddressFieldDetails;
|
|
53
106
|
};
|
|
54
107
|
/** Represents a field within an item. */
|
|
55
108
|
export interface ItemField {
|
|
@@ -99,6 +152,14 @@ export interface Website {
|
|
|
99
152
|
*/
|
|
100
153
|
autofillBehavior: AutofillBehavior;
|
|
101
154
|
}
|
|
155
|
+
export interface ItemFile {
|
|
156
|
+
/** the attributes of the file */
|
|
157
|
+
attributes: FileAttributes;
|
|
158
|
+
/** the section id where the file should be stored */
|
|
159
|
+
sectionId: string;
|
|
160
|
+
/** the field id where the file should be stored */
|
|
161
|
+
fieldId: string;
|
|
162
|
+
}
|
|
102
163
|
/** Represents a 1Password item. */
|
|
103
164
|
export interface Item {
|
|
104
165
|
/** The item's ID */
|
|
@@ -121,6 +182,14 @@ export interface Item {
|
|
|
121
182
|
websites: Website[];
|
|
122
183
|
/** The item's version */
|
|
123
184
|
version: number;
|
|
185
|
+
/** The item's file fields */
|
|
186
|
+
files: ItemFile[];
|
|
187
|
+
/** The document file for the Document item category */
|
|
188
|
+
document?: FileAttributes;
|
|
189
|
+
/** The time the item was created at */
|
|
190
|
+
createdAt: Date;
|
|
191
|
+
/** The time the item was updated at */
|
|
192
|
+
updatedAt: Date;
|
|
124
193
|
}
|
|
125
194
|
export interface ItemCreateParams {
|
|
126
195
|
/** The item's category */
|
|
@@ -139,8 +208,12 @@ export interface ItemCreateParams {
|
|
|
139
208
|
tags?: string[];
|
|
140
209
|
/** The websites used for autofilling for items of the Login and Password categories. */
|
|
141
210
|
websites?: Website[];
|
|
211
|
+
/** The item's files stored as fields */
|
|
212
|
+
files?: FileCreateParams[];
|
|
213
|
+
/** The document file for the Document item type. Empty when the item isn't of Document type. */
|
|
214
|
+
document?: DocumentCreateParams;
|
|
142
215
|
}
|
|
143
|
-
/** Represents a decrypted 1Password item. */
|
|
216
|
+
/** Represents a decrypted 1Password item overview. */
|
|
144
217
|
export interface ItemOverview {
|
|
145
218
|
/** The item's ID */
|
|
146
219
|
id: string;
|
|
@@ -152,6 +225,12 @@ export interface ItemOverview {
|
|
|
152
225
|
vaultId: string;
|
|
153
226
|
/** The websites used for autofilling for items of the Login and Password categories. */
|
|
154
227
|
websites: Website[];
|
|
228
|
+
/** The item tags */
|
|
229
|
+
tags: string[];
|
|
230
|
+
/** The time the item was created at */
|
|
231
|
+
createdAt: Date;
|
|
232
|
+
/** The time the item was updated at */
|
|
233
|
+
updatedAt: Date;
|
|
155
234
|
}
|
|
156
235
|
/** The valid duration options for sharing an item */
|
|
157
236
|
export declare enum ItemShareDuration {
|
|
@@ -180,6 +259,23 @@ export declare enum AllowedRecipientType {
|
|
|
180
259
|
/** Recipients can be specified by domain */
|
|
181
260
|
Domain = "Domain"
|
|
182
261
|
}
|
|
262
|
+
/** The file sharing policy */
|
|
263
|
+
export interface ItemShareFiles {
|
|
264
|
+
/** Whether files can be included in item shares */
|
|
265
|
+
allowed: boolean;
|
|
266
|
+
/** The maximum encrypted size (in bytes) an included file can be */
|
|
267
|
+
maxSize: number;
|
|
268
|
+
/** The allowed types of item sharing - either "Authenticated" (share to specific users) or "Public" (share to anyone with a link) */
|
|
269
|
+
allowedTypes?: AllowedType[];
|
|
270
|
+
/** The allowed recipient types of item sharing - either "Email" or "Domain" */
|
|
271
|
+
allowedRecipientTypes?: AllowedRecipientType[];
|
|
272
|
+
/** The maximum duration that an item can be shared for */
|
|
273
|
+
maxExpiry?: ItemShareDuration;
|
|
274
|
+
/** The default duration that an item is shared for */
|
|
275
|
+
defaultExpiry?: ItemShareDuration;
|
|
276
|
+
/** The maximum number of times an item can be viewed. A null value means unlimited views */
|
|
277
|
+
maxViews?: number;
|
|
278
|
+
}
|
|
183
279
|
/**
|
|
184
280
|
* The account policy for sharing items, set by your account owner/admin
|
|
185
281
|
* This policy is enforced server-side when sharing items
|
|
@@ -195,6 +291,8 @@ export interface ItemShareAccountPolicy {
|
|
|
195
291
|
allowedTypes: AllowedType[];
|
|
196
292
|
/** The allowed recipient types of item sharing - either "Email" or "Domain" */
|
|
197
293
|
allowedRecipientTypes: AllowedRecipientType[];
|
|
294
|
+
/** The file sharing policy */
|
|
295
|
+
files: ItemShareFiles;
|
|
198
296
|
}
|
|
199
297
|
/** The validated recipient of an item share */
|
|
200
298
|
export type ValidRecipient =
|
|
@@ -231,6 +329,107 @@ export interface OtpFieldDetails {
|
|
|
231
329
|
/** The error message, if the OTP code could not be computed */
|
|
232
330
|
errorMessage?: string;
|
|
233
331
|
}
|
|
332
|
+
export interface Response<T, E> {
|
|
333
|
+
content?: T;
|
|
334
|
+
error?: E;
|
|
335
|
+
}
|
|
336
|
+
export interface ResolvedReference {
|
|
337
|
+
secret: string;
|
|
338
|
+
itemId: string;
|
|
339
|
+
vaultId: string;
|
|
340
|
+
}
|
|
341
|
+
export type ResolveReferenceError =
|
|
342
|
+
/** Error parsing the secret reference */
|
|
343
|
+
{
|
|
344
|
+
type: "parsing";
|
|
345
|
+
message: ErrorMessage;
|
|
346
|
+
}
|
|
347
|
+
/** The specified reference cannot be found within the item */
|
|
348
|
+
| {
|
|
349
|
+
type: "fieldNotFound";
|
|
350
|
+
message?: undefined;
|
|
351
|
+
}
|
|
352
|
+
/** No vault matched the secret reference query */
|
|
353
|
+
| {
|
|
354
|
+
type: "vaultNotFound";
|
|
355
|
+
message?: undefined;
|
|
356
|
+
}
|
|
357
|
+
/** More than one vault matched the secret reference query */
|
|
358
|
+
| {
|
|
359
|
+
type: "tooManyVaults";
|
|
360
|
+
message?: undefined;
|
|
361
|
+
}
|
|
362
|
+
/** No item matched the secret reference query */
|
|
363
|
+
| {
|
|
364
|
+
type: "itemNotFound";
|
|
365
|
+
message?: undefined;
|
|
366
|
+
}
|
|
367
|
+
/** More than one item matched the secret reference query */
|
|
368
|
+
| {
|
|
369
|
+
type: "tooManyItems";
|
|
370
|
+
message?: undefined;
|
|
371
|
+
}
|
|
372
|
+
/** More than one field matched the provided secret reference */
|
|
373
|
+
| {
|
|
374
|
+
type: "tooManyMatchingFields";
|
|
375
|
+
message?: undefined;
|
|
376
|
+
}
|
|
377
|
+
/** No section found within the item for the provided identifier */
|
|
378
|
+
| {
|
|
379
|
+
type: "noMatchingSections";
|
|
380
|
+
message?: undefined;
|
|
381
|
+
}
|
|
382
|
+
/** Incompatiable TOTP query parameters */
|
|
383
|
+
| {
|
|
384
|
+
type: "incompatibleTOTPQueryParameterField";
|
|
385
|
+
message?: undefined;
|
|
386
|
+
}
|
|
387
|
+
/** The totp was not able to be generated */
|
|
388
|
+
| {
|
|
389
|
+
type: "unableToGenerateTotpCode";
|
|
390
|
+
message: ErrorMessage;
|
|
391
|
+
}
|
|
392
|
+
/** Couldn't find attributes specific to an SSH Key field */
|
|
393
|
+
| {
|
|
394
|
+
type: "sSHKeyMetadataNotFound";
|
|
395
|
+
message?: undefined;
|
|
396
|
+
}
|
|
397
|
+
/** Currently only support text files */
|
|
398
|
+
| {
|
|
399
|
+
type: "unsupportedFileFormat";
|
|
400
|
+
message?: undefined;
|
|
401
|
+
}
|
|
402
|
+
/** Trying to convert a non-private key to a private key format */
|
|
403
|
+
| {
|
|
404
|
+
type: "incompatibleSshKeyQueryParameterField";
|
|
405
|
+
message?: undefined;
|
|
406
|
+
}
|
|
407
|
+
/** Unable to properly parse a private key string to convert to an internal Private Key type */
|
|
408
|
+
| {
|
|
409
|
+
type: "unableToParsePrivateKey";
|
|
410
|
+
message?: undefined;
|
|
411
|
+
}
|
|
412
|
+
/** Unable to format a private key to OpenSSH format */
|
|
413
|
+
| {
|
|
414
|
+
type: "unableToFormatPrivateKeyToOpenSsh";
|
|
415
|
+
message?: undefined;
|
|
416
|
+
}
|
|
417
|
+
/** Other type */
|
|
418
|
+
| {
|
|
419
|
+
type: "other";
|
|
420
|
+
message?: undefined;
|
|
421
|
+
};
|
|
422
|
+
export interface ResolveAllResponse {
|
|
423
|
+
individualResponses: Record<string, Response<ResolvedReference, ResolveReferenceError>>;
|
|
424
|
+
}
|
|
425
|
+
export interface SshKeyAttributes {
|
|
426
|
+
/** The public part of the SSH Key */
|
|
427
|
+
publicKey: string;
|
|
428
|
+
/** The fingerprint of the SSH Key */
|
|
429
|
+
fingerprint: string;
|
|
430
|
+
/** The key type ("Ed25519" or "RSA, {length}-bit") */
|
|
431
|
+
keyType: string;
|
|
432
|
+
}
|
|
234
433
|
/** Represents a decrypted 1Password vault. */
|
|
235
434
|
export interface VaultOverview {
|
|
236
435
|
/** The vault's ID */
|
|
@@ -314,3 +513,11 @@ export declare enum WordListType {
|
|
|
314
513
|
/** Three (random) letter "words" */
|
|
315
514
|
ThreeLetters = "threeLetters"
|
|
316
515
|
}
|
|
516
|
+
/**
|
|
517
|
+
* Custom JSON reviver and replacer functions for dynamic data transformation
|
|
518
|
+
* ReviverFunc is used during JSON parsing to detect and transform specific data structures
|
|
519
|
+
* ReplacerFunc is used during JSON serialization to modify certain values before stringifying.
|
|
520
|
+
* These functions allow for flexible encoding and decoding of data, ensuring that complex types are properly handled when converting between TS objects and JSON
|
|
521
|
+
*/
|
|
522
|
+
export declare const ReviverFunc: (key: string, value: unknown) => unknown;
|
|
523
|
+
export declare const ReplacerFunc: (key: string, value: unknown) => unknown;
|
package/dist/types.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Generated by typeshare 1.13.2
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.WordListType = exports.SeparatorType = exports.AllowedRecipientType = exports.AllowedType = exports.ItemShareDuration = exports.AutofillBehavior = exports.ItemFieldType = exports.ItemCategory = void 0;
|
|
6
|
+
exports.ReplacerFunc = exports.ReviverFunc = exports.WordListType = exports.SeparatorType = exports.AllowedRecipientType = exports.AllowedType = exports.ItemShareDuration = exports.AutofillBehavior = exports.ItemFieldType = exports.ItemCategory = void 0;
|
|
7
7
|
var ItemCategory;
|
|
8
8
|
(function (ItemCategory) {
|
|
9
9
|
ItemCategory["Login"] = "Login";
|
|
@@ -42,6 +42,11 @@ var ItemFieldType;
|
|
|
42
42
|
ItemFieldType["Totp"] = "Totp";
|
|
43
43
|
ItemFieldType["Email"] = "Email";
|
|
44
44
|
ItemFieldType["Reference"] = "Reference";
|
|
45
|
+
ItemFieldType["SshKey"] = "SshKey";
|
|
46
|
+
ItemFieldType["Menu"] = "Menu";
|
|
47
|
+
ItemFieldType["MonthYear"] = "MonthYear";
|
|
48
|
+
ItemFieldType["Address"] = "Address";
|
|
49
|
+
ItemFieldType["Date"] = "Date";
|
|
45
50
|
ItemFieldType["Unsupported"] = "Unsupported";
|
|
46
51
|
})(ItemFieldType || (exports.ItemFieldType = ItemFieldType = {}));
|
|
47
52
|
/**
|
|
@@ -138,3 +143,33 @@ var WordListType;
|
|
|
138
143
|
/** Three (random) letter "words" */
|
|
139
144
|
WordListType["ThreeLetters"] = "threeLetters";
|
|
140
145
|
})(WordListType || (exports.WordListType = WordListType = {}));
|
|
146
|
+
/**
|
|
147
|
+
* Custom JSON reviver and replacer functions for dynamic data transformation
|
|
148
|
+
* ReviverFunc is used during JSON parsing to detect and transform specific data structures
|
|
149
|
+
* ReplacerFunc is used during JSON serialization to modify certain values before stringifying.
|
|
150
|
+
* These functions allow for flexible encoding and decoding of data, ensuring that complex types are properly handled when converting between TS objects and JSON
|
|
151
|
+
*/
|
|
152
|
+
const ReviverFunc = (key, value) => {
|
|
153
|
+
if (typeof value === "string" &&
|
|
154
|
+
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/.test(value) &&
|
|
155
|
+
(key === "createdAt" || key === "updatedAt")) {
|
|
156
|
+
return new Date(value);
|
|
157
|
+
}
|
|
158
|
+
if (Array.isArray(value) &&
|
|
159
|
+
value.every((v) => Number.isInteger(v) && v >= 0 && v <= 255) &&
|
|
160
|
+
value.length > 0) {
|
|
161
|
+
return new Uint8Array(value);
|
|
162
|
+
}
|
|
163
|
+
return value;
|
|
164
|
+
};
|
|
165
|
+
exports.ReviverFunc = ReviverFunc;
|
|
166
|
+
const ReplacerFunc = (key, value) => {
|
|
167
|
+
if (value instanceof Date) {
|
|
168
|
+
return value.toISOString();
|
|
169
|
+
}
|
|
170
|
+
if (value instanceof Uint8Array) {
|
|
171
|
+
return Array.from(value);
|
|
172
|
+
}
|
|
173
|
+
return value;
|
|
174
|
+
};
|
|
175
|
+
exports.ReplacerFunc = ReplacerFunc;
|
package/dist/vaults.js
CHANGED
|
@@ -24,6 +24,7 @@ var _Vaults_inner;
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.Vaults = void 0;
|
|
26
26
|
const iterator_js_1 = require("./iterator.js");
|
|
27
|
+
const types_js_1 = require("./types.js");
|
|
27
28
|
class Vaults {
|
|
28
29
|
constructor(inner) {
|
|
29
30
|
_Vaults_inner.set(this, void 0);
|
|
@@ -43,7 +44,7 @@ class Vaults {
|
|
|
43
44
|
},
|
|
44
45
|
},
|
|
45
46
|
};
|
|
46
|
-
return new iterator_js_1.SdkIterable(JSON.parse(yield __classPrivateFieldGet(this, _Vaults_inner, "f").core.invoke(invocationConfig)));
|
|
47
|
+
return new iterator_js_1.SdkIterable(JSON.parse(yield __classPrivateFieldGet(this, _Vaults_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc));
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
50
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.1
|
|
2
|
-
export declare const SDK_BUILD_NUMBER = "
|
|
1
|
+
export declare const SDK_VERSION = "0.2.1";
|
|
2
|
+
export declare const SDK_BUILD_NUMBER = "0020101";
|
package/dist/version.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SDK_BUILD_NUMBER = exports.SDK_VERSION = void 0;
|
|
4
|
-
exports.SDK_VERSION = "0.1
|
|
5
|
-
exports.SDK_BUILD_NUMBER = "
|
|
6
|
-
const SDK_CORE_VERSION = "0.1
|
|
4
|
+
exports.SDK_VERSION = "0.2.1";
|
|
5
|
+
exports.SDK_BUILD_NUMBER = "0020101";
|
|
6
|
+
const SDK_CORE_VERSION = "0.2.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1password/sdk",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "The 1Password JavaScript SDK offers programmatic read access to your secrets in 1Password in an interface native to JavaScript. The SDK currently supports `Node.JS`",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"main": "./dist/sdk.js",
|
|
27
27
|
"types": "./dist/sdk.d.ts",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@1password/sdk-core": "0.1
|
|
29
|
+
"@1password/sdk-core": "0.2.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@1password/eslint-config": "^4.0.0",
|