@1password/sdk 0.1.5 → 0.1.7

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
@@ -84,8 +84,9 @@ 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
88
  - [x] [List items](https://developer.1password.com/docs/sdks/list-vaults-items/)
88
- - [x] Add & update tags on items
89
+ - [x] Share items
89
90
  - [x] Generate PIN, random and memorable passwords
90
91
 
91
92
  Field types:
@@ -94,15 +95,18 @@ Field types:
94
95
  - [x] Concealed fields
95
96
  - [x] Text fields
96
97
  - [x] Notes
97
- - [x] SSH private keys (partially supported: supported in resolving secret references, not yet supported in item create/get/update)
98
- - [ ] SSH public keys, fingerprint and key type
98
+ - [x] SSH private keys, public keys, fingerprint and key type (partially supported: supported in resolving secret references, not yet supported in item create/get/update)
99
99
  - [x] One-time passwords
100
100
  - [x] URLs
101
101
  - [x] Websites (used to suggest and autofill logins)
102
102
  - [x] Phone numbers
103
103
  - [x] Credit card types
104
104
  - [x] Credit card numbers
105
- - [ ] File attachments and Document items
105
+ - [x] Emails
106
+ - [x] References to other items
107
+ - [ ] Address
108
+ - [ ] Date / MM/YY
109
+ - [ ] Files attachments and Document items
106
110
 
107
111
  ### Vault management
108
112
  - [ ] Retrieve vaults
@@ -1,6 +1,6 @@
1
1
  import { ClientAuthConfig } from "./core.js";
2
2
  export declare const LANGUAGE = "JS";
3
- export declare const VERSION = "0010501";
3
+ export declare const VERSION = "0010701";
4
4
  export interface ClientConfiguration {
5
5
  auth: Auth;
6
6
  integrationName: string;
package/dist/core.js CHANGED
@@ -11,24 +11,40 @@ 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 errors_1 = require("./errors");
14
15
  /**
15
16
  * An implementation of the `Core` interface that shares resources across all clients.
16
17
  */
17
18
  class SharedCore {
18
19
  invoke_sync(config) {
19
20
  const serializedConfig = JSON.stringify(config);
20
- return (0, sdk_core_1.invoke_sync)(serializedConfig);
21
+ try {
22
+ return (0, sdk_core_1.invoke_sync)(serializedConfig);
23
+ }
24
+ catch (e) {
25
+ (0, errors_1.throwError)(e);
26
+ }
21
27
  }
22
28
  initClient(config) {
23
29
  return __awaiter(this, void 0, void 0, function* () {
24
30
  const serializedConfig = JSON.stringify(config);
25
- return (0, sdk_core_1.init_client)(serializedConfig);
31
+ try {
32
+ return yield (0, sdk_core_1.init_client)(serializedConfig);
33
+ }
34
+ catch (e) {
35
+ (0, errors_1.throwError)(e);
36
+ }
26
37
  });
27
38
  }
28
39
  invoke(config) {
29
40
  return __awaiter(this, void 0, void 0, function* () {
30
41
  const serializedConfig = JSON.stringify(config);
31
- return (0, sdk_core_1.invoke)(serializedConfig);
42
+ try {
43
+ return yield (0, sdk_core_1.invoke)(serializedConfig);
44
+ }
45
+ catch (e) {
46
+ (0, errors_1.throwError)(e);
47
+ }
32
48
  });
33
49
  }
34
50
  releaseClient(clientId) {
@@ -0,0 +1,5 @@
1
+ export declare class RateLimitExceededError extends Error {
2
+ message: string;
3
+ constructor(message: string);
4
+ }
5
+ export declare const throwError: (errString: string) => never;
package/dist/errors.js ADDED
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ // Code generated by op-codegen - DO NOT EDIT MANUALLY
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.throwError = exports.RateLimitExceededError = void 0;
5
+ class RateLimitExceededError extends Error {
6
+ constructor(message) {
7
+ super();
8
+ this.message = message;
9
+ }
10
+ }
11
+ exports.RateLimitExceededError = RateLimitExceededError;
12
+ const throwError = (errString) => {
13
+ let err;
14
+ try {
15
+ err = JSON.parse(errString);
16
+ }
17
+ catch (e) {
18
+ throw new Error(errString);
19
+ }
20
+ switch (err.name) {
21
+ case "RateLimitExceeded":
22
+ throw new RateLimitExceededError(err.message);
23
+ default:
24
+ throw new Error(err.message);
25
+ }
26
+ };
27
+ exports.throwError = throwError;
package/dist/items.d.ts CHANGED
@@ -1,52 +1,63 @@
1
1
  import { InnerClient } from "./core.js";
2
- import * as types from "./types.js";
3
2
  import { SdkIterable } from "./iterator.js";
3
+ import { Item, ItemCreateParams, ItemOverview } from "./types.js";
4
+ import { ItemsSharesApi } from "./items_shares.js";
4
5
  /**
5
6
  * The Items API holds all operations the SDK client can perform on 1Password items.
6
7
  */
7
8
  export interface ItemsApi {
9
+ shares: ItemsSharesApi;
8
10
  /**
9
- * Create a new item
11
+ * Create a new item.
10
12
  */
11
- create(params: types.ItemCreateParams): Promise<types.Item>;
13
+ create(params: ItemCreateParams): Promise<Item>;
12
14
  /**
13
15
  * Get an item by vault and item ID
14
16
  */
15
- get(vaultId: string, itemId: string): Promise<types.Item>;
17
+ get(vaultId: string, itemId: string): Promise<Item>;
16
18
  /**
17
19
  * Update an existing item.
18
20
  */
19
- put(item: types.Item): Promise<types.Item>;
21
+ put(item: Item): Promise<Item>;
20
22
  /**
21
23
  * Delete an item.
22
24
  */
23
25
  delete(vaultId: string, itemId: string): any;
26
+ /**
27
+ * Archive an item.
28
+ */
29
+ archive(vaultId: string, itemId: string): any;
24
30
  /**
25
31
  * List all items
26
32
  */
27
- listAll(vaultId: string): Promise<SdkIterable<types.ItemOverview>>;
33
+ listAll(vaultId: string): Promise<SdkIterable<ItemOverview>>;
28
34
  }
29
35
  export declare class Items implements ItemsApi {
30
36
  #private;
37
+ shares: ItemsSharesApi;
31
38
  constructor(inner: InnerClient);
32
39
  /**
33
- * Create a new item
40
+ * Create a new item.
34
41
  */
35
- create(params: types.ItemCreateParams): Promise<types.Item>;
42
+ create(params: ItemCreateParams): Promise<Item>;
36
43
  /**
37
44
  * Get an item by vault and item ID
38
45
  */
39
- get(vaultId: string, itemId: string): Promise<types.Item>;
46
+ get(vaultId: string, itemId: string): Promise<Item>;
40
47
  /**
41
48
  * Update an existing item.
42
49
  */
43
- put(item: types.Item): Promise<types.Item>;
50
+ put(item: Item): Promise<Item>;
44
51
  /**
45
52
  * Delete an item.
46
53
  */
47
54
  delete(vaultId: string, itemId: string): Promise<void>;
55
+ /**
56
+ * Archive an item.
57
+ */
58
+ archive(vaultId: string, itemId: string): Promise<void>;
48
59
  /**
49
60
  * List all items
50
61
  */
51
- listAll(vaultId: string): Promise<SdkIterable<types.ItemOverview>>;
62
+ listAll(vaultId: string): Promise<SdkIterable<ItemOverview>>;
52
63
  }
package/dist/items.js CHANGED
@@ -24,13 +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 items_shares_js_1 = require("./items_shares.js");
27
28
  class Items {
28
29
  constructor(inner) {
29
30
  _Items_inner.set(this, void 0);
30
31
  __classPrivateFieldSet(this, _Items_inner, inner, "f");
32
+ this.shares = new items_shares_js_1.ItemsShares(inner);
31
33
  }
32
34
  /**
33
- * Create a new item
35
+ * Create a new item.
34
36
  */
35
37
  create(params) {
36
38
  return __awaiter(this, void 0, void 0, function* () {
@@ -107,6 +109,26 @@ class Items {
107
109
  yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig);
108
110
  });
109
111
  }
112
+ /**
113
+ * Archive an item.
114
+ */
115
+ archive(vaultId, itemId) {
116
+ return __awaiter(this, void 0, void 0, function* () {
117
+ const invocationConfig = {
118
+ invocation: {
119
+ clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
120
+ parameters: {
121
+ name: "ItemsArchive",
122
+ parameters: {
123
+ vault_id: vaultId,
124
+ item_id: itemId,
125
+ },
126
+ },
127
+ },
128
+ };
129
+ yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig);
130
+ });
131
+ }
110
132
  /**
111
133
  * List all items
112
134
  */
@@ -0,0 +1,32 @@
1
+ import { InnerClient } from "./core.js";
2
+ import { Item, ItemShareAccountPolicy, ItemShareParams, ValidRecipient } from "./types.js";
3
+ export interface ItemsSharesApi {
4
+ /**
5
+ * Get the item sharing policy of your account.
6
+ */
7
+ getAccountPolicy(vaultId: string, itemId: string): Promise<ItemShareAccountPolicy>;
8
+ /**
9
+ * Validate the recipients of an item sharing link.
10
+ */
11
+ validateRecipients(policy: ItemShareAccountPolicy, recipients: string[]): Promise<ValidRecipient[]>;
12
+ /**
13
+ * Create a new item sharing link.
14
+ */
15
+ create(item: Item, policy: ItemShareAccountPolicy, params: ItemShareParams): Promise<string>;
16
+ }
17
+ export declare class ItemsShares implements ItemsSharesApi {
18
+ #private;
19
+ constructor(inner: InnerClient);
20
+ /**
21
+ * Get the item sharing policy of your account.
22
+ */
23
+ getAccountPolicy(vaultId: string, itemId: string): Promise<ItemShareAccountPolicy>;
24
+ /**
25
+ * Validate the recipients of an item sharing link.
26
+ */
27
+ validateRecipients(policy: ItemShareAccountPolicy, recipients: string[]): Promise<ValidRecipient[]>;
28
+ /**
29
+ * Create a new item sharing link.
30
+ */
31
+ create(item: Item, policy: ItemShareAccountPolicy, params: ItemShareParams): Promise<string>;
32
+ }
@@ -0,0 +1,94 @@
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 _ItemsShares_inner;
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.ItemsShares = void 0;
26
+ class ItemsShares {
27
+ constructor(inner) {
28
+ _ItemsShares_inner.set(this, void 0);
29
+ __classPrivateFieldSet(this, _ItemsShares_inner, inner, "f");
30
+ }
31
+ /**
32
+ * Get the item sharing policy of your account.
33
+ */
34
+ getAccountPolicy(vaultId, itemId) {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ const invocationConfig = {
37
+ invocation: {
38
+ clientId: __classPrivateFieldGet(this, _ItemsShares_inner, "f").id,
39
+ parameters: {
40
+ name: "ItemsSharesGetAccountPolicy",
41
+ parameters: {
42
+ vault_id: vaultId,
43
+ item_id: itemId,
44
+ },
45
+ },
46
+ },
47
+ };
48
+ return JSON.parse(yield __classPrivateFieldGet(this, _ItemsShares_inner, "f").core.invoke(invocationConfig));
49
+ });
50
+ }
51
+ /**
52
+ * Validate the recipients of an item sharing link.
53
+ */
54
+ validateRecipients(policy, recipients) {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ const invocationConfig = {
57
+ invocation: {
58
+ clientId: __classPrivateFieldGet(this, _ItemsShares_inner, "f").id,
59
+ parameters: {
60
+ name: "ItemsSharesValidateRecipients",
61
+ parameters: {
62
+ policy,
63
+ recipients,
64
+ },
65
+ },
66
+ },
67
+ };
68
+ return JSON.parse(yield __classPrivateFieldGet(this, _ItemsShares_inner, "f").core.invoke(invocationConfig));
69
+ });
70
+ }
71
+ /**
72
+ * Create a new item sharing link.
73
+ */
74
+ create(item, policy, params) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ const invocationConfig = {
77
+ invocation: {
78
+ clientId: __classPrivateFieldGet(this, _ItemsShares_inner, "f").id,
79
+ parameters: {
80
+ name: "ItemsSharesCreate",
81
+ parameters: {
82
+ item,
83
+ policy,
84
+ params,
85
+ },
86
+ },
87
+ },
88
+ };
89
+ return JSON.parse(yield __classPrivateFieldGet(this, _ItemsShares_inner, "f").core.invoke(invocationConfig));
90
+ });
91
+ }
92
+ }
93
+ exports.ItemsShares = ItemsShares;
94
+ _ItemsShares_inner = new WeakMap();
package/dist/sdk.d.ts CHANGED
@@ -4,6 +4,7 @@ export declare const DEFAULT_INTEGRATION_NAME = "Unknown";
4
4
  export declare const DEFAULT_INTEGRATION_VERSION = "Unknown";
