@mgamadeus/ddd-web 0.3.1 → 0.5.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/.claude/skills/ddd-web-specialist/SKILL.md +14 -3
- package/.claude/skills/ddd-web-specialist/references/consumer.md +114 -1
- package/CHANGELOG.md +49 -0
- package/README.md +47 -0
- package/dist/api/index.d.ts +185 -5
- package/dist/api/index.js +177 -13
- package/dist/api/index.js.map +1 -1
- package/dist/{chunk-VJ2CHVSL.js → chunk-6PDXSGVW.js} +137 -3
- package/dist/chunk-6PDXSGVW.js.map +1 -0
- package/dist/codegen/cli.js +1 -1
- package/dist/codegen/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-VJ2CHVSL.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ddd-web-specialist
|
|
3
|
-
description: "Use and maintain @mgamadeus/ddd-web, the TS client of mgamadeus/ddd
|
|
3
|
+
description: "Use and maintain @mgamadeus/ddd-web, the TS client of mgamadeus/ddd: openapi-config.ts with defineConfig (schemaFile, sideEffects, responseHandlers, invalidation), the RTK Query SDK from ddd-web-sdk (Enhanced/Tags files, cache tags by entity identity, typed tagTypes via mergeDddTagTypes, downloads via blobResponseHandler, file uploads: multipartFiles argument, buildDddMultipartBody, upload with progress via baseQuery.upload), QueryOptions builders (buildQueryOptions, combineFilters, buildInFilter), createDddBaseQuery (Bearer, shared refresh + retry, relogin for sessions without refresh token, session-bound requests via getSessionKey, shouldRefresh, normalizeDddError), token storage, JWT helpers, link-skills, release. Use when wiring a frontend to a DDD backend, regenerating the SDK, building filters, uploading files, FormData, upload progress, fixing token refresh, guest login, a request sent under the wrong account after an account switch, stale cache tags, downloading an export, or releasing ddd-web."
|
|
4
4
|
metadata:
|
|
5
5
|
author: mgamadeus
|
|
6
|
-
version: "1.
|
|
6
|
+
version: "1.4.0"
|
|
7
7
|
package: "@mgamadeus/ddd-web"
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -21,7 +21,7 @@ frontend code. No UI components, no domain logic — apps bring their own design
|
|
|
21
21
|
|---|---|---|
|
|
22
22
|
| `@mgamadeus/ddd-web/codegen` | Node only (never in a browser bundle) | `defineConfig`, `generateSdk`, `linkSkills`, `loadSpec` / `validateSpec`; bins `ddd-web-sdk`, `ddd-web` |
|
|
23
23
|
| `@mgamadeus/ddd-web/query` | anywhere, no React | QueryOptions builders and definition-driven validators |
|
|
24
|
-
| `@mgamadeus/ddd-web/api` | needs `@reduxjs/toolkit` 2 (peer) | `createDddBaseQuery`, `createDddRefresh`, `normalizeDddError`, downloads, `createAuthEndpoints` |
|
|
24
|
+
| `@mgamadeus/ddd-web/api` | needs `@reduxjs/toolkit` 2 (peer) | `createDddBaseQuery` (+ `upload()`, `relogin`, `getSessionKey`), `createDddRefresh`, `normalizeDddError`, downloads, multipart (`buildDddMultipartBody`), `mergeDddTagTypes`, `createAuthEndpoints` |
|
|
25
25
|
| `@mgamadeus/ddd-web/auth` | anywhere | `TokenStorage` adapters, `decodeJwt`, `isExpired`, SSR-safe storage |
|
|
26
26
|
| `@mgamadeus/ddd-web/contract` | types + small helpers | `x-ddd-*` types, error body, DDD date-time, translations, operators |
|
|
27
27
|
|
|
@@ -92,6 +92,17 @@ const { data } = useGetApiAdminLibraryBooksListQuery({
|
|
|
92
92
|
`DddFileResponse`: `const { blob, filename } = await trigger(args).unwrap(); downloadBlob(blob, filename ?? 'x.xlsx')`.
|
|
93
93
|
When the spec declares JSON for such a route, add a `responseHandlers` override (`handler: 'blob'`) — never
|
|
94
94
|
hand-write a stopgap endpoint.
|
|
95
|
+
- **File uploads** go through the generated `multipartFiles` argument (operations with a multipart request body); for
|
|
96
|
+
progress or cancel use `dddBaseQuery.upload()` in a `queryFn`. Never hand-write `new FormData()` with an own
|
|
97
|
+
`fetch` / `XMLHttpRequest` and an own token: it bypasses the session, the refresh and the headers hooks.
|
|
98
|
+
- **Sessions without refresh token** (guest, device, impersonation) recover through the `relogin` option — never a
|
|
99
|
+
placeholder refresh token.
|
|
100
|
+
- **A request whose body belongs to one account is bound to that session**: `getSessionKey` on the base query and
|
|
101
|
+
`withDddExpectedSessionKey` (or `expectedSessionKey` of an upload). A check before `dispatch()` does not cover the
|
|
102
|
+
wait for a running refresh or the retry after it.
|
|
103
|
+
- **Tag names come from the generated `<stem>Tags.ts`**: build `tagTypes` with `mergeDddTagTypes`, never retype a tag.
|
|
104
|
+
- **A route missing from the deployed spec** is generated from a local spec file or local backend (`schemaFile`,
|
|
105
|
+
`--schema`), not injected by hand.
|
|
95
106
|
- **Never build filter strings by concatenation** — use the `query` builders; they escape strings, write lists as JSON
|
|
96
107
|
and group `or` clauses (the backend parser has no precedence).
|
|
97
108
|
- **One refresh policy:** pass `shouldRefresh` instead of wrapping the base query; auth endpoints never refresh.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
1. Configuration (`openapi-config.ts`)
|
|
6
6
|
2. Generating the SDK (`ddd-web-sdk`)
|
|
7
|
-
3. Generated files and cache tags
|
|
7
|
+
3. Generated files and cache tags (3a file downloads, 3b file uploads and upload progress)
|
|
8
8
|
4. Query builders (`/query`)
|
|
9
9
|
5. Base query, refresh and errors (`/api`)
|
|
10
10
|
6. Tokens (`/auth`)
|
|
@@ -141,6 +141,25 @@ default is `[]`); api-entry resolver first, then the global one; an invalid resu
|
|
|
141
141
|
`invalidation: broadInvalidation` restores the 0.2 output (every write without an `x-ddd-entity` path identity
|
|
142
142
|
invalidates LIST + its whole tag type).
|
|
143
143
|
|
|
144
|
+
**Typed tags in hand-written code.** Build the base api's `tagTypes` from the generated lists, then every
|
|
145
|
+
`providesTags` / `invalidatesTags` of an own `injectEndpoints` file and every `baseApi.util.invalidateTags()` is checked
|
|
146
|
+
against the generated names — a mistyped tag does not compile instead of silently invalidating nothing:
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
import { mergeDddTagTypes } from '@mgamadeus/ddd-web/api';
|
|
150
|
+
import { adminApiTagTypes } from './adminApiTags'; // the Tags files import nothing: no import cycle
|
|
151
|
+
import { clientApiTagTypes } from './clientApiTags';
|
|
152
|
+
|
|
153
|
+
export const baseApi = createApi({
|
|
154
|
+
baseQuery: dddBaseQuery,
|
|
155
|
+
tagTypes: mergeDddTagTypes([...adminApiTagTypes, ...clientApiTagTypes], ['Session']), // own tags second
|
|
156
|
+
endpoints: () => ({}),
|
|
157
|
+
});
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
An own tag that differs from a generated one only by case (`ProspectActivities` next to the generated
|
|
161
|
+
`Prospectactivities`) is a compile error. Never list generated tag names by hand.
|
|
162
|
+
|
|
144
163
|
## 3a. File downloads and text responses
|
|
145
164
|
|
|
146
165
|
The response handler of each endpoint follows its 2xx content types:
|
|
@@ -172,6 +191,46 @@ A `Blob` is not serializable: Redux Toolkit's serializable check warns about it
|
|
|
172
191
|
the cache (`keepUnusedDataFor: 0` via `enhanceEndpoints`). Generated endpoints import the package's `api` entry, so the
|
|
173
192
|
app needs `@reduxjs/toolkit` (the `api` peer) installed.
|
|
174
193
|
|
|
194
|
+
## 3b. File uploads (multipart)
|
|
195
|
+
|
|
196
|
+
An operation whose request body offers `multipart/form-data` (a request DTO with `Parameter::FILES` properties) gets a
|
|
197
|
+
`multipartFiles` argument with one list per file field, and its body is built by `buildDddMultipartBody`:
|
|
198
|
+
|
|
199
|
+
| Operation accepts | Generated argument | Request |
|
|
200
|
+
|---|---|---|
|
|
201
|
+
| JSON and multipart | the JSON DTO argument as before + optional `multipartFiles` | JSON while no file is given; with a file `multipart/form-data`: the JSON envelope in the form field `body`, each file as `<field>[]` |
|
|
202
|
+
| multipart only | `multipartFiles` (required when the spec requires a file field) instead of RTK's body argument | always multipart |
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
const [send] = usePostApiClientChatMessagesMutation();
|
|
206
|
+
await send({ chatMessageCreateRequestDto: { chatMessage: { body: 'see attachment' } }, multipartFiles: { attachmentFiles: [file] } }).unwrap();
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
A file part is a `File` / `Blob`, or React Native's `{ uri, name, type }`. Never set a `Content-Type` header for such a
|
|
210
|
+
request. With `flattenArg` (the argument is the body itself) no files argument can be added: the generator warns and
|
|
211
|
+
the endpoint stays JSON-only. `File` objects in a mutation argument are not serializable — RTK Query's own actions are
|
|
212
|
+
exempt from the serializable check, do not copy them into other state.
|
|
213
|
+
|
|
214
|
+
**Upload with progress.** `fetch` reports no upload progress, so the base query has an `upload()` that sends the same
|
|
215
|
+
multipart form through `XMLHttpRequest` with the session of every other request (Bearer, `headers` / `languageCode`
|
|
216
|
+
hooks, the shared refresh and one retry). Use it in a `queryFn`, so hooks, cache tags and error handling stay RTK's:
|
|
217
|
+
|
|
218
|
+
```ts
|
|
219
|
+
// dddBaseQuery = createDddBaseQuery({...}), exported next to baseApi
|
|
220
|
+
uploadAttachment: build.mutation<AttachmentResponse, { itemId: number; file: File; onProgress?: (loaded: number, total: number) => void; signal?: AbortSignal }>({
|
|
221
|
+
queryFn: async ({ itemId, file, onProgress, signal }, api, extraOptions) =>
|
|
222
|
+
(await dddBaseQuery.upload(
|
|
223
|
+
{ url: `/api/client/items/${itemId}/attachments`, body: { caption: file.name }, files: { attachmentFiles: [file] }, onProgress, signal },
|
|
224
|
+
api, extraOptions,
|
|
225
|
+
)) as { data: AttachmentResponse } | { error: FetchBaseQueryError },
|
|
226
|
+
invalidatesTags: (_result, _error, { itemId }) => [{ type: 'Items', id: itemId }],
|
|
227
|
+
}),
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
`onProgress(loaded, total)` restarts from 0 when the upload is repeated after a refresh. A cancelled upload (`signal`)
|
|
231
|
+
ends with an error for which `isDddUploadAborted(error)` is true; other errors have the base query's shape, so
|
|
232
|
+
`normalizeDddError` reads them.
|
|
233
|
+
|
|
175
234
|
## 4. Query builders (`/query`)
|
|
176
235
|
|
|
177
236
|
The backend reads `filters`, `orderBy`, `expand`, `select`, `top`, `skip` (no `$` prefix). Default `top` is 50.
|
|
@@ -226,6 +285,9 @@ DDD date-time otherwise.
|
|
|
226
285
|
| `setTokens(tokens, api)` | store a refreshed pair |
|
|
227
286
|
| `onLogout(api)` | once, when the session cannot be recovered |
|
|
228
287
|
| `refreshPath` / `refresh` | default refresh = `POST refreshPath { refreshToken }` → `{ accessToken, refreshToken }`; or a custom `DddRefreshFn` |
|
|
288
|
+
| `relogin(context)` | re-opens the session when the refresh cannot: `context.reason` is `'no-refresh-token'` (guest, device, impersonation sessions) or `'refresh-rejected'`; return the new tokens (`refreshToken: null` allowed) or `null` to log out |
|
|
289
|
+
| `getSessionKey(context)` | key of the current session that survives a token refresh (account id, or a counter raised on login and logout; `null` without a session); needed to bind requests to a session, see below |
|
|
290
|
+
| `createUploadRequest()` | the request object of `upload()`; default `new XMLHttpRequest()` |
|
|
229
291
|
| `shouldRefresh(error, request)` | default `defaultShouldRefresh`: status 401 and not an auth route (`…/common/auth/…`, `isDddAuthRequest`) |
|
|
230
292
|
| `languageCode(context)` | value of the DDD `languageCode` header; `context.type` tells queries from mutations (e.g. editing language on writes, UI language on reads) |
|
|
231
293
|
| `headers(headers, context)` | further headers after the Bearer header |
|
|
@@ -236,6 +298,51 @@ Refresh behaviour: one refresh per session generation, shared by all requests th
|
|
|
236
298
|
is retried once. A request that started before a finished refresh reuses its result; a late 401 after a failed refresh
|
|
237
299
|
neither refreshes nor logs out again; a refresh that finishes after a logout or a new login is discarded.
|
|
238
300
|
|
|
301
|
+
A session without refresh token (a guest with a stored credential, a device login, an impersonation renewed through
|
|
302
|
+
another session) recovers through `relogin` — never store a placeholder refresh token to make the refresh run:
|
|
303
|
+
|
|
304
|
+
```ts
|
|
305
|
+
relogin: async ({ reason, baseQuery, api, extraOptions }) => {
|
|
306
|
+
const credential = readGuestCredential();
|
|
307
|
+
if (!credential) return null; // → onLogout
|
|
308
|
+
const result = await baseQuery({ url: '/api/public/common/auth/guest', method: 'POST', body: { credential } }, api, extraOptions as {});
|
|
309
|
+
const data = result.data as { accessToken?: string; refreshToken?: string | null } | undefined;
|
|
310
|
+
return data?.accessToken ? { accessToken: data.accessToken, refreshToken: data.refreshToken ?? null } : null;
|
|
311
|
+
},
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
**Requests bound to a session.** The Bearer token is read when a request is sent: after the wait for a running
|
|
315
|
+
refresh, and again for the retry. A request prepared for account A (an offline queue, an upload, an import) can
|
|
316
|
+
therefore leave with the token of account B when the user switched in between; a check before `dispatch()` does not
|
|
317
|
+
cover that. Give the base query a `getSessionKey` and bind such requests: a bound request is sent, and retried, only
|
|
318
|
+
while its session is the current one. Otherwise it ends with `{ error: { status: 'CUSTOM_ERROR', error:
|
|
319
|
+
'DDD_SESSION_CHANGED' } }` (`isDddSessionChanged(error)`) without a network call, a refresh or a logout. Requests that
|
|
320
|
+
are not bound behave as before.
|
|
321
|
+
|
|
322
|
+
```ts
|
|
323
|
+
createDddBaseQuery({ /* … */ getSessionKey: ({ getState }) => (getState() as RootState).auth.accountId });
|
|
324
|
+
|
|
325
|
+
// The session the caller prepared the request for (strictest form): the key is part of the endpoint's argument.
|
|
326
|
+
saveDraft: build.mutation<void, { accountId: number; draft: Draft }>({
|
|
327
|
+
query: ({ accountId, draft }) =>
|
|
328
|
+
withDddExpectedSessionKey({ url: '/api/client/drafts', method: 'POST', body: { draft } }, accountId),
|
|
329
|
+
}),
|
|
330
|
+
|
|
331
|
+
// An upload:
|
|
332
|
+
dddBaseQuery.upload({ url, files, expectedSessionKey: accountId }, api, extraOptions);
|
|
333
|
+
|
|
334
|
+
// The session that is current when the request starts (also for generated endpoints, through enhanceEndpoints):
|
|
335
|
+
api.enhanceEndpoints({ endpoints: { postClientDrafts: { extraOptions: { bindToSession: true } } } });
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
- The key must survive a token refresh: an account id or an app-side counter, never the access token (a refresh of
|
|
339
|
+
the same session would block the retry).
|
|
340
|
+
- `withDddExpectedSessionKey` carries the key in the header `x-ddd-expected-session-key`; the base query removes it
|
|
341
|
+
before sending. A `queryFn` can pass `{ expectedSessionKey }` as `extraOptions` instead.
|
|
342
|
+
- Treat `DDD_SESSION_CHANGED` like "not sent": a queued item stays queued for its own account.
|
|
343
|
+
|
|
344
|
+
It runs inside the shared refresh, so concurrent failures trigger it once.
|
|
345
|
+
|
|
239
346
|
```ts
|
|
240
347
|
// also refresh on 403, except business refusals
|
|
241
348
|
shouldRefresh: (error, request) =>
|
|
@@ -307,6 +414,12 @@ Idempotent; an existing symlink is repointed, a real file or directory is never
|
|
|
307
414
|
| `type check failed — previous output restored` | Fix the reported type error (often app code using a renamed hook), or `--skip-tsc` to inspect |
|
|
308
415
|
| A list does not refresh after a write | `<stem>Enhanced.ts` not imported; or the write has no tag — see section 3 |
|
|
309
416
|
| A screen shows stale data after a write that changes more than its own entity | Writes invalidate by identity since 0.3 — add an `invalidation` resolver for that endpoint (section 3), or `broadInvalidation` for the 0.2 behaviour |
|
|
417
|
+
| After an account switch a queued request was stored under the new account | Bind it to its session: `getSessionKey` + `withDddExpectedSessionKey` (section 5) |
|
|
418
|
+
| `a request is bound to a session, pass getSessionKey` | The base query has no `getSessionKey` option |
|
|
419
|
+
| A guest / device session logs out at the first 401 | It has no refresh token: pass `relogin` (section 5) |
|
|
420
|
+
| `multipart body not generated (…flattenArg…)` | The endpoint's argument is the body itself; drop `flattenArg` for it or send the files with `upload()` |
|
|
421
|
+
| An invalidation of a hand-written endpoint does nothing | Tag name in another case than the generated one: build `tagTypes` with `mergeDddTagTypes` (section 3) |
|
|
422
|
+
| A route is not in the deployed spec yet | Point `schemaFile` (or `--schema`) at a local spec file or the local backend and regenerate; no hand-written stopgap endpoint |
|
|
310
423
|
| Every request logs out after a 401 | `refreshPath` wrong, or the refresh response lacks `accessToken` |
|
|
311
424
|
| Dates off by the zone offset | DDD date-times are UTC without offset: use `parseDddDateTime` |
|
|
312
425
|
| 400 on a filter that looks right | Column kind / FULLTEXT / options: validate with `buildDefinedFilter` when `x-ddd-query` is available |
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
Requests can be bound to the session they were prepared for. Additive: without `getSessionKey` nothing changes.
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- api: option `getSessionKey` of `createDddBaseQuery` and three ways to bind a request to a session:
|
|
9
|
+
`withDddExpectedSessionKey(request, key)` in an endpoint's `query`, `expectedSessionKey` of an upload, and
|
|
10
|
+
`extraOptions: { bindToSession: true }` (the session that is current when the request starts;
|
|
11
|
+
`{ expectedSessionKey }` for a `queryFn`). A bound request is sent, and repeated after a refresh, only while that
|
|
12
|
+
session is the current one; otherwise it ends with the error of `isDddSessionChanged` (`DDD_SESSION_CHANGED`)
|
|
13
|
+
without a network call, a refresh or a logout. Type `DddSessionBindingOptions`, constant
|
|
14
|
+
`DDD_EXPECTED_SESSION_KEY_HEADER`.
|
|
15
|
+
|
|
16
|
+
### Fixed by binding
|
|
17
|
+
- A request that waited for a running refresh, or was repeated after one, was sent with the token of whatever
|
|
18
|
+
session was current at that moment: after an account switch a body prepared for one account could be stored under
|
|
19
|
+
another. Bind requests whose body belongs to an account (offline queues, uploads, imports).
|
|
20
|
+
|
|
21
|
+
## 0.4.0
|
|
22
|
+
|
|
23
|
+
File uploads, sessions without refresh token and typed cache tags. Minor release: the generated arguments of multipart
|
|
24
|
+
operations change.
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- codegen: an operation with a `multipart/form-data` request body gets a `multipartFiles` argument (one list per file
|
|
28
|
+
field) and sends `buildDddMultipartBody(<json body>, multipartFiles)`: JSON while no file is given, else multipart
|
|
29
|
+
with the JSON envelope in the form field `body` and each file as `<field>[]`. Skipped with a warning for an
|
|
30
|
+
endpoint with `flattenArg`.
|
|
31
|
+
- api: `buildDddMultipartBody`, `buildDddFormData`, `hasDddMultipartFiles`, types `DddMultipartFiles`, `DddFilePart`
|
|
32
|
+
(a `File` / `Blob` or React Native's `{ uri, name, type }`).
|
|
33
|
+
- api: `createDddBaseQuery()` returns a base query with `upload(request, api, extraOptions)`: a multipart upload
|
|
34
|
+
through `XMLHttpRequest` with progress (`onProgress`) and cancel (`signal`, `isDddUploadAborted`), sharing Bearer,
|
|
35
|
+
the `headers` / `languageCode` hooks, the refresh and one retry. Option `createUploadRequest`.
|
|
36
|
+
- api: option `relogin` — re-opens the session when no refresh token is stored or the refresh was rejected
|
|
37
|
+
(`DddReloginFn`, `DddReloginContext`). Without it the behaviour is unchanged.
|
|
38
|
+
- api: `mergeDddTagTypes(generated, own)` for the base api's `tagTypes`; an own tag that differs from a generated one
|
|
39
|
+
only by case does not compile.
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
- codegen: a multipart-only operation no longer has the body argument RTK codegen derived from the multipart schema
|
|
43
|
+
(it typed the files as a schema of the backend's upload class); pass `multipartFiles` instead.
|
|
44
|
+
- A refresh for a session without refresh token is discarded when the access token changed while it ran.
|
|
45
|
+
|
|
46
|
+
### Replaces hand-written code
|
|
47
|
+
Search an app for these after the update and move them to the package:
|
|
48
|
+
- `new FormData(` together with `injectEndpoints`, `fetch(` or `XMLHttpRequest` → `multipartFiles` / `upload()`;
|
|
49
|
+
- a constant refresh token that only exists to make the refresh run (`getTokens` returning a marker) → `relogin`;
|
|
50
|
+
- a `tagTypes:` list that repeats generated tag names → `mergeDddTagTypes`.
|
|
51
|
+
|
|
3
52
|
## 0.3.1
|
|
4
53
|
|
|
5
54
|
The repository moved to the ddd-framework organisation: github.com/ddd-framework/ddd-web. No code changes; the npm
|
package/README.md
CHANGED
|
@@ -74,6 +74,53 @@ export default defineConfig({
|
|
|
74
74
|
});
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
+
### File uploads
|
|
78
|
+
|
|
79
|
+
Operations with a `multipart/form-data` request body get a `multipartFiles` argument; with a file the request is sent
|
|
80
|
+
as multipart (JSON envelope in the form field `body`), without one as JSON:
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
await send({ messageCreateRequestDto: { message: { body: 'see attachment' } }, multipartFiles: { attachmentFiles: [file] } }).unwrap();
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
For upload progress and cancel, `createDddBaseQuery(...)` returns a base query with `upload()` (XMLHttpRequest with the
|
|
87
|
+
same Bearer, headers, refresh and retry) to call from a `queryFn`:
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
queryFn: ({ file, onProgress }, api, extraOptions) =>
|
|
91
|
+
dddBaseQuery.upload({ url: '/api/client/files', files: { files: [file] }, onProgress }, api, extraOptions),
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Sessions without refresh token
|
|
95
|
+
|
|
96
|
+
`relogin` re-opens a guest, device or impersonation session when there is no refresh token or it was rejected:
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
createDddBaseQuery({ /* … */ relogin: async ({ reason, baseQuery, api, extraOptions }) => reopenGuestSession(baseQuery, api, extraOptions) });
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Requests bound to a session
|
|
103
|
+
|
|
104
|
+
A request prepared for one account must not leave with another account's token after an account switch (the token is
|
|
105
|
+
read when the request is sent, after a running refresh, and again for the retry):
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
createDddBaseQuery({ /* … */ getSessionKey: ({ getState }) => (getState() as RootState).auth.accountId });
|
|
109
|
+
|
|
110
|
+
query: ({ accountId, draft }) => withDddExpectedSessionKey({ url: '/api/client/drafts', method: 'POST', body: { draft } }, accountId),
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
A bound request whose session is no longer the current one is not sent: `isDddSessionChanged(result.error)`. Uploads
|
|
114
|
+
take `expectedSessionKey`; `extraOptions: { bindToSession: true }` binds an endpoint's requests to the session they
|
|
115
|
+
start in.
|
|
116
|
+
|
|
117
|
+
### Typed cache tags
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
import { mergeDddTagTypes } from '@mgamadeus/ddd-web/api';
|
|
121
|
+
tagTypes: mergeDddTagTypes([...adminApiTagTypes], ['Session']), // hand-written endpoints are checked against the generated names
|
|
122
|
+
```
|
|
123
|
+
|
|
77
124
|
### Cache invalidation
|
|
78
125
|
|
|
79
126
|
Each mutation invalidates the entity it writes plus the lists of its tag type (`{ type, id }` + `{ type, id: 'LIST' }`).
|
package/dist/api/index.d.ts
CHANGED
|
@@ -28,6 +28,33 @@ declare function readDebugFlags(options?: DddDebugOptions): DddDebugFlags;
|
|
|
28
28
|
*/
|
|
29
29
|
declare function applyDebugParams(args: string | FetchArgs, flags: DddDebugFlags, xdebugSessionKey?: string): string | FetchArgs;
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* One file part: a `File` / `Blob` in a browser, or React Native's `{ uri, name, type }` file reference.
|
|
33
|
+
*/
|
|
34
|
+
type DddFilePart = Blob | {
|
|
35
|
+
uri: string;
|
|
36
|
+
name: string;
|
|
37
|
+
type: string;
|
|
38
|
+
};
|
|
39
|
+
/** File parts per form field of a DDD request DTO (its `Parameter::FILES` properties). */
|
|
40
|
+
type DddMultipartFiles<Field extends string = string> = Partial<Record<Field, readonly DddFilePart[] | DddFilePart | null | undefined>>;
|
|
41
|
+
/** Form field a DDD backend reads the JSON envelope of a multipart request from. */
|
|
42
|
+
declare const DDD_MULTIPART_BODY_FIELD = "body";
|
|
43
|
+
/** True when at least one file part is present. */
|
|
44
|
+
declare function hasDddMultipartFiles(files: DddMultipartFiles | null | undefined): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The `multipart/form-data` body of a DDD request: the JSON envelope in the form field `body` (left out when
|
|
47
|
+
* `body` is `undefined`) and every file as a part named `<field>[]`. No `Content-Type` header must be set for it: the
|
|
48
|
+
* runtime adds the multipart boundary itself.
|
|
49
|
+
*/
|
|
50
|
+
declare function buildDddFormData(body: unknown, files: DddMultipartFiles | null | undefined): FormData;
|
|
51
|
+
/**
|
|
52
|
+
* Request body of an endpoint that accepts JSON and file parts: `body` itself while no file is given (a plain JSON
|
|
53
|
+
* request), else the multipart form of {@link buildDddFormData}. Generated endpoints of operations with a
|
|
54
|
+
* `multipart/form-data` request body call it with their `multipartFiles` argument.
|
|
55
|
+
*/
|
|
56
|
+
declare function buildDddMultipartBody<Body>(body: Body, files: DddMultipartFiles | null | undefined): Body | FormData;
|
|
57
|
+
|
|
31
58
|
/** The raw (non-refreshing) base query handed to a refresh function. */
|
|
32
59
|
type DddRawBaseQuery = BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError, {}, FetchBaseQueryMeta>;
|
|
33
60
|
/** Everything a refresh function needs. */
|
|
@@ -46,6 +73,22 @@ interface DddRefreshContext {
|
|
|
46
73
|
* A missing `refreshToken` in the result keeps the stored one.
|
|
47
74
|
*/
|
|
48
75
|
type DddRefreshFn = (context: DddRefreshContext) => Promise<DddTokens | null>;
|
|
76
|
+
/** Everything a re-login function needs. */
|
|
77
|
+
interface DddReloginContext {
|
|
78
|
+
/** Why the refresh could not recover the session. */
|
|
79
|
+
reason: 'no-refresh-token' | 'refresh-rejected';
|
|
80
|
+
/** The underlying fetch base query (no auth retry, Bearer of the current access token still applied). */
|
|
81
|
+
baseQuery: DddRawBaseQuery;
|
|
82
|
+
api: BaseQueryApi;
|
|
83
|
+
extraOptions: unknown;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Re-opens a session without a usable refresh token (guest credential, device id, impersonation through another
|
|
87
|
+
* session, …).
|
|
88
|
+
*
|
|
89
|
+
* @returns the new tokens (`refreshToken: null` for a session that has none), or `null` to end the session.
|
|
90
|
+
*/
|
|
91
|
+
type DddReloginFn = (context: DddReloginContext) => Promise<DddTokens | null>;
|
|
49
92
|
/**
|
|
50
93
|
* The default {@link DddRefreshFn}: `POST <path>` with `{ refreshToken }`, expecting the DDD `AuthPostResponseDto`
|
|
51
94
|
* `{ accessToken, refreshToken }`. DDD refresh tokens are stateless and re-issued with a renewed lifetime.
|
|
@@ -61,8 +104,73 @@ type DddRequestContext = Pick<BaseQueryApi, 'getState' | 'extra' | 'endpoint' |
|
|
|
61
104
|
type DddHeadersContext = Parameters<NonNullable<FetchBaseQueryArgs['prepareHeaders']>>[1];
|
|
62
105
|
/** Decides whether a failed request is worth a token refresh and one retry. */
|
|
63
106
|
type DddShouldRefresh = (error: FetchBaseQueryError, request: FetchArgs) => boolean;
|
|
64
|
-
/** The base query
|
|
107
|
+
/** The base query type of a DDD api (what {@link createAuthEndpoints} and wrappers accept). */
|
|
65
108
|
type DddBaseQuery = BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError, {}, FetchBaseQueryMeta>;
|
|
109
|
+
/** One upload sent by {@link DddUploadingBaseQuery.upload}. */
|
|
110
|
+
interface DddUploadRequest {
|
|
111
|
+
/** Path relative to the base URL. */
|
|
112
|
+
url: string;
|
|
113
|
+
/** Default `POST`. */
|
|
114
|
+
method?: string;
|
|
115
|
+
/** JSON envelope, sent in the form field `body`; left out when `undefined`. */
|
|
116
|
+
body?: unknown;
|
|
117
|
+
/** File parts per form field (the `Parameter::FILES` properties of the request DTO). */
|
|
118
|
+
files: DddMultipartFiles;
|
|
119
|
+
/** Query parameters; `null` / `undefined` values are skipped. */
|
|
120
|
+
params?: Record<string, unknown>;
|
|
121
|
+
/** Bytes of the request body sent so far. Called again from 0 when the upload is repeated after a refresh. */
|
|
122
|
+
onProgress?: (loaded: number, total: number) => void;
|
|
123
|
+
/** Aborting cancels the request; the result is then the error of {@link isDddUploadAborted}. */
|
|
124
|
+
signal?: AbortSignal;
|
|
125
|
+
/**
|
|
126
|
+
* Session this upload belongs to (see {@link DddBaseQueryOptions.getSessionKey}): it is only sent, and only
|
|
127
|
+
* repeated after a refresh, while that session is the current one.
|
|
128
|
+
*/
|
|
129
|
+
expectedSessionKey?: string | number;
|
|
130
|
+
}
|
|
131
|
+
/** Result of an upload: the shape an RTK `queryFn` returns. */
|
|
132
|
+
type DddUploadResult = {
|
|
133
|
+
data: unknown;
|
|
134
|
+
error?: undefined;
|
|
135
|
+
} | {
|
|
136
|
+
data?: undefined;
|
|
137
|
+
error: FetchBaseQueryError;
|
|
138
|
+
};
|
|
139
|
+
/** The base query returned by {@link createDddBaseQuery}: a {@link DddBaseQuery} that can also upload with progress. */
|
|
140
|
+
type DddUploadingBaseQuery = DddBaseQuery & {
|
|
141
|
+
/**
|
|
142
|
+
* Sends a multipart upload with progress (XMLHttpRequest: `fetch` reports no upload progress) through the same
|
|
143
|
+
* session as every request: Bearer, `headers` / `languageCode` hooks, one shared refresh and one retry.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* uploadAttachment: build.mutation<AttachmentResponse, { id: number; file: File; onProgress?: (loaded: number, total: number) => void }>({
|
|
147
|
+
* queryFn: ({ id, file, onProgress }, api, extraOptions) =>
|
|
148
|
+
* dddBaseQuery.upload({ url: `/api/client/items/${id}/attachments`, files: { attachmentFiles: [file] }, onProgress }, api, extraOptions) as
|
|
149
|
+
* Promise<{ data: AttachmentResponse } | { error: FetchBaseQueryError }>,
|
|
150
|
+
* }),
|
|
151
|
+
*/
|
|
152
|
+
upload: (request: DddUploadRequest, api: BaseQueryApi, extraOptions?: unknown) => Promise<DddUploadResult>;
|
|
153
|
+
};
|
|
154
|
+
/** `error.error` of an upload cancelled through its `signal`. */
|
|
155
|
+
declare const DDD_UPLOAD_ABORTED = "DDD_UPLOAD_ABORTED";
|
|
156
|
+
/** True for the error of an upload that was cancelled through its `signal`. */
|
|
157
|
+
declare const isDddUploadAborted: (error: unknown) => boolean;
|
|
158
|
+
/** `error.error` of a request that was not sent because it was bound to a session that is no longer the current one. */
|
|
159
|
+
declare const DDD_SESSION_CHANGED = "DDD_SESSION_CHANGED";
|
|
160
|
+
/** True for the error of a request that was not sent because its session is no longer the current one. */
|
|
161
|
+
declare const isDddSessionChanged: (error: unknown) => boolean;
|
|
162
|
+
/** Request header that carries the expected session key to the base query; it is removed before the request is sent. */
|
|
163
|
+
declare const DDD_EXPECTED_SESSION_KEY_HEADER = "x-ddd-expected-session-key";
|
|
164
|
+
/**
|
|
165
|
+
* `extraOptions` the base query reads: what binds the requests of an endpoint to a session (see
|
|
166
|
+
* {@link DddBaseQueryOptions.getSessionKey}).
|
|
167
|
+
*/
|
|
168
|
+
interface DddSessionBindingOptions {
|
|
169
|
+
/** Binds each request to the session that is current when the request starts. */
|
|
170
|
+
bindToSession?: boolean;
|
|
171
|
+
/** Binds the request to this session (a `queryFn` passes it on to the base query). */
|
|
172
|
+
expectedSessionKey?: string | number;
|
|
173
|
+
}
|
|
66
174
|
/** Options of {@link createDddBaseQuery}. */
|
|
67
175
|
interface DddBaseQueryOptions {
|
|
68
176
|
/** API origin, e.g. `https://api.example.com`. Request URLs are relative to it. */
|
|
@@ -73,10 +181,51 @@ interface DddBaseQueryOptions {
|
|
|
73
181
|
setTokens: (tokens: DddTokens, api: BaseQueryApi) => MaybePromise<void>;
|
|
74
182
|
/** Called once when the session cannot be recovered (no refresh token, or the refresh was rejected). */
|
|
75
183
|
onLogout: (api: BaseQueryApi) => MaybePromise<void>;
|
|
184
|
+
/**
|
|
185
|
+
* Identifies the current session by a value that survives a token refresh: the account id, or a counter the app
|
|
186
|
+
* raises on every login and logout; `null` without a session. Never the access token: it changes with each refresh.
|
|
187
|
+
*
|
|
188
|
+
* With it a request can be bound to a session. A bound request is sent, and repeated after a refresh, only while
|
|
189
|
+
* that session is the current one; otherwise it is answered with the error of {@link isDddSessionChanged}, without
|
|
190
|
+
* a network call, a refresh or a logout. A request is bound by one of:
|
|
191
|
+
* - {@link withDddExpectedSessionKey} in the endpoint's `query` (the session the caller prepared the request for),
|
|
192
|
+
* - `expectedSessionKey` of an upload ({@link DddUploadRequest}),
|
|
193
|
+
* - `extraOptions: { bindToSession: true }` on the endpoint: the session that is current when the request starts.
|
|
194
|
+
*
|
|
195
|
+
* Requests that are not bound are sent as without this option.
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* getSessionKey: ({ getState }) => (getState() as RootState).auth.accountId,
|
|
199
|
+
*
|
|
200
|
+
* // An endpoint whose body belongs to the account it was prepared for:
|
|
201
|
+
* saveDraft: build.mutation<void, { accountId: number; draft: Draft }>({
|
|
202
|
+
* query: ({ accountId, draft }) =>
|
|
203
|
+
* withDddExpectedSessionKey({ url: '/api/client/drafts', method: 'POST', body: { draft } }, accountId),
|
|
204
|
+
* }),
|
|
205
|
+
*/
|
|
206
|
+
getSessionKey?: (context: DddRequestContext) => MaybePromise<string | number | null | undefined>;
|
|
76
207
|
/** Custom refresh. Default: {@link createDddRefresh} on `refreshPath`. */
|
|
77
208
|
refresh?: DddRefreshFn;
|
|
78
209
|
/** Refresh endpoint for the default refresh, e.g. `/api/admin/common/auth/refresh`. Required without `refresh`. */
|
|
79
210
|
refreshPath?: string;
|
|
211
|
+
/**
|
|
212
|
+
* Re-opens the session when the refresh cannot: no refresh token is stored (guest, impersonation or device
|
|
213
|
+
* sessions), or the refresh token was rejected. Return the new tokens, or `null` to end the session (`onLogout`).
|
|
214
|
+
* Without it a refresh-worthy failure without refresh token logs out directly.
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* // A guest session is re-opened from its stored credential:
|
|
218
|
+
* relogin: async ({ baseQuery, api, extraOptions }) => {
|
|
219
|
+
* const credential = readGuestCredential();
|
|
220
|
+
* if (!credential) return null;
|
|
221
|
+
* const result = await baseQuery({ url: '/api/public/common/auth/guest', method: 'POST', body: { credential } }, api, extraOptions as {});
|
|
222
|
+
* const data = result.data as { accessToken?: string; refreshToken?: string | null } | undefined;
|
|
223
|
+
* return data?.accessToken ? { accessToken: data.accessToken, refreshToken: data.refreshToken ?? null } : null;
|
|
224
|
+
* },
|
|
225
|
+
*/
|
|
226
|
+
relogin?: DddReloginFn;
|
|
227
|
+
/** Creates the request object of an upload. Default `new XMLHttpRequest()`. */
|
|
228
|
+
createUploadRequest?: () => XMLHttpRequest;
|
|
80
229
|
/**
|
|
81
230
|
* Adds or changes headers after the Bearer header is set; return value as in RTK's `prepareHeaders`.
|
|
82
231
|
* `context.type` tells reads (`query`) from writes (`mutation`).
|
|
@@ -112,6 +261,12 @@ declare const defaultShouldRefresh: DddShouldRefresh;
|
|
|
112
261
|
* Query-string serializer that skips `null` / `undefined` values (the generated SDK passes every optional parameter).
|
|
113
262
|
*/
|
|
114
263
|
declare const dddParamsSerializer: (params: Record<string, unknown>) => string;
|
|
264
|
+
/**
|
|
265
|
+
* Binds a request to a session: the base query sends it, and repeats it after a refresh, only while
|
|
266
|
+
* `expectedSessionKey` is the key of the current session ({@link DddBaseQueryOptions.getSessionKey}). The key travels
|
|
267
|
+
* in a request header that the base query removes before sending.
|
|
268
|
+
*/
|
|
269
|
+
declare const withDddExpectedSessionKey: (request: string | FetchArgs, expectedSessionKey: string | number) => FetchArgs;
|
|
115
270
|
/**
|
|
116
271
|
* Creates the RTK Query base query for a DDD backend.
|
|
117
272
|
*
|
|
@@ -119,8 +274,10 @@ declare const dddParamsSerializer: (params: Record<string, unknown>) => string;
|
|
|
119
274
|
* - On a refresh-worthy failure (`shouldRefresh`, default 401) runs ONE shared refresh and retries the request exactly
|
|
120
275
|
* once. Concurrent failures share that refresh and its result; a request whose failure predates a refresh that
|
|
121
276
|
* finished meanwhile reuses that refresh's result instead of refreshing again.
|
|
122
|
-
* - No refresh token, or a rejected refresh → `
|
|
277
|
+
* - No refresh token, or a rejected refresh → `relogin()` when given; without it, or when it returns `null`,
|
|
278
|
+
* `onLogout()` once for that session and the original error is returned.
|
|
123
279
|
* - A refresh whose session was logged out or replaced while it ran is discarded (no `setTokens`, no retry).
|
|
280
|
+
* - A request bound to a session (`getSessionKey`) is not sent once another session is the current one.
|
|
124
281
|
*
|
|
125
282
|
* @example
|
|
126
283
|
* export const baseApi = createApi({
|
|
@@ -134,7 +291,30 @@ declare const dddParamsSerializer: (params: Record<string, unknown>) => string;
|
|
|
134
291
|
* endpoints: () => ({}),
|
|
135
292
|
* });
|
|
136
293
|
*/
|
|
137
|
-
declare function createDddBaseQuery(options: DddBaseQueryOptions):
|
|
294
|
+
declare function createDddBaseQuery(options: DddBaseQueryOptions): DddUploadingBaseQuery;
|
|
295
|
+
|
|
296
|
+
/** The tags of `Extra` that differ from a tag of `Generated` only by case. */
|
|
297
|
+
type DddTagCaseConflict<Extra extends string, Generated extends string> = Extra extends Generated ? never : Lowercase<Extra> extends Lowercase<Generated> ? Extra : never;
|
|
298
|
+
type DddTagCheck<Generated extends readonly string[], Extra extends readonly string[]> = [
|
|
299
|
+
DddTagCaseConflict<Extra[number], Generated[number]>
|
|
300
|
+
] extends [never] ? unknown : {
|
|
301
|
+
'tag differs from a generated tag only by case': DddTagCaseConflict<Extra[number], Generated[number]>;
|
|
302
|
+
};
|
|
303
|
+
/**
|
|
304
|
+
* The `tagTypes` of a base api: the generated tag lists (`<stem>TagTypes` of the `<stem>Tags.ts` files) plus the
|
|
305
|
+
* app's own tags. With this list every `providesTags` / `invalidatesTags` of a hand-written endpoint and every
|
|
306
|
+
* `api.util.invalidateTags()` is checked against the generated names, so a mistyped tag does not compile. An own tag
|
|
307
|
+
* that differs from a generated one only by case (`ProspectActivities` next to the generated `Prospectactivities`)
|
|
308
|
+
* is rejected here: it would be a second tag that no generated endpoint provides.
|
|
309
|
+
*
|
|
310
|
+
* @example
|
|
311
|
+
* export const baseApi = createApi({
|
|
312
|
+
* baseQuery,
|
|
313
|
+
* tagTypes: mergeDddTagTypes([...adminApiTagTypes, ...clientApiTagTypes], ['Session']),
|
|
314
|
+
* endpoints: () => ({}),
|
|
315
|
+
* });
|
|
316
|
+
*/
|
|
317
|
+
declare function mergeDddTagTypes<const Generated extends readonly string[], const Extra extends readonly string[] = readonly []>(generated: Generated, extra?: Extra & DddTagCheck<Generated, Extra>): (Generated[number] | Extra[number])[];
|
|
138
318
|
|
|
139
319
|
/** A DDD API error in one predictable shape, whatever produced it (RTK Query, a thrown Error, a raw body). */
|
|
140
320
|
interface DddNormalizedError {
|
|
@@ -266,5 +446,5 @@ declare function createAuthEndpoints<Definitions extends EndpointDefinitions, Re
|
|
|
266
446
|
authRefresh: _reduxjs_toolkit_query.MutationDefinition<DddRefreshRequest, DddBaseQuery, TagTypes, DddAuthResponse, ReducerPath, unknown>;
|
|
267
447
|
}, ReducerPath, TagTypes, Enhancers>;
|
|
268
448
|
|
|
269
|
-
export { DEFAULT_ERROR_MESSAGE, DEFAULT_ERROR_MESSAGES, DddTokens, applyDebugParams, blobResponseHandler, createAuthEndpoints, createDddBaseQuery, createDddRefresh, createDownloadResponseHandler, dddParamsSerializer, defaultShouldRefresh, downloadBlob, filenameFromContentDisposition, getErrorMessage, getErrorStatus, getRequestUrl, isDddAuthRequest, normalizeDddError, readDebugFlags };
|
|
270
|
-
export type { DddAuthEndpointsOptions, DddBaseQuery, DddBaseQueryOptions, DddDebugFlags, DddDebugOptions, DddDownloadedFile, DddErrorMessages, DddFileResponse, DddHeadersContext, DddNormalizedError, DddRawBaseQuery, DddRefreshContext, DddRefreshFn, DddRequestContext, DddShouldRefresh };
|
|
449
|
+
export { DDD_EXPECTED_SESSION_KEY_HEADER, DDD_MULTIPART_BODY_FIELD, DDD_SESSION_CHANGED, DDD_UPLOAD_ABORTED, DEFAULT_ERROR_MESSAGE, DEFAULT_ERROR_MESSAGES, DddTokens, applyDebugParams, blobResponseHandler, buildDddFormData, buildDddMultipartBody, createAuthEndpoints, createDddBaseQuery, createDddRefresh, createDownloadResponseHandler, dddParamsSerializer, defaultShouldRefresh, downloadBlob, filenameFromContentDisposition, getErrorMessage, getErrorStatus, getRequestUrl, hasDddMultipartFiles, isDddAuthRequest, isDddSessionChanged, isDddUploadAborted, mergeDddTagTypes, normalizeDddError, readDebugFlags, withDddExpectedSessionKey };
|
|
450
|
+
export type { DddAuthEndpointsOptions, DddBaseQuery, DddBaseQueryOptions, DddDebugFlags, DddDebugOptions, DddDownloadedFile, DddErrorMessages, DddFilePart, DddFileResponse, DddHeadersContext, DddMultipartFiles, DddNormalizedError, DddRawBaseQuery, DddRefreshContext, DddRefreshFn, DddReloginContext, DddReloginFn, DddRequestContext, DddSessionBindingOptions, DddShouldRefresh, DddUploadRequest, DddUploadResult, DddUploadingBaseQuery };
|