@girs/geocodeglib-1.0 1.0.0-3.2.4 → 1.0.0-3.2.6

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 CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/geocodeglib-1.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for GeocodeGlib-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.4.
8
+ GJS TypeScript type definitions for GeocodeGlib-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.6.
9
9
 
10
10
  Geocode Helper library
11
11
 
@@ -82,6 +82,19 @@ Now you have also type support for this, too:
82
82
  const GeocodeGlib = imports.gi.GeocodeGlib;
83
83
  ```
84
84
 
85
+
86
+ ### ESM vs. CommonJS
87
+
88
+ GJS supports two different import syntaxes. The new modern ESM syntax and the old global imports syntax.
89
+
90
+ In TypeScript projects for GJS and GNOME Shell extensions, you have the flexibility to use `ESM` syntax and then decide the import syntax for your bundled file. If your bundler is configured to use `CommonJS`, it will convert to the GJS-specific global imports syntax, like `const moduleName = imports.gi[moduleName]`. This is different from the traditional `require` syntax seen in Node.js. The global imports syntax is chosen because it aligns with the CommonJS format supported by NPM, which is used for the generated type definitions and this package.
91
+
92
+ On the other hand, if you configure your bundler to use ESM, it will retain the ESM import syntax. It's crucial to ensure that your bundler is set up to correctly translate and bundle these imports into either CommonJS or ESM format, depending on your project's requirements.
93
+
94
+ This approach is particularly important due to the `@girs` types, which include both `*.cjs `files, using the GJS global imports syntax, and `*.js` files, which utilize the ESM syntax. By appropriately setting up your bundler, you can control which syntax—CommonJS or ESM—is used in your project. The choice of CommonJS in this context is also due to the similarity between the GJS-specific global imports and CommonJS syntax, allowing for easier management and bundling in these specific types of projects.
95
+
96
+ Since GNOME Shell 45, you should only use ESM, even for GNOME Shell extensions. Before that, extensions had to use the global import syntax, unlike normal GJS applications, where ESM has been available for some time.
97
+
85
98
  ### Bundle
86
99
 
87
100
  Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
@@ -1,9 +1,12 @@
1
1
 
2
-
3
2
  declare module 'gi://GeocodeGlib?version=1.0' {
4
3
  import GeocodeGlib10 from '@girs/geocodeglib-1.0';
5
4
  export default GeocodeGlib10;
6
5
  }
7
6
 
7
+ declare module 'gi://GeocodeGlib' {
8
+ import GeocodeGlib10 from '@girs/geocodeglib-1.0';
9
+ export default GeocodeGlib10;
10
+ }
8
11
 
9
12
 
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  import GeocodeGlib10 from '@girs/geocodeglib-1.0';
4
3
 
5
4
  declare global {
@@ -685,6 +685,16 @@ export module Forward {
685
685
  * this area is returned.
686
686
  */
687
687
  search_area?: BoundingBox | null
688
+ /**
689
+ * The number of requested results to a search query.
690
+ */
691
+ answerCount?: number | null
692
+ /**
693
+ * The bounding box that limits the search area.
694
+ * If #GeocodeForward:bounded property is set to #TRUE only results from
695
+ * this area is returned.
696
+ */
697
+ searchArea?: BoundingBox | null
688
698
  }
689
699
 
690
700
  }
@@ -697,6 +707,10 @@ export interface Forward {
697
707
  * The number of requested results to a search query.
698
708
  */
699
709
  answer_count: number
710
+ /**
711
+ * The number of requested results to a search query.
712
+ */
713
+ answerCount: number
700
714
  /**
701
715
  * If set to #TRUE then only results in the #GeocodeForward:search-area
702
716
  * bounding box are returned.
@@ -710,6 +724,12 @@ export interface Forward {
710
724
  * this area is returned.
711
725
  */
712
726
  search_area: BoundingBox
727
+ /**
728
+ * The bounding box that limits the search area.
729
+ * If #GeocodeForward:bounded property is set to #TRUE only results from
730
+ * this area is returned.
731
+ */
732
+ searchArea: BoundingBox
713
733
 
714
734
  // Owm methods of GeocodeGlib-1.0.GeocodeGlib.Forward
715
735
 
@@ -1239,6 +1259,31 @@ export module Nominatim {
1239
1259
  * string.
1240
1260
  */
1241
1261
  user_agent?: string | null
1262
+ /**
1263
+ * The base URL of the Nominatim service, for example
1264
+ * `https://nominatim.example.org`.
1265
+ */
1266
+ baseUrl?: string | null
1267
+ /**
1268
+ * E-mail address of the maintainer of the software making the
1269
+ * geocoding requests to the Nominatim server. This is used to contact
1270
+ * them in the event of a problem with their usage. See
1271
+ * [the Nominatim API](http://wiki.openstreetmap.org/wiki/Nominatim).
1272
+ */
1273
+ maintainerEmailAddress?: string | null
1274
+ /**
1275
+ * User-Agent string to send with HTTP(S) requests, or %NULL to use the
1276
+ * default user agent, which is derived from the geocode-glib version
1277
+ * and #GApplication:id, for example: `geocode-glib/3.20 (MyAppId)`.
1278
+ *
1279
+ * As per the
1280
+ * [Nominatim usage policy](http://wiki.openstreetmap.org/wiki/Nominatim_usage_policy),
1281
+ * it should be set to a string which identifies the application which
1282
+ * is using geocode-glib, and must be a valid
1283
+ * [user agent](https://tools.ietf.org/html/rfc7231#section-5.5.3)
1284
+ * string.
1285
+ */
1286
+ userAgent?: string | null
1242
1287
  }