5
5
  export { Secrets } from "./secrets.js";
6
6
  export * from "./client.js";
7
+ export * from "./errors.js";
7
8
  export * from "./types.js";
8
9
  /**
9
10
  * Creates a default 1Password SDK client.
package/dist/sdk.js CHANGED
@@ -32,6 +32,7 @@ exports.DEFAULT_INTEGRATION_VERSION = "Unknown";
32
32
  var secrets_js_1 = require("./secrets.js");
33
33
  Object.defineProperty(exports, "Secrets", { enumerable: true, get: function () { return secrets_js_1.Secrets; } });
34
34
  __exportStar(require("./client.js"), exports);
35
+ __exportStar(require("./errors.js"), exports);
35
36
  __exportStar(require("./types.js"), exports);
36
37
  /**
37
38
  * Creates a default 1Password SDK client.
package/dist/secrets.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { InnerClient } from "./core.js";
2
- import * as types from "./types.js";
2
+ import { GeneratePasswordResponse, PasswordRecipe } 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>
@@ -21,5 +21,5 @@ export declare class Secrets implements SecretsApi {
21
21
  * Validate the secret reference to ensure there are no syntax errors.
22
22
  */
23
23
  static validateSecretReference(secretReference: string): void;
24
- static generatePassword(recipe: types.PasswordRecipe): types.GeneratePasswordResponse;
24
+ static generatePassword(recipe: PasswordRecipe): GeneratePasswordResponse;
25
25
  }
