@opengeni/vaults-protonpass 0.0.0-stage → 3.2.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.
@@ -0,0 +1,545 @@
1
+ import { z } from "zod";
2
+ declare const ShareRole: z.ZodUnion<readonly [z.ZodEnum<{
3
+ Editor: "Editor";
4
+ Manager: "Manager";
5
+ Owner: "Owner";
6
+ Viewer: "Viewer";
7
+ }>, z.ZodObject<{
8
+ Custom: z.ZodObject<{
9
+ name: z.ZodOptional<z.ZodString>;
10
+ permission: z.ZodNumber;
11
+ }, z.core.$strip>;
12
+ }, z.core.$strip>]>;
13
+ export type ShareRole = z.infer<typeof ShareRole>;
14
+ /** `share list --only-vaults=true --output json` */
15
+ export declare const ShareListOutput: z.ZodObject<{
16
+ shares: z.ZodArray<z.ZodObject<{
17
+ id: z.ZodString;
18
+ name: z.ZodString;
19
+ share_type: z.ZodString;
20
+ share_role: z.ZodUnion<readonly [z.ZodEnum<{
21
+ Editor: "Editor";
22
+ Manager: "Manager";
23
+ Owner: "Owner";
24
+ Viewer: "Viewer";
25
+ }>, z.ZodObject<{
26
+ Custom: z.ZodObject<{
27
+ name: z.ZodOptional<z.ZodString>;
28
+ permission: z.ZodNumber;
29
+ }, z.core.$strip>;
30
+ }, z.core.$strip>]>;
31
+ }, z.core.$strip>>;
32
+ }, z.core.$strip>;
33
+ export type ShareListOutput = z.infer<typeof ShareListOutput>;
34
+ /** `vault list --output json` (fallback when share roles are unavailable). */
35
+ export declare const VaultListOutput: z.ZodObject<{
36
+ vaults: z.ZodArray<z.ZodObject<{
37
+ name: z.ZodString;
38
+ vault_id: z.ZodString;
39
+ share_id: z.ZodString;
40
+ }, z.core.$strip>>;
41
+ }, z.core.$strip>;
42
+ export declare const ExtraFieldContent: z.ZodUnion<readonly [z.ZodObject<{
43
+ Text: z.ZodString;
44
+ }, z.core.$strip>, z.ZodObject<{
45
+ Hidden: z.ZodString;
46
+ }, z.core.$strip>, z.ZodObject<{
47
+ Totp: z.ZodString;
48
+ }, z.core.$strip>, z.ZodObject<{
49
+ Timestamp: z.ZodNumber;
50
+ }, z.core.$strip>]>;
51
+ export declare const ExtraField: z.ZodObject<{
52
+ name: z.ZodString;
53
+ content: z.ZodUnion<readonly [z.ZodObject<{
54
+ Text: z.ZodString;
55
+ }, z.core.$strip>, z.ZodObject<{
56
+ Hidden: z.ZodString;
57
+ }, z.core.$strip>, z.ZodObject<{
58
+ Totp: z.ZodString;
59
+ }, z.core.$strip>, z.ZodObject<{
60
+ Timestamp: z.ZodNumber;
61
+ }, z.core.$strip>]>;
62
+ }, z.core.$strip>;
63
+ export type ExtraField = z.infer<typeof ExtraField>;
64
+ declare const Section: z.ZodObject<{
65
+ section_name: z.ZodString;
66
+ section_fields: z.ZodArray<z.ZodObject<{
67
+ name: z.ZodString;
68
+ content: z.ZodUnion<readonly [z.ZodObject<{
69
+ Text: z.ZodString;
70
+ }, z.core.$strip>, z.ZodObject<{
71
+ Hidden: z.ZodString;
72
+ }, z.core.$strip>, z.ZodObject<{
73
+ Totp: z.ZodString;
74
+ }, z.core.$strip>, z.ZodObject<{
75
+ Timestamp: z.ZodNumber;
76
+ }, z.core.$strip>]>;
77
+ }, z.core.$strip>>;
78
+ }, z.core.$strip>;
79
+ export type Section = z.infer<typeof Section>;
80
+ export declare const ItemContentVariant: z.ZodUnion<readonly [z.ZodObject<{
81
+ Note: z.ZodNull;
82
+ }, z.core.$strict>, z.ZodObject<{
83
+ Alias: z.ZodNull;
84
+ }, z.core.$strict>, z.ZodObject<{
85
+ Login: z.ZodObject<{
86
+ email: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
87
+ username: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
88
+ password: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
89
+ urls: z.ZodDefault<z.ZodArray<z.ZodString>>;
90
+ totp_uri: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
91
+ }, z.core.$strip>;
92
+ }, z.core.$strip>, z.ZodObject<{
93
+ SshKey: z.ZodObject<{
94
+ private_key: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
95
+ public_key: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
96
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
97
+ section_name: z.ZodString;
98
+ section_fields: z.ZodArray<z.ZodObject<{
99
+ name: z.ZodString;
100
+ content: z.ZodUnion<readonly [z.ZodObject<{
101
+ Text: z.ZodString;
102
+ }, z.core.$strip>, z.ZodObject<{
103
+ Hidden: z.ZodString;
104
+ }, z.core.$strip>, z.ZodObject<{
105
+ Totp: z.ZodString;
106
+ }, z.core.$strip>, z.ZodObject<{
107
+ Timestamp: z.ZodNumber;
108
+ }, z.core.$strip>]>;
109
+ }, z.core.$strip>>;
110
+ }, z.core.$strip>>>;
111
+ }, z.core.$strip>;
112
+ }, z.core.$strip>, z.ZodObject<{
113
+ Wifi: z.ZodObject<{
114
+ ssid: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
115
+ password: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
116
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
117
+ section_name: z.ZodString;
118
+ section_fields: z.ZodArray<z.ZodObject<{
119
+ name: z.ZodString;
120
+ content: z.ZodUnion<readonly [z.ZodObject<{
121
+ Text: z.ZodString;
122
+ }, z.core.$strip>, z.ZodObject<{
123
+ Hidden: z.ZodString;
124
+ }, z.core.$strip>, z.ZodObject<{
125
+ Totp: z.ZodString;
126
+ }, z.core.$strip>, z.ZodObject<{
127
+ Timestamp: z.ZodNumber;
128
+ }, z.core.$strip>]>;
129
+ }, z.core.$strip>>;
130
+ }, z.core.$strip>>>;
131
+ }, z.core.$strip>;
132
+ }, z.core.$strip>, z.ZodObject<{
133
+ CreditCard: z.ZodObject<{
134
+ cardholder_name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
135
+ number: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
136
+ verification_number: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
137
+ expiration_date: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
138
+ pin: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
139
+ }, z.core.$strip>;
140
+ }, z.core.$strip>, z.ZodObject<{
141
+ Identity: z.ZodRecord<z.ZodString, z.ZodUnknown>;
142
+ }, z.core.$strip>, z.ZodObject<{
143
+ Custom: z.ZodObject<{
144
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
145
+ section_name: z.ZodString;
146
+ section_fields: z.ZodArray<z.ZodObject<{
147
+ name: z.ZodString;
148
+ content: z.ZodUnion<readonly [z.ZodObject<{
149
+ Text: z.ZodString;
150
+ }, z.core.$strip>, z.ZodObject<{
151
+ Hidden: z.ZodString;
152
+ }, z.core.$strip>, z.ZodObject<{
153
+ Totp: z.ZodString;
154
+ }, z.core.$strip>, z.ZodObject<{
155
+ Timestamp: z.ZodNumber;
156
+ }, z.core.$strip>]>;
157
+ }, z.core.$strip>>;
158
+ }, z.core.$strip>>>;
159
+ }, z.core.$strip>;
160
+ }, z.core.$strip>, z.ZodLiteral<"Note">, z.ZodLiteral<"Alias">]>;
161
+ export type ItemContentVariant = z.infer<typeof ItemContentVariant>;
162
+ export declare const Item: z.ZodObject<{
163
+ id: z.ZodString;
164
+ share_id: z.ZodString;
165
+ vault_id: z.ZodOptional<z.ZodString>;
166
+ content: z.ZodObject<{
167
+ title: z.ZodString;
168
+ note: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
169
+ content: z.ZodUnion<readonly [z.ZodObject<{
170
+ Note: z.ZodNull;
171
+ }, z.core.$strict>, z.ZodObject<{
172
+ Alias: z.ZodNull;
173
+ }, z.core.$strict>, z.ZodObject<{
174
+ Login: z.ZodObject<{
175
+ email: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
176
+ username: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
177
+ password: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
178
+ urls: z.ZodDefault<z.ZodArray<z.ZodString>>;
179
+ totp_uri: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
180
+ }, z.core.$strip>;
181
+ }, z.core.$strip>, z.ZodObject<{
182
+ SshKey: z.ZodObject<{
183
+ private_key: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
184
+ public_key: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
185
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
186
+ section_name: z.ZodString;
187
+ section_fields: z.ZodArray<z.ZodObject<{
188
+ name: z.ZodString;
189
+ content: z.ZodUnion<readonly [z.ZodObject<{
190
+ Text: z.ZodString;
191
+ }, z.core.$strip>, z.ZodObject<{
192
+ Hidden: z.ZodString;
193
+ }, z.core.$strip>, z.ZodObject<{
194
+ Totp: z.ZodString;
195
+ }, z.core.$strip>, z.ZodObject<{
196
+ Timestamp: z.ZodNumber;
197
+ }, z.core.$strip>]>;
198
+ }, z.core.$strip>>;
199
+ }, z.core.$strip>>>;
200
+ }, z.core.$strip>;
201
+ }, z.core.$strip>, z.ZodObject<{
202
+ Wifi: z.ZodObject<{
203
+ ssid: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
204
+ password: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
205
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
206
+ section_name: z.ZodString;
207
+ section_fields: z.ZodArray<z.ZodObject<{
208
+ name: z.ZodString;
209
+ content: z.ZodUnion<readonly [z.ZodObject<{
210
+ Text: z.ZodString;
211
+ }, z.core.$strip>, z.ZodObject<{
212
+ Hidden: z.ZodString;
213
+ }, z.core.$strip>, z.ZodObject<{
214
+ Totp: z.ZodString;
215
+ }, z.core.$strip>, z.ZodObject<{
216
+ Timestamp: z.ZodNumber;
217
+ }, z.core.$strip>]>;
218
+ }, z.core.$strip>>;
219
+ }, z.core.$strip>>>;
220
+ }, z.core.$strip>;
221
+ }, z.core.$strip>, z.ZodObject<{
222
+ CreditCard: z.ZodObject<{
223
+ cardholder_name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
224
+ number: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
225
+ verification_number: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
226
+ expiration_date: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
227
+ pin: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
228
+ }, z.core.$strip>;
229
+ }, z.core.$strip>, z.ZodObject<{
230
+ Identity: z.ZodRecord<z.ZodString, z.ZodUnknown>;
231
+ }, z.core.$strip>, z.ZodObject<{
232
+ Custom: z.ZodObject<{
233
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
234
+ section_name: z.ZodString;
235
+ section_fields: z.ZodArray<z.ZodObject<{
236
+ name: z.ZodString;
237
+ content: z.ZodUnion<readonly [z.ZodObject<{
238
+ Text: z.ZodString;
239
+ }, z.core.$strip>, z.ZodObject<{
240
+ Hidden: z.ZodString;
241
+ }, z.core.$strip>, z.ZodObject<{
242
+ Totp: z.ZodString;
243
+ }, z.core.$strip>, z.ZodObject<{
244
+ Timestamp: z.ZodNumber;
245
+ }, z.core.$strip>]>;
246
+ }, z.core.$strip>>;
247
+ }, z.core.$strip>>>;
248
+ }, z.core.$strip>;
249
+ }, z.core.$strip>, z.ZodLiteral<"Note">, z.ZodLiteral<"Alias">]>;
250
+ extra_fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
251
+ name: z.ZodString;
252
+ content: z.ZodUnion<readonly [z.ZodObject<{
253
+ Text: z.ZodString;
254
+ }, z.core.$strip>, z.ZodObject<{
255
+ Hidden: z.ZodString;
256
+ }, z.core.$strip>, z.ZodObject<{
257
+ Totp: z.ZodString;
258
+ }, z.core.$strip>, z.ZodObject<{
259
+ Timestamp: z.ZodNumber;
260
+ }, z.core.$strip>]>;
261
+ }, z.core.$strip>>>;
262
+ }, z.core.$strip>;
263
+ state: z.ZodString;
264
+ flags: z.ZodDefault<z.ZodArray<z.ZodString>>;
265
+ create_time: z.ZodString;
266
+ modify_time: z.ZodString;
267
+ }, z.core.$strip>;
268
+ export type Item = z.infer<typeof Item>;
269
+ export declare const Attachment: z.ZodObject<{
270
+ id: z.ZodString;
271
+ size: z.ZodNumber;
272
+ content: z.ZodObject<{
273
+ name: z.ZodString;
274
+ mime_type: z.ZodOptional<z.ZodString>;
275
+ }, z.core.$strip>;
276
+ }, z.core.$strip>;
277
+ export type Attachment = z.infer<typeof Attachment>;
278
+ /** `item view --output json`: `ItemDetails`. */
279
+ export declare const ItemDetails: z.ZodObject<{
280
+ item: z.ZodObject<{
281
+ id: z.ZodString;
282
+ share_id: z.ZodString;
283
+ vault_id: z.ZodOptional<z.ZodString>;
284
+ content: z.ZodObject<{
285
+ title: z.ZodString;
286
+ note: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
287
+ content: z.ZodUnion<readonly [z.ZodObject<{
288
+ Note: z.ZodNull;
289
+ }, z.core.$strict>, z.ZodObject<{
290
+ Alias: z.ZodNull;
291
+ }, z.core.$strict>, z.ZodObject<{
292
+ Login: z.ZodObject<{
293
+ email: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
294
+ username: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
295
+ password: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
296
+ urls: z.ZodDefault<z.ZodArray<z.ZodString>>;
297
+ totp_uri: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
298
+ }, z.core.$strip>;
299
+ }, z.core.$strip>, z.ZodObject<{
300
+ SshKey: z.ZodObject<{
301
+ private_key: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
302
+ public_key: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
303
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
304
+ section_name: z.ZodString;
305
+ section_fields: z.ZodArray<z.ZodObject<{
306
+ name: z.ZodString;
307
+ content: z.ZodUnion<readonly [z.ZodObject<{
308
+ Text: z.ZodString;
309
+ }, z.core.$strip>, z.ZodObject<{
310
+ Hidden: z.ZodString;
311
+ }, z.core.$strip>, z.ZodObject<{
312
+ Totp: z.ZodString;
313
+ }, z.core.$strip>, z.ZodObject<{
314
+ Timestamp: z.ZodNumber;
315
+ }, z.core.$strip>]>;
316
+ }, z.core.$strip>>;
317
+ }, z.core.$strip>>>;
318
+ }, z.core.$strip>;
319
+ }, z.core.$strip>, z.ZodObject<{
320
+ Wifi: z.ZodObject<{
321
+ ssid: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
322
+ password: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
323
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
324
+ section_name: z.ZodString;
325
+ section_fields: z.ZodArray<z.ZodObject<{
326
+ name: z.ZodString;
327
+ content: z.ZodUnion<readonly [z.ZodObject<{
328
+ Text: z.ZodString;
329
+ }, z.core.$strip>, z.ZodObject<{
330
+ Hidden: z.ZodString;
331
+ }, z.core.$strip>, z.ZodObject<{
332
+ Totp: z.ZodString;
333
+ }, z.core.$strip>, z.ZodObject<{
334
+ Timestamp: z.ZodNumber;
335
+ }, z.core.$strip>]>;
336
+ }, z.core.$strip>>;
337
+ }, z.core.$strip>>>;
338
+ }, z.core.$strip>;
339
+ }, z.core.$strip>, z.ZodObject<{
340
+ CreditCard: z.ZodObject<{
341
+ cardholder_name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
342
+ number: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
343
+ verification_number: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
344
+ expiration_date: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
345
+ pin: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
346
+ }, z.core.$strip>;
347
+ }, z.core.$strip>, z.ZodObject<{
348
+ Identity: z.ZodRecord<z.ZodString, z.ZodUnknown>;
349
+ }, z.core.$strip>, z.ZodObject<{
350
+ Custom: z.ZodObject<{
351
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
352
+ section_name: z.ZodString;
353
+ section_fields: z.ZodArray<z.ZodObject<{
354
+ name: z.ZodString;
355
+ content: z.ZodUnion<readonly [z.ZodObject<{
356
+ Text: z.ZodString;
357
+ }, z.core.$strip>, z.ZodObject<{
358
+ Hidden: z.ZodString;
359
+ }, z.core.$strip>, z.ZodObject<{
360
+ Totp: z.ZodString;
361
+ }, z.core.$strip>, z.ZodObject<{
362
+ Timestamp: z.ZodNumber;
363
+ }, z.core.$strip>]>;
364
+ }, z.core.$strip>>;
365
+ }, z.core.$strip>>>;
366
+ }, z.core.$strip>;
367
+ }, z.core.$strip>, z.ZodLiteral<"Note">, z.ZodLiteral<"Alias">]>;
368
+ extra_fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
369
+ name: z.ZodString;
370
+ content: z.ZodUnion<readonly [z.ZodObject<{
371
+ Text: z.ZodString;
372
+ }, z.core.$strip>, z.ZodObject<{
373
+ Hidden: z.ZodString;
374
+ }, z.core.$strip>, z.ZodObject<{
375
+ Totp: z.ZodString;
376
+ }, z.core.$strip>, z.ZodObject<{
377
+ Timestamp: z.ZodNumber;
378
+ }, z.core.$strip>]>;
379
+ }, z.core.$strip>>>;
380
+ }, z.core.$strip>;
381
+ state: z.ZodString;
382
+ flags: z.ZodDefault<z.ZodArray<z.ZodString>>;
383
+ create_time: z.ZodString;
384
+ modify_time: z.ZodString;
385
+ }, z.core.$strip>;
386
+ attachments: z.ZodDefault<z.ZodArray<z.ZodObject<{
387
+ id: z.ZodString;
388
+ size: z.ZodNumber;
389
+ content: z.ZodObject<{
390
+ name: z.ZodString;
391
+ mime_type: z.ZodOptional<z.ZodString>;
392
+ }, z.core.$strip>;
393
+ }, z.core.$strip>>>;
394
+ }, z.core.$strip>;
395
+ export type ItemDetails = z.infer<typeof ItemDetails>;
396
+ /** `item list --show-secrets --output json` (non-agent sessions only). */
397
+ export declare const FullItemList: z.ZodObject<{
398
+ items: z.ZodArray<z.ZodObject<{
399
+ id: z.ZodString;
400
+ share_id: z.ZodString;
401
+ vault_id: z.ZodOptional<z.ZodString>;
402
+ content: z.ZodObject<{
403
+ title: z.ZodString;
404
+ note: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
405
+ content: z.ZodUnion<readonly [z.ZodObject<{
406
+ Note: z.ZodNull;
407
+ }, z.core.$strict>, z.ZodObject<{
408
+ Alias: z.ZodNull;
409
+ }, z.core.$strict>, z.ZodObject<{
410
+ Login: z.ZodObject<{
411
+ email: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
412
+ username: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
413
+ password: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
414
+ urls: z.ZodDefault<z.ZodArray<z.ZodString>>;
415
+ totp_uri: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
416
+ }, z.core.$strip>;
417
+ }, z.core.$strip>, z.ZodObject<{
418
+ SshKey: z.ZodObject<{
419
+ private_key: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
420
+ public_key: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
421
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
422
+ section_name: z.ZodString;
423
+ section_fields: z.ZodArray<z.ZodObject<{
424
+ name: z.ZodString;
425
+ content: z.ZodUnion<readonly [z.ZodObject<{
426
+ Text: z.ZodString;
427
+ }, z.core.$strip>, z.ZodObject<{
428
+ Hidden: z.ZodString;
429
+ }, z.core.$strip>, z.ZodObject<{
430
+ Totp: z.ZodString;
431
+ }, z.core.$strip>, z.ZodObject<{
432
+ Timestamp: z.ZodNumber;
433
+ }, z.core.$strip>]>;
434
+ }, z.core.$strip>>;
435
+ }, z.core.$strip>>>;
436
+ }, z.core.$strip>;
437
+ }, z.core.$strip>, z.ZodObject<{
438
+ Wifi: z.ZodObject<{
439
+ ssid: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
440
+ password: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
441
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
442
+ section_name: z.ZodString;
443
+ section_fields: z.ZodArray<z.ZodObject<{
444
+ name: z.ZodString;
445
+ content: z.ZodUnion<readonly [z.ZodObject<{
446
+ Text: z.ZodString;
447
+ }, z.core.$strip>, z.ZodObject<{
448
+ Hidden: z.ZodString;
449
+ }, z.core.$strip>, z.ZodObject<{
450
+ Totp: z.ZodString;
451
+ }, z.core.$strip>, z.ZodObject<{
452
+ Timestamp: z.ZodNumber;
453
+ }, z.core.$strip>]>;
454
+ }, z.core.$strip>>;
455
+ }, z.core.$strip>>>;
456
+ }, z.core.$strip>;
457
+ }, z.core.$strip>, z.ZodObject<{
458
+ CreditCard: z.ZodObject<{
459
+ cardholder_name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
460
+ number: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
461
+ verification_number: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
462
+ expiration_date: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
463
+ pin: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
464
+ }, z.core.$strip>;
465
+ }, z.core.$strip>, z.ZodObject<{
466
+ Identity: z.ZodRecord<z.ZodString, z.ZodUnknown>;
467
+ }, z.core.$strip>, z.ZodObject<{
468
+ Custom: z.ZodObject<{
469
+ sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
470
+ section_name: z.ZodString;
471
+ section_fields: z.ZodArray<z.ZodObject<{
472
+ name: z.ZodString;
473
+ content: z.ZodUnion<readonly [z.ZodObject<{
474
+ Text: z.ZodString;
475
+ }, z.core.$strip>, z.ZodObject<{
476
+ Hidden: z.ZodString;
477
+ }, z.core.$strip>, z.ZodObject<{
478
+ Totp: z.ZodString;
479
+ }, z.core.$strip>, z.ZodObject<{
480
+ Timestamp: z.ZodNumber;
481
+ }, z.core.$strip>]>;
482
+ }, z.core.$strip>>;
483
+ }, z.core.$strip>>>;
484
+ }, z.core.$strip>;
485
+ }, z.core.$strip>, z.ZodLiteral<"Note">, z.ZodLiteral<"Alias">]>;
486
+ extra_fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
487
+ name: z.ZodString;
488
+ content: z.ZodUnion<readonly [z.ZodObject<{
489
+ Text: z.ZodString;
490
+ }, z.core.$strip>, z.ZodObject<{
491
+ Hidden: z.ZodString;
492
+ }, z.core.$strip>, z.ZodObject<{
493
+ Totp: z.ZodString;
494
+ }, z.core.$strip>, z.ZodObject<{
495
+ Timestamp: z.ZodNumber;
496
+ }, z.core.$strip>]>;
497
+ }, z.core.$strip>>>;
498
+ }, z.core.$strip>;
499
+ state: z.ZodString;
500
+ flags: z.ZodDefault<z.ZodArray<z.ZodString>>;
501
+ create_time: z.ZodString;
502
+ modify_time: z.ZodString;
503
+ }, z.core.$strip>>;
504
+ }, z.core.$strip>;
505
+ /** `item list --output json`: secret-free summaries (the only form agent sessions get). */
506
+ export declare const ItemSummary: z.ZodObject<{
507
+ id: z.ZodString;
508
+ share_id: z.ZodString;
509
+ state: z.ZodString;
510
+ flags: z.ZodDefault<z.ZodArray<z.ZodString>>;
511
+ create_time: z.ZodString;
512
+ modify_time: z.ZodString;
513
+ title: z.ZodString;
514
+ item_type: z.ZodString;
515
+ }, z.core.$strip>;
516
+ export type ItemSummary = z.infer<typeof ItemSummary>;
517
+ export declare const ItemSummaryList: z.ZodObject<{
518
+ items: z.ZodArray<z.ZodObject<{
519
+ id: z.ZodString;
520
+ share_id: z.ZodString;
521
+ state: z.ZodString;
522
+ flags: z.ZodDefault<z.ZodArray<z.ZodString>>;
523
+ create_time: z.ZodString;
524
+ modify_time: z.ZodString;
525
+ title: z.ZodString;
526
+ item_type: z.ZodString;
527
+ }, z.core.$strip>>;
528
+ }, z.core.$strip>;
529
+ /** `info --output json` for a personal-access-token or agent session. */
530
+ export declare const InfoOutput: z.ZodObject<{
531
+ personal_access_token_name: z.ZodOptional<z.ZodString>;
532
+ username: z.ZodOptional<z.ZodString>;
533
+ session_has_lock: z.ZodOptional<z.ZodBoolean>;
534
+ }, z.core.$strip>;
535
+ export declare const ITEM_HAS_FILES = "ItemHasFiles";
536
+ /** Proton share permission flags (proton-pass-common ShareRole::Custom). */
537
+ export declare const SHARE_PERMISSION: {
538
+ readonly admin: 1;
539
+ readonly read: 2;
540
+ readonly create: 4;
541
+ readonly update: 8;
542
+ readonly trash: 16;
543
+ readonly delete: 32;
544
+ };
545
+ export {};
@@ -0,0 +1,113 @@
1
+ import { type VaultProviderAuthority } from "./contract.js";
2
+ import { type ProcessRunner } from "./runner.js";
3
+ /** The only pass-cli release whose argv, JSON output and errors this adapter was built against. */
4
+ export declare const PROTON_PASS_CLI_VERSION = "2.4.2";
5
+ /** A PAT login session is treated as stale before Proton's 2 h session lifetime. */
6
+ export declare const PROTON_PASS_SESSION_MAX_AGE_MS: number;
7
+ export declare const PROTON_PASS_IDLE_CLOSE_MS: number;
8
+ export declare const PROTON_PASS_COMMAND_TIMEOUT_MS = 60000;
9
+ export declare const PROTON_PASS_MAX_STDOUT_BYTES: number;
10
+ /** pass/src/monitor MAX_REASON_LENGTH. */
11
+ export declare const PROTON_PASS_MAX_REASON_CHARS = 300;
12
+ /** pass-cli processes allowed at once across every Proton connection in this process. */
13
+ export declare const PROTON_PASS_MAX_PROCESSES = 4;
14
+ export interface ProtonCliOptions {
15
+ /** Absolute path to an operator-installed pass-cli; defaults to `pass-cli` on PATH. */
16
+ binaryPath?: string;
17
+ /** Exact `pass-cli --version` semver to accept (default 2.4.2). */
18
+ expectedVersion?: string;
19
+ /** Optional SHA-256 (hex) the binary must match. */
20
+ expectedSha256?: string;
21
+ /** Parent of per-connection state directories (default `<tmpdir>/opengeni-protonpass`). */
22
+ stateRoot?: string;
23
+ commandTimeoutMs?: number;
24
+ maxStdoutBytes?: number;
25
+ sessionMaxAgeMs?: number;
26
+ idleCloseMs?: number;
27
+ now?: () => number;
28
+ /** Process runner (tests). Defaults to a no-shell, bounded `spawn`. */
29
+ runner?: ProcessRunner;
30
+ /** Process environment used only to resolve PATH and proxy settings (tests). */
31
+ hostEnv?: Readonly<Record<string, string | undefined>>;
32
+ }
33
+ export interface ProtonCommand {
34
+ args: readonly string[];
35
+ stdin?: string;
36
+ /** Short action name for errors and the agent reason, e.g. "list items". */
37
+ subject: string;
38
+ authority?: VaultProviderAuthority;
39
+ signal?: AbortSignal;
40
+ /** Set for writes: failures are definite only with this context and a server verdict. */
41
+ mutationContext?: RegExp;
42
+ /** Error code when stdout exceeds its bound (list: inventory incomplete). */
43
+ overflowCode?: "provider_inventory_incomplete" | "provider_unavailable";
44
+ maxStdoutBytes?: number;
45
+ }
46
+ export interface ProtonSessionInfo {
47
+ tokenName: string | null;
48
+ agent: boolean;
49
+ }
50
+ export interface SlotSemaphore {
51
+ /** Resolves with a release function once a slot is held; rejects if `signal` aborts first. */
52
+ acquire(signal?: AbortSignal): Promise<() => void>;
53
+ /** Slots held, including ones handed to a waiter that has not resumed yet. */
54
+ active(): number;
55
+ waiting(): number;
56
+ }
57
+ /**
58
+ * A FIFO counting semaphore. A released slot is handed straight to the next
59
+ * waiter (the count never drops in between), so a caller arriving while the
60
+ * waiter resumes cannot take the same slot and exceed `limit`.
61
+ */
62
+ export declare function createSlotSemaphore(limit: number): SlotSemaphore;
63
+ /** Creates (or checks) a private directory owned by this process's user. */
64
+ export declare function ensurePrivateDirectory(path: string): void;
65
+ /** A reason for Proton's agent audit log, built only from trusted identifiers. */
66
+ export declare function agentReason(subject: string, authority?: VaultProviderAuthority): string;
67
+ /**
68
+ * One logged-in pass-cli state for one personal access token. Every call is
69
+ * serialized (pass-cli keeps a single SQLite session store per directory), the
70
+ * session is renewed before Proton's 2 h limit, and the directory with its
71
+ * encrypted session is wiped after idling or on close.
72
+ */
73
+ export declare class ProtonCliSession {
74
+ private readonly token;
75
+ private readonly options;
76
+ private readonly runner;
77
+ private readonly now;
78
+ private readonly hostEnv;
79
+ private readonly encryptionKey;
80
+ private binary;
81
+ private dir;
82
+ private loggedInAt;
83
+ private info;
84
+ private queue;
85
+ private pending;
86
+ private idleTimer;
87
+ private closed;
88
+ constructor(token: string, options?: ProtonCliOptions);
89
+ /** The state directory while a session is open (tests and diagnostics). */
90
+ get stateDirectory(): string | null;
91
+ get sessionInfo(): ProtonSessionInfo | null;
92
+ /** Runs one pass-cli command after ensuring a fresh login; returns stdout. */
93
+ run(command: ProtonCommand): Promise<string>;
94
+ /** Login state for `validate`: logs in when needed and returns the token identity. */
95
+ ensureSession(signal?: AbortSignal): Promise<ProtonSessionInfo>;
96
+ /** Allocates a private directory inside the session state for one download. */
97
+ privateScratchDir(): string;
98
+ /** Logs out (best effort) and wipes the state directory. */
99
+ close(): Promise<void>;
100
+ private serialize;
101
+ private armIdleClose;
102
+ private teardown;
103
+ private requireDir;
104
+ private sessionDir;
105
+ private baseEnv;
106
+ private resolveBinary;
107
+ private spawn;
108
+ private sessionFresh;
109
+ private ensureLogin;
110
+ private login;
111
+ private execute;
112
+ }
113
+ export declare function parseJson(text: string): unknown;