@apiverve/unixtimestamp 1.1.14 → 1.2.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/index.d.ts +28 -16
- package/index.js +1 -1
- package/package.json +5 -6
package/index.d.ts
CHANGED
|
@@ -4,31 +4,43 @@ declare module '@apiverve/unixtimestamp' {
|
|
|
4
4
|
secure?: boolean;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Describes fields the current plan does not unlock. Locked fields arrive as null
|
|
9
|
+
* in `data`; `locked_fields` names them, using dot paths for nested fields.
|
|
10
|
+
* Absent when the plan unlocks everything.
|
|
11
|
+
*/
|
|
12
|
+
export interface PremiumInfo {
|
|
13
|
+
message: string;
|
|
14
|
+
upgrade_url: string;
|
|
15
|
+
locked_fields: string[];
|
|
16
|
+
}
|
|
17
|
+
|
|
7
18
|
export interface unixtimestampResponse {
|
|
8
19
|
status: string;
|
|
9
20
|
error: string | null;
|
|
10
21
|
data: UnixTimestampConverterData;
|
|
11
22
|
code?: number;
|
|
23
|
+
premium?: PremiumInfo;
|
|
12
24
|
}
|
|
13
25
|
|
|
14
26
|
|
|
15
27
|
interface UnixTimestampConverterData {
|
|
16
|
-
timestamp: number;
|
|
17
|
-
timestampFormat: string;
|
|
18
|
-
iso8601: Date;
|
|
19
|
-
rfc2822: string;
|
|
20
|
-
date: string;
|
|
21
|
-
time: string;
|
|
22
|
-
unixSeconds: number;
|
|
23
|
-
unixMilliseconds: number;
|
|
24
|
-
year: number;
|
|
25
|
-
month: number;
|
|
26
|
-
day: number;
|
|
27
|
-
hour: number;
|
|
28
|
-
minute: number;
|
|
29
|
-
second: number;
|
|
30
|
-
dayOfWeek: string;
|
|
31
|
-
timezone: string;
|
|
28
|
+
timestamp: number | null;
|
|
29
|
+
timestampFormat: null | string;
|
|
30
|
+
iso8601: Date | null;
|
|
31
|
+
rfc2822: null | string;
|
|
32
|
+
date: null | string;
|
|
33
|
+
time: null | string;
|
|
34
|
+
unixSeconds: number | null;
|
|
35
|
+
unixMilliseconds: number | null;
|
|
36
|
+
year: number | null;
|
|
37
|
+
month: number | null;
|
|
38
|
+
day: number | null;
|
|
39
|
+
hour: number | null;
|
|
40
|
+
minute: number | null;
|
|
41
|
+
second: number | null;
|
|
42
|
+
dayOfWeek: null | string;
|
|
43
|
+
timezone: null | string;
|
|
32
44
|
}
|
|
33
45
|
|
|
34
46
|
export default class unixtimestampWrapper {
|
package/index.js
CHANGED
|
@@ -30,7 +30,7 @@ class unixtimestampWrapper {
|
|
|
30
30
|
this.baseURL = 'https://api.apiverve.com/v1/unixtimestamp';
|
|
31
31
|
|
|
32
32
|
// Validation rules for parameters (generated from schema)
|
|
33
|
-
this.validationRules = {"timestamp":{"type":"string","required":true},"format":{"type":"string","required":false,"default":"seconds"}};
|
|
33
|
+
this.validationRules = {"timestamp":{"type":"string","required":true,"format":"timestamp"},"format":{"type":"string","required":false,"default":"seconds"}};
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apiverve/unixtimestamp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Unix Timestamp Converter is a tool for converting between Unix timestamps and human-readable dates. It supports both seconds and milliseconds formats.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"engines": {
|
|
9
|
-
"node": ">=
|
|
9
|
+
"node": ">=18.0.0"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"directory": "npm"
|
|
24
24
|
},
|
|
25
25
|
"keywords": [
|
|
26
|
-
""
|
|
26
|
+
"unix timestamp", "epoch time", "timestamp converter", "unix time", "epoch converter"
|
|
27
27
|
],
|
|
28
28
|
"author": {
|
|
29
29
|
"name": "APIVerve",
|
|
@@ -41,8 +41,7 @@
|
|
|
41
41
|
"dotenv": "^16.4.7"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"axios": "1.13.2"
|
|
44
|
+
"axios": "1.13.2",
|
|
45
|
+
"form-data": "^4.0.1"
|
|
47
46
|
}
|
|
48
47
|
}
|