@girs/gcr-4 4.4.0 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +36 -41
  2. package/gcr-4.d.ts +113 -52
  3. package/package.json +7 -7
package/README.md CHANGED
@@ -4,82 +4,77 @@
4
4
  ![version](https://img.shields.io/npm/v/@girs/gcr-4)
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gcr-4)
6
6
 
7
+ GJS TypeScript type definitions for Gcr-4, generated from library version 4.4.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.5.0.
7
8
 
8
- GJS TypeScript type definitions for Gcr-4, generated from library version 4.4.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.4.0.
9
+ This package contains type declarations only. It ships no runtime code, so it adds
10
+ nothing to your program and works with any bundler or none at all.
9
11
 
10
12
  ## Install
11
13
 
12
- Install the type definitions with npm:
13
14
  ```bash
14
15
  npm install @girs/gcr-4
15
16
  ```
16
17
 
17
- ## Usage
18
+ Any package manager works. The package has no dependencies beyond other `@girs/*`
19
+ type packages.
20
+
21
+ ## What it exports
22
+
23
+ | Import | What you get |
24
+ |---|---|
25
+ | `@girs/gcr-4` | the namespace as a default export, plus the ambient and global declarations |
26
+ | `@girs/gcr-4/ambient` | only the `gi://` module declarations |
27
+ | `@girs/gcr-4/import` | only the `imports.gi` declarations |
28
+ | `@girs/gcr-4/gcr-4` | the namespace, without the side-effecting declarations |
29
+
30
+ ## Three ways to import
31
+
32
+ Which one you use depends on how you write imports elsewhere, not on your toolchain.
33
+
34
+ ### As a module
18
35
 
19
- Import it like any other module:
20
36
  ```ts
21
37
  import Gcr from '@girs/gcr-4';
22
38
  ```
23
39
 
24
- ### Ambient Modules
40
+ ### As `gi://`
25
41
 
26
- [Ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) let you write the same import you would in plain JavaScript.
27
- For this you need to include `@girs/gcr-4` or `@girs/gcr-4/ambient` in your `tsconfig` or entry point Typescript file:
42
+ GJS resolves `gi://` at runtime. To give it types, reference the package once, either
43
+ from your entry point or from `tsconfig.json`:
28
44
 
29
- `index.ts`:
30
45
  ```ts
31
- import '@girs/gcr-4'
46
+ import '@girs/gcr-4';
32
47
  ```
33
48
 
34
- `tsconfig.json`:
35
49
  ```json
36
- {
37
- "compilerOptions": {
38
- ...
39
- },
40
- "include": ["@girs/gcr-4"],
41
- ...
42
- }
50
+ { "include": ["@girs/gcr-4"] }
43
51
  ```
44
52
 
45
- The ambient module now resolves with types:
53
+ Then the runtime spelling type-checks:
46
54
 
47
55
  ```ts
48
56
  import Gcr from 'gi://Gcr?version=4';
49
57
  ```
50
58
 
51
- ### Global import
52
-
53
- GJS's global `imports.gi` works too, with types.
54
- For this you need to include `@girs/gcr-4` or `@girs/gcr-4/import` in your `tsconfig` or entry point Typescript file:
59
+ Referencing `@girs/gcr-4/ambient` instead pulls in these declarations
60
+ alone. See [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules).
55
61
 
56
- `index.ts`:
57
- ```ts
58
- import '@girs/gcr-4'
59
- ```
60
-
61
- `tsconfig.json`:
62
- ```json
63
- {
64
- "compilerOptions": {
65
- ...
66
- },
67
- "include": ["@girs/gcr-4"],
68
- ...
69
- }
70
- ```
62
+ ### As `imports.gi`
71
63
 
72
- That form carries types as well:
64
+ GJS's global object works the same way, via `@girs/gcr-4/import`:
73
65
 
74
66
  ```ts
75
67
  const Gcr = imports.gi.Gcr;
76
68
  ```
77
69
 
78
- ### Bundle
70
+ ## Building
79
71
 
