@mgamadeus/ddd-web 0.14.0 → 0.15.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.
@@ -4,7 +4,7 @@ import {
4
4
  consoleLogger,
5
5
  generateSdk,
6
6
  linkSkills
7
- } from "../chunk-HVYT2X4V.js";
7
+ } from "../chunk-6CQEUZ3B.js";
8
8
 
9
9
  // src/codegen/cli.ts
10
10
  import { parseArgs } from "util";
@@ -197,9 +197,15 @@ interface EndpointOptions {
197
197
  * `true`: the request builder of every endpoint (its `query`) goes into `<stem>Requests.ts` next to the api file, as
198
198
  * `export const <stem>Requests = { <endpoint>: (queryArg: <Arg>) => ({ url, params, body, … }) }`, and the endpoint
199
199
  * uses it (`query: <stem>Requests.<endpoint>`). A bundle that only builds requests imports that module without the
200
- * endpoint injection. Default `false`.
200
+ * endpoint injection. `'all'`: the module holds the builder of EVERY operation of the document (and their argument
201
+ * types are written), while the api file injects only what `filterEndpoints` keeps. Default `false`.
201
202
  */
202
- requestBuilders?: boolean;
203
+ requestBuilders?: boolean | 'all';
204
+ /**
205
+ * `drop` (default): parameters `in: cookie` leave the endpoints — a browser sends its cookies itself, and RTK Query's
206
+ * `FetchArgs` has no field for them (a builder with `cookies` fails the type check). `keep`: as RTK codegen writes them.
207
+ */
208
+ cookieParameters?: 'drop' | 'keep';
203
209
  }
204
210
  /** The endpoint name of `naming: 'path'` (see {@link EndpointOptions.naming}). */
205
211
  declare function buildEndpointNameFromPath(method: string, path: string, stripPathPrefix?: string | RegExp): string;
@@ -11,7 +11,7 @@ import {
11
11
  loadSpec,
12
12
  silentLogger,
13
13
  validateSpec
14
- } from "../chunk-HVYT2X4V.js";
14
+ } from "../chunk-6CQEUZ3B.js";
15
15
  export {
16
16
  SUPPORTED_CONTRACT,
17
17
  SdkGenerationError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mgamadeus/ddd-web",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "TypeScript web client for backends built with mgamadeus/ddd, the DDD entity framework for Symfony and Doctrine (Composer/Packagist). Generates a typed RTK Query SDK from the backend's OpenAPI document, builds DDD QueryOptions (filters, orderBy, expand, select, paging) and handles JWT auth with token refresh.",
5
5
  "keywords": [
6
6
  "ddd",