@gls_spain/gps-common 35.17.1 → 35.18.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.
- package/CHANGELOG.md +21 -0
- package/CLAUDE.md +60 -0
- package/package.json +1 -1
- package/schemas/definitions/become.js +1 -1
- package/schemas/definitions/expeditions.js +2 -0
- package/schemas/definitions/shops.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [35.18.2](https://github.com/GLS-Spain/gps-common/compare/v35.18.1...v35.18.2) (2026-08-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update version minor ([a65e971](https://github.com/GLS-Spain/gps-common/commit/a65e9711e6472ca99505d06b33ef5ed2590b3888))
|
|
7
|
+
|
|
8
|
+
## [35.18.1](https://github.com/GLS-Spain/gps-common/compare/v35.18.0...v35.18.1) (2026-08-12)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add Sunday in shopSchedule schema ([6ea0d8a](https://github.com/GLS-Spain/gps-common/commit/6ea0d8a9e3a0e0f591c82ca7f3c7791f64876112))
|
|
14
|
+
|
|
15
|
+
# [35.18.0](https://github.com/GLS-Spain/gps-common/compare/v35.17.1...v35.18.0) (2026-06-17)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* Añadir tracking de si la entrega se hizo utilizando el mail del dtt con QR o no ([f4e799c](https://github.com/GLS-Spain/gps-common/commit/f4e799c86b4e5f17d63cca407a2914b10dafa69e))
|
|
21
|
+
|
|
1
22
|
## [35.17.1](https://github.com/GLS-Spain/gps-common/compare/v35.17.0...v35.17.1) (2026-05-27)
|
|
2
23
|
|
|
3
24
|
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Purpose
|
|
6
|
+
|
|
7
|
+
Shared library providing error classes, JSON schemas, and OpenAPI specifications for the GLS Parcel Shops (GPS) project. Published as `@gls_spain/gps-common`.
|
|
8
|
+
|
|
9
|
+
## Build Commands
|
|
10
|
+
|
|
11
|
+
Standard `npm test` runs jest. Non-obvious scripts:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm run build-json-schemas # Compile schemas → build/schemas/
|
|
15
|
+
npm run build-documentation # Build HTML docs → build/documentation/documentation.html
|
|
16
|
+
npm run generate-documentation # rimraf build, then full rebuild of schemas + docs
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Code Style
|
|
20
|
+
|
|
21
|
+
Prettier is configured with non-default settings — always respect these:
|
|
22
|
+
|
|
23
|
+
- **Print width:** 140 characters (not the typical 80/100)
|
|
24
|
+
- **Quotes:** single quotes
|
|
25
|
+
- **Trailing commas:** `all`
|
|
26
|
+
- **Arrow parens:** `avoid` (omit parens for single-arg arrow functions)
|
|
27
|
+
|
|
28
|
+
ESLint extends `airbnb-base` + `prettier` with two overrides:
|
|
29
|
+
- `no-underscore-dangle`: off (underscores are used for DB fields like `_id`)
|
|
30
|
+
- `import/extensions`: off (file extensions omitted in imports)
|
|
31
|
+
|
|
32
|
+
## Testing
|
|
33
|
+
|
|
34
|
+
Jest runs with `collectCoverage: true` by default. The `@gls_spain/*` scoped packages in `node_modules` are **not** excluded from transformation — they are transpiled as part of the test run.
|
|
35
|
+
|
|
36
|
+
## Commits and Branching
|
|
37
|
+
|
|
38
|
+
Use conventional commits. Run `npm run commit` (commitizen) instead of `git commit` directly to get the interactive prompt that formats the commit message correctly.
|
|
39
|
+
|
|
40
|
+
The pre-commit Husky hook runs all tests — commits will be blocked if tests fail.
|
|
41
|
+
|
|
42
|
+
Branches follow the pattern `<JIRA-TICKET>-<description>` (e.g., `INN-563-Schema-lockers`).
|
|
43
|
+
|
|
44
|
+
## Release
|
|
45
|
+
|
|
46
|
+
Releases are managed by semantic-release on the `master` branch, triggered manually:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm run semantic-release
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
This publishes to npm, updates `CHANGELOG.md`, and creates a git tag. Requires `NPM_TOKEN` to be set.
|
|
53
|
+
|
|
54
|
+
## NPM Auth
|
|
55
|
+
|
|
56
|
+
The `@gls_spain` scoped packages require npm authentication. Set `NPM_TOKEN` in your environment or configure `.npmrc` with the registry token before installing dependencies.
|
|
57
|
+
|
|
58
|
+
## Adding Errors or Schemas
|
|
59
|
+
|
|
60
|
+
Mirror the structure of existing files in `errors/` and `schemas/definitions/`. Export new entries from the relevant `index.js` files.
|
package/package.json
CHANGED
|
@@ -91,6 +91,7 @@ const customer = () => ({
|
|
|
91
91
|
nif: { type: 'string', trim: true },
|
|
92
92
|
barcode: { type: 'string', trim: true },
|
|
93
93
|
pod: objectWithUuid(),
|
|
94
|
+
identificationMethod: { type: 'string', enum: ['qr', 'manual'] },
|
|
94
95
|
},
|
|
95
96
|
required: ['name', 'nif'],
|
|
96
97
|
additionalProperties: false,
|
|
@@ -103,6 +104,7 @@ const customerWithPod = () => ({
|
|
|
103
104
|
nif: { type: 'string', trim: true },
|
|
104
105
|
barcode: { type: 'string', trim: true },
|
|
105
106
|
pod: { type: 'string', contentMediaType: 'image/jpg', contentEncoding: 'base64' },
|
|
107
|
+
identificationMethod: { type: 'string', enum: ['qr', 'manual'] },
|
|
106
108
|
},
|
|
107
109
|
required: ['name', 'nif'],
|
|
108
110
|
additionalProperties: false,
|
|
@@ -58,7 +58,7 @@ const shopSchedule = () => ({
|
|
|
58
58
|
saturday: shopDaySchedule(),
|
|
59
59
|
sunday: shopDaySchedule(),
|
|
60
60
|
},
|
|
61
|
-
required: ['type', 'weekly'
|
|
61
|
+
required: ['type', 'weekly'],// saturday and sunday are optional
|
|
62
62
|
additionalProperties: false,
|
|
63
63
|
},
|
|
64
64
|
{
|
|
@@ -74,7 +74,7 @@ const shopSchedule = () => ({
|
|
|
74
74
|
saturday: shopDaySchedule(),
|
|
75
75
|
sunday: shopDaySchedule(),
|
|
76
76
|
},
|
|
77
|
-
required: ['type', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday'
|
|
77
|
+
required: ['type', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday'], // saturday and sunday are optional
|
|
78
78
|
additionalProperties: false,
|
|
79
79
|
},
|
|
80
80
|
],
|