@galaxy-tool-util/gxwf-client 0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 John Chilton
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @module @galaxy-tool-util/gxwf-client
3
+ *
4
+ * Typed HTTP client for the gxwf-web Galaxy workflow server.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * import { createGxwfClient } from "@galaxy-tool-util/gxwf-client";
9
+ *
10
+ * const client = createGxwfClient("http://localhost:8000");
11
+ *
12
+ * const { data, error } = await client.GET("/workflows", {});
13
+ * const { data: report } = await client.GET("/workflows/{workflow_path}/validate", {
14
+ * params: { path: { workflow_path: "my_workflow.ga" } },
15
+ * });
16
+ * ```
17
+ */
18
+ import type { Client, ClientOptions } from "openapi-fetch";
19
+ import type { paths, components, operations } from "@galaxy-tool-util/gxwf-web";
20
+ export type { paths, components, operations };
21
+ export type { Client, ClientOptions };
22
+ /** A fully-typed gxwf-web HTTP client. */
23
+ export type GxwfClient = Client<paths>;
24
+ /**
25
+ * Create a typed HTTP client pointed at a gxwf-web server.
26
+ *
27
+ * @param baseUrl - Base URL of the gxwf-web server (e.g. "http://localhost:8000")
28
+ * @param options - Additional openapi-fetch ClientOptions (headers, custom fetch, etc.)
29
+ */
30
+ export declare function createGxwfClient(baseUrl: string, options?: Omit<ClientOptions, "baseUrl">): GxwfClient;
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAEhF,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AAC9C,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC;AAEtC,0CAA0C;AAC1C,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAEvC;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,GACvC,UAAU,CAEZ"}
package/dist/index.js ADDED
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @module @galaxy-tool-util/gxwf-client
3
+ *
4
+ * Typed HTTP client for the gxwf-web Galaxy workflow server.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * import { createGxwfClient } from "@galaxy-tool-util/gxwf-client";
9
+ *
10
+ * const client = createGxwfClient("http://localhost:8000");
11
+ *
12
+ * const { data, error } = await client.GET("/workflows", {});
13
+ * const { data: report } = await client.GET("/workflows/{workflow_path}/validate", {
14
+ * params: { path: { workflow_path: "my_workflow.ga" } },
15
+ * });
16
+ * ```
17
+ */
18
+ import createClient from "openapi-fetch";
19
+ /**
20
+ * Create a typed HTTP client pointed at a gxwf-web server.
21
+ *
22
+ * @param baseUrl - Base URL of the gxwf-web server (e.g. "http://localhost:8000")
23
+ * @param options - Additional openapi-fetch ClientOptions (headers, custom fetch, etc.)
24
+ */
25
+ export function createGxwfClient(baseUrl, options) {
26
+ return createClient({ baseUrl, ...options });
27
+ }
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,YAAY,MAAM,eAAe,CAAC;AAUzC;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAAe,EACf,OAAwC;IAExC,OAAO,YAAY,CAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;AACtD,CAAC"}
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@galaxy-tool-util/gxwf-client",
3
+ "version": "0.0.0",
4
+ "description": "Typed HTTP client for the gxwf-web Galaxy workflow server",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./dist/index.d.ts",
9
+ "import": "./dist/index.js"
10
+ }
11
+ },
12
+ "files": [
13
+ "dist",
14
+ "README.md",
15
+ "LICENSE"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/jmchilton/galaxy-tool-util-ts",
20
+ "directory": "packages/gxwf-client"
21
+ },
22
+ "publishConfig": {
23
+ "access": "public",
24
+ "provenance": true
25
+ },
26
+ "license": "MIT",
27
+ "dependencies": {
28
+ "openapi-fetch": "^0.13.8",
29
+ "@galaxy-tool-util/gxwf-web": "0.0.0"
30
+ },
31
+ "devDependencies": {
32
+ "@types/node": "^25.5.0"
33
+ },
34
+ "scripts": {
35
+ "build": "tsc",
36
+ "typecheck": "tsc --noEmit",
37
+ "test": "tsc --noEmit && vitest run",
38
+ "test:watch": "vitest",
39
+ "lint": "eslint src/ test/",
40
+ "format": "prettier --check 'src/**/*.ts' 'test/**/*.ts'",
41
+ "format-fix": "prettier --write 'src/**/*.ts' 'test/**/*.ts'"
42
+ }
43
+ }