@leancodepl/api-date 8.4.0 → 8.5.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.
- package/README.md +55 -0
- package/package.json +35 -3
- package/index.esm.d.ts +0 -1
- /package/{index.cjs.d.ts → index.d.ts} +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @leancodepl/api-date
|
|
2
|
+
|
|
3
|
+
Type definitions for API date and time handling.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @leancodepl/api-date
|
|
9
|
+
# or
|
|
10
|
+
yarn add @leancodepl/api-date
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## API
|
|
14
|
+
|
|
15
|
+
### `ApiDateOnly`
|
|
16
|
+
|
|
17
|
+
Type representing date-only values for API communication.
|
|
18
|
+
|
|
19
|
+
### `ApiDateTime`
|
|
20
|
+
|
|
21
|
+
Type representing date and time values for API communication.
|
|
22
|
+
|
|
23
|
+
### `ApiTimeSpan`
|
|
24
|
+
|
|
25
|
+
Type representing time span values for API communication.
|
|
26
|
+
|
|
27
|
+
### `ApiTimeOnly`
|
|
28
|
+
|
|
29
|
+
Type representing time-only values for API communication.
|
|
30
|
+
|
|
31
|
+
### `ApiDateTimeOffset`
|
|
32
|
+
|
|
33
|
+
Type representing date and time with offset values for API communication.
|
|
34
|
+
|
|
35
|
+
## Usage Examples
|
|
36
|
+
|
|
37
|
+
### Type Definitions
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
import {
|
|
41
|
+
ApiDateOnly,
|
|
42
|
+
ApiDateTime,
|
|
43
|
+
ApiTimeSpan,
|
|
44
|
+
ApiTimeOnly,
|
|
45
|
+
ApiDateTimeOffset
|
|
46
|
+
} from '@leancodepl/api-date';
|
|
47
|
+
|
|
48
|
+
interface UserProfile {
|
|
49
|
+
birthDate: ApiDateOnly;
|
|
50
|
+
createdAt: ApiDateTime;
|
|
51
|
+
sessionDuration: ApiTimeSpan;
|
|
52
|
+
preferredTime: ApiTimeOnly;
|
|
53
|
+
lastLogin: ApiDateTimeOffset;
|
|
54
|
+
}
|
|
55
|
+
```
|
package/package.json
CHANGED
|
@@ -1,17 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leancodepl/api-date",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public",
|
|
7
|
+
"registry": "https://registry.npmjs.org/"
|
|
8
|
+
},
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=18.0.0"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/leancodepl/js_corelibrary.git",
|
|
15
|
+
"directory": "packages/cqrs-clients/custom-types/date/api-date"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/leancodepl/js_corelibrary",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/leancodepl/js_corelibrary/issues"
|
|
20
|
+
},
|
|
21
|
+
"description": "Core date and time types for API serialization",
|
|
22
|
+
"keywords": [
|
|
23
|
+
"date",
|
|
24
|
+
"time",
|
|
25
|
+
"api",
|
|
26
|
+
"types",
|
|
27
|
+
"serialization",
|
|
28
|
+
"typescript",
|
|
29
|
+
"javascript",
|
|
30
|
+
"leancode"
|
|
31
|
+
],
|
|
32
|
+
"author": {
|
|
33
|
+
"name": "LeanCode",
|
|
34
|
+
"url": "https://leancode.co"
|
|
35
|
+
},
|
|
36
|
+
"sideEffects": false,
|
|
5
37
|
"exports": {
|
|
6
38
|
"./package.json": "./package.json",
|
|
7
39
|
".": {
|
|
8
40
|
"module": "./index.esm.js",
|
|
9
|
-
"types": "./index.
|
|
41
|
+
"types": "./index.d.ts",
|
|
10
42
|
"import": "./index.cjs.mjs",
|
|
11
43
|
"default": "./index.cjs.js"
|
|
12
44
|
}
|
|
13
45
|
},
|
|
14
46
|
"module": "./index.esm.js",
|
|
15
47
|
"main": "./index.cjs.js",
|
|
16
|
-
"types": "./index.
|
|
48
|
+
"types": "./index.d.ts"
|
|
17
49
|
}
|
package/index.esm.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./src/index";
|
|
File without changes
|