@1password/sdk 0.2.0 → 0.3.0

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
@@ -86,7 +86,7 @@ Operations:
86
86
  - [x] [Delete items](https://developer.1password.com/docs/sdks/manage-items#delete-an-item)
87
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](https://developer.1password.com/docs/sdks/share-items) (items with files cannot be shared)
89
+ - [x] [Share items](https://developer.1password.com/docs/sdks/share-items)
90
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:
@@ -104,8 +104,8 @@ Field types:
104
104
  - [x] Credit card numbers
105
105
  - [x] Emails
106
106
  - [x] References to other items
107
- - [ ] Address
108
- - [ ] Date
107
+ - [x] Address
108
+ - [x] Date
109
109
  - [x] MM/YY
110
110
  - [x] Files attachments and Document items
111
111
  - [x] Menu
@@ -1,6 +1,6 @@
1
1
  import { ClientAuthConfig } from "./core.js";
2
2
  export declare const LANGUAGE = "JS";
3
- export declare const VERSION = "0020001";
3
+ export declare const VERSION = "0030001";
4
4
  export interface ClientConfiguration {
5
5
  auth: Auth;
6
6
  integrationName: string;
@@ -13,10 +13,11 @@ exports.VERSION = version_js_1.SDK_BUILD_NUMBER;
13
13
  * @returns The client configuration to instantiate the client with.
14
14
  */
15
15
  const clientAuthConfig = (userConfig) => {
16
+ var _a;
16
17
  // TODO: Add logic for computing the correct sanitized version value for each platform
17
18
  const defaultOsVersion = "0.0.0";
18
19
  return {
19
- serviceAccountToken: userConfig.auth,
20
+ serviceAccountToken: (_a = userConfig.auth) !== null && _a !== void 0 ? _a : "",
20
21
  programmingLanguage: exports.LANGUAGE,
21
22
  sdkVersion: exports.VERSION,
22
23
  integrationName: userConfig.integrationName,
package/dist/items.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { InnerClient } from "./core.js";
2
- import { SdkIterable } from "./iterator.js";
3
- import { Item, ItemCreateParams, ItemOverview } from "./types.js";
2
+ import { Item, ItemCreateParams, ItemListFilter, ItemOverview } from "./types.js";
4
3
  import { ItemsSharesApi } from "./items_shares.js";
5
4
  import { ItemsFilesApi } from "./items_files.js";
6
5
  /**
@@ -30,9 +29,9 @@ export interface ItemsApi {
30
29
  */
31
30
  archive(vaultId: string, itemId: string): any;
32
31
  /**
33
- * List all items
32
+ * List items based on filters.
34
33
  */
35
- listAll(vaultId: string): Promise<SdkIterable<ItemOverview>>;
34
+ list(vaultId: string, ...filters: ItemListFilter[]): Promise<ItemOverview[]>;
36
35
  }
37
36
  export declare class Items implements ItemsApi {
38
37
  #private;
@@ -60,7 +59,7 @@ export declare class Items implements ItemsApi {
60
59
  */
61
60
  archive(vaultId: string, itemId: string): Promise<void>;
62
61
  /**
63
- * List all items
62
+ * List items based on filters.
64
63
  */
65
- listAll(vaultId: string): Promise<SdkIterable<ItemOverview>>;
64
+ list(vaultId: string, ...filters: ItemListFilter[]): Promise<ItemOverview[]>;
66
65
  }
package/dist/items.js CHANGED
@@ -23,7 +23,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
23
23
  var _Items_inner;
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.Items = void 0;
26
- const iterator_js_1 = require("./iterator.js");
27
26
  const types_js_1 = require("./types.js");
28
27
  const items_shares_js_1 = require("./items_shares.js");
29
28
  const items_files_js_1 = require("./items_files.js");
@@ -133,22 +132,23 @@ class Items {
133
132
  });
134
133
  }
135
134
  /**
136
- * List all items
135
+ * List items based on filters.
137
136
  */
138
- listAll(vaultId) {
137
+ list(vaultId, ...filters) {
139
138
  return __awaiter(this, void 0, void 0, function* () {
140
139
  const invocationConfig = {
141
140
  invocation: {
142
141
  clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
143
142
  parameters: {
144
- name: "ItemsListAll",
143
+ name: "ItemsList",
145
144
  parameters: {
146
145
  vault_id: vaultId,
146
+ filters,
147
147
  },
148
148
  },
149
149
  },
150
150
  };
151
- return new iterator_js_1.SdkIterable(JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc));
151
+ return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc);
152
152
  });
153
153
  }
154
154
  }
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
@@ -49,6 +49,25 @@ class Secrets {
49
49
  return JSON.parse(yield __classPrivateFieldGet(this, _Secrets_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc);
50
50
  });
51
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);
69
+ });
70
+ }
52
71
  /**
53
72
  * Validate the secret reference to ensure there are no syntax errors.
54
73
  */
