api-def 0.12.0-alpha.7 → 0.12.0-alpha.9

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/bin/index.js CHANGED
@@ -258628,7 +258628,7 @@ ${Object.entries(routes).flatMap(([path2, route]) => {
258628
258628
  return false;
258629
258629
  });
258630
258630
  if (anyHeaderParams) {
258631
- extraTypes[`Headers${(0, import_lodash.upperFirst)(id)}`] = `operations["${id}"]["parameters"]["header"]`;
258631
+ extraTypes[`Headers${(0, import_lodash.upperFirst)(id)}`] = `NonNullable<operations["${id}"]["parameters"]["header"]>`;
258632
258632
  requestHeaderTypes.push(`Headers${(0, import_lodash.upperFirst)(id)}`);
258633
258633
  }
258634
258634
  }
package/cjs/Endpoint.d.ts CHANGED
@@ -50,7 +50,7 @@ export default class Endpoint<TResponse = any, TParams extends Params | undefine
50
50
  get responseType(): ResponseType | undefined;
51
51
  get mocking(): Mocking.EndpointMockingConfig<TResponse, TParams, TQuery, TBody, TState> | undefined;
52
52
  get validation(): Validation<TResponse, TParams, TQuery, TBody, TState>;
53
- submit(config: RequestConfig<TParams, TQuery, TBody, TState>): Promise<ApiResponse<TResponse>>;
53
+ submit(config: RequestConfig<TParams, TQuery, TBody, TState, TRequestHeaders>): Promise<ApiResponse<TResponse>>;
54
54
  computePath(path: string, request: RequestConfig): string;
55
55
  get baseUrl(): string;
56
56
  /**
package/esm/Endpoint.d.ts CHANGED
@@ -50,7 +50,7 @@ export default class Endpoint<TResponse = any, TParams extends Params | undefine
50
50
  get responseType(): ResponseType | undefined;
51
51
  get mocking(): Mocking.EndpointMockingConfig<TResponse, TParams, TQuery, TBody, TState> | undefined;
52
52
  get validation(): Validation<TResponse, TParams, TQuery, TBody, TState>;
53
- submit(config: RequestConfig<TParams, TQuery, TBody, TState>): Promise<ApiResponse<TResponse>>;
53
+ submit(config: RequestConfig<TParams, TQuery, TBody, TState, TRequestHeaders>): Promise<ApiResponse<TResponse>>;
54
54
  computePath(path: string, request: RequestConfig): string;
55
55
  get baseUrl(): string;
56
56
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "api-def",
3
- "version": "0.12.0-alpha.7",
3
+ "version": "0.12.0-alpha.9",
4
4
  "description": "Typed API definitions with middleware support",
5
5
  "main": "cjs/index.js",
6
6
  "types": "esm/index.d.ts",