@1password/sdk 0.1.0-beta.9 → 0.1.2
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 +137 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +5 -2
- package/dist/configuration.d.ts +2 -0
- package/dist/configuration.js +11 -30
- package/dist/core.d.ts +7 -1
- package/dist/items.d.ts +33 -9
- package/dist/items.js +68 -27
- package/dist/iterator.d.ts +6 -0
- package/dist/iterator.js +32 -0
- package/dist/sdk.d.ts +1 -0
- package/dist/sdk.js +3 -1
- package/dist/secrets.d.ts +11 -1
- package/dist/secrets.js +17 -11
- package/dist/types.d.ts +75 -51
- package/dist/types.js +5 -1
- package/dist/vaults.d.ts +20 -0
- package/dist/vaults.js +51 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +6 -0
- package/package.json +13 -11
package/README.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://1password.com">
|
|
3
|
+
<h1 align="center">1Password JavaScript SDK</h1>
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<h4 align="center">Build integrations that programmatically access your secrets in 1Password.</h4>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://developer.1password.com/docs/sdks/">Documentation</a> | <a href="https://github.com/1Password/onepassword-sdk-js/tree/main/examples">Examples</a>
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 🚀 Get started
|
|
18
|
+
|
|
19
|
+
To use the 1Password JavaScript SDK in your project:
|
|
20
|
+
|
|
21
|
+
1. [Create a service account](https://my.1password.com/developer-tools/infrastructure-secrets/serviceaccount/) and give it the appropriate permissions in the vaults where the items you want to use with the SDK are saved.
|
|
22
|
+
2. Provision your service account token. We recommend provisioning your token from the environment. For example, to export your token to the `OP_SERVICE_ACCOUNT_TOKEN` environment variable:
|
|
23
|
+
|
|
24
|
+
**macOS or Linux**
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
export OP_SERVICE_ACCOUNT_TOKEN=<your-service-account-token>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Windows**
|
|
31
|
+
|
|
32
|
+
```powershell
|
|
33
|
+
$Env:OP_SERVICE_ACCOUNT_TOKEN = "<your-service-account-token>"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
3. Install the 1Password JavaScript SDK in your project:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
## NPM
|
|
40
|
+
npm install @1password/sdk
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
## PNPM
|
|
45
|
+
pnpm add @1password/sdk
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
## Yarn
|
|
50
|
+
yarn add @1password/sdk
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
4. Use the JavaScript SDK in your project:
|
|
54
|
+
|
|
55
|
+
```js
|
|
56
|
+
import { createClient } from "@1password/sdk";
|
|
57
|
+
|
|
58
|
+
// Creates an authenticated client.
|
|
59
|
+
const client = await createClient({
|
|
60
|
+
auth: process.env.OP_SERVICE_ACCOUNT_TOKEN,
|
|
61
|
+
// Set the following to your own integration name and version.
|
|
62
|
+
integrationName: "My 1Password Integration",
|
|
63
|
+
integrationVersion: "v1.0.0",
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// Fetches a secret.
|
|
67
|
+
const secret = await client.secrets.resolve("op://vault/item/field");
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Make sure to use [secret reference URIs](https://developer.1password.com/docs/cli/secret-reference-syntax/) with the syntax `op://vault/item/field` to securely load secrets from 1Password into your code.
|
|
71
|
+
|
|
72
|
+
Inside `createClient()`, set `integrationName` to the name of your application and `integrationVersion` to the version of your application.
|
|
73
|
+
|
|
74
|
+
## Supported functionality
|
|
75
|
+
|
|
76
|
+
1Password SDKs are in active development. We're keen to hear what you'd like to see next. Let us know by [upvoting](https://github.com/1Password/onepassword-sdk-js/issues) or [filing](https://github.com/1Password/onepassword-sdk-js/issues/new/choose) an issue.
|
|
77
|
+
|
|
78
|
+
### Item management
|
|
79
|
+
|
|
80
|
+
Operations:
|
|
81
|
+
|
|
82
|
+
- [x] [Retrieve secrets](https://developer.1password.com/docs/sdks/load-secrets)
|
|
83
|
+
- [x] [Retrieve items](https://developer.1password.com/docs/sdks/manage-items#get-an-item)
|
|
84
|
+
- [x] [Create items](https://developer.1password.com/docs/sdks/manage-items#create-an-item)
|
|
85
|
+
- [x] [Update items](https://developer.1password.com/docs/sdks/manage-items#update-an-item)
|
|
86
|
+
- [x] [Delete items](https://developer.1password.com/docs/sdks/manage-items#delete-an-item)
|
|
87
|
+
- [x] [List items](https://developer.1password.com/docs/sdks/list-vaults-items/)
|
|
88
|
+
- [x] Add & update tags on items
|
|
89
|
+
|
|
90
|
+
Field types:
|
|
91
|
+
- [x] API Keys
|
|
92
|
+
- [x] Passwords
|
|
93
|
+
- [x] Concealed fields
|
|
94
|
+
- [x] Text fields
|
|
95
|
+
- [x] Notes
|
|
96
|
+
- [x] SSH private keys (partially supported: supported in resolving secret references, not yet supported in item create/get/update)
|
|
97
|
+
- [ ] SSH public keys, fingerprint and key type
|
|
98
|
+
- [x] One-time passwords
|
|
99
|
+
- [x] URLs
|
|
100
|
+
- [ ] Websites (used to suggest and autofill logins)
|
|
101
|
+
- [x] Phone numbers
|
|
102
|
+
- [x] Credit card types
|
|
103
|
+
- [ ] File attachments and Document items
|
|
104
|
+
|
|
105
|
+
### Vault management
|
|
106
|
+
- [ ] Retrieve vaults
|
|
107
|
+
- [ ] Create vaults ([#50](https://github.com/1Password/onepassword-sdk-js/issues/50))
|
|
108
|
+
- [ ] Update vaults
|
|
109
|
+
- [ ] Delete vaults
|
|
110
|
+
- [x] [List vaults](https://developer.1password.com/docs/sdks/list-vaults-items/)
|
|
111
|
+
|
|
112
|
+
### User & access management
|
|
113
|
+
- [ ] Provision users
|
|
114
|
+
- [ ] Retrieve users
|
|
115
|
+
- [ ] List users
|
|
116
|
+
- [ ] Suspend users
|
|
117
|
+
- [ ] Create groups
|
|
118
|
+
- [ ] Update group membership
|
|
119
|
+
- [ ] Update vault access & permissions
|
|
120
|
+
|
|
121
|
+
### Compliance & reporting
|
|
122
|
+
- [ ] Watchtower insights
|
|
123
|
+
- [ ] Travel mode
|
|
124
|
+
- [ ] Events. For now, use [1Password Events Reporting API](https://developer.1password.com/docs/events-api/) directly.
|
|
125
|
+
|
|
126
|
+
### Authentication
|
|
127
|
+
|
|
128
|
+
- [x] [1Password Service Accounts](https://developer.1password.com/docs/service-accounts/get-started/)
|
|
129
|
+
- [ ] User authentication
|
|
130
|
+
- [ ] 1Password Connect. For now, use [1Password/connect-sdk-js](https://github.com/1Password/connect-sdk-js).
|
|
131
|
+
|
|
132
|
+
## 📖 Learn more
|
|
133
|
+
|
|
134
|
+
- [Load secrets with 1Password SDKs](https://developer.1password.com/docs/sdks/load-secrets)
|
|
135
|
+
- [Manage items with 1Password SDKs](https://developer.1password.com/docs/sdks/manage-items)
|
|
136
|
+
- [List vaults and items with 1Password SDKs](https://developer.1password.com/docs/sdks/list-vaults-items)
|
|
137
|
+
- [1Password SDK concepts](https://developer.1password.com/docs/sdks/concepts)
|
package/dist/client.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { InnerClient } from "./core.js";
|
|
2
2
|
import { SecretsApi } from "./secrets.js";
|
|
3
3
|
import { ItemsApi } from "./items.js";
|
|
4
|
+
import { VaultsApi } from "./vaults.js";
|
|
4
5
|
export declare class Client {
|
|
5
6
|
secrets: SecretsApi;
|
|
6
7
|
items: ItemsApi;
|
|
8
|
+
vaults: VaultsApi;
|
|
7
9
|
constructor(innerClient: InnerClient);
|
|
8
10
|
}
|
package/dist/client.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// Code generated by op-codegen - DO NOT EDIT MANUALLY
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.Client = void 0;
|
|
4
5
|
const secrets_js_1 = require("./secrets.js");
|
|
5
6
|
const items_js_1 = require("./items.js");
|
|
7
|
+
const vaults_js_1 = require("./vaults.js");
|
|
6
8
|
class Client {
|
|
7
9
|
constructor(innerClient) {
|
|
8
|
-
this.secrets = new secrets_js_1.
|
|
9
|
-
this.items = new items_js_1.
|
|
10
|
+
this.secrets = new secrets_js_1.Secrets(innerClient);
|
|
11
|
+
this.items = new items_js_1.Items(innerClient);
|
|
12
|
+
this.vaults = new vaults_js_1.Vaults(innerClient);
|
|
10
13
|
}
|
|
11
14
|
}
|
|
12
15
|
exports.Client = Client;
|
package/dist/configuration.d.ts
CHANGED
package/dist/configuration.js
CHANGED
|
@@ -1,32 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
4
|
};
|
|
25
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.getOsName = exports.clientAuthConfig = void 0;
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
|
|
6
|
+
exports.getOsName = exports.clientAuthConfig = exports.VERSION = exports.LANGUAGE = void 0;
|
|
7
|
+
const os_1 = __importDefault(require("os"));
|
|
8
|
+
const version_js_1 = require("./version.js");
|
|
9
|
+
exports.LANGUAGE = "JS";
|
|
10
|
+
exports.VERSION = version_js_1.SDK_BUILD_NUMBER;
|
|
30
11
|
/**
|
|
31
12
|
* Creates a default client configuration.
|
|
32
13
|
* @returns The client configuration to instantiate the client with.
|
|
@@ -36,21 +17,21 @@ const clientAuthConfig = (userConfig) => {
|
|
|
36
17
|
const defaultOsVersion = "0.0.0";
|
|
37
18
|
return {
|
|
38
19
|
serviceAccountToken: userConfig.auth,
|
|
39
|
-
programmingLanguage: LANGUAGE,
|
|
40
|
-
sdkVersion: VERSION,
|
|
20
|
+
programmingLanguage: exports.LANGUAGE,
|
|
21
|
+
sdkVersion: exports.VERSION,
|
|
41
22
|
integrationName: userConfig.integrationName,
|
|
42
23
|
integrationVersion: userConfig.integrationVersion,
|
|
43
24
|
requestLibraryName: "Fetch API",
|
|
44
25
|
requestLibraryVersion: "Fetch API",
|
|
45
26
|
os: (0, exports.getOsName)(),
|
|
46
27
|
osVersion: defaultOsVersion,
|
|
47
|
-
architecture:
|
|
28
|
+
architecture: os_1.default.arch(),
|
|
48
29
|
};
|
|
49
30
|
};
|
|
50
31
|
exports.clientAuthConfig = clientAuthConfig;
|
|
51
32
|
const getOsName = () => {
|
|
52
33
|
// Only supported on Node.js
|
|
53
|
-
const os_name =
|
|
34
|
+
const os_name = os_1.default.type().toLowerCase();
|
|
54
35
|
if (os_name === "windows_nt") {
|
|
55
36
|
return "windows";
|
|
56
37
|
}
|
package/dist/core.d.ts
CHANGED
|
@@ -37,13 +37,19 @@ export interface InvokeConfig {
|
|
|
37
37
|
/**
|
|
38
38
|
* Identifies the client instance for which you called the function.
|
|
39
39
|
*/
|
|
40
|
-
clientId: number;
|
|
41
40
|
invocation: Invocation;
|
|
42
41
|
}
|
|
43
42
|
/**
|
|
44
43
|
* Calls certain logic from the SDK core, with the given parameters.
|
|
45
44
|
*/
|
|
46
45
|
interface Invocation {
|
|
46
|
+
/**
|
|
47
|
+
* Identifies the client instance for which you called the function.
|
|
48
|
+
*/
|
|
49
|
+
clientId?: number;
|
|
50
|
+
parameters: Parameters;
|
|
51
|
+
}
|
|
52
|
+
export interface Parameters {
|
|
47
53
|
/**
|
|
48
54
|
* Functionality name
|
|
49
55
|
*/
|
package/dist/items.d.ts
CHANGED
|
@@ -1,28 +1,52 @@
|
|
|
1
1
|
import { InnerClient } from "./core.js";
|
|
2
2
|
import * as types from "./types.js";
|
|
3
|
+
import { SdkIterable } from "./iterator.js";
|
|
4
|
+
/**
|
|
5
|
+
* The Items API holds all operations the SDK client can perform on 1Password items.
|
|
6
|
+
*/
|
|
3
7
|
export interface ItemsApi {
|
|
4
8
|
/**
|
|
5
|
-
*
|
|
9
|
+
* Create a new item
|
|
6
10
|
*/
|
|
7
|
-
create(
|
|
11
|
+
create(params: types.ItemCreateParams): Promise<types.Item>;
|
|
8
12
|
/**
|
|
9
|
-
*
|
|
13
|
+
* Get an item by vault and item ID
|
|
10
14
|
*/
|
|
11
15
|
get(vaultId: string, itemId: string): Promise<types.Item>;
|
|
12
16
|
/**
|
|
13
|
-
*
|
|
17
|
+
* Update an existing item.
|
|
14
18
|
*/
|
|
15
|
-
|
|
19
|
+
put(item: types.Item): Promise<types.Item>;
|
|
16
20
|
/**
|
|
17
|
-
*
|
|
21
|
+
* Delete an item.
|
|
18
22
|
*/
|
|
19
23
|
delete(vaultId: string, itemId: string): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* List all items
|
|
26
|
+
*/
|
|
27
|
+
listAll(vaultId: string): Promise<SdkIterable<types.ItemOverview>>;
|
|
20
28
|
}
|
|
21
|
-
export declare class
|
|
29
|
+
export declare class Items implements ItemsApi {
|
|
22
30
|
#private;
|
|
23
31
|
constructor(inner: InnerClient);
|
|
24
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Create a new item
|
|
34
|
+
*/
|
|
35
|
+
create(params: types.ItemCreateParams): Promise<types.Item>;
|
|
36
|
+
/**
|
|
37
|
+
* Get an item by vault and item ID
|
|
38
|
+
*/
|
|
25
39
|
get(vaultId: string, itemId: string): Promise<types.Item>;
|
|
26
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Update an existing item.
|
|
42
|
+
*/
|
|
43
|
+
put(item: types.Item): Promise<types.Item>;
|
|
44
|
+
/**
|
|
45
|
+
* Delete an item.
|
|
46
|
+
*/
|
|
27
47
|
delete(vaultId: string, itemId: string): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* List all items
|
|
50
|
+
*/
|
|
51
|
+
listAll(vaultId: string): Promise<SdkIterable<types.ItemOverview>>;
|
|
28
52
|
}
|
package/dist/items.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// Code generated by op-codegen - DO NOT EDIT MANUALLY
|
|
2
3
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
4
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
5
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -19,72 +20,112 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
19
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");
|
|
20
21
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
21
22
|
};
|
|
22
|
-
var
|
|
23
|
+
var _Items_inner;
|
|
23
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.
|
|
25
|
-
|
|
25
|
+
exports.Items = void 0;
|
|
26
|
+
const iterator_js_1 = require("./iterator.js");
|
|
27
|
+
class Items {
|
|
26
28
|
constructor(inner) {
|
|
27
|
-
|
|
28
|
-
__classPrivateFieldSet(this,
|
|
29
|
+
_Items_inner.set(this, void 0);
|
|
30
|
+
__classPrivateFieldSet(this, _Items_inner, inner, "f");
|
|
29
31
|
}
|
|
30
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Create a new item
|
|
34
|
+
*/
|
|
35
|
+
create(params) {
|
|
31
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
37
|
const invocationConfig = {
|
|
33
|
-
clientId: __classPrivateFieldGet(this, _ItemsSource_inner, "f").id,
|
|
34
38
|
invocation: {
|
|
35
|
-
|
|
39
|
+
clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
|
|
36
40
|
parameters: {
|
|
37
|
-
|
|
41
|
+
name: "ItemsCreate",
|
|
42
|
+
parameters: {
|
|
43
|
+
params,
|
|
44
|
+
},
|
|
38
45
|
},
|
|
39
46
|
},
|
|
40
47
|
};
|
|
41
|
-
return JSON.parse(yield __classPrivateFieldGet(this,
|
|
48
|
+
return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig));
|
|
42
49
|
});
|
|
43
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Get an item by vault and item ID
|
|
53
|
+
*/
|
|
44
54
|
get(vaultId, itemId) {
|
|
45
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
56
|
const invocationConfig = {
|
|
47
|
-
clientId: __classPrivateFieldGet(this, _ItemsSource_inner, "f").id,
|
|
48
57
|
invocation: {
|
|
49
|
-
|
|
58
|
+
clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
|
|
50
59
|
parameters: {
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
name: "ItemsGet",
|
|
61
|
+
parameters: {
|
|
62
|
+
vault_id: vaultId,
|
|
63
|
+
item_id: itemId,
|
|
64
|
+
},
|
|
53
65
|
},
|
|
54
66
|
},
|
|
55
67
|
};
|
|
56
|
-
return JSON.parse(yield __classPrivateFieldGet(this,
|
|
68
|
+
return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig));
|
|
57
69
|
});
|
|
58
70
|
}
|
|
59
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Update an existing item.
|
|
73
|
+
*/
|
|
74
|
+
put(item) {
|
|
60
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
61
76
|
const invocationConfig = {
|
|
62
|
-
clientId: __classPrivateFieldGet(this, _ItemsSource_inner, "f").id,
|
|
63
77
|
invocation: {
|
|
64
|
-
|
|
78
|
+
clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
|
|
65
79
|
parameters: {
|
|
66
|
-
|
|
80
|
+
name: "ItemsPut",
|
|
81
|
+
parameters: {
|
|
82
|
+
item,
|
|
83
|
+
},
|
|
67
84
|
},
|
|
68
85
|
},
|
|
69
86
|
};
|
|
70
|
-
return JSON.parse(yield __classPrivateFieldGet(this,
|
|
87
|
+
return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig));
|
|
71
88
|
});
|
|
72
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Delete an item.
|
|
92
|
+
*/
|
|
73
93
|
delete(vaultId, itemId) {
|
|
74
94
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
95
|
const invocationConfig = {
|
|
76
|
-
clientId: __classPrivateFieldGet(this, _ItemsSource_inner, "f").id,
|
|
77
96
|
invocation: {
|
|
78
|
-
|
|
97
|
+
clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
|
|
79
98
|
parameters: {
|
|
80
|
-
|
|
81
|
-
|
|
99
|
+
name: "ItemsDelete",
|
|
100
|
+
parameters: {
|
|
101
|
+
vault_id: vaultId,
|
|
102
|
+
item_id: itemId,
|
|
103
|
+
},
|
|
82
104
|
},
|
|
83
105
|
},
|
|
84
106
|
};
|
|
85
|
-
yield __classPrivateFieldGet(this,
|
|
107
|
+
yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* List all items
|
|
112
|
+
*/
|
|
113
|
+
listAll(vaultId) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
const invocationConfig = {
|
|
116
|
+
invocation: {
|
|
117
|
+
clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
|
|
118
|
+
parameters: {
|
|
119
|
+
name: "ItemsListAll",
|
|
120
|
+
parameters: {
|
|
121
|
+
vault_id: vaultId,
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
return new iterator_js_1.SdkIterable(JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig)));
|
|
86
127
|
});
|
|
87
128
|
}
|
|
88
129
|
}
|
|
89
|
-
exports.
|
|
90
|
-
|
|
130
|
+
exports.Items = Items;
|
|
131
|
+
_Items_inner = new WeakMap();
|
package/dist/iterator.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
|
3
|
+
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
4
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
5
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
6
|
+
return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
7
|
+
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
|
8
|
+
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
|
|
9
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
10
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
11
|
+
function fulfill(value) { resume("next", value); }
|
|
12
|
+
function reject(value) { resume("throw", value); }
|
|
13
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
14
|
+
};
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SdkIterable = void 0;
|
|
17
|
+
class SdkIterable {
|
|
18
|
+
constructor(elements) {
|
|
19
|
+
this.elements = elements;
|
|
20
|
+
}
|
|
21
|
+
[Symbol.asyncIterator]() {
|
|
22
|
+
return this.asyncIterator();
|
|
23
|
+
}
|
|
24
|
+
asyncIterator() {
|
|
25
|
+
return __asyncGenerator(this, arguments, function* asyncIterator_1() {
|
|
26
|
+
for (const element of this.elements) {
|
|
27
|
+
yield yield __await(yield __await(Promise.resolve(element)));
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.SdkIterable = SdkIterable;
|
package/dist/sdk.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ClientConfiguration } from "./configuration.js";
|
|
|
2
2
|
import { Client } from "./client.js";
|
|
3
3
|
export declare const DEFAULT_INTEGRATION_NAME = "Unknown";
|
|
4
4
|
export declare const DEFAULT_INTEGRATION_VERSION = "Unknown";
|
|
5
|
+
export { Secrets } from "./secrets.js";
|
|
5
6
|
export * from "./client.js";
|
|
6
7
|
export * from "./types.js";
|
|
7
8
|
/**
|
package/dist/sdk.js
CHANGED
|
@@ -23,11 +23,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.createClient = exports.DEFAULT_INTEGRATION_VERSION = exports.DEFAULT_INTEGRATION_NAME = void 0;
|
|
26
|
+
exports.createClient = exports.Secrets = exports.DEFAULT_INTEGRATION_VERSION = exports.DEFAULT_INTEGRATION_NAME = void 0;
|
|
27
27
|
const core_js_1 = require("./core.js");
|
|
28
28
|
const client_builder_js_1 = require("./client_builder.js");
|
|
29
29
|
exports.DEFAULT_INTEGRATION_NAME = "Unknown";
|
|
30
30
|
exports.DEFAULT_INTEGRATION_VERSION = "Unknown";
|
|
31
|
+
var secrets_js_1 = require("./secrets.js");
|
|
32
|
+
Object.defineProperty(exports, "Secrets", { enumerable: true, get: function () { return secrets_js_1.Secrets; } });
|
|
31
33
|
__exportStar(require("./client.js"), exports);
|
|
32
34
|
__exportStar(require("./types.js"), exports);
|
|
33
35
|
/**
|
package/dist/secrets.d.ts
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import { InnerClient } from "./core.js";
|
|
2
|
+
/**
|
|
3
|
+
* The Secrets API includes all operations the SDK client can perform on secrets.
|
|
4
|
+
* Use secret reference URIs to securely load secrets from 1Password: op://<vault-name>/<item-name>[/<section-name>]/<field-name>
|
|
5
|
+
*/
|
|
2
6
|
export interface SecretsApi {
|
|
7
|
+
/**
|
|
8
|
+
* Resolve returns the secret the provided secret reference points to.
|
|
9
|
+
*/
|
|
3
10
|
resolve(secretReference: string): Promise<string>;
|
|
4
11
|
}
|
|
5
|
-
export declare class
|
|
12
|
+
export declare class Secrets implements SecretsApi {
|
|
6
13
|
#private;
|
|
7
14
|
constructor(inner: InnerClient);
|
|
15
|
+
/**
|
|
16
|
+
* Resolve returns the secret the provided secret reference points to.
|
|
17
|
+
*/
|
|
8
18
|
resolve(secretReference: string): Promise<string>;
|
|
9
19
|
}
|
package/dist/secrets.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// Code generated by op-codegen - DO NOT EDIT MANUALLY
|
|
2
3
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
4
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
5
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -19,28 +20,33 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
19
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");
|
|
20
21
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
21
22
|
};
|
|
22
|
-
var
|
|
23
|
+
var _Secrets_inner;
|
|
23
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.
|
|
25
|
-
class
|
|
25
|
+
exports.Secrets = void 0;
|
|
26
|
+
class Secrets {
|
|
26
27
|
constructor(inner) {
|
|
27
|
-
|
|
28
|
-
__classPrivateFieldSet(this,
|
|
28
|
+
_Secrets_inner.set(this, void 0);
|
|
29
|
+
__classPrivateFieldSet(this, _Secrets_inner, inner, "f");
|
|
29
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Resolve returns the secret the provided secret reference points to.
|
|
33
|
+
*/
|
|
30
34
|
resolve(secretReference) {
|
|
31
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
36
|
const invocationConfig = {
|
|
33
|
-
clientId: __classPrivateFieldGet(this, _SecretsSource_inner, "f").id,
|
|
34
37
|
invocation: {
|
|
35
|
-
|
|
38
|
+
clientId: __classPrivateFieldGet(this, _Secrets_inner, "f").id,
|
|
36
39
|
parameters: {
|
|
37
|
-
|
|
40
|
+
name: "SecretsResolve",
|
|
41
|
+
parameters: {
|
|
42
|
+
secret_reference: secretReference,
|
|
43
|
+
},
|
|
38
44
|
},
|
|
39
45
|
},
|
|
40
46
|
};
|
|
41
|
-
return JSON.parse(yield __classPrivateFieldGet(this,
|
|
47
|
+
return JSON.parse(yield __classPrivateFieldGet(this, _Secrets_inner, "f").core.invoke(invocationConfig));
|
|
42
48
|
});
|
|
43
49
|
}
|
|
44
50
|
}
|
|
45
|
-
exports.
|
|
46
|
-
|
|
51
|
+
exports.Secrets = Secrets;
|
|
52
|
+
_Secrets_inner = new WeakMap();
|
package/dist/types.d.ts
CHANGED
|
@@ -27,72 +27,96 @@ export declare enum ItemCategory {
|
|
|
27
27
|
export declare enum ItemFieldType {
|
|
28
28
|
Text = "Text",
|
|
29
29
|
Concealed = "Concealed",
|
|
30
|
+
CreditCardType = "CreditCardType",
|
|
31
|
+
Phone = "Phone",
|
|
32
|
+
Url = "Url",
|
|
33
|
+
Totp = "Totp",
|
|
30
34
|
Unsupported = "Unsupported"
|
|
31
35
|
}
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
*/
|
|
36
|
+
/** Field type-specific attributes. */
|
|
37
|
+
export type ItemFieldDetails =
|
|
38
|
+
/** The computed OTP code and other details */
|
|
39
|
+
{
|
|
40
|
+
type: "Otp";
|
|
41
|
+
content: OtpFieldDetails;
|
|
42
|
+
};
|
|
43
|
+
/** Represents a field within an item. */
|
|
35
44
|
export interface ItemField {
|
|
36
|
-
/**
|
|
37
|
-
* The field's ID
|
|
38
|
-
*/
|
|
45
|
+
/** The field's ID */
|
|
39
46
|
id: string;
|
|
40
|
-
/**
|
|
41
|
-
* The field's title
|
|
42
|
-
*/
|
|
47
|
+
/** The field's title */
|
|
43
48
|
title: string;
|
|
44
|
-
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* The type of value stored in the field
|
|
50
|
-
*/
|
|
51
|
-
field_type: ItemFieldType;
|
|
52
|
-
/**
|
|
53
|
-
* The string representation of the field's value
|
|
54
|
-
*/
|
|
49
|
+
/** The ID of the section containing the field. Built-in fields such as usernames and passwords don't require a section. */
|
|
50
|
+
sectionId?: string;
|
|
51
|
+
/** The field's type */
|
|
52
|
+
fieldType: ItemFieldType;
|
|
53
|
+
/** The string representation of the field's value */
|
|
55
54
|
value: string;
|
|
55
|
+
/** Field type-specific attributes. */
|
|
56
|
+
details?: ItemFieldDetails;
|
|
56
57
|
}
|
|
57
|
-
/**
|
|
58
|
-
* A section groups together multiple fields in an item.
|
|
59
|
-
*/
|
|
58
|
+
/** A section groups together multiple fields in an item. */
|
|
60
59
|
export interface ItemSection {
|
|
61
|
-
/**
|
|
62
|
-
* The ID of the section
|
|
63
|
-
*/
|
|
60
|
+
/** The section's unique ID */
|
|
64
61
|
id: string;
|
|
65
|
-
/**
|
|
66
|
-
* The title of the section
|
|
67
|
-
*/
|
|
62
|
+
/** The section's title */
|
|
68
63
|
title: string;
|
|
69
64
|
}
|
|
70
|
-
/**
|
|
71
|
-
* Represents a 1Password item.
|
|
72
|
-
*/
|
|
65
|
+
/** Represents a 1Password item. */
|
|
73
66
|
export interface Item {
|
|
74
|
-
/**
|
|
75
|
-
* The item's unique ID
|
|
76
|
-
*/
|
|
67
|
+
/** The item's ID */
|
|
77
68
|
id: string;
|
|
78
|
-
/**
|
|
79
|
-
* The item's title
|
|
80
|
-
*/
|
|
69
|
+
/** The item's title */
|
|
81
70
|
title: string;
|
|
82
|
-
/**
|
|
83
|
-
* The item's category
|
|
84
|
-
*/
|
|
71
|
+
/** The item's category */
|
|
85
72
|
category: ItemCategory;
|
|
86
|
-
/**
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
vault_id: string;
|
|
90
|
-
/**
|
|
91
|
-
* The item's fields
|
|
92
|
-
*/
|
|
73
|
+
/** The ID of the vault where the item is saved */
|
|
74
|
+
vaultId: string;
|
|
75
|
+
/** The item's fields */
|
|
93
76
|
fields: ItemField[];
|
|
94
|
-
/**
|
|
95
|
-
* The item's sections
|
|
96
|
-
*/
|
|
77
|
+
/** The item's sections */
|
|
97
78
|
sections: ItemSection[];
|
|
79
|
+
/** The item's tags */
|
|
80
|
+
tags: string[];
|
|
81
|
+
/** The item's version */
|
|
82
|
+
version: number;
|
|
83
|
+
}
|
|
84
|
+
export interface ItemCreateParams {
|
|
85
|
+
/** The item's category */
|
|
86
|
+
category: ItemCategory;
|
|
87
|
+
/** The ID of the vault where the item is saved */
|
|
88
|
+
vaultId: string;
|
|
89
|
+
/** The item's title */
|
|
90
|
+
title: string;
|
|
91
|
+
/** The item's fields */
|
|
92
|
+
fields?: ItemField[];
|
|
93
|
+
/** The item's sections */
|
|
94
|
+
sections?: ItemSection[];
|
|
95
|
+
/** The item's tags */
|
|
96
|
+
tags?: string[];
|
|
97
|
+
}
|
|
98
|
+
/** Represents a decrypted 1Password item. */
|
|
99
|
+
export interface ItemOverview {
|
|
100
|
+
/** The item's ID */
|
|
101
|
+
id: string;
|
|
102
|
+
/** The item's title */
|
|
103
|
+
title: string;
|
|
104
|
+
/** The item's category */
|
|
105
|
+
category: ItemCategory;
|
|
106
|
+
/** The ID of the vault where the item is saved */
|
|
107
|
+
vaultId: string;
|
|
108
|
+
}
|
|
109
|
+
/** Additional attributes for OTP fields. */
|
|
110
|
+
export interface OtpFieldDetails {
|
|
111
|
+
/** The OTP code, if successfully computed */
|
|
112
|
+
code?: string;
|
|
113
|
+
/** The error message, if the OTP code could not be computed */
|
|
114
|
+
errorMessage?: string;
|
|
115
|
+
}
|
|
116
|
+
/** Represents a decrypted 1Password vault. */
|
|
117
|
+
export interface VaultOverview {
|
|
118
|
+
/** The vault's ID */
|
|
119
|
+
id: string;
|
|
120
|
+
/** The vault's title */
|
|
121
|
+
title: string;
|
|
98
122
|
}
|
package/dist/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Generated by typeshare 1.
|
|
3
|
+
Generated by typeshare 1.11.0
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ItemFieldType = exports.ItemCategory = void 0;
|
|
@@ -35,5 +35,9 @@ var ItemFieldType;
|
|
|
35
35
|
(function (ItemFieldType) {
|
|
36
36
|
ItemFieldType["Text"] = "Text";
|
|
37
37
|
ItemFieldType["Concealed"] = "Concealed";
|
|
38
|
+
ItemFieldType["CreditCardType"] = "CreditCardType";
|
|
39
|
+
ItemFieldType["Phone"] = "Phone";
|
|
40
|
+
ItemFieldType["Url"] = "Url";
|
|
41
|
+
ItemFieldType["Totp"] = "Totp";
|
|
38
42
|
ItemFieldType["Unsupported"] = "Unsupported";
|
|
39
43
|
})(ItemFieldType || (exports.ItemFieldType = ItemFieldType = {}));
|
package/dist/vaults.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { InnerClient } from "./core.js";
|
|
2
|
+
import * as types from "./types.js";
|
|
3
|
+
import { SdkIterable } from "./iterator.js";
|
|
4
|
+
/**
|
|
5
|
+
* The Vaults API holds all the operations the SDK client can perform on 1Password vaults.
|
|
6
|
+
*/
|
|
7
|
+
export interface VaultsApi {
|
|
8
|
+
/**
|
|
9
|
+
* List all vaults
|
|
10
|
+
*/
|
|
11
|
+
listAll(): Promise<SdkIterable<types.VaultOverview>>;
|
|
12
|
+
}
|
|
13
|
+
export declare class Vaults implements VaultsApi {
|
|
14
|
+
#private;
|
|
15
|
+
constructor(inner: InnerClient);
|
|
16
|
+
/**
|
|
17
|
+
* List all vaults
|
|
18
|
+
*/
|
|
19
|
+
listAll(): Promise<SdkIterable<types.VaultOverview>>;
|
|
20
|
+
}
|
package/dist/vaults.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
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 _Vaults_inner;
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.Vaults = void 0;
|
|
26
|
+
const iterator_js_1 = require("./iterator.js");
|
|
27
|
+
class Vaults {
|
|
28
|
+
constructor(inner) {
|
|
29
|
+
_Vaults_inner.set(this, void 0);
|
|
30
|
+
__classPrivateFieldSet(this, _Vaults_inner, inner, "f");
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* List all vaults
|
|
34
|
+
*/
|
|
35
|
+
listAll() {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
const invocationConfig = {
|
|
38
|
+
invocation: {
|
|
39
|
+
clientId: __classPrivateFieldGet(this, _Vaults_inner, "f").id,
|
|
40
|
+
parameters: {
|
|
41
|
+
name: "VaultsListAll",
|
|
42
|
+
parameters: {},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
return new iterator_js_1.SdkIterable(JSON.parse(yield __classPrivateFieldGet(this, _Vaults_inner, "f").core.invoke(invocationConfig)));
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.Vaults = Vaults;
|
|
51
|
+
_Vaults_inner = new WeakMap();
|
package/dist/version.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1password/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
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",
|
|
@@ -9,12 +9,14 @@
|
|
|
9
9
|
"prettier-fix": "prettier --write 'src/*.ts'",
|
|
10
10
|
"eslint": "eslint -c .eslintrc.json 'src/*.ts'",
|
|
11
11
|
"prepare": "rm -rf ./dist && npm run build",
|
|
12
|
-
"publish-test": "cp ../README.md . && npm publish --tag beta --dry-run && rm ./README.md",
|
|
13
|
-
"publish-
|
|
12
|
+
"publish-test": "cp ../README.md . && npm publish --tag \"${RELEASE_CHANNEL:-beta}\" --dry-run && rm ./README.md",
|
|
13
|
+
"publish-prod": "cp ../README.md . && npm publish --tag \"${RELEASE_CHANNEL:-beta}\" && rm ./README.md"
|
|
14
14
|
},
|
|
15
15
|
"author": "1Password",
|
|
16
16
|
"license": "MIT",
|
|
17
|
-
"files": [
|
|
17
|
+
"files": [
|
|
18
|
+
"./dist"
|
|
19
|
+
],
|
|
18
20
|
"exports": {
|
|
19
21
|
".": {
|
|
20
22
|
"types": "./dist/sdk.d.ts",
|
|
@@ -24,22 +26,22 @@
|
|
|
24
26
|
"main": "./dist/sdk.js",
|
|
25
27
|
"types": "./dist/sdk.d.ts",
|
|
26
28
|
"dependencies": {
|
|
27
|
-
"@1password/sdk-core": "0.1.
|
|
29
|
+
"@1password/sdk-core": "0.1.2"
|
|
28
30
|
},
|
|
29
31
|
"devDependencies": {
|
|
30
32
|
"@1password/eslint-config": "^4.0.0",
|
|
31
33
|
"@1password/prettier-config": "^1.1.3",
|
|
34
|
+
"@babel/preset-env": "^7.23.8",
|
|
32
35
|
"@jest/globals": "^29.7.0",
|
|
33
36
|
"@types/jest": "^29.5.11",
|
|
34
|
-
"
|
|
37
|
+
"@types/node": "^20.11.0",
|
|
38
|
+
"babel-jest": "^29.7.0",
|
|
35
39
|
"eslint": "^8.54.0",
|
|
36
|
-
"
|
|
40
|
+
"jest": "^29.7.0",
|
|
37
41
|
"jest-environment-jsdom": "^29.6.2",
|
|
38
42
|
"prettier": "3.1.1",
|
|
43
|
+
"prettier-plugin-organize-imports": "^3.2.3",
|
|
39
44
|
"ts-jest": "^29.1.1",
|
|
40
|
-
"typescript": "^5.3.3"
|
|
41
|
-
"@types/node": "^20.11.0",
|
|
42
|
-
"@babel/preset-env": "^7.23.8",
|
|
43
|
-
"babel-jest": "^29.7.0"
|
|
45
|
+
"typescript": "^5.3.3"
|
|
44
46
|
}
|
|
45
47
|
}
|