1243
1288
 
1244
1289
  }
@@ -1252,6 +1297,11 @@ export interface Nominatim extends Backend {
1252
1297
  * `https://nominatim.example.org`.
1253
1298
  */
1254
1299
  readonly base_url: string | null
1300
+ /**
1301
+ * The base URL of the Nominatim service, for example
1302
+ * `https://nominatim.example.org`.
1303
+ */
1304
+ readonly baseUrl: string | null
1255
1305
  /**
1256
1306
  * E-mail address of the maintainer of the software making the
1257
1307
  * geocoding requests to the Nominatim server. This is used to contact
@@ -1259,6 +1309,13 @@ export interface Nominatim extends Backend {
1259
1309
  * [the Nominatim API](http://wiki.openstreetmap.org/wiki/Nominatim).
1260
1310
  */
1261
1311
  readonly maintainer_email_address: string | null
1312
+ /**
1313
+ * E-mail address of the maintainer of the software making the
1314
+ * geocoding requests to the Nominatim server. This is used to contact
1315
+ * them in the event of a problem with their usage. See
1316
+ * [the Nominatim API](http://wiki.openstreetmap.org/wiki/Nominatim).
1317
+ */
1318
+ readonly maintainerEmailAddress: string | null
1262
1319
  /**
1263
1320
  * User-Agent string to send with HTTP(S) requests, or %NULL to use the
1264
1321
  * default user agent, which is derived from the geocode-glib version
@@ -1272,6 +1329,19 @@ export interface Nominatim extends Backend {
1272
1329
  * string.
1273
1330
  */
1274
1331
  user_agent: string | null
1332
+ /**
1333
+ * User-Agent string to send with HTTP(S) requests, or %NULL to use the
1334
+ * default user agent, which is derived from the geocode-glib version
1335
+ * and #GApplication:id, for example: `geocode-glib/3.20 (MyAppId)`.
1336
+ *
1337
+ * As per the
1338
+ * [Nominatim usage policy](http://wiki.openstreetmap.org/wiki/Nominatim_usage_policy),
1339
+ * it should be set to a string which identifies the application which
1340
+ * is using geocode-glib, and must be a valid
1341
+ * [user agent](https://tools.ietf.org/html/rfc7231#section-5.5.3)
1342
+ * string.
1343
+ */
1344
+ userAgent: string | null
1275
1345
 
1276
1346
  // Own fields of GeocodeGlib-1.0.GeocodeGlib.Nominatim
1277
1347
 
@@ -1425,6 +1495,38 @@ export module Place {
1425
1495
  * The town.
1426
1496
  */
1427
1497
  town?: string | null
1498
+ /**
1499
+ * The local administrative area.
1500
+ */
1501
+ administrativeArea?: string | null
1502
+ /**
1503
+ * The bounding box for the place.
1504
+ */
1505
+ boundingBox?: BoundingBox | null
1506
+ /**
1507
+ * The country code.
1508
+ */
1509
+ countryCode?: string | null
1510
+ /**
1511
+ * The OpenStreetMap id of the place.
1512
+ */
1513
+ osmId?: string | null
1514
+ /**
1515
+ * The OpenStreetMap type of the place.
1516
+ */
1517
+ osmType?: PlaceOsmType | null
1518
+ /**
1519
+ * The type of the place.
1520
+ */
1521
+ placeType?: PlaceType | null
1522
+ /**
1523
+ * The postal code.
1524
+ */
1525
+ postalCode?: string | null
1526
+ /**
1527
+ * The street address.
1528
+ */
1529
+ streetAddress?: string | null
1428
1530
  }
1429
1531
 
1430
1532
  }
