executor 1.3.0-beta.5 → 1.4.0-beta.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/bin/executor +53 -0
- package/package.json +6 -20
- package/postinstall.cjs +102 -0
- package/README.md +0 -395
- package/bin/deno-subprocess-worker.mjs +0 -205
- package/bin/emscripten-module.wasm +0 -0
- package/bin/executor.js +0 -42
- package/bin/executor.mjs +0 -367200
- package/bin/keyring.linux-x64-gnu-62qs1shy.node +0 -0
- package/bin/keyring.linux-x64-musl-n4e0vcy6.node +0 -0
- package/bin/sandbox-worker.mjs +0 -5850
- package/node_modules/@1password/sdk/README.md +0 -146
- package/node_modules/@1password/sdk/dist/client.d.ts +0 -14
- package/node_modules/@1password/sdk/dist/client.js +0 -19
- package/node_modules/@1password/sdk/dist/client_builder.d.ts +0 -8
- package/node_modules/@1password/sdk/dist/client_builder.js +0 -36
- package/node_modules/@1password/sdk/dist/configuration.d.ts +0 -23
- package/node_modules/@1password/sdk/dist/configuration.js +0 -58
- package/node_modules/@1password/sdk/dist/core.d.ts +0 -92
- package/node_modules/@1password/sdk/dist/core.js +0 -119
- package/node_modules/@1password/sdk/dist/environments.d.ts +0 -19
- package/node_modules/@1password/sdk/dist/environments.js +0 -53
- package/node_modules/@1password/sdk/dist/errors.d.ts +0 -9
- package/node_modules/@1password/sdk/dist/errors.js +0 -36
- package/node_modules/@1password/sdk/dist/groups.d.ts +0 -19
- package/node_modules/@1password/sdk/dist/groups.js +0 -54
- package/node_modules/@1password/sdk/dist/items.d.ts +0 -89
- package/node_modules/@1password/sdk/dist/items.js +0 -216
- package/node_modules/@1password/sdk/dist/items_files.d.ts +0 -40
- package/node_modules/@1password/sdk/dist/items_files.js +0 -116
- package/node_modules/@1password/sdk/dist/items_shares.d.ts +0 -32
- package/node_modules/@1password/sdk/dist/items_shares.js +0 -95
- package/node_modules/@1password/sdk/dist/sdk.d.ts +0 -14
- package/node_modules/@1password/sdk/dist/sdk.js +0 -45
- package/node_modules/@1password/sdk/dist/secrets.d.ts +0 -36
- package/node_modules/@1password/sdk/dist/secrets.js +0 -107
- package/node_modules/@1password/sdk/dist/shared_lib_core.d.ts +0 -16
- package/node_modules/@1password/sdk/dist/shared_lib_core.js +0 -177
- package/node_modules/@1password/sdk/dist/types.d.ts +0 -769
- package/node_modules/@1password/sdk/dist/types.js +0 -260
- package/node_modules/@1password/sdk/dist/vaults.d.ts +0 -83
- package/node_modules/@1password/sdk/dist/vaults.js +0 -209
- package/node_modules/@1password/sdk/dist/version.d.ts +0 -2
- package/node_modules/@1password/sdk/dist/version.js +0 -6
- package/node_modules/@1password/sdk/package.json +0 -47
- package/node_modules/@1password/sdk-core/nodejs/core.d.ts +0 -18
- package/node_modules/@1password/sdk-core/nodejs/core.js +0 -798
- package/node_modules/@1password/sdk-core/nodejs/core_bg.wasm +0 -0
- package/node_modules/@1password/sdk-core/nodejs/core_bg.wasm.d.ts +0 -20
- package/node_modules/@1password/sdk-core/package.json +0 -16
- package/resources/web/assets/c-BIGW1oBm.js +0 -1
- package/resources/web/assets/cpp-BRuaLJcg.js +0 -1
- package/resources/web/assets/csharp-COcwbKMJ.js +0 -1
- package/resources/web/assets/css-DPfMkruS.js +0 -1
- package/resources/web/assets/diff-D97Zzqfu.js +0 -1
- package/resources/web/assets/dockerfile-BcOcwvcX.js +0 -1
- package/resources/web/assets/go-CxLEBnE3.js +0 -1
- package/resources/web/assets/graphql-ChdNCCLP.js +0 -1
- package/resources/web/assets/highlighted-body-TPN3WLV5-46YyTVIj.js +0 -1
- package/resources/web/assets/html-GMplVEZG.js +0 -1
- package/resources/web/assets/http-jrhK8wxY.js +0 -1
- package/resources/web/assets/index-CRuElBS1.js +0 -1
- package/resources/web/assets/index-vE9OfFSV.js +0 -10
- package/resources/web/assets/java-CylS5w8V.js +0 -1
- package/resources/web/assets/javascript-wDzz0qaB.js +0 -1
- package/resources/web/assets/json-Cp-IABpG.js +0 -1
- package/resources/web/assets/jsonc-Des-eS-w.js +0 -1
- package/resources/web/assets/jsx-g9-lgVsj.js +0 -1
- package/resources/web/assets/kotlin-BdnUsdx6.js +0 -1
- package/resources/web/assets/log-2UxHyX5q.js +0 -1
- package/resources/web/assets/markdown-Cvjx9yec.js +0 -1
- package/resources/web/assets/mermaid-O7DHMXV3-C705YdCO.js +0 -394
- package/resources/web/assets/mermaid-O7DHMXV3-CQK1gbuD.css +0 -1
- package/resources/web/assets/php-Dhbhpdrm.js +0 -1
- package/resources/web/assets/proto-C7zT0LnQ.js +0 -1
- package/resources/web/assets/python-B6aJPvgy.js +0 -1
- package/resources/web/assets/ruby-xesJ3fNi.js +0 -1
- package/resources/web/assets/rust-B1yitclQ.js +0 -1
- package/resources/web/assets/shellscript-Yzrsuije.js +0 -1
- package/resources/web/assets/sql-BLtJtn59.js +0 -1
- package/resources/web/assets/swift-D82vCrfD.js +0 -1
- package/resources/web/assets/toml-vGWfd6FD.js +0 -1
- package/resources/web/assets/tsx-COt5Ahok.js +0 -1
- package/resources/web/assets/typescript-BPQ3VLAy.js +0 -1
- package/resources/web/assets/vitesse-dark-D0r3Knsf.js +0 -1
- package/resources/web/assets/xml-sdJ4AIDG.js +0 -1
- package/resources/web/assets/yaml-Buea-lGh.js +0 -1
- package/resources/web/index.html +0 -24
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
Generated by typeshare 1.13.2
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ReplacerFunc = exports.ReviverFunc = exports.UPDATE_ITEM_HISTORY = exports.UPDATE_ITEMS = exports.SEND_ITEMS = exports.REVEAL_ITEM_PASSWORD = exports.RECOVER_VAULT = exports.READ_ITEMS = exports.PRINT_ITEMS = exports.NO_ACCESS = exports.MANAGE_VAULT = exports.IMPORT_ITEMS = exports.EXPORT_ITEMS = exports.DELETE_ITEMS = exports.CREATE_ITEMS = exports.ARCHIVE_ITEMS = exports.WordListType = exports.SeparatorType = exports.VaultType = exports.AllowedRecipientType = exports.AllowedType = exports.ItemShareDuration = exports.ItemState = exports.AutofillBehavior = exports.ItemFieldType = exports.ItemCategory = exports.VaultAccessorType = exports.GroupState = exports.GroupType = void 0;
|
|
7
|
-
var GroupType;
|
|
8
|
-
(function (GroupType) {
|
|
9
|
-
/**
|
|
10
|
-
* The owners group, which gives the following permissions:
|
|
11
|
-
* - Do everything the Admin group can do
|
|
12
|
-
* - See every vault other than the personal vaults
|
|
13
|
-
* - Change people's names
|
|
14
|
-
* - See billing
|
|
15
|
-
* - Change billing
|
|
16
|
-
* - Make other people owners
|
|
17
|
-
* - Delete a person
|
|
18
|
-
*/
|
|
19
|
-
GroupType["Owners"] = "owners";
|
|
20
|
-
/**
|
|
21
|
-
* The administrators group, which gives the following permissions:
|
|
22
|
-
* - Perform recovery
|
|
23
|
-
* - Create new vaults
|
|
24
|
-
* - Invite new members
|
|
25
|
-
* - See vault metadata, including the vault name and who has access.
|
|
26
|
-
* - Make other people admins
|
|
27
|
-
*/
|
|
28
|
-
GroupType["Administrators"] = "administrators";
|
|
29
|
-
/**
|
|
30
|
-
* The recovery group. It contains recovery keysets, and is added to every vault to allow for recovery.
|
|
31
|
-
*
|
|
32
|
-
* No one is added to this.
|
|
33
|
-
*/
|
|
34
|
-
GroupType["Recovery"] = "recovery";
|
|
35
|
-
/**
|
|
36
|
-
* The external account managers group or EAM is a mandatory group for managed accounts that has
|
|
37
|
-
* same permissions as the owners.
|
|
38
|
-
*/
|
|
39
|
-
GroupType["ExternalAccountManagers"] = "externalAccountManagers";
|
|
40
|
-
/** Members of a team that a user is on. */
|
|
41
|
-
GroupType["TeamMembers"] = "teamMembers";
|
|
42
|
-
/** A custom, user defined group. */
|
|
43
|
-
GroupType["UserDefined"] = "userDefined";
|
|
44
|
-
/** Support for new or renamed group types */
|
|
45
|
-
GroupType["Unsupported"] = "unsupported";
|
|
46
|
-
})(GroupType || (exports.GroupType = GroupType = {}));
|
|
47
|
-
var GroupState;
|
|
48
|
-
(function (GroupState) {
|
|
49
|
-
/** This group is active */
|
|
50
|
-
GroupState["Active"] = "active";
|
|
51
|
-
/** This group has been deleted */
|
|
52
|
-
GroupState["Deleted"] = "deleted";
|
|
53
|
-
/** This group is in an unknown state */
|
|
54
|
-
GroupState["Unsupported"] = "unsupported";
|
|
55
|
-
})(GroupState || (exports.GroupState = GroupState = {}));
|
|
56
|
-
var VaultAccessorType;
|
|
57
|
-
(function (VaultAccessorType) {
|
|
58
|
-
VaultAccessorType["User"] = "user";
|
|
59
|
-
VaultAccessorType["Group"] = "group";
|
|
60
|
-
})(VaultAccessorType || (exports.VaultAccessorType = VaultAccessorType = {}));
|
|
61
|
-
var ItemCategory;
|
|
62
|
-
(function (ItemCategory) {
|
|
63
|
-
ItemCategory["Login"] = "Login";
|
|
64
|
-
ItemCategory["SecureNote"] = "SecureNote";
|
|
65
|
-
ItemCategory["CreditCard"] = "CreditCard";
|
|
66
|
-
ItemCategory["CryptoWallet"] = "CryptoWallet";
|
|
67
|
-
ItemCategory["Identity"] = "Identity";
|
|
68
|
-
ItemCategory["Password"] = "Password";
|
|
69
|
-
ItemCategory["Document"] = "Document";
|
|
70
|
-
ItemCategory["ApiCredentials"] = "ApiCredentials";
|
|
71
|
-
ItemCategory["BankAccount"] = "BankAccount";
|
|
72
|
-
ItemCategory["Database"] = "Database";
|
|
73
|
-
ItemCategory["DriverLicense"] = "DriverLicense";
|
|
74
|
-
ItemCategory["Email"] = "Email";
|
|
75
|
-
ItemCategory["MedicalRecord"] = "MedicalRecord";
|
|
76
|
-
ItemCategory["Membership"] = "Membership";
|
|
77
|
-
ItemCategory["OutdoorLicense"] = "OutdoorLicense";
|
|
78
|
-
ItemCategory["Passport"] = "Passport";
|
|
79
|
-
ItemCategory["Rewards"] = "Rewards";
|
|
80
|
-
ItemCategory["Router"] = "Router";
|
|
81
|
-
ItemCategory["Server"] = "Server";
|
|
82
|
-
ItemCategory["SshKey"] = "SshKey";
|
|
83
|
-
ItemCategory["SocialSecurityNumber"] = "SocialSecurityNumber";
|
|
84
|
-
ItemCategory["SoftwareLicense"] = "SoftwareLicense";
|
|
85
|
-
ItemCategory["Person"] = "Person";
|
|
86
|
-
ItemCategory["Unsupported"] = "Unsupported";
|
|
87
|
-
})(ItemCategory || (exports.ItemCategory = ItemCategory = {}));
|
|
88
|
-
var ItemFieldType;
|
|
89
|
-
(function (ItemFieldType) {
|
|
90
|
-
ItemFieldType["Text"] = "Text";
|
|
91
|
-
ItemFieldType["Concealed"] = "Concealed";
|
|
92
|
-
ItemFieldType["CreditCardType"] = "CreditCardType";
|
|
93
|
-
ItemFieldType["CreditCardNumber"] = "CreditCardNumber";
|
|
94
|
-
ItemFieldType["Phone"] = "Phone";
|
|
95
|
-
ItemFieldType["Url"] = "Url";
|
|
96
|
-
ItemFieldType["Totp"] = "Totp";
|
|
97
|
-
ItemFieldType["Email"] = "Email";
|
|
98
|
-
ItemFieldType["Reference"] = "Reference";
|
|
99
|
-
ItemFieldType["SshKey"] = "SshKey";
|
|
100
|
-
ItemFieldType["Menu"] = "Menu";
|
|
101
|
-
ItemFieldType["MonthYear"] = "MonthYear";
|
|
102
|
-
ItemFieldType["Address"] = "Address";
|
|
103
|
-
ItemFieldType["Date"] = "Date";
|
|
104
|
-
ItemFieldType["Unsupported"] = "Unsupported";
|
|
105
|
-
})(ItemFieldType || (exports.ItemFieldType = ItemFieldType = {}));
|
|
106
|
-
/**
|
|
107
|
-
* Controls the auto-fill behavior of a website.
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* For more information, visit <https://support.1password.com/autofill-behavior/>
|
|
111
|
-
*/
|
|
112
|
-
var AutofillBehavior;
|
|
113
|
-
(function (AutofillBehavior) {
|
|
114
|
-
/** Auto-fill any page that’s part of the website, including subdomains */
|
|
115
|
-
AutofillBehavior["AnywhereOnWebsite"] = "AnywhereOnWebsite";
|
|
116
|
-
/** Auto-fill only if the domain (hostname and port) is an exact match. */
|
|
117
|
-
AutofillBehavior["ExactDomain"] = "ExactDomain";
|
|
118
|
-
/** Never auto-fill on this website */
|
|
119
|
-
AutofillBehavior["Never"] = "Never";
|
|
120
|
-
})(AutofillBehavior || (exports.AutofillBehavior = AutofillBehavior = {}));
|
|
121
|
-
/** Represents the state of an item in the SDK. */
|
|
122
|
-
var ItemState;
|
|
123
|
-
(function (ItemState) {
|
|
124
|
-
/** The item is active */
|
|
125
|
-
ItemState["Active"] = "active";
|
|
126
|
-
/** The item is archived meaning it's hidden from regular view and stored in the archive. */
|
|
127
|
-
ItemState["Archived"] = "archived";
|
|
128
|
-
})(ItemState || (exports.ItemState = ItemState = {}));
|
|
129
|
-
/** The valid duration options for sharing an item */
|
|
130
|
-
var ItemShareDuration;
|
|
131
|
-
(function (ItemShareDuration) {
|
|
132
|
-
/** The share will expire in one hour */
|
|
133
|
-
ItemShareDuration["OneHour"] = "OneHour";
|
|
134
|
-
/** The share will expire in one day */
|
|
135
|
-
ItemShareDuration["OneDay"] = "OneDay";
|
|
136
|
-
/** The share will expire in seven days */
|
|
137
|
-
ItemShareDuration["SevenDays"] = "SevenDays";
|
|
138
|
-
/** The share will expire in fourteen days */
|
|
139
|
-
ItemShareDuration["FourteenDays"] = "FourteenDays";
|
|
140
|
-
/** The share will expire in thirty days */
|
|
141
|
-
ItemShareDuration["ThirtyDays"] = "ThirtyDays";
|
|
142
|
-
})(ItemShareDuration || (exports.ItemShareDuration = ItemShareDuration = {}));
|
|
143
|
-
/** The allowed types of item sharing, enforced by account policy */
|
|
144
|
-
var AllowedType;
|
|
145
|
-
(function (AllowedType) {
|
|
146
|
-
/** Allows creating share links with specific recipients */
|
|
147
|
-
AllowedType["Authenticated"] = "Authenticated";
|
|
148
|
-
/** Allows creating public share links */
|
|
149
|
-
AllowedType["Public"] = "Public";
|
|
150
|
-
})(AllowedType || (exports.AllowedType = AllowedType = {}));
|
|
151
|
-
/** The allowed recipient types of item sharing, enforced by account policy */
|
|
152
|
-
var AllowedRecipientType;
|
|
153
|
-
(function (AllowedRecipientType) {
|
|
154
|
-
/** Recipients can be specified by email address */
|
|
155
|
-
AllowedRecipientType["Email"] = "Email";
|
|
156
|
-
/** Recipients can be specified by domain */
|
|
157
|
-
AllowedRecipientType["Domain"] = "Domain";
|
|
158
|
-
})(AllowedRecipientType || (exports.AllowedRecipientType = AllowedRecipientType = {}));
|
|
159
|
-
/** Represents the vault type. */
|
|
160
|
-
var VaultType;
|
|
161
|
-
(function (VaultType) {
|
|
162
|
-
VaultType["Personal"] = "personal";
|
|
163
|
-
VaultType["Everyone"] = "everyone";
|
|
164
|
-
VaultType["Transfer"] = "transfer";
|
|
165
|
-
VaultType["UserCreated"] = "userCreated";
|
|
166
|
-
VaultType["Unsupported"] = "unsupported";
|
|
167
|
-
})(VaultType || (exports.VaultType = VaultType = {}));
|
|
168
|
-
var SeparatorType;
|
|
169
|
-
(function (SeparatorType) {
|
|
170
|
-
/**
|
|
171
|
-
* Randomly selected digits.
|
|
172
|
-
* E.g, "`correct4horse0battery1staple`"
|
|
173
|
-
*/
|
|
174
|
-
SeparatorType["Digits"] = "digits";
|
|
175
|
-
/**
|
|
176
|
-
* Randomly selected digits and symbols.
|
|
177
|
-
* This is useful to get word-based passwords to meet complexity requirements
|
|
178
|
-
* E.g, "`correct4horse-battery1staple`"
|
|
179
|
-
*/
|
|
180
|
-
SeparatorType["DigitsAndSymbols"] = "digitsAndSymbols";
|
|
181
|
-
/**
|
|
182
|
-
* Spaces, like the original Diceware.
|
|
183
|
-
* Great for mobile keyboards, not so great when people can overhear you type the password.
|
|
184
|
-
* E.g, "`correct horse battery staple`"
|
|
185
|
-
*/
|
|
186
|
-
SeparatorType["Spaces"] = "spaces";
|
|
187
|
-
/**
|
|
188
|
-
* Hyphens "`-`".
|
|
189
|
-
* E.g, "`correct-horse-battery-staple`"
|
|
190
|
-
*/
|
|
191
|
-
SeparatorType["Hyphens"] = "hyphens";
|
|
192
|
-
/**
|
|
193
|
-
* "`_`".
|
|
194
|
-
* E.g, "`correct_horse_battery_staple`"
|
|
195
|
-
*/
|
|
196
|
-
SeparatorType["Underscores"] = "underscores";
|
|
197
|
-
/**
|
|
198
|
-
* Period (full stop) "`.`".
|
|
199
|
-
* E.g, "`correct.horse.battery.staple`"
|
|
200
|
-
*/
|
|
201
|
-
SeparatorType["Periods"] = "periods";
|
|
202
|
-
/**
|
|
203
|
-
* Comma "`,`".
|
|
204
|
-
* E.g, "`correct,horse,battery,staple`"
|
|
205
|
-
*/
|
|
206
|
-
SeparatorType["Commas"] = "commas";
|
|
207
|
-
})(SeparatorType || (exports.SeparatorType = SeparatorType = {}));
|
|
208
|
-
var WordListType;
|
|
209
|
-
(function (WordListType) {
|
|
210
|
-
/** Agile wordlist */
|
|
211
|
-
WordListType["FullWords"] = "fullWords";
|
|
212
|
-
/** English-like syllables */
|
|
213
|
-
WordListType["Syllables"] = "syllables";
|
|
214
|
-
/** Three (random) letter "words" */
|
|
215
|
-
WordListType["ThreeLetters"] = "threeLetters";
|
|
216
|
-
})(WordListType || (exports.WordListType = WordListType = {}));
|
|
217
|
-
exports.ARCHIVE_ITEMS = 256;
|
|
218
|
-
exports.CREATE_ITEMS = 128;
|
|
219
|
-
exports.DELETE_ITEMS = 512;
|
|
220
|
-
exports.EXPORT_ITEMS = 4194304;
|
|
221
|
-
exports.IMPORT_ITEMS = 2097152;
|
|
222
|
-
exports.MANAGE_VAULT = 2;
|
|
223
|
-
exports.NO_ACCESS = 0;
|
|
224
|
-
exports.PRINT_ITEMS = 8388608;
|
|
225
|
-
exports.READ_ITEMS = 32;
|
|
226
|
-
exports.RECOVER_VAULT = 1;
|
|
227
|
-
exports.REVEAL_ITEM_PASSWORD = 16;
|
|
228
|
-
exports.SEND_ITEMS = 1048576;
|
|
229
|
-
exports.UPDATE_ITEMS = 64;
|
|
230
|
-
exports.UPDATE_ITEM_HISTORY = 1024;
|
|
231
|
-
/**
|
|
232
|
-
* Custom JSON reviver and replacer functions for dynamic data transformation
|
|
233
|
-
* ReviverFunc is used during JSON parsing to detect and transform specific data structures
|
|
234
|
-
* ReplacerFunc is used during JSON serialization to modify certain values before stringifying.
|
|
235
|
-
* These functions allow for flexible encoding and decoding of data, ensuring that complex types are properly handled when converting between TS objects and JSON
|
|
236
|
-
*/
|
|
237
|
-
const ReviverFunc = (key, value) => {
|
|
238
|
-
if (typeof value === "string" &&
|
|
239
|
-
/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/.test(value) &&
|
|
240
|
-
(key === "createdAt" || key === "updatedAt")) {
|
|
241
|
-
return new Date(value);
|
|
242
|
-
}
|
|
243
|
-
if (Array.isArray(value) &&
|
|
244
|
-
value.every((v) => Number.isInteger(v) && v >= 0 && v <= 255) &&
|
|
245
|
-
value.length > 0) {
|
|
246
|
-
return new Uint8Array(value);
|
|
247
|
-
}
|
|
248
|
-
return value;
|
|
249
|
-
};
|
|
250
|
-
exports.ReviverFunc = ReviverFunc;
|
|
251
|
-
const ReplacerFunc = (key, value) => {
|
|
252
|
-
if (value instanceof Date) {
|
|
253
|
-
return value.toISOString();
|
|
254
|
-
}
|
|
255
|
-
if (value instanceof Uint8Array) {
|
|
256
|
-
return Array.from(value);
|
|
257
|
-
}
|
|
258
|
-
return value;
|
|
259
|
-
};
|
|
260
|
-
exports.ReplacerFunc = ReplacerFunc;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { InnerClient } from "./core.js";
|
|
2
|
-
import { GroupAccess, GroupVaultAccess, Vault, VaultCreateParams, VaultGetParams, VaultListParams, VaultOverview, VaultUpdateParams } from "./types.js";
|
|
3
|
-
/**
|
|
4
|
-
* The Vaults API holds all the operations the SDK client can perform on 1Password vaults.
|
|
5
|
-
*/
|
|
6
|
-
export interface VaultsApi {
|
|
7
|
-
/**
|
|
8
|
-
* Create a new user vault.
|
|
9
|
-
*/
|
|
10
|
-
create(params: VaultCreateParams): Promise<Vault>;
|
|
11
|
-
/**
|
|
12
|
-
* List information about vaults that's configurable based on some input parameters.
|
|
13
|
-
*/
|
|
14
|
-
list(params?: VaultListParams): Promise<VaultOverview[]>;
|
|
15
|
-
/**
|
|
16
|
-
* Get an overview of a vault by its ID.
|
|
17
|
-
*/
|
|
18
|
-
getOverview(vaultId: string): Promise<VaultOverview>;
|
|
19
|
-
/**
|
|
20
|
-
* Get detailed vault information by vault ID and parameters.
|
|
21
|
-
*/
|
|
22
|
-
get(vaultId: string, vaultParams: VaultGetParams): Promise<Vault>;
|
|
23
|
-
/**
|
|
24
|
-
* Update a vault
|
|
25
|
-
*/
|
|
26
|
-
update(vaultId: string, params: VaultUpdateParams): Promise<Vault>;
|
|
27
|
-
/**
|
|
28
|
-
* Delete a vault by its ID.
|
|
29
|
-
*/
|
|
30
|
-
delete(vaultId: string): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Grant group permissions to a vault.
|
|
33
|
-
*/
|
|
34
|
-
grantGroupPermissions(vaultId: string, groupPermissionsList: GroupAccess[]): Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Update group permissions for vaults.
|
|
37
|
-
*/
|
|
38
|
-
updateGroupPermissions(groupPermissionsList: GroupVaultAccess[]): Promise<void>;
|
|
39
|
-
/**
|
|
40
|
-
* Revoke group permissions from a vault.
|
|
41
|
-
*/
|
|
42
|
-
revokeGroupPermissions(vaultId: string, groupId: string): Promise<void>;
|
|
43
|
-
}
|
|
44
|
-
export declare class Vaults implements VaultsApi {
|
|
45
|
-
#private;
|
|
46
|
-
constructor(inner: InnerClient);
|
|
47
|
-
/**
|
|
48
|
-
* Create a new user vault.
|
|
49
|
-
*/
|
|
50
|
-
create(params: VaultCreateParams): Promise<Vault>;
|
|
51
|
-
/**
|
|
52
|
-
* List information about vaults that's configurable based on some input parameters.
|
|
53
|
-
*/
|
|
54
|
-
list(params?: VaultListParams): Promise<VaultOverview[]>;
|
|
55
|
-
/**
|
|
56
|
-
* Get an overview of a vault by its ID.
|
|
57
|
-
*/
|
|
58
|
-
getOverview(vaultId: string): Promise<VaultOverview>;
|
|
59
|
-
/**
|
|
60
|
-
* Get detailed vault information by vault ID and parameters.
|
|
61
|
-
*/
|
|
62
|
-
get(vaultId: string, vaultParams: VaultGetParams): Promise<Vault>;
|
|
63
|
-
/**
|
|
64
|
-
* Update a vault
|
|
65
|
-
*/
|
|
66
|
-
update(vaultId: string, params: VaultUpdateParams): Promise<Vault>;
|
|
67
|
-
/**
|
|
68
|
-
* Delete a vault by its ID.
|
|
69
|
-
*/
|
|
70
|
-
delete(vaultId: string): Promise<void>;
|
|
71
|
-
/**
|
|
72
|
-
* Grant group permissions to a vault.
|
|
73
|
-
*/
|
|
74
|
-
grantGroupPermissions(vaultId: string, groupPermissionsList: GroupAccess[]): Promise<void>;
|
|
75
|
-
/**
|
|
76
|
-
* Update group permissions for vaults.
|
|
77
|
-
*/
|
|
78
|
-
updateGroupPermissions(groupPermissionsList: GroupVaultAccess[]): Promise<void>;
|
|
79
|
-
/**
|
|
80
|
-
* Revoke group permissions from a vault.
|
|
81
|
-
*/
|
|
82
|
-
revokeGroupPermissions(vaultId: string, groupId: string): Promise<void>;
|
|
83
|
-
}
|
|
@@ -1,209 +0,0 @@
|
|
|
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 types_js_1 = require("./types.js");
|
|
27
|
-
class Vaults {
|
|
28
|
-
constructor(inner) {
|
|
29
|
-
_Vaults_inner.set(this, void 0);
|
|
30
|
-
__classPrivateFieldSet(this, _Vaults_inner, inner, "f");
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Create a new user vault.
|
|
34
|
-
*/
|
|
35
|
-
create(params) {
|
|
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: "VaultsCreate",
|
|
42
|
-
parameters: {
|
|
43
|
-
params,
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
return JSON.parse(yield __classPrivateFieldGet(this, _Vaults_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* List information about vaults that's configurable based on some input parameters.
|
|
53
|
-
*/
|
|
54
|
-
list(params) {
|
|
55
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
const invocationConfig = {
|
|
57
|
-
invocation: {
|
|
58
|
-
clientId: __classPrivateFieldGet(this, _Vaults_inner, "f").id,
|
|
59
|
-
parameters: {
|
|
60
|
-
name: "VaultsList",
|
|
61
|
-
parameters: {
|
|
62
|
-
params,
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
return JSON.parse(yield __classPrivateFieldGet(this, _Vaults_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Get an overview of a vault by its ID.
|
|
72
|
-
*/
|
|
73
|
-
getOverview(vaultId) {
|
|
74
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
const invocationConfig = {
|
|
76
|
-
invocation: {
|
|
77
|
-
clientId: __classPrivateFieldGet(this, _Vaults_inner, "f").id,
|
|
78
|
-
parameters: {
|
|
79
|
-
name: "VaultsGetOverview",
|
|
80
|
-
parameters: {
|
|
81
|
-
vault_id: vaultId,
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
return JSON.parse(yield __classPrivateFieldGet(this, _Vaults_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Get detailed vault information by vault ID and parameters.
|
|
91
|
-
*/
|
|
92
|
-
get(vaultId, vaultParams) {
|
|
93
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
-
const invocationConfig = {
|
|
95
|
-
invocation: {
|
|
96
|
-
clientId: __classPrivateFieldGet(this, _Vaults_inner, "f").id,
|
|
97
|
-
parameters: {
|
|
98
|
-
name: "VaultsGet",
|
|
99
|
-
parameters: {
|
|
100
|
-
vault_id: vaultId,
|
|
101
|
-
vault_params: vaultParams,
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
return JSON.parse(yield __classPrivateFieldGet(this, _Vaults_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Update a vault
|
|
111
|
-
*/
|
|
112
|
-
update(vaultId, params) {
|
|
113
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
-
const invocationConfig = {
|
|
115
|
-
invocation: {
|
|
116
|
-
clientId: __classPrivateFieldGet(this, _Vaults_inner, "f").id,
|
|
117
|
-
parameters: {
|
|
118
|
-
name: "VaultsUpdate",
|
|
119
|
-
parameters: {
|
|
120
|
-
vault_id: vaultId,
|
|
121
|
-
params,
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
};
|
|
126
|
-
return JSON.parse(yield __classPrivateFieldGet(this, _Vaults_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Delete a vault by its ID.
|
|
131
|
-
*/
|
|
132
|
-
delete(vaultId) {
|
|
133
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
-
const invocationConfig = {
|
|
135
|
-
invocation: {
|
|
136
|
-
clientId: __classPrivateFieldGet(this, _Vaults_inner, "f").id,
|
|
137
|
-
parameters: {
|
|
138
|
-
name: "VaultsDelete",
|
|
139
|
-
parameters: {
|
|
140
|
-
vault_id: vaultId,
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
};
|
|
145
|
-
yield __classPrivateFieldGet(this, _Vaults_inner, "f").invoke(invocationConfig);
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Grant group permissions to a vault.
|
|
150
|
-
*/
|
|
151
|
-
grantGroupPermissions(vaultId, groupPermissionsList) {
|
|
152
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
-
const invocationConfig = {
|
|
154
|
-
invocation: {
|
|
155
|
-
clientId: __classPrivateFieldGet(this, _Vaults_inner, "f").id,
|
|
156
|
-
parameters: {
|
|
157
|
-
name: "VaultsGrantGroupPermissions",
|
|
158
|
-
parameters: {
|
|
159
|
-
vault_id: vaultId,
|
|
160
|
-
group_permissions_list: groupPermissionsList,
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
};
|
|
165
|
-
yield __classPrivateFieldGet(this, _Vaults_inner, "f").invoke(invocationConfig);
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Update group permissions for vaults.
|
|
170
|
-
*/
|
|
171
|
-
updateGroupPermissions(groupPermissionsList) {
|
|
172
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
-
const invocationConfig = {
|
|
174
|
-
invocation: {
|
|
175
|
-
clientId: __classPrivateFieldGet(this, _Vaults_inner, "f").id,
|
|
176
|
-
parameters: {
|
|
177
|
-
name: "VaultsUpdateGroupPermissions",
|
|
178
|
-
parameters: {
|
|
179
|
-
group_permissions_list: groupPermissionsList,
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
};
|
|
184
|
-
yield __classPrivateFieldGet(this, _Vaults_inner, "f").invoke(invocationConfig);
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Revoke group permissions from a vault.
|
|
189
|
-
*/
|
|
190
|
-
revokeGroupPermissions(vaultId, groupId) {
|
|
191
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
192
|
-
const invocationConfig = {
|
|
193
|
-
invocation: {
|
|
194
|
-
clientId: __classPrivateFieldGet(this, _Vaults_inner, "f").id,
|
|
195
|
-
parameters: {
|
|
196
|
-
name: "VaultsRevokeGroupPermissions",
|
|
197
|
-
parameters: {
|
|
198
|
-
vault_id: vaultId,
|
|
199
|
-
group_id: groupId,
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
|
-
},
|
|
203
|
-
};
|
|
204
|
-
yield __classPrivateFieldGet(this, _Vaults_inner, "f").invoke(invocationConfig);
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
exports.Vaults = Vaults;
|
|
209
|
-
_Vaults_inner = new WeakMap();
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@1password/sdk",
|
|
3
|
-
"version": "0.4.1-beta.1",
|
|
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
|
-
"scripts": {
|
|
6
|
-
"build": "tsc",
|
|
7
|
-
"test": "npm run build && jest",
|
|
8
|
-
"prettier": "prettier --check 'src/*.ts'",
|
|
9
|
-
"prettier-fix": "prettier --write 'src/*.ts'",
|
|
10
|
-
"eslint": "eslint -c .eslintrc.json 'src/*.ts'",
|
|
11
|
-
"prepare": "rm -rf ./dist && npm run build",
|
|
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
|
-
},
|
|
15
|
-
"author": "1Password",
|
|
16
|
-
"license": "MIT",
|
|
17
|
-
"files": [
|
|
18
|
-
"./dist"
|
|
19
|
-
],
|
|
20
|
-
"exports": {
|
|
21
|
-
".": {
|
|
22
|
-
"types": "./dist/sdk.d.ts",
|
|
23
|
-
"default": "./dist/sdk.js"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"main": "./dist/sdk.js",
|
|
27
|
-
"types": "./dist/sdk.d.ts",
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"@1password/sdk-core": "0.4.1-beta.1"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@1password/eslint-config": "^4.0.0",
|
|
33
|
-
"@1password/prettier-config": "^1.1.3",
|
|
34
|
-
"@babel/preset-env": "^7.23.8",
|
|
35
|
-
"@jest/globals": "^29.7.0",
|
|
36
|
-
"@types/jest": "^29.5.11",
|
|
37
|
-
"@types/node": "^20.11.0",
|
|
38
|
-
"babel-jest": "^29.7.0",
|
|
39
|
-
"eslint": "^8.54.0",
|
|
40
|
-
"jest": "^29.7.0",
|
|
41
|
-
"jest-environment-jsdom": "^29.6.2",
|
|
42
|
-
"prettier": "3.1.1",
|
|
43
|
-
"prettier-plugin-organize-imports": "^3.2.3",
|
|
44
|
-
"ts-jest": "^29.1.1",
|
|
45
|
-
"typescript": "^5.3.3"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Handles all asynchronous invocations to the SDK core received from the SDK.
|
|
5
|
-
*/
|
|
6
|
-
export function invoke(parameters: string): Promise<string>;
|
|
7
|
-
/**
|
|
8
|
-
* Initializes an SDK client with a given configuration.
|
|
9
|
-
*/
|
|
10
|
-
export function init_client(config: string): Promise<string>;
|
|
11
|
-
/**
|
|
12
|
-
* Drops a client, releasing the memory allocated for it.
|
|
13
|
-
*/
|
|
14
|
-
export function release_client(client_id: string): void;
|
|
15
|
-
/**
|
|
16
|
-
* Handles all synchronous invocations to the SDK core received from the SDK.
|
|
17
|
-
*/
|
|
18
|
-
export function invoke_sync(parameters: string): string;
|