executor 1.3.0-beta.5 → 1.4.0-beta.1

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.
Files changed (88) hide show
  1. package/bin/executor +24 -0
  2. package/package.json +6 -20
  3. package/postinstall.mjs +102 -0
  4. package/README.md +0 -395
  5. package/bin/deno-subprocess-worker.mjs +0 -205
  6. package/bin/emscripten-module.wasm +0 -0
  7. package/bin/executor.js +0 -42
  8. package/bin/executor.mjs +0 -367200
  9. package/bin/keyring.linux-x64-gnu-62qs1shy.node +0 -0
  10. package/bin/keyring.linux-x64-musl-n4e0vcy6.node +0 -0
  11. package/bin/sandbox-worker.mjs +0 -5850
  12. package/node_modules/@1password/sdk/README.md +0 -146
  13. package/node_modules/@1password/sdk/dist/client.d.ts +0 -14
  14. package/node_modules/@1password/sdk/dist/client.js +0 -19
  15. package/node_modules/@1password/sdk/dist/client_builder.d.ts +0 -8
  16. package/node_modules/@1password/sdk/dist/client_builder.js +0 -36
  17. package/node_modules/@1password/sdk/dist/configuration.d.ts +0 -23
  18. package/node_modules/@1password/sdk/dist/configuration.js +0 -58
  19. package/node_modules/@1password/sdk/dist/core.d.ts +0 -92
  20. package/node_modules/@1password/sdk/dist/core.js +0 -119
  21. package/node_modules/@1password/sdk/dist/environments.d.ts +0 -19
  22. package/node_modules/@1password/sdk/dist/environments.js +0 -53
  23. package/node_modules/@1password/sdk/dist/errors.d.ts +0 -9
  24. package/node_modules/@1password/sdk/dist/errors.js +0 -36
  25. package/node_modules/@1password/sdk/dist/groups.d.ts +0 -19
  26. package/node_modules/@1password/sdk/dist/groups.js +0 -54
  27. package/node_modules/@1password/sdk/dist/items.d.ts +0 -89
  28. package/node_modules/@1password/sdk/dist/items.js +0 -216
  29. package/node_modules/@1password/sdk/dist/items_files.d.ts +0 -40
  30. package/node_modules/@1password/sdk/dist/items_files.js +0 -116
  31. package/node_modules/@1password/sdk/dist/items_shares.d.ts +0 -32
  32. package/node_modules/@1password/sdk/dist/items_shares.js +0 -95
  33. package/node_modules/@1password/sdk/dist/sdk.d.ts +0 -14
  34. package/node_modules/@1password/sdk/dist/sdk.js +0 -45
  35. package/node_modules/@1password/sdk/dist/secrets.d.ts +0 -36
  36. package/node_modules/@1password/sdk/dist/secrets.js +0 -107
  37. package/node_modules/@1password/sdk/dist/shared_lib_core.d.ts +0 -16
  38. package/node_modules/@1password/sdk/dist/shared_lib_core.js +0 -177
  39. package/node_modules/@1password/sdk/dist/types.d.ts +0 -769
  40. package/node_modules/@1password/sdk/dist/types.js +0 -260
  41. package/node_modules/@1password/sdk/dist/vaults.d.ts +0 -83
  42. package/node_modules/@1password/sdk/dist/vaults.js +0 -209
  43. package/node_modules/@1password/sdk/dist/version.d.ts +0 -2
  44. package/node_modules/@1password/sdk/dist/version.js +0 -6
  45. package/node_modules/@1password/sdk/package.json +0 -47
  46. package/node_modules/@1password/sdk-core/nodejs/core.d.ts +0 -18
  47. package/node_modules/@1password/sdk-core/nodejs/core.js +0 -798
  48. package/node_modules/@1password/sdk-core/nodejs/core_bg.wasm +0 -0
  49. package/node_modules/@1password/sdk-core/nodejs/core_bg.wasm.d.ts +0 -20
  50. package/node_modules/@1password/sdk-core/package.json +0 -16
  51. package/resources/web/assets/c-BIGW1oBm.js +0 -1
  52. package/resources/web/assets/cpp-BRuaLJcg.js +0 -1
  53. package/resources/web/assets/csharp-COcwbKMJ.js +0 -1
  54. package/resources/web/assets/css-DPfMkruS.js +0 -1
  55. package/resources/web/assets/diff-D97Zzqfu.js +0 -1
  56. package/resources/web/assets/dockerfile-BcOcwvcX.js +0 -1
  57. package/resources/web/assets/go-CxLEBnE3.js +0 -1
  58. package/resources/web/assets/graphql-ChdNCCLP.js +0 -1
  59. package/resources/web/assets/highlighted-body-TPN3WLV5-46YyTVIj.js +0 -1
  60. package/resources/web/assets/html-GMplVEZG.js +0 -1
  61. package/resources/web/assets/http-jrhK8wxY.js +0 -1
  62. package/resources/web/assets/index-CRuElBS1.js +0 -1
  63. package/resources/web/assets/index-vE9OfFSV.js +0 -10
  64. package/resources/web/assets/java-CylS5w8V.js +0 -1
  65. package/resources/web/assets/javascript-wDzz0qaB.js +0 -1
  66. package/resources/web/assets/json-Cp-IABpG.js +0 -1
  67. package/resources/web/assets/jsonc-Des-eS-w.js +0 -1
  68. package/resources/web/assets/jsx-g9-lgVsj.js +0 -1
  69. package/resources/web/assets/kotlin-BdnUsdx6.js +0 -1
  70. package/resources/web/assets/log-2UxHyX5q.js +0 -1
  71. package/resources/web/assets/markdown-Cvjx9yec.js +0 -1
  72. package/resources/web/assets/mermaid-O7DHMXV3-C705YdCO.js +0 -394
  73. package/resources/web/assets/mermaid-O7DHMXV3-CQK1gbuD.css +0 -1
  74. package/resources/web/assets/php-Dhbhpdrm.js +0 -1
  75. package/resources/web/assets/proto-C7zT0LnQ.js +0 -1
  76. package/resources/web/assets/python-B6aJPvgy.js +0 -1
  77. package/resources/web/assets/ruby-xesJ3fNi.js +0 -1
  78. package/resources/web/assets/rust-B1yitclQ.js +0 -1
  79. package/resources/web/assets/shellscript-Yzrsuije.js +0 -1
  80. package/resources/web/assets/sql-BLtJtn59.js +0 -1
  81. package/resources/web/assets/swift-D82vCrfD.js +0 -1
  82. package/resources/web/assets/toml-vGWfd6FD.js +0 -1
  83. package/resources/web/assets/tsx-COt5Ahok.js +0 -1
  84. package/resources/web/assets/typescript-BPQ3VLAy.js +0 -1
  85. package/resources/web/assets/vitesse-dark-D0r3Knsf.js +0 -1
  86. package/resources/web/assets/xml-sdJ4AIDG.js +0 -1
  87. package/resources/web/assets/yaml-Buea-lGh.js +0 -1
  88. package/resources/web/index.html +0 -24
