@girs/cloudproviders-0.3 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.
- package/README.md +36 -41
- package/cloudproviders-0.3.d.ts +19 -4
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -4,82 +4,77 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
+
GJS TypeScript type definitions for CloudProviders-0.3 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.5.0.
|
|
7
8
|
|
|
8
|
-
|
|
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/cloudproviders-0.3
|
|
15
16
|
```
|
|
16
17
|
|
|
17
|
-
|
|
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/cloudproviders-0.3` | the namespace as a default export, plus the ambient and global declarations |
|
|
26
|
+
| `@girs/cloudproviders-0.3/ambient` | only the `gi://` module declarations |
|
|
27
|
+
| `@girs/cloudproviders-0.3/import` | only the `imports.gi` declarations |
|
|
28
|
+
| `@girs/cloudproviders-0.3/cloudproviders-0.3` | 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 CloudProviders from '@girs/cloudproviders-0.3';
|
|
22
38
|
```
|
|
23
39
|
|
|
24
|
-
###
|
|
40
|
+
### As `gi://`
|
|
25
41
|
|
|
26
|
-
|
|
27
|
-
|
|
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/cloudproviders-0.3'
|
|
46
|
+
import '@girs/cloudproviders-0.3';
|
|
32
47
|
```
|
|
33
48
|
|
|
34
|
-
`tsconfig.json`:
|
|
35
49
|
```json
|
|
36
|
-
{
|
|
37
|
-
"compilerOptions": {
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
"include": ["@girs/cloudproviders-0.3"],
|
|
41
|
-
...
|
|
42
|
-
}
|
|
50
|
+
{ "include": ["@girs/cloudproviders-0.3"] }
|
|
43
51
|
```
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
Then the runtime spelling type-checks:
|
|
46
54
|
|
|
47
55
|
```ts
|
|
48
56
|
import CloudProviders from 'gi://CloudProviders?version=0.3';
|
|
49
57
|
```
|
|
50
58
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
GJS's global `imports.gi` works too, with types.
|
|
54
|
-
For this you need to include `@girs/cloudproviders-0.3` or `@girs/cloudproviders-0.3/import` in your `tsconfig` or entry point Typescript file:
|
|
59
|
+
Referencing `@girs/cloudproviders-0.3/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
|
-
`
|
|
57
|
-
```ts
|
|
58
|
-
import '@girs/cloudproviders-0.3'
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
`tsconfig.json`:
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"compilerOptions": {
|
|
65
|
-
...
|
|
66
|
-
},
|
|
67
|
-
"include": ["@girs/cloudproviders-0.3"],
|
|
68
|
-
...
|
|
69
|
-
}
|
|
70
|
-
```
|
|
62
|
+
### As `imports.gi`
|
|
71
63
|
|
|
72
|
-
|
|
64
|
+
GJS's global object works the same way, via `@girs/cloudproviders-0.3/import`:
|
|
73
65
|
|
|
74
66
|
```ts
|
|
75
67
|
const CloudProviders = imports.gi.CloudProviders;
|
|
76
68
|
```
|
|
77
69
|
|
|
78
|
-
|
|
70
|
+
## Building
|
|
79
71
|
|
|
80
|
-
|
|
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
|
-
|
|
78
|
+
Every pre-generated package is at [gjsify/types](https://github.com/gjsify/types).
|
|
79
|
+
|
|
85
80
|
|
package/cloudproviders-0.3.d.ts
CHANGED
|
@@ -27,15 +27,21 @@ export namespace CloudProviders {
|
|
|
27
27
|
* @gir-type Enum
|
|
28
28
|
*/
|
|
29
29
|
enum AccountStatus {
|
|
30
|
-
INVALID,
|
|
31
|
-
IDLE,
|
|
32
|
-
SYNCING,
|
|
33
|
-
ERROR,
|
|
30
|
+
INVALID = 0,
|
|
31
|
+
IDLE = 1,
|
|
32
|
+
SYNCING = 2,
|
|
33
|
+
ERROR = 3,
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* @default org.freedesktop.CloudProviders.Account
|
|
39
|
+
*/
|
|
37
40
|
const ACCOUNT_DBUS_IFACE: string;
|
|
38
41
|
|
|
42
|
+
/**
|
|
43
|
+
* @default org.freedesktop.CloudProviders.Provider
|
|
44
|
+
*/
|
|
39
45
|
const PROVIDER_DBUS_IFACE: string;
|
|
40
46
|
|
|
41
47
|
/**
|
|
@@ -812,6 +818,7 @@ export namespace CloudProviders {
|
|
|
812
818
|
* @param res a {@link Gio.AsyncResult}.
|
|
813
819
|
* @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
|
|
814
820
|
* @since 2.22
|
|
821
|
+
* @throws GLib.Error
|
|
815
822
|
*/
|
|
816
823
|
init_finish(res: Gio.AsyncResult): boolean;
|
|
817
824
|
|
|
@@ -821,6 +828,7 @@ export namespace CloudProviders {
|
|
|
821
828
|
* @param res the {@link Gio.AsyncResult} from the callback
|
|
822
829
|
* @returns a newly created {@link GObject.Object}, or `null` on error. Free with `g_object_unref()`.
|
|
823
830
|
* @since 2.22
|
|
831
|
+
* @throws GLib.Error
|
|
824
832
|
*/
|
|
825
833
|
new_finish(res: Gio.AsyncResult): DbusAccountProxy;
|
|
826
834
|
|
|
@@ -985,6 +993,7 @@ export namespace CloudProviders {
|
|
|
985
993
|
* @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
|
|
986
994
|
* @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
|
|
987
995
|
* @since 2.22
|
|
996
|
+
* @throws GLib.Error
|
|
988
997
|
*/
|
|
989
998
|
init(cancellable: Gio.Cancellable | null): boolean;
|
|
990
999
|
|
|
@@ -1480,6 +1489,7 @@ export namespace CloudProviders {
|
|
|
1480
1489
|
* @param res a {@link Gio.AsyncResult}.
|
|
1481
1490
|
* @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
|
|
1482
1491
|
* @since 2.22
|
|
1492
|
+
* @throws GLib.Error
|
|
1483
1493
|
*/
|
|
1484
1494
|
init_finish(res: Gio.AsyncResult): boolean;
|
|
1485
1495
|
|
|
@@ -1489,6 +1499,7 @@ export namespace CloudProviders {
|
|
|
1489
1499
|
* @param res the {@link Gio.AsyncResult} from the callback
|
|
1490
1500
|
* @returns a newly created {@link GObject.Object}, or `null` on error. Free with `g_object_unref()`.
|
|
1491
1501
|
* @since 2.22
|
|
1502
|
+
* @throws GLib.Error
|
|
1492
1503
|
*/
|
|
1493
1504
|
new_finish(res: Gio.AsyncResult): DbusObjectManagerClient;
|
|
1494
1505
|
|
|
@@ -1688,6 +1699,7 @@ export namespace CloudProviders {
|
|
|
1688
1699
|
* @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
|
|
1689
1700
|
* @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
|
|
1690
1701
|
* @since 2.22
|
|
1702
|
+
* @throws GLib.Error
|
|
1691
1703
|
*/
|
|
1692
1704
|
init(cancellable: Gio.Cancellable | null): boolean;
|
|
1693
1705
|
|
|
@@ -2294,6 +2306,7 @@ export namespace CloudProviders {
|
|
|
2294
2306
|
* @param res a {@link Gio.AsyncResult}.
|
|
2295
2307
|
* @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
|
|
2296
2308
|
* @since 2.22
|
|
2309
|
+
* @throws GLib.Error
|
|
2297
2310
|
*/
|
|
2298
2311
|
init_finish(res: Gio.AsyncResult): boolean;
|
|
2299
2312
|
|
|
@@ -2303,6 +2316,7 @@ export namespace CloudProviders {
|
|
|
2303
2316
|
* @param res the {@link Gio.AsyncResult} from the callback
|
|
2304
2317
|
* @returns a newly created {@link GObject.Object}, or `null` on error. Free with `g_object_unref()`.
|
|
2305
2318
|
* @since 2.22
|
|
2319
|
+
* @throws GLib.Error
|
|
2306
2320
|
*/
|
|
2307
2321
|
new_finish(res: Gio.AsyncResult): DbusProviderProxy;
|
|
2308
2322
|
|
|
@@ -2467,6 +2481,7 @@ export namespace CloudProviders {
|
|
|
2467
2481
|
* @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
|
|
2468
2482
|
* @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
|
|
2469
2483
|
* @since 2.22
|
|
2484
|
+
* @throws GLib.Error
|
|
2470
2485
|
*/
|
|
2471
2486
|
init(cancellable: Gio.Cancellable | null): boolean;
|
|
2472
2487
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/cloudproviders-0.3",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for CloudProviders-0.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "cloudproviders-0.3.js",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"test": "tsc --project tsconfig.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@girs/gjs": "^4.
|
|
35
|
-
"@girs/gio-2.0": "^4.
|
|
36
|
-
"@girs/gobject-2.0": "^4.
|
|
37
|
-
"@girs/glib-2.0": "^4.
|
|
38
|
-
"@girs/gmodule-2.0": "^4.
|
|
34
|
+
"@girs/gjs": "^4.5.0",
|
|
35
|
+
"@girs/gio-2.0": "^4.5.0",
|
|
36
|
+
"@girs/gobject-2.0": "^4.5.0",
|
|
37
|
+
"@girs/glib-2.0": "^4.5.0",
|
|
38
|
+
"@girs/gmodule-2.0": "^4.5.0" },
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"typescript": "*"
|
|
41
41
|
},
|