@ps-aux/api-client-gen 0.7.0-rc.6 → 0.7.0-rc.7

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/dist/index.cjs CHANGED
@@ -1,15 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var generateApiClient = require('./generateApiClient.cjs');
3
+ var generate = require('./generate.cjs');
4
+ require('node:fs');
5
+ require('node:path');
6
+ require('c12');
4
7
  require('path');
5
8
  require('fs');
6
- require('node:path');
9
+ require('ts-to-zod');
10
+ require('node:fs/promises');
7
11
  require('swagger-typescript-api');
8
12
  require('node:url');
9
- require('node:fs/promises');
10
- require('ts-to-zod');
11
13
 
12
14
 
13
15
 
14
- exports.defineConfig = generateApiClient.defineConfig;
15
- exports.generateApiClient = generateApiClient.generateApiClient;
16
+ exports.defineConfig = generate.defineConfig;
17
+ exports.generateApiClient = generate.generateApiClient;
package/dist/index.mjs CHANGED
@@ -1,8 +1,10 @@
1
- export { d as defineConfig, g as generateApiClient } from './generateApiClient.mjs';
1
+ export { d as defineConfig, g as generateApiClient } from './generate.mjs';
2
+ import 'node:fs';
3
+ import 'node:path';
4
+ import 'c12';
2
5
  import 'path';
3
6
  import 'fs';
4
- import 'node:path';
7
+ import 'ts-to-zod';
8
+ import 'node:fs/promises';
5
9
  import 'swagger-typescript-api';
6
10
  import 'node:url';
7
- import 'node:fs/promises';
8
- import 'ts-to-zod';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ps-aux/api-client-gen",
3
- "version": "0.7.0-rc.6",
3
+ "version": "0.7.0-rc.7",
4
4
  "main": "dist/index.cjs",
5
5
  "type": "module",
6
6
  "bin": {
@@ -18,7 +18,7 @@ export type QueryValue =
18
18
 
19
19
  export type QueryParams = Record<string, QueryValue>
20
20
 
21
- export type Request = {
21
+ export type HttpRequest = {
22
22
  path: string
23
23
  method: 'GET' | 'POST' | 'PUT' | 'DELETE'
24
24
  responseFormat?: 'json' | 'document'
@@ -38,7 +38,7 @@ export type QuerySerializer = (params: QueryParams) => string
38
38
 
39
39
  export type HttpClient<RequestParams = never> = {
40
40
  request: <Data>(
41
- req: Request,
41
+ req: HttpRequest,
42
42
  params?: RequestParams
43
43
  ) => Promise<HttpResponse<Data>>
44
44
  }
@@ -42,14 +42,14 @@ const wrapperArgs = _
42
42
  .map(argToTmpl)
43
43
  .join(', ')
44
44
 
45
- // Request["contentType"]
45
+ // HttpRequest["contentType"]
46
46
  const requestContentKind = {
47
47
  "JSON": '"application/json"',
48
48
  "URL_ENCODED": '"application/x-www-form-urlencoded"',
49
49
  "FORM_DATA": '"multipart/form-data"',
50
50
  "TEXT": '"text/plain"',
51
51
  }
52
- // Request["responseFormat"]
52
+ // HttpRequest["responseFormat"]
53
53
  const responseContentKind = {
54
54
  "JSON": '"json"',
55
55
  "IMAGE": '"blob"',
File without changes