package/dist/types.d.ts CHANGED
@@ -1,7 +1,21 @@
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
+ }
1
15
  export interface DocumentCreateParams {
2
- /** the name of the file */
16
+ /** The name of the file */
3
17
  name: string;
4
- /** the content of the file */
18
+ /** The content of the file */
5
19
  content: Uint8Array;
6
20
  }
7
21
  export interface FileAttributes {
@@ -13,13 +27,13 @@ export interface FileAttributes {
13
27
  size: number;
14
28
  }
15
29
  export interface FileCreateParams {
16
- /** the name of the file */
30
+ /** The name of the file */
17
31
  name: string;
18
- /** the content of the file */
32
+ /** The content of the file */
19
33
  content: Uint8Array;
20
- /** the section id where the file should be stored */
34
+ /** The section id where the file should be stored */
21
35
  sectionId: string;
22
- /** the field id where the file should be stored */
36
+ /** The field id where the file should be stored */
23
37
  fieldId: string;
24
38
  }
25
39
  /**
@@ -69,6 +83,8 @@ export declare enum ItemFieldType {
69
83
  SshKey = "SshKey",
70
84
  Menu = "Menu",
71
85
  MonthYear = "MonthYear",
86
+ Address = "Address",
87
+ Date = "Date",
72
88
  Unsupported = "Unsupported"
73
89
  }
74
90
  /** Field type-specific attributes. */
@@ -82,6 +98,11 @@ export type ItemFieldDetails =
82
98
  | {
83
99
  type: "SshKey";
84
100
  content?: SshKeyAttributes;
101
+ }
102
+ /** Address components */
103
+ | {
104
+ type: "Address";
105
+ content?: AddressFieldDetails;
85
106
  };
86
107
  /** Represents a field within an item. */
87
108
  export interface ItemField {
@@ -139,7 +160,7 @@ export interface ItemFile {
139
160
  /** the field id where the file should be stored */
140
161
  fieldId: string;
141
162
  }
142
- /** Represents a 1Password item. */
163
+ /** Represents an active 1Password item. */
143
164
  export interface Item {
144
165
  /** The item's ID */
145
166
  id: string;
@@ -165,6 +186,10 @@ export interface Item {
165
186
  files: ItemFile[];
166
187
  /** The document file for the Document item category */
167
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;
168
193
  }
169
194
  export interface ItemCreateParams {
170
195
  /** The item's category */
@@ -185,10 +210,17 @@ export interface ItemCreateParams {
185
210
  websites?: Website[];
186
211
  /** The item's files stored as fields */
187
212
  files?: FileCreateParams[];
188
- /** The document file for the Document item category */
213
+ /** The document file for the Document item type. Empty when the item isn't of Document type. */
189
214
  document?: DocumentCreateParams;
190
215
  }
191
- /** Represents a decrypted 1Password item. */
216
+ /** Represents the state of an item in the SDK. */
217
+ export declare enum ItemState {
218
+ /** The item is active */
219
+ Active = "active",
220
+ /** The item is archived meaning it's hidden from regular view and stored in the archive. */
221
+ Archived = "archived"
222
+ }
223
+ /** Represents a decrypted 1Password item overview. */
192
224
  export interface ItemOverview {
193
225
  /** The item's ID */
194
226
  id: string;
@@ -200,6 +232,14 @@ export interface ItemOverview {
200
232
  vaultId: string;
201
233
  /** The websites used for autofilling for items of the Login and Password categories. */
202
234
  websites: Website[];
235
+ /** The item tags */
236
+ tags: string[];
237
+ /** The time the item was created at */
238
+ createdAt: Date;
239
+ /** The time the item was updated at */
240
+ updatedAt: Date;
241
+ /** Indicates the state of the item */
242
+ state: ItemState;
203
243
  }
204
244
  /** The valid duration options for sharing an item */
205
245
  export declare enum ItemShareDuration {
@@ -228,6 +268,23 @@ export declare enum AllowedRecipientType {
228
268
  /** Recipients can be specified by domain */
229
269
  Domain = "Domain"
230
270
  }
271
+ /** The file sharing policy */
272
+ export interface ItemShareFiles {
273
+ /** Whether files can be included in item shares */
274
+ allowed: boolean;
275
+ /** The maximum encrypted size (in bytes) an included file can be */
276
+ maxSize: number;
277
+ /** The allowed types of item sharing - either "Authenticated" (share to specific users) or "Public" (share to anyone with a link) */
278
+ allowedTypes?: AllowedType[];
279
+ /** The allowed recipient types of item sharing - either "Email" or "Domain" */
280
+ allowedRecipientTypes?: AllowedRecipientType[];
281
+ /** The maximum duration that an item can be shared for */
282
+ maxExpiry?: ItemShareDuration;
283
+ /** The default duration that an item is shared for */
284
+ defaultExpiry?: ItemShareDuration;
285
+ /** The maximum number of times an item can be viewed. A null value means unlimited views */
286
+ maxViews?: number;
287
+ }
231
288
  /**
232
289
  * The account policy for sharing items, set by your account owner/admin
233
290
  * This policy is enforced server-side when sharing items
@@ -243,6 +300,8 @@ export interface ItemShareAccountPolicy {
243
300
  allowedTypes: AllowedType[];
244
301
  /** The allowed recipient types of item sharing - either "Email" or "Domain" */
245
302
  allowedRecipientTypes: AllowedRecipientType[];
303
+ /** The file sharing policy */
304
+ files: ItemShareFiles;
246
305
  }
247
306
  /** The validated recipient of an item share */
248
307
  export type ValidRecipient =
@@ -279,6 +338,99 @@ export interface OtpFieldDetails {
279
338
  /** The error message, if the OTP code could not be computed */
280
339
  errorMessage?: string;
281
340
  }
341
+ export interface Response<T, E> {
342
+ content?: T;
343
+ error?: E;
344
+ }
345
+ export interface ResolvedReference {
346
+ secret: string;
347
+ itemId: string;
348
+ vaultId: string;
349
+ }
350
+ export type ResolveReferenceError =
351
+ /** Error parsing the secret reference */
352
+ {
353
+ type: "parsing";
354
+ message: ErrorMessage;
355
+ }
356
+ /** The specified reference cannot be found within the item */
357
+ | {
358
+ type: "fieldNotFound";
359
+ message?: undefined;
360
+ }
361
+ /** No vault matched the secret reference query */
362
+ | {
363
+ type: "vaultNotFound";
364
+ message?: undefined;
365
+ }
366
+ /** More than one vault matched the secret reference query */
367
+ | {
368
+ type: "tooManyVaults";
369
+ message?: undefined;
370
+ }
371
+ /** No item matched the secret reference query */
372
+ | {
373
+ type: "itemNotFound";
374
+ message?: undefined;
375
+ }
376
+ /** More than one item matched the secret reference query */
377
+ | {
378
+ type: "tooManyItems";
379
+ message?: undefined;
380
+ }
381
+ /** More than one field matched the provided secret reference */
382
+ | {
383
+ type: "tooManyMatchingFields";
384
+ message?: undefined;
385
+ }
386
+ /** No section found within the item for the provided identifier */
387
+ | {
388
+ type: "noMatchingSections";
389
+ message?: undefined;
390
+ }
391
+ /** Incompatiable TOTP query parameters */
392
+ | {
393
+ type: "incompatibleTOTPQueryParameterField";
394
+ message?: undefined;
395
+ }
396
+ /** The totp was not able to be generated */
397
+ | {
398
+ type: "unableToGenerateTotpCode";
399
+ message: ErrorMessage;
400
+ }
401
+ /** Couldn't find attributes specific to an SSH Key field */
402
+ | {
403
+ type: "sSHKeyMetadataNotFound";
404
+ message?: undefined;
405
+ }
406
+ /** Currently only support text files */
407
+ | {
408
+ type: "unsupportedFileFormat";
409
+ message?: undefined;
410
+ }
411
+ /** Trying to convert a non-private key to a private key format */
412
+ | {
413
+ type: "incompatibleSshKeyQueryParameterField";
414
+ message?: undefined;
415
+ }
416
+ /** Unable to properly parse a private key string to convert to an internal Private Key type */
417
+ | {
418
+ type: "unableToParsePrivateKey";
419
+ message?: undefined;
420
+ }
421
+ /** Unable to format a private key to OpenSSH format */
422
+ | {
423
+ type: "unableToFormatPrivateKeyToOpenSsh";
424
+ message?: undefined;
425
+ }
426
+ /** Other type */
427
+ | {
428
+ type: "other";
429
+ message?: undefined;
430
+ };
431
+ export interface ResolveAllResponse {
432
+ individualResponses: Record<string, Response<ResolvedReference, ResolveReferenceError>>;
433
+ }
282
434
  export interface SshKeyAttributes {
283
435
  /** The public part of the SSH Key */
284
436
  publicKey: string;
@@ -294,6 +446,13 @@ export interface VaultOverview {
294
446
  /** The vault's title */
295
447
  title: string;
296
448
  }
449
+ export type ItemListFilter = {
450
+ type: "ByState";
451
+ content: {
452
+ active: boolean;
453
+ archived: boolean;
454
+ };
455
+ };
297
456
  export type PasswordRecipe = {
298
457
  type: "Memorable";
299
458
  parameters: {
@@ -370,5 +529,11 @@ export declare enum WordListType {
370
529
  /** Three (random) letter "words" */
371
530
  ThreeLetters = "threeLetters"
372
531
  }
532
+ /**
533
+ * Custom JSON reviver and replacer functions for dynamic data transformation
534
+ * ReviverFunc is used during JSON parsing to detect and transform specific data structures
535
+ * ReplacerFunc is used during JSON serialization to modify certain values before stringifying.
536
+ * These functions allow for flexible encoding and decoding of data, ensuring that complex types are properly handled when converting between TS objects and JSON
537
+ */
373
538
  export declare const ReviverFunc: (key: string, value: unknown) => unknown;
374
539
  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.ReplacerFunc = exports.ReviverFunc = 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.ItemState = exports.AutofillBehavior = exports.ItemFieldType = exports.ItemCategory = void 0;
7
7
  var ItemCategory;
8
8
  (function (ItemCategory) {
9
9
  ItemCategory["Login"] = "Login";
@@ -45,6 +45,8 @@ var ItemFieldType;
45
45
  ItemFieldType["SshKey"] = "SshKey";
46
46
  ItemFieldType["Menu"] = "Menu";
47
47
  ItemFieldType["MonthYear"] = "MonthYear";
48
+ ItemFieldType["Address"] = "Address";
49
+ ItemFieldType["Date"] = "Date";
48
50
  ItemFieldType["Unsupported"] = "Unsupported";
49
51
  })(ItemFieldType || (exports.ItemFieldType = ItemFieldType = {}));
50
52
  /**
@@ -62,6 +64,14 @@ var AutofillBehavior;
62
64
  /** Never auto-fill on this website */
63
65
  AutofillBehavior["Never"] = "Never";
64
66
  })(AutofillBehavior || (exports.AutofillBehavior = AutofillBehavior = {}));
67
+ /** Represents the state of an item in the SDK. */
68
+ var ItemState;
69
+ (function (ItemState) {
70
+ /** The item is active */
71
+ ItemState["Active"] = "active";
72
+ /** The item is archived meaning it's hidden from regular view and stored in the archive. */
73
+ ItemState["Archived"] = "archived";
74
+ })(ItemState || (exports.ItemState = ItemState = {}));
65
75
  /** The valid duration options for sharing an item */
66
76
  var ItemShareDuration;
67
77
  (function (ItemShareDuration) {
@@ -141,7 +151,18 @@ var WordListType;
141
151
  /** Three (random) letter "words" */
142
152
  WordListType["ThreeLetters"] = "threeLetters";
143
153
  })(WordListType || (exports.WordListType = WordListType = {}));
154
+ /**
155
+ * Custom JSON reviver and replacer functions for dynamic data transformation
156
+ * ReviverFunc is used during JSON parsing to detect and transform specific data structures
157
+ * ReplacerFunc is used during JSON serialization to modify certain values before stringifying.
158
+ * These functions allow for flexible encoding and decoding of data, ensuring that complex types are properly handled when converting between TS objects and JSON
159
+ */
144
160
  const ReviverFunc = (key, value) => {
161
+ if (typeof value === "string" &&
162
+ /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/.test(value) &&
163
+ (key === "createdAt" || key === "updatedAt")) {
164
+ return new Date(value);
165
+ }
145
166
  if (Array.isArray(value) &&
146
167
  value.every((v) => Number.isInteger(v) && v >= 0 && v <= 255) &&
147
168
  value.length > 0) {
@@ -151,6 +172,9 @@ const ReviverFunc = (key, value) => {
151
172
  };
152
173
  exports.ReviverFunc = ReviverFunc;
153
174
  const ReplacerFunc = (key, value) => {
175
+ if (value instanceof Date) {
176
+ return value.toISOString();
177
+ }
154
178
  if (value instanceof Uint8Array) {
155
179
  return Array.from(value);
156
180
  }
package/dist/vaults.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { InnerClient } from "./core.js";
2
- import { SdkIterable } from "./iterator.js";
3
2
  import { VaultOverview } from "./types.js";
4
3
  /**
5
4
  * The Vaults API holds all the operations the SDK client can perform on 1Password vaults.
@@ -8,7 +7,7 @@ export interface VaultsApi {
8
7
  /**
9
8
  * List all vaults
10
9
  */
11
- listAll(): Promise<SdkIterable<VaultOverview>>;
10
+ list(): Promise<VaultOverview[]>;
12
11
  }
13
12
  export declare class Vaults implements VaultsApi {
14
13
  #private;
@@ -16,5 +15,5 @@ export declare class Vaults implements VaultsApi {
16
15
  /**
17
16
  * List all vaults
18
17
  */
19
- listAll(): Promise<SdkIterable<VaultOverview>>;
18
+ list(): Promise<VaultOverview[]>;
20
19
  }
package/dist/vaults.js CHANGED
@@ -23,7 +23,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
23
23
  var _Vaults_inner;
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.Vaults = void 0;
26
- const iterator_js_1 = require("./iterator.js");
27
26
  const types_js_1 = require("./types.js");
28
27
  class Vaults {
29
28
  constructor(inner) {
@@ -33,18 +32,18 @@ class Vaults {
33
32
  /**
34
33
  * List all vaults
35
34
  */
36
- listAll() {
35
+ list() {
37
36
  return __awaiter(this, void 0, void 0, function* () {
38
37
  const invocationConfig = {
39
38
  invocation: {
40
39
  clientId: __classPrivateFieldGet(this, _Vaults_inner, "f").id,
41
40
  parameters: {
42
- name: "VaultsListAll",
41
+ name: "VaultsList",
43
42
  parameters: {},
44
43
  },
45
44
  },
46
45
  };
47
- return new iterator_js_1.SdkIterable(JSON.parse(yield __classPrivateFieldGet(this, _Vaults_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc));
46
+ return JSON.parse(yield __classPrivateFieldGet(this, _Vaults_inner, "f").core.invoke(invocationConfig), types_js_1.ReviverFunc);
48
47
  });
49
48
  }
50
49
  }
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "0.2.0";
2
- export declare const SDK_BUILD_NUMBER = "0020001";
1
+ export declare const SDK_VERSION = "0.3.0";
2
+ export declare const SDK_BUILD_NUMBER = "0030001";
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.2.0";
5
- exports.SDK_BUILD_NUMBER = "0020001";
6
- const SDK_CORE_VERSION = "0.2.0";
4
+ exports.SDK_VERSION = "0.3.0";
5
+ exports.SDK_BUILD_NUMBER = "0030001";
6
+ const SDK_CORE_VERSION = "0.3.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1password/sdk",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
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.2.0"
29
+ "@1password/sdk-core": "0.3.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@1password/eslint-config": "^4.0.0",
@@ -1,6 +0,0 @@
1
- export declare class SdkIterable<T> implements AsyncIterable<T> {
2
- private readonly elements;
3
- constructor(elements: T[]);
4
- [Symbol.asyncIterator](): AsyncIterator<T>;
5
- private asyncIterator;
6
- }
package/dist/iterator.js DELETED
@@ -1,33 +0,0 @@
1
- "use strict";
2
- // Code generated by op-codegen - DO NOT EDIT MANUALLY
3
- var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
4
- var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
5
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
6
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
7
- return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
8
- function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
9
- 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]); } }
10
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
11
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
12
- function fulfill(value) { resume("next", value); }
13
- function reject(value) { resume("throw", value); }
14
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.SdkIterable = void 0;
18
- class SdkIterable {
19
- constructor(elements) {
20
- this.elements = elements;
21
- }
22
- [Symbol.asyncIterator]() {
23
- return this.asyncIterator();
24
- }
25
- asyncIterator() {
26
- return __asyncGenerator(this, arguments, function* asyncIterator_1() {
27
- for (const element of this.elements) {
28
- yield yield __await(yield __await(Promise.resolve(element)));
29
- }
30
- });
31
- }
32
- }
33
- exports.SdkIterable = SdkIterable;