80
- Most projects want a bundler. [esbuild](https://esbuild.github.io/) is the smallest thing that works; the [examples directory](https://github.com/gjsify/ts-for-gir/tree/main/examples) has setups for several others.
72
+ The declarations need no build step. If you bundle, every bundler works, since there is
73
+ no runtime code to resolve. The [examples](https://github.com/gjsify/ts-for-gir/tree/main/examples)
74
+ show working setups for several.
81
75
 
82
76
  ## Other packages
83
77
 
84
- All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
78
+ Every pre-generated package is at [gjsify/types](https://github.com/gjsify/types).
79
+
85
80
 
package/gcr-4.d.ts CHANGED
@@ -36,35 +36,35 @@ export namespace Gcr {
36
36
  * When a chain is not yet built it has this status. If a chain is modified after
37
37
  * being built, it has this status.
38
38
  */
39
- UNKNOWN,
39
+ UNKNOWN = 0,
40
40
  /**
41
41
  * A full chain could not be loaded. The
42
42
  * chain does not end with a self-signed certificate, a trusted anchor, or a
43
43
  * pinned certificate.
44
44
  */
45
- INCOMPLETE,
45
+ INCOMPLETE = 1,
46
46
  /**
47
47
  * The certificate chain contains a revoked
48
48
  * or otherwise explicitly distrusted certificate. The entire chain should
49
49
  * be distrusted.
50
50
  */
51
- DISTRUSTED,
51
+ DISTRUSTED = 2,
52
52
  /**
53
53
  * The chain ends with a self-signed
54
54
  * certificate. No trust anchor was found.
55
55
  */
56
- SELFSIGNED,
56
+ SELFSIGNED = 3,
57
57
  /**
58
58
  * The chain represents a pinned certificate. A
59
59
  * pinned certificate is an exception which trusts a given certificate
60
60
  * explicitly for a purpose and communication with a certain peer.
61
61
  */
62
- PINNED,
62
+ PINNED = 4,
63
63
  /**
64
64
  * The chain ends with an anchored
65
65
  * certificate. The anchored certificate is not necessarily self-signed.
66
66
  */
67
- ANCHORED,
67
+ ANCHORED = 5,
68
68
  }
69
69
 
70
70
 
@@ -76,7 +76,7 @@ export namespace Gcr {
76
76
  /**
77
77
  * certificate request is in PKCS#10 format
78
78
  */
79
- CERTIFICATE_REQUEST_PKCS10,
79
+ CERTIFICATE_REQUEST_PKCS10 = 1,
80
80
  }
81
81
 
82
82
 
@@ -88,19 +88,19 @@ export namespace Gcr {
88
88
  /**
89
89
  * Failed to parse or serialize the data
90
90
  */
91
- FAILURE,
91
+ FAILURE = -1,
92
92
  /**
93
93
  * The data was unrecognized or unsupported
94
94
  */
95
- UNRECOGNIZED,
95
+ UNRECOGNIZED = 1,
96
96
  /**
97
97
  * The operation was cancelled
98
98
  */
99
- CANCELLED,
99
+ CANCELLED = 2,
100
100
  /**
101
101
  * The data was encrypted or locked and could not be unlocked.
102
102
  */
103
- LOCKED,
103
+ LOCKED = 3,
104
104
  }
105
105
 
106
106
 
@@ -112,127 +112,127 @@ export namespace Gcr {
112
112
  /**
113
113
  * Represents all the formats, when enabling or disabling
114
114
  */
115
- ALL,
115
+ ALL = -1,
116
116
  /**
117
117
  * Not a valid format
118
118
  */
119
- INVALID,
119
+ INVALID = 0,
120
120
  /**
121
121
  * DER encoded private key
122
122
  */
123
- DER_PRIVATE_KEY,
123
+ DER_PRIVATE_KEY = 100,
124
124
  /**
125
125
  * DER encoded RSA private key
126
126
  */
127
- DER_PRIVATE_KEY_RSA,
127
+ DER_PRIVATE_KEY_RSA = 101,
128
128
  /**
129
129
  * DER encoded DSA private key
130
130
  */
131
- DER_PRIVATE_KEY_DSA,
131
+ DER_PRIVATE_KEY_DSA = 102,
132
132
  /**
133
133
  * DER encoded EC private key
134
134
  */
135
- DER_PRIVATE_KEY_EC,
135
+ DER_PRIVATE_KEY_EC = 103,
136
136
  /**
137
137
  * DER encoded SubjectPublicKeyInfo
138
138
  */
139
- DER_SUBJECT_PUBLIC_KEY,
139
+ DER_SUBJECT_PUBLIC_KEY = 150,
140
140
  /**
141
141
  * DER encoded X.509 certificate
142
142
  */
143
- DER_CERTIFICATE_X509,
143
+ DER_CERTIFICATE_X509 = 200,
144
144
  /**
145
145
  * DER encoded PKCS#7 container file which can contain certificates
146
146
  */
147
- DER_PKCS7,
147
+ DER_PKCS7 = 300,
148
148
  /**
149
149
  * DER encoded PKCS#8 file which can contain a key
150
150
  */
151
- DER_PKCS8,
151
+ DER_PKCS8 = 400,
152
152
  /**
153
153
  * Unencrypted DER encoded PKCS#8 file which can contain a key
154
154
  */
155
- DER_PKCS8_PLAIN,
155
+ DER_PKCS8_PLAIN = 401,
156
156
  /**
157
157
  * Encrypted DER encoded PKCS#8 file which can contain a key
158
158
  */
159
- DER_PKCS8_ENCRYPTED,
159
+ DER_PKCS8_ENCRYPTED = 402,
160
160
  /**
161
161
  * DER encoded PKCS#10 certificate request file
162
162
  */
163
- DER_PKCS10,
163
+ DER_PKCS10 = 450,
164
164
  /**
165
165
  * DER encoded SPKAC as generated by HTML5 keygen element
166
166
  */
167
- DER_SPKAC,
167
+ DER_SPKAC = 455,
168
168
  /**
169
169
  * OpenSSL style SPKAC data
170
170
  */
171
- BASE64_SPKAC,
171
+ BASE64_SPKAC = 456,
172
172
  /**
173
173
  * DER encoded PKCS#12 file which can contain certificates and/or keys
174
174
  */
175
- DER_PKCS12,
175
+ DER_PKCS12 = 500,
176
176
  /**
177
177
  * OpenSSH v1 or v2 public key
178
178
  */
179
- OPENSSH_PUBLIC,
179
+ OPENSSH_PUBLIC = 600,
180
180
  /**
181
181
  * OpenPGP key packet(s)
182
182
  */
183
- OPENPGP_PACKET,
183
+ OPENPGP_PACKET = 700,
184
184
  /**
185
185
  * OpenPGP public or private key armor encoded data
186
186
  */
187
- OPENPGP_ARMOR,
187
+ OPENPGP_ARMOR = 701,
188
188
  /**
189
189
  * An OpenSSL style PEM file with unspecified contents
190
190
  */
191
- PEM,
191
+ PEM = 1000,
192
192
  /**
193
193
  * An OpenSSL style PEM file with a private RSA key
194
194
  */
195
- PEM_PRIVATE_KEY_RSA,
195
+ PEM_PRIVATE_KEY_RSA = 1001,
196
196
  /**
197
197
  * An OpenSSL style PEM file with a private DSA key
198
198
  */
199
- PEM_PRIVATE_KEY_DSA,
199
+ PEM_PRIVATE_KEY_DSA = 1002,
200
200
  /**
201
201
  * An OpenSSL style PEM file with an X.509 certificate
202
202
  */
203
- PEM_CERTIFICATE_X509,
203
+ PEM_CERTIFICATE_X509 = 1003,
204
204
  /**
205
205
  * An OpenSSL style PEM file containing PKCS#7
206
206
  */
207
- PEM_PKCS7,
207
+ PEM_PKCS7 = 1004,
208
208
  /**
209
209
  * Unencrypted OpenSSL style PEM file containing PKCS#8
210
210
  */
211
- PEM_PKCS8_PLAIN,
211
+ PEM_PKCS8_PLAIN = 1005,
212
212
  /**
213
213
  * Encrypted OpenSSL style PEM file containing PKCS#8
214
214
  */
215
- PEM_PKCS8_ENCRYPTED,
215
+ PEM_PKCS8_ENCRYPTED = 1006,
216
216
  /**
217
217
  * An OpenSSL style PEM file containing PKCS#12
218
218
  */
219
- PEM_PKCS12,
219
+ PEM_PKCS12 = 1007,
220
220
  /**
221
221
  * An OpenSSL style PEM file with a private key
222
222
  */
223
- PEM_PRIVATE_KEY,
223
+ PEM_PRIVATE_KEY = 1008,
224
224
  /**
225
225
  * An OpenSSL style PEM file containing PKCS#10
226
226
  */
227
- PEM_PKCS10,
227
+ PEM_PKCS10 = 1009,
228
228
  /**
229
229
  * An OpenSSL style PEM file with a private EC key
230
230
  */
231
- PEM_PRIVATE_KEY_EC,
231
+ PEM_PRIVATE_KEY_EC = 1010,
232
232
  /**
233
233
  * An OpenSSL style PEM file containing a SubjectPublicKeyInfo
234
234
  */
235
- PEM_PUBLIC_KEY,
235
+ PEM_PUBLIC_KEY = 1011,
236
236
  }
237
237
 
238
238
 
@@ -244,11 +244,11 @@ export namespace Gcr {
244
244
  /**
245
245
  * the prompt was cancelled
246
246
  */
247
- CANCEL,
247
+ CANCEL = 0,
248
248
  /**
249
249
  * the user replied with 'ok'
250
250
  */
251
- CONTINUE,
251
+ CONTINUE = 1,
252
252
  }
253
253
 
254
254
 
@@ -265,7 +265,7 @@ export namespace Gcr {
265
265
  /**
266
266
  * another prompt is already in progress
267
267
  */
268
- SYSTEM_PROMPT_IN_PROGRESS,
268
+ SYSTEM_PROMPT_IN_PROGRESS = 1,
269
269
  }
270
270
 
271
271
 
@@ -278,48 +278,55 @@ export namespace Gcr {
278
278
  /**
279
279
  * only one prompt shown at a time
280
280
  */
281
- SINGLE,
281
+ SINGLE = 0,
282
282
  /**
283
283
  * more than one prompt shown at a time
284
284
  */
285
- MULTIPLE,
285
+ MULTIPLE = 1,
286
286
  }
287
287
 
288
288
 
289
289
  /**
290
290
  * The major version number of the Gcr library.
291
+ * @default 4
291
292
  */
292
293
  const MAJOR_VERSION: number;
293
294
 
294
295
  /**
295
296
  * The micro version number of the Gcr library.
297
+ * @default 0
296
298
  */
297
299
  const MICRO_VERSION: number;
298
300
 
299
301
  /**
300
302
  * The minor version number of the Gcr library.
303
+ * @default 4
301
304
  */
302
305
  const MINOR_VERSION: number;
303
306
 
304
307
  /**
305
308
  * The purpose used to verify the client certificate in a TLS connection.
309
+ * @default 1.3.6.1.5.5.7.3.2
306
310
  */
307
311
  const PURPOSE_CLIENT_AUTH: string;
308
312
 
309
313
  /**
310
314
  * The purpose used to verify certificate used for the signature on signed code.
315
+ * @default 1.3.6.1.5.5.7.3.3
311
316
  */
312
317
  const PURPOSE_CODE_SIGNING: string;
313
318
 
314
319
  /**
315
320
  * The purpose used to verify certificates that are used in email communication
316
321
  * such as S/MIME.
322
+ * @default 1.3.6.1.5.5.7.3.4
317
323
  */
318
324
  const PURPOSE_EMAIL: string;
319
325
 
320
326
  /**
321
327
  * The purpose used to verify the server certificate in a TLS connection. This
322
328
  * is the most common purpose in use.
329
+ * @default 1.3.6.1.5.5.7.3.1
323
330
  */
324
331
  const PURPOSE_SERVER_AUTH: string;
325
332
 
@@ -327,15 +334,28 @@ export namespace Gcr {
327
334
  * The current secret exchange protocol. Key agreement is done using DH with the
328
335
  * 1536 bit IKE parameter group. Keys are derived using SHA256 with HKDF. The
329
336
  * transport encryption is done with 128 bit AES.
337
+ * @default sx-aes-1
330
338
  */
331
339
  const SECRET_EXCHANGE_PROTOCOL_1: string;
332
340
 
341
+ /**
342
+ * @default always
343
+ */
333
344
  const UNLOCK_OPTION_ALWAYS: string;
334
345
 
346
+ /**
347
+ * @default idle
348
+ */
335
349
  const UNLOCK_OPTION_IDLE: string;
336
350
 
351
+ /**
352
+ * @default session
353
+ */
337
354
  const UNLOCK_OPTION_SESSION: string;
338
355
 
356
+ /**
357
+ * @default timeout
358
+ */
339
359
  const UNLOCK_OPTION_TIMEOUT: string;
340
360
 
341
361
  function data_error_get_domain(): GLib.Quark;
@@ -498,6 +518,7 @@ export namespace Gcr {
498
518
  * @param module_path the full file path of the PKCS#11 module
499
519
  * @param unused unused
500
520
  * @returns whether the module was sucessfully added.
521
+ * @throws GLib.Error
501
522
  */
502
523
  function pkcs11_add_module_from_file(module_path: string, unused: null): boolean;
503
524
 
@@ -551,6 +572,7 @@ export namespace Gcr {
551
572
  * Asynchronously initialize the registered PKCS#11 modules.
552
573
  * @param cancellable optional cancellable used to cancel the operation
553
574
  * @returns whether the operation was successful or not.
575
+ * @throws GLib.Error
554
576
  */
555
577
  function pkcs11_initialize(cancellable: Gio.Cancellable | null): boolean;
556
578
 
@@ -577,6 +599,7 @@ export namespace Gcr {
577
599
  * modules.
578
600
  * @param result the asynchronous result
579
601
  * @returns whether the operation was successful or not.
602
+ * @throws GLib.Error
580
603
  */
581
604
  function pkcs11_initialize_finish(result: Gio.AsyncResult): boolean;
582
605
 
@@ -626,6 +649,7 @@ export namespace Gcr {
626
649
  * @param peer the peer for this pinned certificate
627
650
  * @param cancellable a {@link Gio.Cancellable}
628
651
  * @returns `true` if the pinned certificate is recorded successfully
652
+ * @throws GLib.Error
629
653
  */
630
654
  function trust_add_pinned_certificate(certificate: Certificate, purpose: string, peer: string, cancellable: Gio.Cancellable | null): boolean;
631
655
 
@@ -688,6 +712,7 @@ export namespace Gcr {
688
712
  * {@link Gcr.trust_add_pinned_certificate_async}.
689
713
  * @param result the {@link Gio.AsyncResult} passed to the callback
690
714
  * @returns `true` if the pinned certificate is recorded successfully
715
+ * @throws GLib.Error
691
716
  */
692
717
  function trust_add_pinned_certificate_finish(result: Gio.AsyncResult): boolean;
693
718
 
@@ -705,6 +730,7 @@ export namespace Gcr {
705
730
  * @param purpose the purpose string
706
731
  * @param cancellable a {@link Gio.Cancellable}
707
732
  * @returns `true` if the certificate is a trust anchor
733
+ * @throws GLib.Error
708
734
  */
709
735
  function trust_is_certificate_anchored(certificate: Certificate, purpose: string, cancellable: Gio.Cancellable | null): boolean;
710
736
 
@@ -758,6 +784,7 @@ export namespace Gcr {
758
784
  * if an error occurred.
759
785
  * @param result the {@link Gio.AsyncResult} passed to the callback
760
786
  * @returns `true` if the certificate is a trust anchor
787
+ * @throws GLib.Error
761
788
  */
762
789
  function trust_is_certificate_anchored_finish(result: Gio.AsyncResult): boolean;
763
790
 
@@ -773,6 +800,7 @@ export namespace Gcr {
773
800
  * @param issuer The raw issuer
774
801
  * @param cancellable a {@link Gio.Cancellable} or `null`
775
802
  * @returns `true` if the certificate is marked as distrusted
803
+ * @throws GLib.Error
776
804
  */
777
805
  function trust_is_certificate_distrusted(serial_nr: Uint8Array | string, issuer: Uint8Array | string, cancellable: Gio.Cancellable | null): boolean;
778
806
 
@@ -838,6 +866,7 @@ export namespace Gcr {
838
866
  * if an error occurred.
839
867
  * @param result the {@link Gio.AsyncResult} passed to the callback
840
868
  * @returns `true` if the certificate is a trust anchor
869
+ * @throws GLib.Error
841
870
  */
842
871
  function trust_is_certificate_distrusted_finish(result: Gio.AsyncResult): boolean;
843
872
 
@@ -855,6 +884,7 @@ export namespace Gcr {
855
884
  * @param peer the peer for this pinned
856
885
  * @param cancellable a {@link Gio.Cancellable}
857
886
  * @returns `true` if the certificate is pinned for the host and purpose
887
+ * @throws GLib.Error
858
888
  */
859
889
  function trust_is_certificate_pinned(certificate: Certificate, purpose: string, peer: string, cancellable: Gio.Cancellable | null): boolean;
860
890
 
@@ -908,6 +938,7 @@ export namespace Gcr {
908
938
  * if an error occurred.
909
939
  * @param result the {@link Gio.AsyncResult} passed to the callback
910
940
  * @returns `true` if the certificate is pinned.
941
+ * @throws GLib.Error
911
942
  */
912
943
  function trust_is_certificate_pinned_finish(result: Gio.AsyncResult): boolean;
913
944
 
@@ -924,6 +955,7 @@ export namespace Gcr {
924
955
  * @param peer the peer for this pinned certificate
925
956
  * @param cancellable a {@link Gio.Cancellable}
926
957
  * @returns `true` if the pinned certificate no longer exists
958
+ * @throws GLib.Error
927
959
  */
928
960
  function trust_remove_pinned_certificate(certificate: Certificate, purpose: string, peer: string, cancellable: Gio.Cancellable | null): boolean;
929
961
 
@@ -980,6 +1012,7 @@ export namespace Gcr {
980
1012
  * {@link Gcr.trust_remove_pinned_certificate_async}.
981
1013
  * @param result the {@link Gio.AsyncResult} passed to the callback
982
1014
  * @returns `true` if the pinned certificate no longer exists
1015
+ * @throws GLib.Error
983
1016
  */
984
1017
  function trust_remove_pinned_certificate_finish(result: Gio.AsyncResult): boolean;
985
1018
 
@@ -991,14 +1024,14 @@ export namespace Gcr {
991
1024
  /**
992
1025
  * no flags
993
1026
  */
994
- NONE,
1027
+ NONE = 0,
995
1028
  /**
996
1029
  * If this flag is specified then no
997
1030
  * lookups for anchors or pinned certificates are done, and the resulting chain
998
1031
  * will be neither anchored or pinned. Additionally no missing certificate
999
1032
  * authorities are looked up in PKCS#11.
1000
1033
  */
1001
- NO_LOOKUPS,
1034
+ NO_LOOKUPS = 1,
1002
1035
  }
1003
1036
 
1004
1037
 
@@ -1006,8 +1039,8 @@ export namespace Gcr {
1006
1039
  * @gir-type Flags
1007
1040
  */
1008
1041
  enum CertificateSectionFlags {
1009
- NONE,
1010
- IMPORTANT,
1042
+ NONE = 0,
1043
+ IMPORTANT = 1,
1011
1044
  }
1012
1045
 
1013
1046
 
@@ -1212,6 +1245,7 @@ export namespace Gcr {
1212
1245
  * @param flags chain completion flags
1213
1246
  * @param cancellable a {@link Gio.Cancellable} or `null`
1214
1247
  * @returns whether the operation completed successfully
1248
+ * @throws GLib.Error
1215
1249
  */
1216
1250
  build(purpose: string, peer: string | null, flags: CertificateChainFlags, cancellable: Gio.Cancellable | null): boolean;
1217
1251
 
@@ -1333,6 +1367,7 @@ export namespace Gcr {
1333
1367
  * `gcr_certificate_chain_build_async()`.
1334
1368
  * @param result the {@link Gio.AsyncResult} passed to the callback
1335
1369
  * @returns whether the operation succeeded
1370
+ * @throws GLib.Error
1336
1371
  */
1337
1372
  build_finish(result: Gio.AsyncResult): boolean;
1338
1373
 
@@ -3210,6 +3245,7 @@ export namespace Gcr {
3210
3245
  * This call may block as it signs the request using the private key.
3211
3246
  * @param cancellable a cancellation object
3212
3247
  * @returns whether certificate request was successfully completed or not
3248
+ * @throws GLib.Error
3213
3249
  */
3214
3250
  complete(cancellable: Gio.Cancellable | null): boolean;
3215
3251
 
@@ -3247,6 +3283,7 @@ export namespace Gcr {
3247
3283
  * request.
3248
3284
  * @param result result of the asynchronous operation
3249
3285
  * @returns whether certificate request was successfully completed or not
3286
+ * @throws GLib.Error
3250
3287
  */
3251
3288
  complete_finish(result: Gio.AsyncResult): boolean;
3252
3289
 
@@ -3681,7 +3718,7 @@ export namespace Gcr {
3681
3718
  * @signal
3682
3719
  * @run-last
3683
3720
  */
3684
- authenticate: (arg0: number) => boolean | void;
3721
+ authenticate: (count: number) => boolean | void;
3685
3722
  /**
3686
3723
  * This signal is emitted when an item is sucessfully parsed. To access
3687
3724
  * the information about the item use the `gcr_parser_get_parsed_label()`,
@@ -3902,6 +3939,7 @@ export namespace Gcr {
3902
3939
  * `Gcr.Parser::authenticate` signals may fire during the parsing.
3903
3940
  * @param data the data to parse
3904
3941
  * @returns Whether the data was parsed successfully or not.
3942
+ * @throws GLib.Error
3905
3943
  */
3906
3944
  parse_bytes(data: GLib.Bytes | Uint8Array): boolean;
3907
3945
 
@@ -3913,6 +3951,7 @@ export namespace Gcr {
3913
3951
  * this.
3914
3952
  * @param data the data to parse
3915
3953
  * @returns Whether the data was parsed successfully or not.
3954
+ * @throws GLib.Error
3916
3955
  */
3917
3956
  parse_data(data: Uint8Array | string): boolean;
3918
3957
 
@@ -3926,6 +3965,7 @@ export namespace Gcr {
3926
3965
  * @param input The input stream
3927
3966
  * @param cancellable An optional cancellation object
3928
3967
  * @returns Whether the parsing completed successfully or not.
3968
+ * @throws GLib.Error
3929
3969
  */
3930
3970
  parse_stream(input: Gio.InputStream, cancellable: Gio.Cancellable | null): boolean;
3931
3971
 
@@ -3968,6 +4008,7 @@ export namespace Gcr {
3968
4008
  * Complete an operation to parse a stream.
3969
4009
  * @param result The operation result
3970
4010
  * @returns Whether the parsing completed successfully or not.
4011
+ * @throws GLib.Error
3971
4012
  */
3972
4013
  parse_stream_finish(result: Gio.AsyncResult): boolean;
3973
4014
 
@@ -5195,6 +5236,7 @@ export namespace Gcr {
5195
5236
  * still closed and may not be further used.
5196
5237
  * @param cancellable an optional cancellation object
5197
5238
  * @returns whether close was cleanly completed
5239
+ * @throws GLib.Error
5198
5240
  */
5199
5241
  close(cancellable: Gio.Cancellable | null): boolean;
5200
5242
 
@@ -5243,6 +5285,7 @@ export namespace Gcr {
5243
5285
  * still closed and may not be further used.
5244
5286
  * @param result asynchronous operation result
5245
5287
  * @returns whether close was cleanly completed
5288
+ * @throws GLib.Error
5246
5289
  */
5247
5290
  close_finish(result: Gio.AsyncResult): boolean;
5248
5291
 
@@ -5471,6 +5514,7 @@ export namespace Gcr {
5471
5514
  * an error occurs. Check the `error` argument to tell the difference.
5472
5515
  * @param cancellable optional cancellation object
5473
5516
  * @returns the reply from the prompt
5517
+ * @throws GLib.Error
5474
5518
  */
5475
5519
  confirm(cancellable: Gio.Cancellable | null): PromptReply;
5476
5520
 
@@ -5514,6 +5558,7 @@ export namespace Gcr {
5514
5558
  * an error occurs. Check the `error` argument to tell the difference.
5515
5559
  * @param result asynchronous result passed to callback
5516
5560
  * @returns the reply from the prompt
5561
+ * @throws GLib.Error
5517
5562
  */
5518
5563
  confirm_finish(result: Gio.AsyncResult): PromptReply;
5519
5564
 
@@ -5531,6 +5576,7 @@ export namespace Gcr {
5531
5576
  * an error occurs. Check the `error` argument to tell the difference.
5532
5577
  * @param cancellable optional cancellation object
5533
5578
  * @returns the reply from the prompt
5579
+ * @throws GLib.Error
5534
5580
  */
5535
5581
  confirm_run(cancellable: Gio.Cancellable | null): PromptReply;
5536
5582
 
@@ -5651,6 +5697,7 @@ export namespace Gcr {
5651
5697
  * `error` argument to tell the difference.
5652
5698
  * @param cancellable optional cancellation object
5653
5699
  * @returns the password owned by the prompt, or `null`
5700
+ * @throws GLib.Error
5654
5701
  */
5655
5702
  password(cancellable: Gio.Cancellable | null): string;
5656
5703
 
@@ -5694,6 +5741,7 @@ export namespace Gcr {
5694
5741
  * `error` argument to tell the difference.
5695
5742
  * @param result asynchronous result passed to callback
5696
5743
  * @returns the password owned by the prompt, or `null`
5744
+ * @throws GLib.Error
5697
5745
  */
5698
5746
  password_finish(result: Gio.AsyncResult): string;
5699
5747
 
@@ -5713,6 +5761,7 @@ export namespace Gcr {
5713
5761
  * `error` argument to tell the difference.
5714
5762
  * @param cancellable optional cancellation object
5715
5763
  * @returns the password owned by the prompt, or `null`
5764
+ * @throws GLib.Error
5716
5765
  */
5717
5766
  password_run(cancellable: Gio.Cancellable | null): string;
5718
5767
 
@@ -6010,6 +6059,7 @@ export namespace Gcr {
6010
6059
  * @param res a {@link Gio.AsyncResult}.
6011
6060
  * @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
6012
6061
  * @since 2.22
6062
+ * @throws GLib.Error
6013
6063
  */
6014
6064
  init_finish(res: Gio.AsyncResult): boolean;
6015
6065
 
@@ -6019,6 +6069,7 @@ export namespace Gcr {
6019
6069
  * @param res the {@link Gio.AsyncResult} from the callback
6020
6070
  * @returns a newly created {@link GObject.Object}, or `null` on error. Free with `g_object_unref()`.
6021
6071
  * @since 2.22
6072
+ * @throws GLib.Error
6022
6073
  */
6023
6074
  new_finish(res: Gio.AsyncResult): SystemPrompt;
6024
6075
 
@@ -6118,6 +6169,7 @@ export namespace Gcr {
6118
6169
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
6119
6170
  * @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
6120
6171
  * @since 2.22
6172
+ * @throws GLib.Error
6121
6173
  */
6122
6174
  init(cancellable: Gio.Cancellable | null): boolean;
6123
6175
 
@@ -7041,6 +7093,7 @@ export namespace Gcr {
7041
7093
  * @param builder supplemented attributes
7042
7094
  * @param cancellable optional cancellable object
7043
7095
  * @returns {@link Gio.TlsInteractionResult.HANDLED} if successful or {@link Gio.TlsInteractionResult.FAILED}
7096
+ * @throws GLib.Error
7044
7097
  */
7045
7098
  supplement(builder: Gck.Builder, cancellable: Gio.Cancellable | null): Gio.TlsInteractionResult;
7046
7099
 
@@ -7086,6 +7139,7 @@ export namespace Gcr {
7086
7139
  * with {@link Gio.IOErrorEnum.CANCELLED}.
7087
7140
  * @param result the asynchronous result
7088
7141
  * @returns {@link Gio.TlsInteractionResult.HANDLED} if successful or {@link Gio.TlsInteractionResult.FAILED}
7142
+ * @throws GLib.Error
7089
7143
  */
7090
7144
  supplement_finish(result: Gio.AsyncResult): Gio.TlsInteractionResult;
7091
7145
 
@@ -7260,6 +7314,7 @@ export namespace Gcr {
7260
7314
  * Complete an asynchronous operation to import queued items.
7261
7315
  * @param result an asynchronous result
7262
7316
  * @returns whether the import succeeded or failed
7317
+ * @throws GLib.Error
7263
7318
  */
7264
7319
  import_finish(result: Gio.AsyncResult): boolean;
7265
7320
 
@@ -7614,6 +7669,7 @@ export namespace Gcr {
7614
7669
  * an error occurs. Check the `error` argument to tell the difference.
7615
7670
  * @param cancellable optional cancellation object
7616
7671
  * @returns the reply from the prompt
7672
+ * @throws GLib.Error
7617
7673
  */
7618
7674
  confirm(cancellable: Gio.Cancellable | null): PromptReply;
7619
7675
 
@@ -7657,6 +7713,7 @@ export namespace Gcr {
7657
7713
  * an error occurs. Check the `error` argument to tell the difference.
7658
7714
  * @param result asynchronous result passed to callback
7659
7715
  * @returns the reply from the prompt
7716
+ * @throws GLib.Error
7660
7717
  */
7661
7718
  confirm_finish(result: Gio.AsyncResult): PromptReply;
7662
7719
 
@@ -7674,6 +7731,7 @@ export namespace Gcr {
7674
7731
  * an error occurs. Check the `error` argument to tell the difference.
7675
7732
  * @param cancellable optional cancellation object
7676
7733
  * @returns the reply from the prompt
7734
+ * @throws GLib.Error
7677
7735
  */
7678
7736
  confirm_run(cancellable: Gio.Cancellable | null): PromptReply;
7679
7737
 
@@ -7794,6 +7852,7 @@ export namespace Gcr {
7794
7852
  * `error` argument to tell the difference.
7795
7853
  * @param cancellable optional cancellation object
7796
7854
  * @returns the password owned by the prompt, or `null`
7855
+ * @throws GLib.Error
7797
7856
  */
7798
7857
  password(cancellable: Gio.Cancellable | null): string;
7799
7858
 
@@ -7837,6 +7896,7 @@ export namespace Gcr {
7837
7896
  * `error` argument to tell the difference.
7838
7897
  * @param result asynchronous result passed to callback
7839
7898
  * @returns the password owned by the prompt, or `null`
7899
+ * @throws GLib.Error
7840
7900
  */
7841
7901
  password_finish(result: Gio.AsyncResult): string;
7842
7902
 
@@ -7856,6 +7916,7 @@ export namespace Gcr {
7856
7916
  * `error` argument to tell the difference.
7857
7917
  * @param cancellable optional cancellation object
7858
7918
  * @returns the password owned by the prompt, or `null`
7919
+ * @throws GLib.Error
7859
7920
  */
7860
7921
  password_run(cancellable: Gio.Cancellable | null): string;
7861
7922
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gcr-4",
3
- "version": "4.4.0",
3
+ "version": "4.5.0",
4
4
  "libraryVersion": "4.4.0",
5
5
  "description": "GJS TypeScript type definitions for Gcr-4, generated from library version 4.4.0",
6
6
  "type": "module",
@@ -32,12 +32,12 @@
32
32
  "test": "tsc --project tsconfig.json"
33
33
  },
34
34
  "dependencies": {
35
- "@girs/gjs": "^4.4.0",
36
- "@girs/gio-2.0": "^4.4.0",
37
- "@girs/gobject-2.0": "^4.4.0",
38
- "@girs/glib-2.0": "^4.4.0",
39
- "@girs/gmodule-2.0": "^4.4.0",
40
- "@girs/gck-2": "^4.4.0" },
35
+ "@girs/gjs": "^4.5.0",
36
+ "@girs/gio-2.0": "^4.5.0",
37
+ "@girs/gobject-2.0": "^4.5.0",
38
+ "@girs/glib-2.0": "^4.5.0",
39
+ "@girs/gmodule-2.0": "^4.5.0",
40
+ "@girs/gck-2": "^4.5.0" },
41
41
  "devDependencies": {
42
42
  "typescript": "*"
43
43
  },