@@ -1437,6 +1539,10 @@ export interface Place {
1437
1539
  * The local administrative area.
1438
1540
  */
1439
1541
  administrative_area: string | null
1542
+ /**
1543
+ * The local administrative area.
1544
+ */
1545
+ administrativeArea: string | null
1440
1546
  /**
1441
1547
  * A named area such as a campus or neighborhood.
1442
1548
  */
@@ -1445,6 +1551,10 @@ export interface Place {
1445
1551
  * The bounding box for the place.
1446
1552
  */
1447
1553
  bounding_box: BoundingBox
1554
+ /**
1555
+ * The bounding box for the place.
1556
+ */
1557
+ boundingBox: BoundingBox
1448
1558
  /**
1449
1559
  * A specific building on a street or in an area.
1450
1560
  */
@@ -1461,6 +1571,10 @@ export interface Place {
1461
1571
  * The country code.
1462
1572
  */
1463
1573
  country_code: string | null
1574
+ /**
1575
+ * The country code.
1576
+ */
1577
+ countryCode: string | null
1464
1578
  /**
1465
1579
  * The county.
1466
1580
  */
@@ -1481,18 +1595,34 @@ export interface Place {
1481
1595
  * The OpenStreetMap id of the place.
1482
1596
  */
1483
1597
  osm_id: string | null
1598
+ /**
1599
+ * The OpenStreetMap id of the place.
1600
+ */
1601
+ osmId: string | null
1484
1602
  /**
1485
1603
  * The OpenStreetMap type of the place.
1486
1604
  */
1487
1605
  osm_type: PlaceOsmType
1606
+ /**
1607
+ * The OpenStreetMap type of the place.
1608
+ */
1609
+ osmType: PlaceOsmType
1488
1610
  /**
1489
1611
  * The type of the place.
1490
1612
  */
1491
1613
  readonly place_type: PlaceType
1614
+ /**
1615
+ * The type of the place.
1616
+ */
1617
+ readonly placeType: PlaceType
1492
1618
  /**
1493
1619
  * The postal code.
1494
1620
  */
1495
1621
  postal_code: string | null
1622
+ /**
1623
+ * The postal code.
1624
+ */
1625
+ postalCode: string | null
1496
1626
  /**
1497
1627
  * The state.
1498
1628
  */
@@ -1505,6 +1635,10 @@ export interface Place {
1505
1635
  * The street address.
1506
1636
  */
1507
1637
  street_address: string | null
1638
+ /**
1639
+ * The street address.
1640
+ */
1641
+ streetAddress: string | null
1508
1642
  /**
1509
1643
  * The town.
1510
1644
  */
@@ -687,6 +687,16 @@ module Forward {
687
687
  * this area is returned.
688
688
  */
689
689
  search_area?: BoundingBox | null
690
+ /**
691
+ * The number of requested results to a search query.
692
+ */
693
+ answerCount?: number | null
694
+ /**
695
+ * The bounding box that limits the search area.
696
+ * If #GeocodeForward:bounded property is set to #TRUE only results from
697
+ * this area is returned.
698
+ */
699
+ searchArea?: BoundingBox | null
690
700
  }
691
701
 
692
702
  }
@@ -699,6 +709,10 @@ interface Forward {
699
709
  * The number of requested results to a search query.
700
710
  */
701
711
  answer_count: number
712
+ /**
713
+ * The number of requested results to a search query.
714
+ */
715
+ answerCount: number
702
716
  /**
703
717
  * If set to #TRUE then only results in the #GeocodeForward:search-area
704
718
  * bounding box are returned.
@@ -712,6 +726,12 @@ interface Forward {
712
726
  * this area is returned.
713
727
  */
714
728
  search_area: BoundingBox
729
+ /**
730
+ * The bounding box that limits the search area.
731
+ * If #GeocodeForward:bounded property is set to #TRUE only results from
732
+ * this area is returned.
733
+ */
734
+ searchArea: BoundingBox
715
735
 
716
736
  // Owm methods of GeocodeGlib-1.0.GeocodeGlib.Forward
717
737
 
@@ -1241,6 +1261,31 @@ module Nominatim {
1241
1261
  * string.
1242
1262
  */
1243
1263
  user_agent?: string | null
1264
+ /**
1265
+ * The base URL of the Nominatim service, for example
1266
+ * `https://nominatim.example.org`.
1267
+ */
1268
+ baseUrl?: string | null
1269
+ /**
1270
+ * E-mail address of the maintainer of the software making the
1271
+ * geocoding requests to the Nominatim server. This is used to contact
1272
+ * them in the event of a problem with their usage. See
1273
+ * [the Nominatim API](http://wiki.openstreetmap.org/wiki/Nominatim).
1274
+ */
1275
+ maintainerEmailAddress?: string | null
1276
+ /**
1277
+ * User-Agent string to send with HTTP(S) requests, or %NULL to use the
1278
+ * default user agent, which is derived from the geocode-glib version
1279
+ * and #GApplication:id, for example: `geocode-glib/3.20 (MyAppId)`.
1280
+ *
1281
+ * As per the
1282
+ * [Nominatim usage policy](http://wiki.openstreetmap.org/wiki/Nominatim_usage_policy),
1283
+ * it should be set to a string which identifies the application which
1284
+ * is using geocode-glib, and must be a valid
1285
+ * [user agent](https://tools.ietf.org/html/rfc7231#section-5.5.3)
1286
+ * string.
1287
+ */
1288
+ userAgent?: string | null
1244
1289
  }
1245
1290
 
1246
1291
  }
@@ -1254,6 +1299,11 @@ interface Nominatim extends Backend {
1254
1299
  * `https://nominatim.example.org`.
1255
1300
  */
1256
1301
  readonly base_url: string | null
1302
+ /**
1303
+ * The base URL of the Nominatim service, for example
1304
+ * `https://nominatim.example.org`.
1305
+ */
1306
+ readonly baseUrl: string | null
1257
1307
  /**
1258
1308
  * E-mail address of the maintainer of the software making the
1259
1309
  * geocoding requests to the Nominatim server. This is used to contact
@@ -1261,6 +1311,13 @@ interface Nominatim extends Backend {
1261
1311
  * [the Nominatim API](http://wiki.openstreetmap.org/wiki/Nominatim).
1262
1312
  */
1263
1313
  readonly maintainer_email_address: string | null
1314
+ /**
1315
+ * E-mail address of the maintainer of the software making the
1316
+ * geocoding requests to the Nominatim server. This is used to contact
1317
+ * them in the event of a problem with their usage. See
1318
+ * [the Nominatim API](http://wiki.openstreetmap.org/wiki/Nominatim).
1319
+ */
1320
+ readonly maintainerEmailAddress: string | null
1264
1321
  /**
1265
1322
  * User-Agent string to send with HTTP(S) requests, or %NULL to use the
1266
1323
  * default user agent, which is derived from the geocode-glib version
@@ -1274,6 +1331,19 @@ interface Nominatim extends Backend {
1274
1331
  * string.
1275
1332
  */
1276
1333
  user_agent: string | null
1334
+ /**
1335
+ * User-Agent string to send with HTTP(S) requests, or %NULL to use the
1336
+ * default user agent, which is derived from the geocode-glib version
1337
+ * and #GApplication:id, for example: `geocode-glib/3.20 (MyAppId)`.
1338
+ *
1339
+ * As per the
1340
+ * [Nominatim usage policy](http://wiki.openstreetmap.org/wiki/Nominatim_usage_policy),
1341
+ * it should be set to a string which identifies the application which
1342
+ * is using geocode-glib, and must be a valid
1343
+ * [user agent](https://tools.ietf.org/html/rfc7231#section-5.5.3)
1344
+ * string.
1345
+ */
1346
+ userAgent: string | null
1277
1347
 
1278
1348
  // Own fields of GeocodeGlib-1.0.GeocodeGlib.Nominatim
1279
1349
 
@@ -1427,6 +1497,38 @@ module Place {
1427
1497
  * The town.
1428
1498
  */
1429
1499
  town?: string | null
1500
+ /**
1501
+ * The local administrative area.
1502
+ */
1503
+ administrativeArea?: string | null
1504
+ /**
1505
+ * The bounding box for the place.
1506
+ */
1507
+ boundingBox?: BoundingBox | null
1508
+ /**
1509
+ * The country code.
1510
+ */
1511
+ countryCode?: string | null
1512
+ /**
1513
+ * The OpenStreetMap id of the place.
1514
+ */
1515
+ osmId?: string | null
1516
+ /**
1517
+ * The OpenStreetMap type of the place.
1518
+ */
1519
+ osmType?: PlaceOsmType | null
1520
+ /**
1521
+ * The type of the place.
1522
+ */
1523
+ placeType?: PlaceType | null
1524
+ /**
1525
+ * The postal code.
1526
+ */
1527
+ postalCode?: string | null
1528
+ /**
1529
+ * The street address.
1530
+ */
1531
+ streetAddress?: string | null
1430
1532
  }
1431
1533
 
1432
1534
  }
@@ -1439,6 +1541,10 @@ interface Place {
1439
1541
  * The local administrative area.
1440
1542
  */
1441
1543
  administrative_area: string | null
1544
+ /**
1545
+ * The local administrative area.
1546
+ */
1547
+ administrativeArea: string | null
1442
1548
  /**
1443
1549
  * A named area such as a campus or neighborhood.
1444
1550
  */
@@ -1447,6 +1553,10 @@ interface Place {
1447
1553
  * The bounding box for the place.
1448
1554
  */
1449
1555
  bounding_box: BoundingBox
1556
+ /**
1557
+ * The bounding box for the place.
1558
+ */
1559
+ boundingBox: BoundingBox
1450
1560
  /**
1451
1561
  * A specific building on a street or in an area.
1452
1562
  */
@@ -1463,6 +1573,10 @@ interface Place {
1463
1573
  * The country code.
1464
1574
  */
1465
1575
  country_code: string | null
1576
+ /**
1577
+ * The country code.
1578
+ */
1579
+ countryCode: string | null
1466
1580
  /**
1467
1581
  * The county.
1468
1582
  */
@@ -1483,18 +1597,34 @@ interface Place {
1483
1597
  * The OpenStreetMap id of the place.
1484
1598
  */
1485
1599
  osm_id: string | null
1600
+ /**
1601
+ * The OpenStreetMap id of the place.
1602
+ */
1603
+ osmId: string | null
1486
1604
  /**
1487
1605
  * The OpenStreetMap type of the place.
1488
1606
  */
1489
1607
  osm_type: PlaceOsmType
1608
+ /**
1609
+ * The OpenStreetMap type of the place.
1610
+ */
1611
+ osmType: PlaceOsmType
1490
1612
  /**
1491
1613
  * The type of the place.
1492
1614
  */
1493
1615
  readonly place_type: PlaceType
1616
+ /**
1617
+ * The type of the place.
1618
+ */
1619
+ readonly placeType: PlaceType
1494
1620
  /**
1495
1621
  * The postal code.
1496
1622
  */
1497
1623
  postal_code: string | null
1624
+ /**
1625
+ * The postal code.
1626
+ */
1627
+ postalCode: string | null
1498
1628
  /**
1499
1629
  * The state.
1500
1630
  */
@@ -1507,6 +1637,10 @@ interface Place {
1507
1637
  * The street address.
1508
1638
  */
1509
1639
  street_address: string | null
1640
+ /**
1641
+ * The street address.
1642
+ */
1643
+ streetAddress: string | null
1510
1644
  /**
1511
1645
  * The town.
1512
1646
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/geocodeglib-1.0",
3
- "version": "1.0.0-3.2.4",
3
+ "version": "1.0.0-3.2.6",
4
4
  "description": "GJS TypeScript type definitions for GeocodeGlib-1.0, generated from library version 1.0.0",
5
5
  "type": "module",
6
6
  "module": "geocodeglib-1.0.js",
@@ -25,12 +25,12 @@
25
25
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit geocodeglib-1.0.d.cts"
26
26
  },
27
27
  "dependencies": {
28
- "@girs/gio-2.0": "^2.78.0-3.2.4",
29
- "@girs/gjs": "^3.2.4",
30
- "@girs/glib-2.0": "^2.78.0-3.2.4",
31
- "@girs/gobject-2.0": "^2.78.0-3.2.4",
32
- "@girs/json-1.0": "^1.7.1-3.2.4",
33
- "@girs/soup-2.4": "^2.74.3-3.2.4"
28
+ "@girs/gio-2.0": "^2.78.0-3.2.6",
29
+ "@girs/gjs": "^3.2.6",
30
+ "@girs/glib-2.0": "^2.78.0-3.2.6",
31
+ "@girs/gobject-2.0": "^2.78.0-3.2.6",
32
+ "@girs/json-1.0": "^1.7.1-3.2.6",
33
+ "@girs/soup-2.4": "^2.74.3-3.2.6"
34
34
  },
35
35
  "devDependencies": {
36
36
  "typescript": "*"