@1password/sdk 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.
package/README.md CHANGED
@@ -67,7 +67,7 @@ const client = await createClient({
67
67
  const secret = await client.secrets.resolve("op://vault/item/field");
68
68
  ```
69
69
 
70
- Make sure to use [secret reference URIs](https://developer.1password.com/docs/cli/secrets-reference-syntax/) with the syntax `op://vault/item/field` to securely load secrets from 1Password into your code.
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
71
 
72
72
  Inside `createClient()`, set `integrationName` to the name of your application and `integrationVersion` to the version of your application.
73
73
 
@@ -82,10 +82,10 @@ Operations:
82
82
  - [x] [Retrieve secrets](https://developer.1password.com/docs/sdks/load-secrets)
83
83
  - [x] [Retrieve items](https://developer.1password.com/docs/sdks/manage-items#get-an-item)
84
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#edit-an-item)
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
87
  - [x] [List items](https://developer.1password.com/docs/sdks/list-vaults-items/)
88
- - [ ] Add & update tags on items
88
+ - [x] Add & update tags on items
89
89
 
90
90
  Field types:
91
91
  - [x] API Keys
@@ -97,6 +97,7 @@ Field types:
97
97
  - [ ] SSH public keys, fingerprint and key type
98
98
  - [x] One-time passwords
99
99
  - [x] URLs
100
+ - [x] Websites (used to suggest and autofill logins)
100
101
  - [x] Phone numbers
101
102
  - [x] Credit card types
102
103
  - [ ] File attachments and Document items
@@ -126,7 +127,7 @@ Field types:
126
127
 
127
128
  - [x] [1Password Service Accounts](https://developer.1password.com/docs/service-accounts/get-started/)
128
129
  - [ ] User authentication
129
- - [ ] 1Password Connect. For now, use [1Password/connect-sdk-go](https://github.com/1Password/connect-sdk-go).
130
+ - [ ] 1Password Connect. For now, use [1Password/connect-sdk-js](https://github.com/1Password/connect-sdk-js).
130
131
 
131
132
  ## 📖 Learn more
132
133
 
package/dist/client.js CHANGED
@@ -1,4 +1,5 @@
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");
@@ -6,9 +7,9 @@ const items_js_1 = require("./items.js");
6
7
  const vaults_js_1 = require("./vaults.js");
7
8
  class Client {
8
9
  constructor(innerClient) {
9
- this.secrets = new secrets_js_1.SecretsSource(innerClient);
10
- this.items = new items_js_1.ItemsSource(innerClient);
11
- this.vaults = new vaults_js_1.VaultsSource(innerClient);
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);
12
13
  }
13
14
  }
14
15
  exports.Client = Client;
@@ -1,6 +1,6 @@
1
1
  import { ClientAuthConfig } from "./core.js";
2
2
  export declare const LANGUAGE = "JS";
3
- export declare const VERSION = "0010100";
3
+ export declare const VERSION = "0010301";
4
4
  export interface ClientConfiguration {
5
5
  auth: Auth;
6
6
  integrationName: string;
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
@@ -2,51 +2,51 @@ import { InnerClient } from "./core.js";
2
2
  import * as types from "./types.js";
3
3
  import { SdkIterable } from "./iterator.js";
4
4
  /**
5
- * The Items API holds all operations the SDK client can perform on 1Password items.
5
+ * The Items API holds all operations the SDK client can perform on 1Password items.
6
6
  */
7
7
  export interface ItemsApi {
8
8
  /**
9
- * Create a new item
9
+ * Create a new item
10
10
  */
11
11
  create(params: types.ItemCreateParams): Promise<types.Item>;
12
12
  /**
13
- * Get an item by vault and item ID
13
+ * Get an item by vault and item ID
14
14
  */
15
15
  get(vaultId: string, itemId: string): Promise<types.Item>;
16
16
  /**
17
- * Update an existing item.
17
+ * Update an existing item.
18
18
  */
19
19
  put(item: types.Item): Promise<types.Item>;
20
20
  /**
21
- * Delete an item.
21
+ * Delete an item.
22
22
  */
23
23
  delete(vaultId: string, itemId: string): Promise<void>;
24
24
  /**
25
- * List all items
25
+ * List all items
26
26
  */
27
27
  listAll(vaultId: string): Promise<SdkIterable<types.ItemOverview>>;
28
28
  }
29
- export declare class ItemsSource implements ItemsApi {
29
+ export declare class Items implements ItemsApi {
30
30
  #private;
31
31
  constructor(inner: InnerClient);
32
32
  /**
33
- * Create a new item
33
+ * Create a new item
34
34
  */
35
35
  create(params: types.ItemCreateParams): Promise<types.Item>;
36
36
  /**
37
- * Get an item by vault and item ID
37
+ * Get an item by vault and item ID
38
38
  */
39
39
  get(vaultId: string, itemId: string): Promise<types.Item>;
40
40
  /**
41
- * Update an existing item.
41
+ * Update an existing item.
42
42
  */
43
43
  put(item: types.Item): Promise<types.Item>;
44
44
  /**
45
- * Delete an item.
45
+ * Delete an item.
46
46
  */
47
47
  delete(vaultId: string, itemId: string): Promise<void>;
48
48
  /**
49
- * List all items
49
+ * List all items
50
50
  */
51
51
  listAll(vaultId: string): Promise<SdkIterable<types.ItemOverview>>;
52
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,102 +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 _ItemsSource_inner;
23
+ var _Items_inner;
23
24
  Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.ItemsSource = void 0;
25
+ exports.Items = void 0;
25
26
  const iterator_js_1 = require("./iterator.js");
26
- class ItemsSource {
27
+ class Items {
27
28
  constructor(inner) {
28
- _ItemsSource_inner.set(this, void 0);
29
- __classPrivateFieldSet(this, _ItemsSource_inner, inner, "f");
29
+ _Items_inner.set(this, void 0);
30
+ __classPrivateFieldSet(this, _Items_inner, inner, "f");
30
31
  }
31
32
  /**
32
- * Create a new item
33
+ * Create a new item
33
34
  */
34
35
  create(params) {
35
36
  return __awaiter(this, void 0, void 0, function* () {
36
37
  const invocationConfig = {
37
- clientId: __classPrivateFieldGet(this, _ItemsSource_inner, "f").id,
38
38
  invocation: {
39
- name: "ItemsCreate",
39
+ clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
40
40
  parameters: {
41
- params,
41
+ name: "ItemsCreate",
42
+ parameters: {
43
+ params,
44
+ },
42
45
  },
43
46
  },
44
47
  };
45
- return JSON.parse(yield __classPrivateFieldGet(this, _ItemsSource_inner, "f").core.invoke(invocationConfig));
48
+ return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig));
46
49
  });
47
50
  }
48
51
  /**
49
- * Get an item by vault and item ID
52
+ * Get an item by vault and item ID
50
53
  */
51
54
  get(vaultId, itemId) {
52
55
  return __awaiter(this, void 0, void 0, function* () {
53
56
  const invocationConfig = {
54
- clientId: __classPrivateFieldGet(this, _ItemsSource_inner, "f").id,
55
57
  invocation: {
56
- name: "ItemsGet",
58
+ clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
57
59
  parameters: {
58
- vault_id: vaultId,
59
- item_id: itemId,
60
+ name: "ItemsGet",
61
+ parameters: {
62
+ vault_id: vaultId,
63
+ item_id: itemId,
64
+ },
60
65
  },
61
66
  },
62
67
  };
63
- return JSON.parse(yield __classPrivateFieldGet(this, _ItemsSource_inner, "f").core.invoke(invocationConfig));
68
+ return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig));
64
69
  });
65
70
  }
66
71
  /**
67
- * Update an existing item.
72
+ * Update an existing item.
68
73
  */
69
74
  put(item) {
70
75
  return __awaiter(this, void 0, void 0, function* () {
71
76
  const invocationConfig = {
72
- clientId: __classPrivateFieldGet(this, _ItemsSource_inner, "f").id,
73
77
  invocation: {
74
- name: "ItemsPut",
78
+ clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
75
79
  parameters: {
76
- item,
80
+ name: "ItemsPut",
81
+ parameters: {
82
+ item,
83
+ },
77
84
  },
78
85
  },
79
86
  };
80
- return JSON.parse(yield __classPrivateFieldGet(this, _ItemsSource_inner, "f").core.invoke(invocationConfig));
87
+ return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig));
81
88
  });
82
89
  }
83
90
  /**
84
- * Delete an item.
91
+ * Delete an item.
85
92
  */
86
93
  delete(vaultId, itemId) {
87
94
  return __awaiter(this, void 0, void 0, function* () {
88
95
  const invocationConfig = {
89
- clientId: __classPrivateFieldGet(this, _ItemsSource_inner, "f").id,
90
96
  invocation: {
91
- name: "ItemsDelete",
97
+ clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
92
98
  parameters: {
93
- vault_id: vaultId,
94
- item_id: itemId,
99
+ name: "ItemsDelete",
100
+ parameters: {
101
+ vault_id: vaultId,
102
+ item_id: itemId,
103
+ },
95
104
  },
96
105
  },
97
106
  };
98
- yield __classPrivateFieldGet(this, _ItemsSource_inner, "f").core.invoke(invocationConfig);
107
+ yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig);
99
108
  });
100
109
  }
101
110
  /**
102
- * List all items
111
+ * List all items
103
112
  */
104
113
  listAll(vaultId) {
105
114
  return __awaiter(this, void 0, void 0, function* () {
106
115
  const invocationConfig = {
107
- clientId: __classPrivateFieldGet(this, _ItemsSource_inner, "f").id,
108
116
  invocation: {
109
- name: "ItemsListAll",
117
+ clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
110
118
  parameters: {
111
- vault_id: vaultId,
119
+ name: "ItemsListAll",
120
+ parameters: {
121
+ vault_id: vaultId,
122
+ },
112
123
  },
113
124
  },
114
125
  };
115
- return new iterator_js_1.SdkIterable(JSON.parse(yield __classPrivateFieldGet(this, _ItemsSource_inner, "f").core.invoke(invocationConfig)));
126
+ return new iterator_js_1.SdkIterable(JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig)));
116
127
  });
117
128
  }
118
129
  }
119
- exports.ItemsSource = ItemsSource;
120
- _ItemsSource_inner = new WeakMap();
130
+ exports.Items = Items;
131
+ _Items_inner = new WeakMap();
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,19 +1,19 @@
1
1
  import { InnerClient } from "./core.js";
2
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>
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
5
  */
6
6
  export interface SecretsApi {
7
7
  /**
8
- * Resolve returns the secret the provided secret reference points to.
8
+ * Resolve returns the secret the provided secret reference points to.
9
9
  */
10
10
  resolve(secretReference: string): Promise<string>;
11
11
  }
12
- export declare class SecretsSource implements SecretsApi {
12
+ export declare class Secrets implements SecretsApi {
13
13
  #private;
14
14
  constructor(inner: InnerClient);
15
15
  /**
16
- * Resolve returns the secret the provided secret reference points to.
16
+ * Resolve returns the secret the provided secret reference points to.
17
17
  */
18
18
  resolve(secretReference: string): Promise<string>;
19
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,31 +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 _SecretsSource_inner;
23
+ var _Secrets_inner;
23
24
  Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.SecretsSource = void 0;
25
- class SecretsSource {
25
+ exports.Secrets = void 0;
26
+ class Secrets {
26
27
  constructor(inner) {
27
- _SecretsSource_inner.set(this, void 0);
28
- __classPrivateFieldSet(this, _SecretsSource_inner, inner, "f");
28
+ _Secrets_inner.set(this, void 0);
29
+ __classPrivateFieldSet(this, _Secrets_inner, inner, "f");
29
30
  }
30
31
  /**
31
- * Resolve returns the secret the provided secret reference points to.
32
+ * Resolve returns the secret the provided secret reference points to.
32
33
  */
33
34
  resolve(secretReference) {
34
35
  return __awaiter(this, void 0, void 0, function* () {
35
36
  const invocationConfig = {
36
- clientId: __classPrivateFieldGet(this, _SecretsSource_inner, "f").id,
37
37
  invocation: {
38
- name: "SecretsResolve",
38
+ clientId: __classPrivateFieldGet(this, _Secrets_inner, "f").id,
39
39
  parameters: {
40
- secret_reference: secretReference,
40
+ name: "SecretsResolve",
41
+ parameters: {
42
+ secret_reference: secretReference,
43
+ },
41
44
  },
42
45
  },
43
46
  };
44
- return JSON.parse(yield __classPrivateFieldGet(this, _SecretsSource_inner, "f").core.invoke(invocationConfig));
47
+ return JSON.parse(yield __classPrivateFieldGet(this, _Secrets_inner, "f").core.invoke(invocationConfig));
45
48
  });
46
49
  }
47
50
  }
48
- exports.SecretsSource = SecretsSource;
49
- _SecretsSource_inner = new WeakMap();
51
+ exports.Secrets = Secrets;
52
+ _Secrets_inner = new WeakMap();
package/dist/types.d.ts CHANGED
@@ -62,6 +62,32 @@ export interface ItemSection {
62
62
  /** The section's title */
63
63
  title: string;
64
64
  }
65
+ /**
66
+ * Controls the auto-fill behavior of a website.
67
+ *
68
+ *
69
+ * For more information, visit https://support.1password.com/autofill-behavior/
70
+ */
71
+ export declare enum AutofillBehavior {
72
+ /** Auto-fill any page that’s part of the website, including subdomains */
73
+ AnywhereOnWebsite = "AnywhereOnWebsite",
74
+ /** Auto-fill only if the domain (hostname and port) is an exact match. */
75
+ ExactDomain = "ExactDomain",
76
+ /** Never auto-fill on this website */
77
+ Never = "Never"
78
+ }
79
+ export interface Website {
80
+ /** The website URL */
81
+ url: string;
82
+ /** The label of the website, e.g. 'website', 'sign-in address' */
83
+ label: string;
84
+ /**
85
+ * The auto-fill behavior of the website
86
+ *
87
+ * For more information, visit https://support.1password.com/autofill-behavior/
88
+ */
89
+ autofillBehavior: AutofillBehavior;
90
+ }
65
91
  /** Represents a 1Password item. */
66
92
  export interface Item {
67
93
  /** The item's ID */
@@ -76,6 +102,10 @@ export interface Item {
76
102
  fields: ItemField[];
77
103
  /** The item's sections */
78
104
  sections: ItemSection[];
105
+ /** The item's tags */
106
+ tags: string[];
107
+ /** The websites used for autofilling for items of the Login and Password categories. */
108
+ websites: Website[];
79
109
  /** The item's version */
80
110
  version: number;
81
111
  }
@@ -87,9 +117,13 @@ export interface ItemCreateParams {
87
117
  /** The item's title */
88
118
  title: string;
89
119
  /** The item's fields */
90
- fields: ItemField[];
120
+ fields?: ItemField[];
91
121
  /** The item's sections */
92
- sections: ItemSection[];
122
+ sections?: ItemSection[];
123
+ /** The item's tags */
124
+ tags?: string[];
125
+ /** The websites used for autofilling for items of the Login and Password categories. */
126
+ websites?: Website[];
93
127
  }
94
128
  /** Represents a decrypted 1Password item. */
95
129
  export interface ItemOverview {
@@ -101,6 +135,8 @@ export interface ItemOverview {
101
135
  category: ItemCategory;
102
136
  /** The ID of the vault where the item is saved */
103
137
  vaultId: string;
138
+ /** The websites used for autofilling for items of the Login and Password categories. */
139
+ websites: Website[];
104
140
  }
105
141
  /** Additional attributes for OTP fields. */
106
142
  export interface OtpFieldDetails {
package/dist/types.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  /*
3
- Generated by typeshare 1.10.0-beta.7
3
+ Generated by typeshare 1.11.0
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ItemFieldType = exports.ItemCategory = void 0;
6
+ exports.AutofillBehavior = exports.ItemFieldType = exports.ItemCategory = void 0;
7
7
  var ItemCategory;
8
8
  (function (ItemCategory) {
9
9
  ItemCategory["Login"] = "Login";
@@ -41,3 +41,18 @@ var ItemFieldType;
41
41
  ItemFieldType["Totp"] = "Totp";
42
42
  ItemFieldType["Unsupported"] = "Unsupported";
43
43
  })(ItemFieldType || (exports.ItemFieldType = ItemFieldType = {}));
44
+ /**
45
+ * Controls the auto-fill behavior of a website.
46
+ *
47
+ *
48
+ * For more information, visit https://support.1password.com/autofill-behavior/
49
+ */
50
+ var AutofillBehavior;
51
+ (function (AutofillBehavior) {
52
+ /** Auto-fill any page that’s part of the website, including subdomains */
53
+ AutofillBehavior["AnywhereOnWebsite"] = "AnywhereOnWebsite";
54
+ /** Auto-fill only if the domain (hostname and port) is an exact match. */
55
+ AutofillBehavior["ExactDomain"] = "ExactDomain";
56
+ /** Never auto-fill on this website */
57
+ AutofillBehavior["Never"] = "Never";
58
+ })(AutofillBehavior || (exports.AutofillBehavior = AutofillBehavior = {}));
package/dist/vaults.d.ts CHANGED
@@ -2,19 +2,19 @@ import { InnerClient } from "./core.js";
2
2
  import * as types from "./types.js";
3
3
  import { SdkIterable } from "./iterator.js";
4
4
  /**
5
- * The Vaults API holds all the operations the SDK client can perform on 1Password vaults.
5
+ * The Vaults API holds all the operations the SDK client can perform on 1Password vaults.
6
6
  */
7
7
  export interface VaultsApi {
8
8
  /**
9
- * List all vaults
9
+ * List all vaults
10
10
  */
11
11
  listAll(): Promise<SdkIterable<types.VaultOverview>>;
12
12
  }
13
- export declare class VaultsSource implements VaultsApi {
13
+ export declare class Vaults implements VaultsApi {
14
14
  #private;
15
15
  constructor(inner: InnerClient);
16
16
  /**
17
- * List all vaults
17
+ * List all vaults
18
18
  */
19
19
  listAll(): Promise<SdkIterable<types.VaultOverview>>;
20
20
  }
package/dist/vaults.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,30 +20,32 @@ 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 _VaultsSource_inner;
23
+ var _Vaults_inner;
23
24
  Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.VaultsSource = void 0;
25
+ exports.Vaults = void 0;
25
26
  const iterator_js_1 = require("./iterator.js");
26
- class VaultsSource {
27
+ class Vaults {
27
28
  constructor(inner) {
28
- _VaultsSource_inner.set(this, void 0);
29
- __classPrivateFieldSet(this, _VaultsSource_inner, inner, "f");
29
+ _Vaults_inner.set(this, void 0);
30
+ __classPrivateFieldSet(this, _Vaults_inner, inner, "f");
30
31
  }
31
32
  /**
32
- * List all vaults
33
+ * List all vaults
33
34
  */
34
35
  listAll() {
35
36
  return __awaiter(this, void 0, void 0, function* () {
36
37
  const invocationConfig = {
37
- clientId: __classPrivateFieldGet(this, _VaultsSource_inner, "f").id,
38
38
  invocation: {
39
- name: "VaultsListAll",
40
- parameters: {},
39
+ clientId: __classPrivateFieldGet(this, _Vaults_inner, "f").id,
40
+ parameters: {
41
+ name: "VaultsListAll",
42
+ parameters: {},
43
+ },
41
44
  },
42
45
  };
43
- return new iterator_js_1.SdkIterable(JSON.parse(yield __classPrivateFieldGet(this, _VaultsSource_inner, "f").core.invoke(invocationConfig)));
46
+ return new iterator_js_1.SdkIterable(JSON.parse(yield __classPrivateFieldGet(this, _Vaults_inner, "f").core.invoke(invocationConfig)));
44
47
  });
45
48
  }
46
49
  }
47
- exports.VaultsSource = VaultsSource;
48
- _VaultsSource_inner = new WeakMap();
50
+ exports.Vaults = Vaults;
51
+ _Vaults_inner = new WeakMap();
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "0.1.1";
2
- export declare const SDK_BUILD_NUMBER = "0010100";
1
+ export declare const SDK_VERSION = "0.1.3";
2
+ export declare const SDK_BUILD_NUMBER = "0010301";
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.1";
5
- exports.SDK_BUILD_NUMBER = "0010100";
6
- const SDK_CORE_VERSION = "0.1.0-beta.15";
4
+ exports.SDK_VERSION = "0.1.3";
5
+ exports.SDK_BUILD_NUMBER = "0010301";
6
+ const SDK_CORE_VERSION = "0.1.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1password/sdk",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
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,8 +9,8 @@
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 --dry-run && rm ./README.md",
13
- "publish-prod": "cp ../README.md . && npm publish && rm ./README.md"
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",
@@ -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.0-beta.15"
29
+ "@1password/sdk-core": "0.1.3"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@1password/eslint-config": "^4.0.0",