package/dist/types.d.ts CHANGED
@@ -40,6 +40,8 @@ export declare enum ItemFieldType {
40
40
  Phone = "Phone",
41
41
  Url = "Url",
42
42
  Totp = "Totp",
43
+ Email = "Email",
44
+ Reference = "Reference",
43
45
  Unsupported = "Unsupported"
44
46
  }
45
47
  /** Field type-specific attributes. */
@@ -111,6 +113,8 @@ export interface Item {
111
113
  fields: ItemField[];
112
114
  /** The item's sections */
113
115
  sections: ItemSection[];
116
+ /** The notes of the item */
117
+ notes: string;
114
118
  /** The item's tags */
115
119
  tags: string[];
116
120
  /** The websites used for autofilling for items of the Login and Password categories. */
@@ -129,6 +133,8 @@ export interface ItemCreateParams {
129
133
  fields?: ItemField[];
130
134
  /** The item's sections */
131
135
  sections?: ItemSection[];
136
+ /** The item's notes */
137
+ notes?: string;
132
138
  /** The item's tags */
133
139
  tags?: string[];
134
140
  /** The websites used for autofilling for items of the Login and Password categories. */
@@ -147,6 +153,77 @@ export interface ItemOverview {
147
153
  /** The websites used for autofilling for items of the Login and Password categories. */
148
154
  websites: Website[];
149
155
  }
156
+ /** The valid duration options for sharing an item */
157
+ export declare enum ItemShareDuration {
158
+ /** The share will expire in one hour */
159
+ OneHour = "OneHour",
160
+ /** The share will expire in one day */
161
+ OneDay = "OneDay",
162
+ /** The share will expire in seven days */
163
+ SevenDays = "SevenDays",
164
+ /** The share will expire in fourteen days */
165
+ FourteenDays = "FourteenDays",
166
+ /** The share will expire in thirty days */
167
+ ThirtyDays = "ThirtyDays"
168
+ }
169
+ /** The allowed types of item sharing, enforced by account policy */
170
+ export declare enum AllowedType {
171
+ /** Allows creating share links with specific recipients */
172
+ Authenticated = "Authenticated",
173
+ /** Allows creating public share links */
174
+ Public = "Public"
175
+ }
176
+ /** The allowed recipient types of item sharing, enforced by account policy */
177
+ export declare enum AllowedRecipientType {
178
+ /** Recipients can be specified by email address */
179
+ Email = "Email",
180
+ /** Recipients can be specified by domain */
181
+ Domain = "Domain"
182
+ }
183
+ /**
184
+ * The account policy for sharing items, set by your account owner/admin
185
+ * This policy is enforced server-side when sharing items
186
+ */
187
+ export interface ItemShareAccountPolicy {
188
+ /** The maximum duration that an item can be shared for */
189
+ maxExpiry: ItemShareDuration;
190
+ /** The default duration that an item is shared for */
191
+ defaultExpiry: ItemShareDuration;
192
+ /** The maximum number of times an item can be viewed. A null value means unlimited views */
193
+ maxViews?: number;
194
+ /** The allowed types of item sharing - either "Authenticated" (share to specific users) or "Public" (share to anyone with a link) */
195
+ allowedTypes: AllowedType[];
196
+ /** The allowed recipient types of item sharing - either "Email" or "Domain" */
197
+ allowedRecipientTypes: AllowedRecipientType[];
198
+ }
199
+ /** The validated recipient of an item share */
200
+ export type ValidRecipient =
201
+ /** This exact email address */
202
+ {
203
+ type: "Email";
204
+ parameters: {
205
+ email: string;
206
+ };
207
+ }
208
+ /** Anyone with an email address from the specified domain */
209
+ | {
210
+ type: "Domain";
211
+ parameters: {
212
+ domain: string;
213
+ };
214
+ };
215
+ /**
216
+ * The configuration options for sharing an item
217
+ * These must respect the account policy on item sharing
218
+ */
219
+ export interface ItemShareParams {
220
+ /** Emails or domains of the item share recipients. If not provided, everyone with the share link will have access */
221
+ recipients?: ValidRecipient[];
222
+ /** The duration of the share in seconds. If not provided, defaults to the account policy's default expiry */
223
+ expireAfter?: ItemShareDuration;
224
+ /** Whether the item can only be viewed once per recipient */
225
+ oneTimeOnly: boolean;
226
+ }
150
227
  /** Additional attributes for OTP fields. */
151
228
  export interface OtpFieldDetails {
152
229
  /** The OTP code, if successfully computed */
package/dist/types.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  /*
3
- Generated by typeshare 1.12.0
3
+ Generated by typeshare 1.13.2
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.WordListType = exports.SeparatorType = exports.AutofillBehavior = exports.ItemFieldType = exports.ItemCategory = void 0;
6
+ 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";
@@ -40,6 +40,8 @@ var ItemFieldType;
40
40
  ItemFieldType["Phone"] = "Phone";
41
41
  ItemFieldType["Url"] = "Url";
42
42
  ItemFieldType["Totp"] = "Totp";
43
+ ItemFieldType["Email"] = "Email";
44
+ ItemFieldType["Reference"] = "Reference";
43
45
  ItemFieldType["Unsupported"] = "Unsupported";
44
46
  })(ItemFieldType || (exports.ItemFieldType = ItemFieldType = {}));
45
47
  /**
@@ -57,6 +59,36 @@ var AutofillBehavior;
57
59
  /** Never auto-fill on this website */
58
60
  AutofillBehavior["Never"] = "Never";
59
61
  })(AutofillBehavior || (exports.AutofillBehavior = AutofillBehavior = {}));
62
+ /** The valid duration options for sharing an item */
63
+ var ItemShareDuration;
64
+ (function (ItemShareDuration) {
65
+ /** The share will expire in one hour */
66
+ ItemShareDuration["OneHour"] = "OneHour";
67
+ /** The share will expire in one day */
68
+ ItemShareDuration["OneDay"] = "OneDay";
69
+ /** The share will expire in seven days */
70
+ ItemShareDuration["SevenDays"] = "SevenDays";
71
+ /** The share will expire in fourteen days */
72
+ ItemShareDuration["FourteenDays"] = "FourteenDays";
73
+ /** The share will expire in thirty days */
74
+ ItemShareDuration["ThirtyDays"] = "ThirtyDays";
75
+ })(ItemShareDuration || (exports.ItemShareDuration = ItemShareDuration = {}));
76
+ /** The allowed types of item sharing, enforced by account policy */
77
+ var AllowedType;
78
+ (function (AllowedType) {
79
+ /** Allows creating share links with specific recipients */
80
+ AllowedType["Authenticated"] = "Authenticated";
81
+ /** Allows creating public share links */
82
+ AllowedType["Public"] = "Public";
83
+ })(AllowedType || (exports.AllowedType = AllowedType = {}));
84
+ /** The allowed recipient types of item sharing, enforced by account policy */
85
+ var AllowedRecipientType;
86
+ (function (AllowedRecipientType) {
87
+ /** Recipients can be specified by email address */
88
+ AllowedRecipientType["Email"] = "Email";
89
+ /** Recipients can be specified by domain */
90
+ AllowedRecipientType["Domain"] = "Domain";
91
+ })(AllowedRecipientType || (exports.AllowedRecipientType = AllowedRecipientType = {}));
60
92
  var SeparatorType;
61
93
  (function (SeparatorType) {
62
94
  /**
package/dist/vaults.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { InnerClient } from "./core.js";
2
- import * as types from "./types.js";
3
2
  import { SdkIterable } from "./iterator.js";
3
+ import { VaultOverview } from "./types.js";
4
4
  /**
5
5
  * The Vaults API holds all the operations the SDK client can perform on 1Password vaults.
6
6
  */
@@ -8,7 +8,7 @@ export interface VaultsApi {
8
8
  /**
9
9
  * List all vaults
10
10
  */
11
- listAll(): Promise<SdkIterable<types.VaultOverview>>;
11
+ listAll(): Promise<SdkIterable<VaultOverview>>;
12
12
  }
13
13
  export declare class Vaults implements VaultsApi {
14
14
  #private;
@@ -16,5 +16,5 @@ export declare class Vaults implements VaultsApi {
16
16
  /**
17
17
  * List all vaults
18
18
  */
19
- listAll(): Promise<SdkIterable<types.VaultOverview>>;
19
+ listAll(): Promise<SdkIterable<VaultOverview>>;
20
20
  }
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "0.1.5";
2
- export declare const SDK_BUILD_NUMBER = "0010501";
1
+ export declare const SDK_VERSION = "0.1.7";
2
+ export declare const SDK_BUILD_NUMBER = "0010701";
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";
5
- exports.SDK_BUILD_NUMBER = "0010501";
6
- const SDK_CORE_VERSION = "0.1.5";
4
+ exports.SDK_VERSION = "0.1.7";
5
+ exports.SDK_BUILD_NUMBER = "0010701";
6
+ const SDK_CORE_VERSION = "0.1.7";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1password/sdk",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
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.5"
29
+ "@1password/sdk-core": "0.1.7"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@1password/eslint-config": "^4.0.0",