@@ -1,54 +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 _Groups_inner;
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.Groups = void 0;
26
- const types_js_1 = require("./types.js");
27
- class Groups {
28
- constructor(inner) {
29
- _Groups_inner.set(this, void 0);
30
- __classPrivateFieldSet(this, _Groups_inner, inner, "f");
31
- }
32
- /**
33
- * Get a group by its ID and parameters.
34
- */
35
- get(groupId, groupParams) {
36
- return __awaiter(this, void 0, void 0, function* () {
37
- const invocationConfig = {
38
- invocation: {
39
- clientId: __classPrivateFieldGet(this, _Groups_inner, "f").id,
40
- parameters: {
41
- name: "GroupsGet",
42
- parameters: {
43
- group_id: groupId,
44
- group_params: groupParams,
45
- },
46
- },
47
- },
48
- };
49
- return JSON.parse(yield __classPrivateFieldGet(this, _Groups_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
50
- });
51
- }
52
- }
53
- exports.Groups = Groups;
54
- _Groups_inner = new WeakMap();
@@ -1,89 +0,0 @@
1
- import { InnerClient } from "./core.js";
2
- import { Item, ItemCreateParams, ItemListFilter, ItemOverview, ItemsDeleteAllResponse, ItemsGetAllResponse, ItemsUpdateAllResponse } from "./types.js";
3
- import { ItemsSharesApi } from "./items_shares.js";
4
- import { ItemsFilesApi } from "./items_files.js";
5
- /**
6
- * The Items API holds all operations the SDK client can perform on 1Password items.
7
- */
8
- export interface ItemsApi {
9
- shares: ItemsSharesApi;
10
- files: ItemsFilesApi;
11
- /**
12
- * Create a new item.
13
- */
14
- create(params: ItemCreateParams): Promise<Item>;
15
- /**
16
- * Create items in batch, within a single vault.
17
- */
18
- createAll(vaultId: string, params: ItemCreateParams[]): Promise<ItemsUpdateAllResponse>;
19
- /**
20
- * Get an item by vault and item ID.
21
- */
22
- get(vaultId: string, itemId: string): Promise<Item>;
23
- /**
24
- * Get items by vault and their item IDs.
25
- */
26
- getAll(vaultId: string, itemIds: string[]): Promise<ItemsGetAllResponse>;
27
- /**
28
- * Update an existing item.
29
- */
30
- put(item: Item): Promise<Item>;
31
- /**
32
- * Delete an item.
33
- */
34
- delete(vaultId: string, itemId: string): Promise<void>;
35
- /**
36
- * Delete items in batch, within a single vault.
37
- */
38
- deleteAll(vaultId: string, itemIds: string[]): Promise<ItemsDeleteAllResponse>;
39
- /**
40
- * Archive an item.
41
- */
42
- archive(vaultId: string, itemId: string): Promise<void>;
43
- /**
44
- * List items based on filters.
45
- */
46
- list(vaultId: string, ...filters: ItemListFilter[]): Promise<ItemOverview[]>;
47
- }
48
- export declare class Items implements ItemsApi {
49
- #private;
50
- shares: ItemsSharesApi;
51
- files: ItemsFilesApi;
52
- constructor(inner: InnerClient);
53
- /**
54
- * Create a new item.
55
- */
56
- create(params: ItemCreateParams): Promise<Item>;
57
- /**
58
- * Create items in batch, within a single vault.
59
- */
60
- createAll(vaultId: string, params: ItemCreateParams[]): Promise<ItemsUpdateAllResponse>;
61
- /**
62
- * Get an item by vault and item ID.
63
- */
64
- get(vaultId: string, itemId: string): Promise<Item>;
65
- /**
66
- * Get items by vault and their item IDs.
67
- */
68
- getAll(vaultId: string, itemIds: string[]): Promise<ItemsGetAllResponse>;
69
- /**
70
- * Update an existing item.
71
- */
72
- put(item: Item): Promise<Item>;
73
- /**
74
- * Delete an item.
75
- */
76
- delete(vaultId: string, itemId: string): Promise<void>;
77
- /**
78
- * Delete items in batch, within a single vault.
79
- */
80
- deleteAll(vaultId: string, itemIds: string[]): Promise<ItemsDeleteAllResponse>;
81
- /**
82
- * Archive an item.
83
- */
84
- archive(vaultId: string, itemId: string): Promise<void>;
85
- /**
86
- * List items based on filters.
87
- */
88
- list(vaultId: string, ...filters: ItemListFilter[]): Promise<ItemOverview[]>;
89
- }
@@ -1,216 +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 _Items_inner;
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.Items = void 0;
26
- const types_js_1 = require("./types.js");
27
- const items_shares_js_1 = require("./items_shares.js");
28
- const items_files_js_1 = require("./items_files.js");
29
- class Items {
30
- constructor(inner) {
31
- _Items_inner.set(this, void 0);
32
- __classPrivateFieldSet(this, _Items_inner, inner, "f");
33
- this.shares = new items_shares_js_1.ItemsShares(inner);
34
- this.files = new items_files_js_1.ItemsFiles(inner);
35
- }
36
- /**
37
- * Create a new item.
38
- */
39
- create(params) {
40
- return __awaiter(this, void 0, void 0, function* () {
41
- const invocationConfig = {
42
- invocation: {
43
- clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
44
- parameters: {
45
- name: "ItemsCreate",
46
- parameters: {
47
- params,
48
- },
49
- },
50
- },
51
- };
52
- return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
53
- });
54
- }
55
- /**
56
- * Create items in batch, within a single vault.
57
- */
58
- createAll(vaultId, params) {
59
- return __awaiter(this, void 0, void 0, function* () {
60
- const invocationConfig = {
61
- invocation: {
62
- clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
63
- parameters: {
64
- name: "ItemsCreateAll",
65
- parameters: {
66
- vault_id: vaultId,
67
- params,
68
- },
69
- },
70
- },
71
- };
72
- return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
73
- });
74
- }
75
- /**
76
- * Get an item by vault and item ID.
77
- */
78
- get(vaultId, itemId) {
79
- return __awaiter(this, void 0, void 0, function* () {
80
- const invocationConfig = {
81
- invocation: {
82
- clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
83
- parameters: {
84
- name: "ItemsGet",
85
- parameters: {
86
- vault_id: vaultId,
87
- item_id: itemId,
88
- },
89
- },
90
- },
91
- };
92
- return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
93
- });
94
- }
95
- /**
96
- * Get items by vault and their item IDs.
97
- */
98
- getAll(vaultId, itemIds) {
99
- return __awaiter(this, void 0, void 0, function* () {
100
- const invocationConfig = {
101
- invocation: {
102
- clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
103
- parameters: {
104
- name: "ItemsGetAll",
105
- parameters: {
106
- vault_id: vaultId,
107
- item_ids: itemIds,
108
- },
109
- },
110
- },
111
- };
112
- return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
113
- });
114
- }
115
- /**
116
- * Update an existing item.
117
- */
118
- put(item) {
119
- return __awaiter(this, void 0, void 0, function* () {
120
- const invocationConfig = {
121
- invocation: {
122
- clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
123
- parameters: {
124
- name: "ItemsPut",
125
- parameters: {
126
- item,
127
- },
128
- },
129
- },
130
- };
131
- return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
132
- });
133
- }
134
- /**
135
- * Delete an item.
136
- */
137
- delete(vaultId, itemId) {
138
- return __awaiter(this, void 0, void 0, function* () {
139
- const invocationConfig = {
140
- invocation: {
141
- clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
142
- parameters: {
143
- name: "ItemsDelete",
144
- parameters: {
145
- vault_id: vaultId,
146
- item_id: itemId,
147
- },
148
- },
149
- },
150
- };
151
- yield __classPrivateFieldGet(this, _Items_inner, "f").invoke(invocationConfig);
152
- });
153
- }
154
- /**
155
- * Delete items in batch, within a single vault.
156
- */
157
- deleteAll(vaultId, itemIds) {
158
- return __awaiter(this, void 0, void 0, function* () {
159
- const invocationConfig = {
160
- invocation: {
161
- clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
162
- parameters: {
163
- name: "ItemsDeleteAll",
164
- parameters: {
165
- vault_id: vaultId,
166
- item_ids: itemIds,
167
- },
168
- },
169
- },
170
- };
171
- return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
172
- });
173
- }
174
- /**
175
- * Archive an item.
176
- */
177
- archive(vaultId, itemId) {
178
- return __awaiter(this, void 0, void 0, function* () {
179
- const invocationConfig = {
180
- invocation: {
181
- clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
182
- parameters: {
183
- name: "ItemsArchive",
184
- parameters: {
185
- vault_id: vaultId,
186
- item_id: itemId,
187
- },
188
- },
189
- },
190
- };
191
- yield __classPrivateFieldGet(this, _Items_inner, "f").invoke(invocationConfig);
192
- });
193
- }
194
- /**
195
- * List items based on filters.
196
- */
197
- list(vaultId, ...filters) {
198
- return __awaiter(this, void 0, void 0, function* () {
199
- const invocationConfig = {
200
- invocation: {
201
- clientId: __classPrivateFieldGet(this, _Items_inner, "f").id,
202
- parameters: {
203
- name: "ItemsList",
204
- parameters: {
205
- vault_id: vaultId,
206
- filters,
207
- },
208
- },
209
- },
210
- };
211
- return JSON.parse(yield __classPrivateFieldGet(this, _Items_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
212
- });
213
- }
214
- }
215
- exports.Items = Items;
216
- _Items_inner = new WeakMap();
@@ -1,40 +0,0 @@
1
- import { InnerClient } from "./core.js";
2
- import { DocumentCreateParams, FileAttributes, FileCreateParams, Item } from "./types.js";
3
- export interface ItemsFilesApi {
4
- /**
5
- * Attach files to Items.
6
- */
7
- attach(item: Item, fileParams: FileCreateParams): Promise<Item>;
8
- /**
9
- * Read file content from the Item.
10
- */
11
- read(vaultId: string, itemId: string, attr: FileAttributes): Promise<Uint8Array>;
12
- /**
13
- * Delete a field file from Item using the section and field IDs.
14
- */
15
- delete(item: Item, sectionId: string, fieldId: string): Promise<Item>;
16
- /**
17
- * Replace the document file within a document item.
18
- */
19
- replaceDocument(item: Item, docParams: DocumentCreateParams): Promise<Item>;
20
- }
21
- export declare class ItemsFiles implements ItemsFilesApi {
22
- #private;
23
- constructor(inner: InnerClient);
24
- /**
25
- * Attach files to Items.
26
- */
27
- attach(item: Item, fileParams: FileCreateParams): Promise<Item>;
28
- /**
29
- * Read file content from the Item.
30
- */
31
- read(vaultId: string, itemId: string, attr: FileAttributes): Promise<Uint8Array>;
32
- /**
33
- * Delete a field file from Item using the section and field IDs.
34
- */
35
- delete(item: Item, sectionId: string, fieldId: string): Promise<Item>;
36
- /**
37
- * Replace the document file within a document item.
38
- */
39
- replaceDocument(item: Item, docParams: DocumentCreateParams): Promise<Item>;
40
- }
@@ -1,116 +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 _ItemsFiles_inner;
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.ItemsFiles = void 0;
26
- const types_js_1 = require("./types.js");
27
- class ItemsFiles {
28
- constructor(inner) {
29
- _ItemsFiles_inner.set(this, void 0);
30
- __classPrivateFieldSet(this, _ItemsFiles_inner, inner, "f");
31
- }
32
- /**
33
- * Attach files to Items.
34
- */
35
- attach(item, fileParams) {
36
- return __awaiter(this, void 0, void 0, function* () {
37
- const invocationConfig = {
38
- invocation: {
39
- clientId: __classPrivateFieldGet(this, _ItemsFiles_inner, "f").id,
40
- parameters: {
41
- name: "ItemsFilesAttach",
42
- parameters: {
43
- item,
44
- file_params: fileParams,
45
- },
46
- },
47
- },
48
- };
49
- return JSON.parse(yield __classPrivateFieldGet(this, _ItemsFiles_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
50
- });
51
- }
52
- /**
53
- * Read file content from the Item.
54
- */
55
- read(vaultId, itemId, attr) {
56
- return __awaiter(this, void 0, void 0, function* () {
57
- const invocationConfig = {
58
- invocation: {
59
- clientId: __classPrivateFieldGet(this, _ItemsFiles_inner, "f").id,
60
- parameters: {
61
- name: "ItemsFilesRead",
62
- parameters: {
63
- vault_id: vaultId,
64
- item_id: itemId,
65
- attr,
66
- },
67
- },
68
- },
69
- };
70
- return JSON.parse(yield __classPrivateFieldGet(this, _ItemsFiles_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
71
- });
72
- }
73
- /**
74
- * Delete a field file from Item using the section and field IDs.
75
- */
76
- delete(item, sectionId, fieldId) {
77
- return __awaiter(this, void 0, void 0, function* () {
78
- const invocationConfig = {
79
- invocation: {
80
- clientId: __classPrivateFieldGet(this, _ItemsFiles_inner, "f").id,
81
- parameters: {
82
- name: "ItemsFilesDelete",
83
- parameters: {
84
- item,
85
- section_id: sectionId,
86
- field_id: fieldId,
87
- },
88
- },
89
- },
90
- };
91
- return JSON.parse(yield __classPrivateFieldGet(this, _ItemsFiles_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
92
- });
93
- }
94
- /**
95
- * Replace the document file within a document item.
96
- */
97
- replaceDocument(item, docParams) {
98
- return __awaiter(this, void 0, void 0, function* () {
99
- const invocationConfig = {
100
- invocation: {
101
- clientId: __classPrivateFieldGet(this, _ItemsFiles_inner, "f").id,
102
- parameters: {
103
- name: "ItemsFilesReplaceDocument",
104
- parameters: {
105
- item,
106
- doc_params: docParams,
107
- },
108
- },
109
- },
110
- };
111
- return JSON.parse(yield __classPrivateFieldGet(this, _ItemsFiles_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
112
- });
113
- }
114
- }
115
- exports.ItemsFiles = ItemsFiles;
116
- _ItemsFiles_inner = new WeakMap();
@@ -1,32 +0,0 @@
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
- }
@@ -1,95 +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 _ItemsShares_inner;
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.ItemsShares = void 0;
26
- const types_js_1 = require("./types.js");
27
- class ItemsShares {
28
- constructor(inner) {
29
- _ItemsShares_inner.set(this, void 0);
30
- __classPrivateFieldSet(this, _ItemsShares_inner, inner, "f");
31
- }
32
- /**
33
- * Get the item sharing policy of your account.
34
- */
35
- getAccountPolicy(vaultId, itemId) {
36
- return __awaiter(this, void 0, void 0, function* () {
37
- const invocationConfig = {
38
- invocation: {
39
- clientId: __classPrivateFieldGet(this, _ItemsShares_inner, "f").id,
40
- parameters: {
41
- name: "ItemsSharesGetAccountPolicy",
42
- parameters: {
43
- vault_id: vaultId,
44
- item_id: itemId,
45
- },
46
- },
47
- },
48
- };
49
- return JSON.parse(yield __classPrivateFieldGet(this, _ItemsShares_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
50
- });
51
- }
52
- /**
53
- * Validate the recipients of an item sharing link.
54
- */
55
- validateRecipients(policy, recipients) {
56
- return __awaiter(this, void 0, void 0, function* () {
57
- const invocationConfig = {
58
- invocation: {
59
- clientId: __classPrivateFieldGet(this, _ItemsShares_inner, "f").id,
60
- parameters: {
61
- name: "ItemsSharesValidateRecipients",
62
- parameters: {
63
- policy,
64
- recipients,
65
- },
66
- },
67
- },
68
- };
69
- return JSON.parse(yield __classPrivateFieldGet(this, _ItemsShares_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
70
- });
71
- }
72
- /**
73
- * Create a new item sharing link.
74
- */
75
- create(item, policy, params) {
76
- return __awaiter(this, void 0, void 0, function* () {
77
- const invocationConfig = {
78
- invocation: {
79
- clientId: __classPrivateFieldGet(this, _ItemsShares_inner, "f").id,
80
- parameters: {
81
- name: "ItemsSharesCreate",
82
- parameters: {
83
- item,
84
- policy,
85
- params,
86
- },
87
- },
88
- },
89
- };
90
- return JSON.parse(yield __classPrivateFieldGet(this, _ItemsShares_inner, "f").invoke(invocationConfig), types_js_1.ReviverFunc);
91
- });
92
- }
93
- }
94
- exports.ItemsShares = ItemsShares;
95
- _ItemsShares_inner = new WeakMap();
@@ -1,14 +0,0 @@
1
- import { ClientConfiguration } from "./configuration.js";
2
- import { Client } from "./client.js";
3
- export declare const DEFAULT_INTEGRATION_NAME = "Unknown";
4
- export declare const DEFAULT_INTEGRATION_VERSION = "Unknown";
5
- export { Secrets } from "./secrets.js";
6
- export { DesktopAuth } from "./configuration.js";
7
- export * from "./client.js";
8
- export * from "./errors.js";
9
- export * from "./types.js";
10
- /**
11
- * Creates a default 1Password SDK client.
12
- * @returns The authenticated 1Password SDK client.
13
- */
14
- export declare const createClient: (config: ClientConfiguration) => Promise<Client>;