@tc-libs/geodata 3.6.0 → 3.6.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 (2) hide show
  1. package/README.md +56 -6
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,11 +1,61 @@
1
- # geodata
1
+ # @tc-libs/geodata
2
2
 
3
- This library was generated with [Nx](https://nx.dev).
3
+ Client applicativo per dati geografici remoti.
4
4
 
5
- ## Building
5
+ Il package non contiene repository locali: chiama un servizio remoto configurato in `aws.lambda.geodata.url` e fornisce service e controller Nest per:
6
6
 
7
- Run `nx build geodata` to build the library.
7
+ - paesi
8
+ - lingue
9
+ - stati/province
8
10
 
9
- ## Running unit tests
11
+ ## Registrazione
10
12
 
11
- Run `nx test geodata` to execute the unit tests via [Jest](https://jestjs.io).
13
+ ```ts
14
+ GeoDataModule.register(
15
+ {
16
+ aws: {
17
+ lambda: {
18
+ geodata: {
19
+ url: 'https://my-geodata-service.example.com',
20
+ },
21
+ },
22
+ },
23
+ },
24
+ true,
25
+ );
26
+ ```
27
+
28
+ ## Service principali
29
+
30
+ ### `CountryService`
31
+
32
+ - `listNames(lang)`
33
+ - `listPhonePrefix()`
34
+ - `getByCode('cca2' | 'cca3' | 'ccn3' | 'cioc', code)`
35
+
36
+ ### `LanguageService`
37
+
38
+ - `list()`
39
+
40
+ ### `SubdivisionStateProvincesService`
41
+
42
+ - `findByCountry(country)`
43
+
44
+ ## Esempi
45
+
46
+ ```ts
47
+ const countries = await this.countryService.listNames('it');
48
+ const language = await this.languageService.list();
49
+ const provinces = await this.subdivisionService.findByCountry('IT');
50
+ ```
51
+
52
+ ## Export pubblici
53
+
54
+ Il package esporta sia service sia controller/serializzazioni di supporto, quindi puoi usarlo come client interno o montare direttamente gli endpoint.
55
+
56
+ ## Sviluppo
57
+
58
+ ```bash
59
+ nx build geodata
60
+ nx test geodata
61
+ ```
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@tc-libs/geodata",
3
- "version": "3.6.0",
3
+ "version": "3.6.1",
4
4
  "dependencies": {
5
- "@tc-libs/response": "3.6.0",
6
- "@tc-libs/doc": "3.6.0",
7
- "@tc-libs/database": "3.6.0",
5
+ "@tc-libs/response": "3.6.1",
6
+ "@tc-libs/doc": "3.6.1",
7
+ "@tc-libs/database": "3.6.1",
8
8
  "@faker-js/faker": "^9.6.0",
9
9
  "@nestjs/common": "^11.0.12",
10
10
  "@nestjs/swagger": "^11.1.0",