@knpkv/clockify-api-client 1.1.1 → 2.0.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/CHANGELOG.md +23 -0
- package/dist/ClockifyApiClient.d.ts +2 -2
- package/dist/ClockifyApiClient.d.ts.map +1 -1
- package/dist/ClockifyApiClient.js +3 -3
- package/dist/ClockifyApiClient.js.map +1 -1
- package/dist/generated/ClockifyApi.d.ts +5165 -4178
- package/dist/generated/ClockifyApi.d.ts.map +1 -1
- package/dist/generated/ClockifyApi.js +336 -329
- package/dist/generated/ClockifyApi.js.map +1 -1
- package/package.json +9 -9
- package/scripts/regenerate.ts +10 -8
- package/src/ClockifyApiClient.ts +4 -4
- package/src/generated/ClockifyApi.ts +570 -544
- package/test/ClockifyApiClient.test.ts +164 -213
- package/test/CustomFieldValues.test.ts +18 -0
- package/test/GeneratedSchemas.test.ts +60 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knpkv/clockify-api-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Effect-based Clockify REST API client",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "knpkv",
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"effect": "4.0.0
|
|
38
|
+
"effect": "4.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@effect/openapi-generator": "4.0.0
|
|
42
|
-
"@effect/platform-node": "4.0.0
|
|
43
|
-
"@effect/vitest": "4.0.0
|
|
41
|
+
"@effect/openapi-generator": "4.0.0",
|
|
42
|
+
"@effect/platform-node": "4.0.0",
|
|
43
|
+
"@effect/vitest": "4.0.0",
|
|
44
44
|
"@types/node": "latest",
|
|
45
|
-
"effect": "4.0.0
|
|
46
|
-
"prettier": "^3.9.
|
|
47
|
-
"tsx": "^4.23.
|
|
45
|
+
"effect": "4.0.0",
|
|
46
|
+
"prettier": "^3.9.9",
|
|
47
|
+
"tsx": "^4.23.15",
|
|
48
48
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
49
|
-
"vitest": "^
|
|
49
|
+
"vitest": "^5.0.3"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"effect",
|
package/scripts/regenerate.ts
CHANGED
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
import * as OpenApiGenerator from "@effect/openapi-generator/OpenApiGenerator"
|
|
9
9
|
import * as OpenApiPatch from "@effect/openapi-generator/OpenApiPatch"
|
|
10
10
|
import { NodeHttpClient, NodeRuntime, NodeServices } from "@effect/platform-node"
|
|
11
|
+
import * as Command from "effect/cli/Command"
|
|
12
|
+
import * as Flag from "effect/cli/Flag"
|
|
11
13
|
import * as Console from "effect/Console"
|
|
12
14
|
import * as Data from "effect/Data"
|
|
13
15
|
import * as Effect from "effect/Effect"
|
|
14
16
|
import * as FileSystem from "effect/FileSystem"
|
|
17
|
+
import type { OpenAPISpec } from "effect/http-api/OpenApi"
|
|
18
|
+
import * as HttpClient from "effect/http/HttpClient"
|
|
15
19
|
import type * as JsonSchema from "effect/JsonSchema"
|
|
16
20
|
import * as Layer from "effect/Layer"
|
|
17
21
|
import * as Path from "effect/Path"
|
|
18
22
|
import * as Predicate from "effect/Predicate"
|
|
19
23
|
import * as Schema from "effect/Schema"
|
|
20
|
-
import * as Command from "effect/unstable/cli/Command"
|
|
21
|
-
import * as Flag from "effect/unstable/cli/Flag"
|
|
22
|
-
import * as HttpClient from "effect/unstable/http/HttpClient"
|
|
23
|
-
import type { OpenAPISpec } from "effect/unstable/httpapi/OpenApi"
|
|
24
24
|
import { format as formatSource } from "prettier"
|
|
25
25
|
|
|
26
26
|
const SPEC_URL = "https://docs.clockify.me/openapi.json"
|
|
@@ -169,12 +169,14 @@ const generate = Effect.fn("Clockify.regenerate.generate")(function*(
|
|
|
169
169
|
)
|
|
170
170
|
})
|
|
171
171
|
|
|
172
|
-
const check = Flag.
|
|
173
|
-
Flag.withDescription("Exit non-zero when the committed upstream spec differs from Clockify")
|
|
172
|
+
const check = Flag.Boolean("check").pipe(
|
|
173
|
+
Flag.withDescription("Exit non-zero when the committed upstream spec differs from Clockify"),
|
|
174
|
+
Flag.withDefault(false)
|
|
174
175
|
)
|
|
175
176
|
|
|
176
|
-
const local = Flag.
|
|
177
|
-
Flag.withDescription("Regenerate from the committed spec without contacting Clockify")
|
|
177
|
+
const local = Flag.Boolean("local").pipe(
|
|
178
|
+
Flag.withDescription("Regenerate from the committed spec without contacting Clockify"),
|
|
179
|
+
Flag.withDefault(false)
|
|
178
180
|
)
|
|
179
181
|
|
|
180
182
|
const root = Command.make("clockify-api-regenerate", { check, local }).pipe(
|
package/src/ClockifyApiClient.ts
CHANGED
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
import * as Context from "effect/Context"
|
|
11
11
|
import * as Effect from "effect/Effect"
|
|
12
12
|
import { flow } from "effect/Function"
|
|
13
|
+
import * as HttpClient from "effect/http/HttpClient"
|
|
14
|
+
import type * as HttpClientError from "effect/http/HttpClientError"
|
|
15
|
+
import * as HttpClientRequest from "effect/http/HttpClientRequest"
|
|
16
|
+
import * as HttpClientResponse from "effect/http/HttpClientResponse"
|
|
13
17
|
import * as Layer from "effect/Layer"
|
|
14
18
|
import * as Redacted from "effect/Redacted"
|
|
15
19
|
import type { SchemaError } from "effect/Schema"
|
|
16
|
-
import * as HttpClient from "effect/unstable/http/HttpClient"
|
|
17
|
-
import type * as HttpClientError from "effect/unstable/http/HttpClientError"
|
|
18
|
-
import * as HttpClientRequest from "effect/unstable/http/HttpClientRequest"
|
|
19
|
-
import * as HttpClientResponse from "effect/unstable/http/HttpClientResponse"
|
|
20
20
|
import { ClockifyApiConfig } from "./ClockifyApiConfig.js"
|
|
21
21
|
import * as Generated from "./generated/ClockifyApi.js"
|
|
22
22
|
|