@chill-sharp/ui-core 1.1.12 → 1.1.15
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/README.md +103 -103
- package/fesm2022/chill-sharp-ui-core.mjs +2446 -2446
- package/fesm2022/chill-sharp-ui-core.mjs.map +1 -1
- package/lib/lib/chill-form.component.d.ts +1 -1
- package/package.json +3 -3
- package/service-worker/chill-sharp-service-worker.js +166 -166
- package/styles/core-theme.scss +1235 -1235
- package/.agents/skills/chillsharp-current-user-preferences/SKILL.md +0 -70
- package/.agents/skills/chillsharp-ui-template/SKILL.md +0 -18
- package/doc/AIAssistedDevelopment/README.md +0 -185
- package/doc/AttachmentModel/README.md +0 -173
- package/doc/AuthenticationModel/README.md +0 -213
- package/doc/AuthenticationModel/how-to-integreate-auth-minimal-api.md +0 -293
- package/doc/ChillSharpClient.md +0 -464
- package/doc/ClientGeneration/README.md +0 -172
- package/doc/ComplianceGuide/README.md +0 -178
- package/doc/Configuration/README.md +0 -94
- package/doc/CurrentUserPreferences.md +0 -114
- package/doc/DateTimePolicy/README.md +0 -154
- package/doc/DateTimeSerialization.md +0 -423
- package/doc/Endpoints.md +0 -260
- package/doc/HowTo/01-simple-blog-sqlite.md +0 -153
- package/doc/HowTo/02-blog-schema-labels.md +0 -140
- package/doc/HowTo/03-authentication.md +0 -218
- package/doc/HowTo/04-blog-posts-one-to-many.md +0 -194
- package/doc/HowTo/05-docker-env-variables.md +0 -274
- package/doc/HowTo/06-chunk-transactions-autocomplete.md +0 -196
- package/doc/Mcp/ChatGPT.md +0 -291
- package/doc/Mcp/README.md +0 -799
- package/doc/MenuGuide/README.md +0 -49
- package/doc/ModelPreparation.md +0 -255
- package/doc/PermissionModel/README.md +0 -277
- package/doc/README.md +0 -228
- package/doc/ReferenceExistence.md +0 -130
- package/doc/RegisterContext.md +0 -217
- package/doc/UiCore/CRUD.md +0 -170
- package/doc/UiCore/README.md +0 -13
- package/doc/ValidationModel/README.md +0 -117
- package/doc/it/AIAssistedDevelopment/README.md +0 -185
- package/doc/it/AttachmentModel/README.md +0 -173
- package/doc/it/AuthenticationModel/README.md +0 -171
- package/doc/it/AuthenticationModel/how-to-integreate-auth-minimal-api.md +0 -292
- package/doc/it/ChillSharpClient.md +0 -464
- package/doc/it/ClientGeneration/README.md +0 -152
- package/doc/it/ComplianceGuide/README.md +0 -178
- package/doc/it/Configuration/README.md +0 -94
- package/doc/it/CurrentUserPreferences.md +0 -114
- package/doc/it/DateTimePolicy/README.md +0 -154
- package/doc/it/DateTimeSerialization.md +0 -423
- package/doc/it/Endpoints.md +0 -260
- package/doc/it/HowTo/01-simple-blog-sqlite.md +0 -152
- package/doc/it/HowTo/02-blog-schema-labels.md +0 -139
- package/doc/it/HowTo/03-authentication.md +0 -221
- package/doc/it/HowTo/04-blog-posts-one-to-many.md +0 -193
- package/doc/it/HowTo/05-docker-env-variables.md +0 -268
- package/doc/it/HowTo/06-chunk-transactions-autocomplete.md +0 -196
- package/doc/it/Mcp/ChatGPT.md +0 -291
- package/doc/it/Mcp/README.md +0 -799
- package/doc/it/MenuGuide/README.md +0 -49
- package/doc/it/ModelPreparation.md +0 -254
- package/doc/it/PermissionModel/README.md +0 -190
- package/doc/it/README.md +0 -172
- package/doc/it/ReferenceExistence.md +0 -130
- package/doc/it/RegisterContext.md +0 -218
- package/doc/it/UiCore/CRUD.md +0 -170
- package/doc/it/UiCore/README.md +0 -13
- package/doc/it/ValidationModel/README.md +0 -117
- package/template-customization/upgrade.ps1.template +0 -342
- package/template-customization/upgrade.sh.template +0 -271
|
@@ -1,423 +0,0 @@
|
|
|
1
|
-
# ChillSharp Date And Time Serialization
|
|
2
|
-
|
|
3
|
-
Versione italiana: [Italiano](it/DateTimeSerialization.md)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
This document explains how ChillSharp serializes and parses `DateTimeOffset`, `DateTime`, `DateOnly`, and `TimeOnly` values in DTO payloads.
|
|
7
|
-
|
|
8
|
-
It also compares ChillSharp behavior with the default ASP.NET Core `System.Text.Json` behavior so you can quickly see what is standard .NET behavior and what is ChillSharp-specific behavior.
|
|
9
|
-
|
|
10
|
-
## Why This Matters
|
|
11
|
-
|
|
12
|
-
ChillSharp moves data through DTO property bags rather than strongly typed controller parameters. That means date and time values are converted explicitly inside the DTO mapper.
|
|
13
|
-
|
|
14
|
-
For most applications the important questions are:
|
|
15
|
-
|
|
16
|
-
- what string format leaves the server
|
|
17
|
-
- what string format the server accepts on input
|
|
18
|
-
- whether offsets and time zones are preserved, normalized, or ignored
|
|
19
|
-
|
|
20
|
-
ChillSharp now follows standard .NET behavior for `DateOnly` and `TimeOnly`, while still accepting full ISO 8601 date-time strings when reading them back into those CLR types.
|
|
21
|
-
|
|
22
|
-
## Quick Comparison Table
|
|
23
|
-
|
|
24
|
-
| CLR type | Default ASP.NET Core / `System.Text.Json` | ChillSharp output |
|
|
25
|
-
| --- | --- | --- |
|
|
26
|
-
| `DateTimeOffset` | ISO 8601 date-time with offset | ISO 8601 date-time with offset |
|
|
27
|
-
| `DateTime` | ISO 8601 date-time, based on `DateTime.Kind` | ISO 8601 date-time converted to ChillSharp system time zone |
|
|
28
|
-
| `DateOnly` | `yyyy-MM-dd` | `yyyy-MM-dd` |
|
|
29
|
-
| `TimeOnly` | `HH:mm:ss[.fffffff]` | `HH:mm:ss.fffffff` |
|
|
30
|
-
|
|
31
|
-
## ChillSharp System Time Zone
|
|
32
|
-
|
|
33
|
-
ChillSharp uses a configurable system time zone only for `DateTime` and some `DateTimeOffset` normalization cases.
|
|
34
|
-
|
|
35
|
-
Environment variable:
|
|
36
|
-
|
|
37
|
-
```text
|
|
38
|
-
CHILLSHARP_SYSTEM_TIMEZONE
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Default:
|
|
42
|
-
|
|
43
|
-
```text
|
|
44
|
-
Europe/Rome
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Expected value:
|
|
48
|
-
|
|
49
|
-
- an IANA time-zone id such as `Europe/Rome`
|
|
50
|
-
- another example is `America/New_York`
|
|
51
|
-
|
|
52
|
-
This setting does **not** change the output format of `DateOnly` or `TimeOnly`.
|
|
53
|
-
|
|
54
|
-
## Outgoing Serialization
|
|
55
|
-
|
|
56
|
-
Outgoing serialization happens when ChillSharp reads entity/query CLR values and writes them into DTO `Properties`.
|
|
57
|
-
|
|
58
|
-
### `DateTimeOffset`
|
|
59
|
-
|
|
60
|
-
ChillSharp writes `DateTimeOffset` exactly as an ISO 8601 date-time with offset.
|
|
61
|
-
|
|
62
|
-
Example CLR value:
|
|
63
|
-
|
|
64
|
-
```csharp
|
|
65
|
-
new DateTimeOffset(2026, 4, 11, 14, 30, 0, TimeSpan.FromHours(2))
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Serialized by ChillSharp:
|
|
69
|
-
|
|
70
|
-
```json
|
|
71
|
-
"2026-04-11T14:30:00.0000000+02:00"
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
This is effectively aligned with normal ASP.NET Core JSON serialization.
|
|
75
|
-
|
|
76
|
-
### `DateTime`
|
|
77
|
-
|
|
78
|
-
ChillSharp writes `DateTime` as an ISO 8601 date-time in the configured ChillSharp system time zone.
|
|
79
|
-
|
|
80
|
-
If the source value is UTC, ChillSharp converts it into the configured system time zone before writing.
|
|
81
|
-
|
|
82
|
-
Example with `CHILLSHARP_SYSTEM_TIMEZONE=Europe/Rome`:
|
|
83
|
-
|
|
84
|
-
```csharp
|
|
85
|
-
new DateTime(2026, 4, 11, 12, 30, 0, DateTimeKind.Utc)
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Serialized by ChillSharp:
|
|
89
|
-
|
|
90
|
-
```json
|
|
91
|
-
"2026-04-11T14:30:00.0000000+02:00"
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Another example with an unspecified `DateTime`:
|
|
95
|
-
|
|
96
|
-
```csharp
|
|
97
|
-
new DateTime(2026, 4, 11, 14, 30, 0, DateTimeKind.Unspecified)
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
Serialized by ChillSharp:
|
|
101
|
-
|
|
102
|
-
```json
|
|
103
|
-
"2026-04-11T14:30:00.0000000+02:00"
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
The difference from plain ASP.NET Core is that ChillSharp applies a configured system time zone consistently when writing `DateTime`.
|
|
107
|
-
|
|
108
|
-
### `DateOnly`
|
|
109
|
-
|
|
110
|
-
ChillSharp now keeps standard .NET behavior for `DateOnly`.
|
|
111
|
-
|
|
112
|
-
Example CLR value:
|
|
113
|
-
|
|
114
|
-
```csharp
|
|
115
|
-
new DateOnly(2026, 4, 11)
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
Serialized by ChillSharp:
|
|
119
|
-
|
|
120
|
-
```json
|
|
121
|
-
"2026-04-11"
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
This is intentionally simple. There is no offset, no time component, and no time-zone conversion on output.
|
|
125
|
-
|
|
126
|
-
### `TimeOnly`
|
|
127
|
-
|
|
128
|
-
ChillSharp now keeps standard .NET behavior for `TimeOnly`.
|
|
129
|
-
|
|
130
|
-
Example CLR value:
|
|
131
|
-
|
|
132
|
-
```csharp
|
|
133
|
-
new TimeOnly(14, 30, 15, 123)
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Serialized by ChillSharp:
|
|
137
|
-
|
|
138
|
-
```json
|
|
139
|
-
"14:30:15.1230000"
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
There is no date and no time-zone conversion on output.
|
|
143
|
-
|
|
144
|
-
## Incoming Parsing
|
|
145
|
-
|
|
146
|
-
Incoming parsing happens when ChillSharp reads DTO `Properties` and applies them onto entity/query CLR objects.
|
|
147
|
-
|
|
148
|
-
This is the more permissive side of the mapper.
|
|
149
|
-
|
|
150
|
-
### `DateTimeOffset` input rules
|
|
151
|
-
|
|
152
|
-
If the incoming JSON contains:
|
|
153
|
-
|
|
154
|
-
- `Z`
|
|
155
|
-
- an explicit UTC offset
|
|
156
|
-
|
|
157
|
-
and the CLR target is `DateTimeOffset`, ChillSharp behaves like this:
|
|
158
|
-
|
|
159
|
-
- if the value is UTC (`Z` or `+00:00`), it converts the value into the configured ChillSharp system time zone
|
|
160
|
-
- if the value has another explicit offset, it keeps that offset as-is
|
|
161
|
-
|
|
162
|
-
Example input:
|
|
163
|
-
|
|
164
|
-
```json
|
|
165
|
-
"2026-04-11T12:30:00Z"
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
Stored in a `DateTimeOffset` property with `Europe/Rome` system time zone:
|
|
169
|
-
|
|
170
|
-
```csharp
|
|
171
|
-
2026-04-11 14:30:00 +02:00
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
Example input:
|
|
175
|
-
|
|
176
|
-
```json
|
|
177
|
-
"2026-04-11T12:30:00+01:00"
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
Stored in a `DateTimeOffset` property:
|
|
181
|
-
|
|
182
|
-
```csharp
|
|
183
|
-
2026-04-11 12:30:00 +01:00
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
### `DateTime` input rules
|
|
187
|
-
|
|
188
|
-
If the CLR target is `DateTime`:
|
|
189
|
-
|
|
190
|
-
- UTC input is converted into the configured ChillSharp system time zone
|
|
191
|
-
- input with an explicit offset is also converted into the configured ChillSharp system time zone
|
|
192
|
-
- input without offset is parsed as a normal date-time value
|
|
193
|
-
|
|
194
|
-
Example input:
|
|
195
|
-
|
|
196
|
-
```json
|
|
197
|
-
"2026-04-11T12:30:00Z"
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
Stored in a `DateTime` property with `Europe/Rome` system time zone:
|
|
201
|
-
|
|
202
|
-
```csharp
|
|
203
|
-
2026-04-11 14:30:00
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
Example input:
|
|
207
|
-
|
|
208
|
-
```json
|
|
209
|
-
"2026-04-11T12:30:00+01:00"
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
Stored in a `DateTime` property with `Europe/Rome` system time zone:
|
|
213
|
-
|
|
214
|
-
```csharp
|
|
215
|
-
2026-04-11 13:30:00
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### `DateOnly` input rules
|
|
219
|
-
|
|
220
|
-
If the CLR target is `DateOnly`, ChillSharp extracts only the year, month, and day.
|
|
221
|
-
|
|
222
|
-
That means it accepts both:
|
|
223
|
-
|
|
224
|
-
- a plain date string
|
|
225
|
-
- a full ISO 8601 date-time string
|
|
226
|
-
|
|
227
|
-
and ignores the time, offset, and timezone information.
|
|
228
|
-
|
|
229
|
-
Example input:
|
|
230
|
-
|
|
231
|
-
```json
|
|
232
|
-
"2026-04-11"
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
Stored as:
|
|
236
|
-
|
|
237
|
-
```csharp
|
|
238
|
-
new DateOnly(2026, 4, 11)
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
Example input:
|
|
242
|
-
|
|
243
|
-
```json
|
|
244
|
-
"2026-04-11T23:59:58.321-05:00"
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
Stored as:
|
|
248
|
-
|
|
249
|
-
```csharp
|
|
250
|
-
new DateOnly(2026, 4, 11)
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
This rule is deliberate. `DateOnly` represents only a calendar date, so ChillSharp discards time and zone details when assigning it.
|
|
254
|
-
|
|
255
|
-
### `TimeOnly` input rules
|
|
256
|
-
|
|
257
|
-
If the CLR target is `TimeOnly`, ChillSharp extracts only the time part.
|
|
258
|
-
|
|
259
|
-
That means it accepts both:
|
|
260
|
-
|
|
261
|
-
- a plain time string
|
|
262
|
-
- a full ISO 8601 date-time string
|
|
263
|
-
|
|
264
|
-
and ignores the date, offset, and timezone information.
|
|
265
|
-
|
|
266
|
-
Example input:
|
|
267
|
-
|
|
268
|
-
```json
|
|
269
|
-
"14:30:15.1230000"
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
Stored as:
|
|
273
|
-
|
|
274
|
-
```csharp
|
|
275
|
-
new TimeOnly(14, 30, 15, 123)
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
Example input:
|
|
279
|
-
|
|
280
|
-
```json
|
|
281
|
-
"2026-04-11T23:59:58.321-05:00"
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
Stored as:
|
|
285
|
-
|
|
286
|
-
```csharp
|
|
287
|
-
new TimeOnly(23, 59, 58, 321)
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
This is useful when clients send a full timestamp but the target field conceptually represents only a local clock time.
|
|
291
|
-
|
|
292
|
-
## Side-By-Side Examples
|
|
293
|
-
|
|
294
|
-
Assume:
|
|
295
|
-
|
|
296
|
-
```text
|
|
297
|
-
CHILLSHARP_SYSTEM_TIMEZONE=Europe/Rome
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
### Example 1: `DateTimeOffset`
|
|
301
|
-
|
|
302
|
-
CLR value:
|
|
303
|
-
|
|
304
|
-
```csharp
|
|
305
|
-
new DateTimeOffset(2026, 4, 11, 14, 30, 0, TimeSpan.FromHours(2))
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
Default ASP.NET Core output:
|
|
309
|
-
|
|
310
|
-
```json
|
|
311
|
-
"2026-04-11T14:30:00+02:00"
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
ChillSharp output:
|
|
315
|
-
|
|
316
|
-
```json
|
|
317
|
-
"2026-04-11T14:30:00.0000000+02:00"
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
### Example 2: `DateTime` in UTC
|
|
321
|
-
|
|
322
|
-
CLR value:
|
|
323
|
-
|
|
324
|
-
```csharp
|
|
325
|
-
new DateTime(2026, 4, 11, 12, 30, 0, DateTimeKind.Utc)
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
Default ASP.NET Core output:
|
|
329
|
-
|
|
330
|
-
```json
|
|
331
|
-
"2026-04-11T12:30:00Z"
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
ChillSharp output:
|
|
335
|
-
|
|
336
|
-
```json
|
|
337
|
-
"2026-04-11T14:30:00.0000000+02:00"
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
### Example 3: `DateOnly`
|
|
341
|
-
|
|
342
|
-
CLR value:
|
|
343
|
-
|
|
344
|
-
```csharp
|
|
345
|
-
new DateOnly(2026, 4, 11)
|
|
346
|
-
```
|
|
347
|
-
|
|
348
|
-
Default ASP.NET Core output:
|
|
349
|
-
|
|
350
|
-
```json
|
|
351
|
-
"2026-04-11"
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
ChillSharp output:
|
|
355
|
-
|
|
356
|
-
```json
|
|
357
|
-
"2026-04-11"
|
|
358
|
-
```
|
|
359
|
-
|
|
360
|
-
### Example 4: `TimeOnly`
|
|
361
|
-
|
|
362
|
-
CLR value:
|
|
363
|
-
|
|
364
|
-
```csharp
|
|
365
|
-
new TimeOnly(14, 30, 15, 123)
|
|
366
|
-
```
|
|
367
|
-
|
|
368
|
-
Default ASP.NET Core output:
|
|
369
|
-
|
|
370
|
-
```json
|
|
371
|
-
"14:30:15.1230000"
|
|
372
|
-
```
|
|
373
|
-
|
|
374
|
-
ChillSharp output:
|
|
375
|
-
|
|
376
|
-
```json
|
|
377
|
-
"14:30:15.1230000"
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
### Example 5: full timestamp sent into `DateOnly`
|
|
381
|
-
|
|
382
|
-
Incoming JSON:
|
|
383
|
-
|
|
384
|
-
```json
|
|
385
|
-
"2026-04-11T23:59:58.321-05:00"
|
|
386
|
-
```
|
|
387
|
-
|
|
388
|
-
Stored by ChillSharp in a `DateOnly` property:
|
|
389
|
-
|
|
390
|
-
```csharp
|
|
391
|
-
new DateOnly(2026, 4, 11)
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
### Example 6: full timestamp sent into `TimeOnly`
|
|
395
|
-
|
|
396
|
-
Incoming JSON:
|
|
397
|
-
|
|
398
|
-
```json
|
|
399
|
-
"2026-04-11T23:59:58.321-05:00"
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
Stored by ChillSharp in a `TimeOnly` property:
|
|
403
|
-
|
|
404
|
-
```csharp
|
|
405
|
-
new TimeOnly(23, 59, 58, 321)
|
|
406
|
-
```
|
|
407
|
-
|
|
408
|
-
## Practical Guidance
|
|
409
|
-
|
|
410
|
-
- Use `DateTimeOffset` when the offset itself matters and should survive round-trips.
|
|
411
|
-
- Use `DateTime` when your application treats a value as local wall-clock time in the configured ChillSharp system time zone.
|
|
412
|
-
- Use `DateOnly` for birthdays, accounting dates, business dates, deadlines by calendar day, and similar concepts.
|
|
413
|
-
- Use `TimeOnly` for opening hours, appointment clock times, and other values that are intentionally not full timestamps.
|
|
414
|
-
|
|
415
|
-
## Related Configuration
|
|
416
|
-
|
|
417
|
-
For the environment variable reference, see:
|
|
418
|
-
|
|
419
|
-
- [Configuration/README.md](./Configuration/README.md)
|
|
420
|
-
|
|
421
|
-
For Docker and runtime environment examples, see:
|
|
422
|
-
|
|
423
|
-
- [HowTo/05-docker-env-variables.md](./HowTo/05-docker-env-variables.md)
|
package/doc/Endpoints.md
DELETED
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
# ChillSharp Endpoints
|
|
2
|
-
|
|
3
|
-
Versione italiana: [Italiano](it/Endpoints.md)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
This document lists the HTTP, SignalR, and MCP endpoints exposed by the built-in ChillSharp API modules.
|
|
7
|
-
|
|
8
|
-
## Base Path
|
|
9
|
-
|
|
10
|
-
ChillSharp endpoints are mounted under a configurable API base path.
|
|
11
|
-
|
|
12
|
-
Default:
|
|
13
|
-
|
|
14
|
-
```text
|
|
15
|
-
/api
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Configuration:
|
|
19
|
-
|
|
20
|
-
```text
|
|
21
|
-
CHILLSHARP_API_BASE_PATH=/api
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
or in code:
|
|
25
|
-
|
|
26
|
-
```csharp
|
|
27
|
-
builder.Services.AddChillApi<MyDbContext>(options =>
|
|
28
|
-
{
|
|
29
|
-
options.ApiBasePath = "/api";
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
app.MapChillApi();
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
The examples below use the default `/api` base path. If you set `CHILLSHARP_API_BASE_PATH=/backend`, replace `/api` with `/backend`.
|
|
36
|
-
|
|
37
|
-
## Root And Diagnostics
|
|
38
|
-
|
|
39
|
-
These endpoints are registered by `MapChillApi()`.
|
|
40
|
-
|
|
41
|
-
| Method | Path | Description |
|
|
42
|
-
| --- | --- | --- |
|
|
43
|
-
| GET | `/api` | Basic ChillSharp health response, also matched when callers request `/api/`. |
|
|
44
|
-
| GET | `/api/test` | Basic ChillSharp health response. |
|
|
45
|
-
| GET | `/api/license` | Returns ChillSharp license and project metadata. |
|
|
46
|
-
|
|
47
|
-
## Core DTO API
|
|
48
|
-
|
|
49
|
-
These endpoints are enabled by `AddChillApi<TContext>()` and are available when the base Chill API is registered.
|
|
50
|
-
|
|
51
|
-
Base route:
|
|
52
|
-
|
|
53
|
-
```text
|
|
54
|
-
/api/chill
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
| Method | Path | Description |
|
|
58
|
-
| --- | --- | --- |
|
|
59
|
-
| POST | `/api/chill/query` | Executes a dynamic `ChillDtoQuery`. |
|
|
60
|
-
| POST | `/api/chill/lookup` | Performs a full-text lookup against the requested entity type. |
|
|
61
|
-
| POST | `/api/chill/find` | Finds one entity by type and GUID. |
|
|
62
|
-
| POST | `/api/chill/create` | Creates one entity from a `ChillDtoEntity`. |
|
|
63
|
-
| POST | `/api/chill/update` | Updates one entity from a `ChillDtoEntity`. |
|
|
64
|
-
| POST | `/api/chill/delete` | Deletes one entity identified by a `ChillDtoEntity`. |
|
|
65
|
-
| POST | `/api/chill/autocomplete` | Runs autocomplete logic for an entity or query DTO. |
|
|
66
|
-
| POST | `/api/chill/validate` | Runs validation for an entity or query DTO. |
|
|
67
|
-
| POST | `/api/chill/chunk` | Executes a list of Chill operations in one request. |
|
|
68
|
-
|
|
69
|
-
When entity ACL services are registered and the caller is authenticated, these endpoints can also enforce entity-level permissions.
|
|
70
|
-
|
|
71
|
-
## SignalR Notifications
|
|
72
|
-
|
|
73
|
-
The notification hub is registered by `MapChillApi()`.
|
|
74
|
-
|
|
75
|
-
| Protocol | Path | Description |
|
|
76
|
-
| --- | --- | --- |
|
|
77
|
-
| SignalR | `/api/notify` | Hub for entity change notifications. |
|
|
78
|
-
|
|
79
|
-
Hub methods:
|
|
80
|
-
|
|
81
|
-
| Method | Parameters | Description |
|
|
82
|
-
| --- | --- | --- |
|
|
83
|
-
| `Register` | `chillType`, optional `guid` | Subscribes the connection to all changes for a type or one entity. |
|
|
84
|
-
| `Unregister` | `chillType`, optional `guid` | Removes a previous subscription. |
|
|
85
|
-
|
|
86
|
-
Server-to-client method:
|
|
87
|
-
|
|
88
|
-
| Method | Description |
|
|
89
|
-
| --- | --- |
|
|
90
|
-
| `EntitiesChanged` | Sent when subscribed entities change. |
|
|
91
|
-
|
|
92
|
-
## Auth API
|
|
93
|
-
|
|
94
|
-
Enabled when `ChillApiOptions.EnableAuthApi` is `true` and the context implements `IChillAuthDbContext`.
|
|
95
|
-
|
|
96
|
-
Base route:
|
|
97
|
-
|
|
98
|
-
```text
|
|
99
|
-
/api/chill-auth
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### Account Endpoints
|
|
103
|
-
|
|
104
|
-
| Method | Path | Auth | Description |
|
|
105
|
-
| --- | --- | --- | --- |
|
|
106
|
-
| POST | `/api/chill-auth/register` | Anonymous | Registers a new Identity account and returns tokens. |
|
|
107
|
-
| POST | `/api/chill-auth/login` | Anonymous | Authenticates and returns tokens. |
|
|
108
|
-
| POST | `/api/chill-auth/refresh` | Anonymous | Exchanges a refresh token for new tokens. |
|
|
109
|
-
| POST | `/api/chill-auth/logout` | Required | Revokes the current session. |
|
|
110
|
-
| POST | `/api/chill-auth/change-password` | Required | Changes the current user's password. |
|
|
111
|
-
| POST | `/api/chill-auth/request-password-reset` | Anonymous | Requests or generates a password reset token. |
|
|
112
|
-
| POST | `/api/chill-auth/reset-password` | Anonymous | Resets a password with a reset token. |
|
|
113
|
-
|
|
114
|
-
### Current User And Metadata
|
|
115
|
-
|
|
116
|
-
| Method | Path | Auth | Description |
|
|
117
|
-
| --- | --- | --- | --- |
|
|
118
|
-
| GET | `/api/chill-auth/get-permissions` | Optional | Returns direct, role, and role-derived permissions for the current user. |
|
|
119
|
-
| GET | `/api/chill-auth/get-user-list` | Management | Returns a simplified user list for management UIs. |
|
|
120
|
-
| GET | `/api/chill-auth/get-role-list` | Management | Returns a simplified role list for management UIs. |
|
|
121
|
-
| GET | `/api/chill-auth/get-module-list` | Management | Returns available logical modules. |
|
|
122
|
-
| GET | `/api/chill-auth/get-entity-list?module={module}` | Management | Returns entities for a module. |
|
|
123
|
-
| GET | `/api/chill-auth/get-query-list?module={module}` | Management | Returns queries for a module. |
|
|
124
|
-
| GET | `/api/chill-auth/get-property-list?chillType={type}` | Management | Returns properties for a Chill type. |
|
|
125
|
-
|
|
126
|
-
### Users
|
|
127
|
-
|
|
128
|
-
| Method | Path | Auth | Description |
|
|
129
|
-
| --- | --- | --- | --- |
|
|
130
|
-
| GET | `/api/chill-auth/users` | Management | Lists authorization users. |
|
|
131
|
-
| GET | `/api/chill-auth/users/{userGuid}` | Management | Gets one authorization user. |
|
|
132
|
-
| POST | `/api/chill-auth/users` | Management | Creates an authorization user. |
|
|
133
|
-
| PUT | `/api/chill-auth/users/{userGuid}` | Management | Updates an authorization user. |
|
|
134
|
-
| DELETE | `/api/chill-auth/users/{userGuid}` | Management | Deletes an authorization user. |
|
|
135
|
-
| GET | `/api/chill-auth/users/{userGuid}/roles` | Management | Lists roles assigned to a user. |
|
|
136
|
-
| PUT | `/api/chill-auth/users/{userGuid}/roles/{roleGuid}` | Management | Assigns a role to a user. |
|
|
137
|
-
| DELETE | `/api/chill-auth/users/{userGuid}/roles/{roleGuid}` | Management | Removes a role from a user. |
|
|
138
|
-
|
|
139
|
-
### Roles
|
|
140
|
-
|
|
141
|
-
| Method | Path | Auth | Description |
|
|
142
|
-
| --- | --- | --- | --- |
|
|
143
|
-
| GET | `/api/chill-auth/roles` | Management | Lists roles. |
|
|
144
|
-
| GET | `/api/chill-auth/roles/{roleGuid}` | Management | Gets one role. |
|
|
145
|
-
| POST | `/api/chill-auth/roles` | Management | Creates a role. |
|
|
146
|
-
| PUT | `/api/chill-auth/roles/{roleGuid}` | Management | Updates a role. |
|
|
147
|
-
| DELETE | `/api/chill-auth/roles/{roleGuid}` | Management | Deletes a role. |
|
|
148
|
-
|
|
149
|
-
### Permission Rules
|
|
150
|
-
|
|
151
|
-
| Method | Path | Auth | Description |
|
|
152
|
-
| --- | --- | --- | --- |
|
|
153
|
-
| GET | `/api/chill-auth/permissions` | Management | Lists permission rules, optionally filtered by `userGuid` or `roleGuid`. |
|
|
154
|
-
| GET | `/api/chill-auth/permissions/{ruleGuid}` | Management | Gets one permission rule. |
|
|
155
|
-
| POST | `/api/chill-auth/permissions` | Management | Creates a permission rule. |
|
|
156
|
-
| PUT | `/api/chill-auth/permissions/{ruleGuid}` | Management | Updates a permission rule. |
|
|
157
|
-
| DELETE | `/api/chill-auth/permissions/{ruleGuid}` | Management | Deletes a permission rule. |
|
|
158
|
-
|
|
159
|
-
`Management` means the endpoint is protected by `ChillAuthManagementAccessFilter`.
|
|
160
|
-
|
|
161
|
-
## Schema API
|
|
162
|
-
|
|
163
|
-
Enabled when `ChillApiOptions.EnableSchemaApi` is `true` and the context implements `IChillSchemaDbContext`.
|
|
164
|
-
|
|
165
|
-
Base route:
|
|
166
|
-
|
|
167
|
-
```text
|
|
168
|
-
/api/chill-schema
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
| Method | Path | Auth | Description |
|
|
172
|
-
| --- | --- | --- | --- |
|
|
173
|
-
| GET | `/api/chill-schema/get-schema?ChillType={type}&ChillViewCode={view}&CultureName={culture}` | Depends on global API protection | Gets one schema. |
|
|
174
|
-
| GET | `/api/chill-schema/get-schema-list?CultureName={culture}` | Depends on global API protection | Lists entity and query schema summaries. |
|
|
175
|
-
| POST | `/api/chill-schema/set-schema` | Schema management | Creates or updates a schema. |
|
|
176
|
-
| GET | `/api/chill-schema/get-entity-options?ChillType={type}` | Schema management | Gets schema options for one entity type. |
|
|
177
|
-
| POST | `/api/chill-schema/set-entity-options` | Schema management | Creates or updates entity options. |
|
|
178
|
-
| GET | `/api/chill-schema/get-menu?ParentGuid={guid}` | Depends on global API protection | Returns menu entries, filtered by auth metadata when available. |
|
|
179
|
-
| POST | `/api/chill-schema/set-menu` | Schema management | Creates or updates one menu item. |
|
|
180
|
-
| DELETE | `/api/chill-schema/delete-menu?MenuItemGuid={guid}` | Schema management | Deletes one menu item. |
|
|
181
|
-
|
|
182
|
-
`Schema management` means the endpoint is protected by `ChillSchemaManagementAccessFilter`.
|
|
183
|
-
|
|
184
|
-
## I18n API
|
|
185
|
-
|
|
186
|
-
Enabled when `ChillApiOptions.EnableI18nApi` is `true` and the context implements `IChillI18nDbContext`.
|
|
187
|
-
|
|
188
|
-
Base route:
|
|
189
|
-
|
|
190
|
-
```text
|
|
191
|
-
/api/chill-i18n
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
| Method | Path | Auth | Description |
|
|
195
|
-
| --- | --- | --- | --- |
|
|
196
|
-
| POST | `/api/chill-i18n/get-text` | Anonymous | Gets one localized text. |
|
|
197
|
-
| POST | `/api/chill-i18n/get-multiple-text` | Anonymous | Gets multiple localized texts. |
|
|
198
|
-
| PUT | `/api/chill-i18n/set-text` | Depends on global API protection | Creates or updates localized text. |
|
|
199
|
-
|
|
200
|
-
## Attachment API
|
|
201
|
-
|
|
202
|
-
Enabled when `ChillApiOptions.EnableAttachmentApi` is `true` and the context implements `IChillAttachmentDbContext`.
|
|
203
|
-
|
|
204
|
-
Base route:
|
|
205
|
-
|
|
206
|
-
```text
|
|
207
|
-
/api/chill-attachment
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
| Method | Path | Auth | Description |
|
|
211
|
-
| --- | --- | --- | --- |
|
|
212
|
-
| GET | `/api/chill-attachment/attachment/download?guid={guid}` | Anonymous for public files; authenticated for private files | Downloads an archived attachment. |
|
|
213
|
-
| POST | `/api/chill-attachment/attachment/upload` | Depends on global API protection | Uploads one or more files as multipart form data. |
|
|
214
|
-
|
|
215
|
-
Upload form fields:
|
|
216
|
-
|
|
217
|
-
| Field | Required | Description |
|
|
218
|
-
| --- | --- | --- |
|
|
219
|
-
| `attachToChillType` | Yes | Chill type of the entity the attachment belongs to. |
|
|
220
|
-
| `attachToGuid` | Yes | GUID of the entity the attachment belongs to. |
|
|
221
|
-
| `file` | Yes | One or more uploaded files. |
|
|
222
|
-
| `title` | No | Display title. Defaults to the filename without extension. |
|
|
223
|
-
| `description` | No | Optional attachment description. |
|
|
224
|
-
| `public` | No | Whether anonymous callers can download the file. |
|
|
225
|
-
|
|
226
|
-
## MCP API
|
|
227
|
-
|
|
228
|
-
Enabled when `ChillApiOptions.EnableMcpApi` is `true`, `ChillMcpOptions.Enabled` is `true`, and the context implements `IChillSchemaDbContext`.
|
|
229
|
-
|
|
230
|
-
Default route:
|
|
231
|
-
|
|
232
|
-
```text
|
|
233
|
-
/api/chill-mcp
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
The MCP endpoint is registered through `MapMcp(...)` from the Model Context Protocol ASP.NET Core SDK. Its HTTP behavior follows the MCP SDK transport contract.
|
|
237
|
-
|
|
238
|
-
You can override the MCP route directly:
|
|
239
|
-
|
|
240
|
-
```csharp
|
|
241
|
-
builder.Services.AddChillMcpApi<MyDbContext>(options =>
|
|
242
|
-
{
|
|
243
|
-
options.RoutePattern = "/api/chill-mcp";
|
|
244
|
-
});
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
If `RoutePattern` is relative, for example `chill-mcp`, ChillSharp places it under the configured API base path.
|
|
248
|
-
|
|
249
|
-
## Protection Rules
|
|
250
|
-
|
|
251
|
-
`ChillApiOptions.ProtectedApi` applies authorization to the mapped controller endpoints and SignalR hub. Some endpoints explicitly allow anonymous access, such as auth login/register, i18n read endpoints, and public attachment downloads.
|
|
252
|
-
|
|
253
|
-
Module-specific management endpoints add stricter filters:
|
|
254
|
-
|
|
255
|
-
| Filter | Used By |
|
|
256
|
-
| --- | --- |
|
|
257
|
-
| `ChillAuthManagementAccessFilter` | Auth users, roles, permissions, and management metadata. |
|
|
258
|
-
| `ChillSchemaManagementAccessFilter` | Schema and menu write operations. |
|
|
259
|
-
|
|
260
|
-
Entity ACL checks can also apply to core DTO and attachment operations when an `IChillEntityAclService` is registered.
|