Skip to content

Commit 884e331

Browse files
committed
docs: update to v2.4.1
1 parent 3c75e37 commit 884e331

File tree

50 files changed

+3094
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3094
-12
lines changed

Scripting Documentation/request/en.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class Response {
9191
| ------------------------ | ---------------------- | ----------------------------------------------- |
9292
| `body` | `ReadableStream<Data>` | The response body as a stream. |
9393
| `bodyUsed` | `boolean` | Whether the body has been consumed. |
94-
| `cookies` | `Record<string, string>` | Response cookies. |
94+
| `cookies` | `Cookie[]` | Response cookies. |
9595
| `status` | `number` | HTTP status code. |
9696
| `statusText` | `string` | HTTP status text. |
9797
| `headers` | `Headers` | Response headers. |
@@ -101,6 +101,20 @@ class Response {
101101
| `expectedContentLength?` | `number` | Expected content length in bytes, if available. |
102102
| `textEncodingName?` | `string` | Encoding of the response body, if specified. |
103103

104+
##### `Cookie` Type
105+
106+
```ts
107+
interface Cookie {
108+
name: string
109+
value: string
110+
attributes: Record<string, string | boolean>
111+
}
112+
```
113+
114+
- `name`: cookie name
115+
- `value`: cookie value
116+
- `attributes`: cookie attributes, including `path`, `domain`, `expires`, etc.
117+
104118
#### Methods
105119

106120
* `json(): Promise<any>`

Scripting Documentation/request/zh.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class Response {
9191
| ------------------------ | ---------------------- | ------------------ |
9292
| `body` | `ReadableStream<Data>` | 响应体(数据流) |
9393
| `bodyUsed` | `boolean` | 响应体是否已被读取 |
94-
| `cookies` | `Record<string, string>` | 响应的 cookie |
94+
| `cookies` | `Cookie[]` | 响应的 cookie 列表 |
9595
| `status` | `number` | HTTP 状态码 |
9696
| `statusText` | `string` | HTTP 状态文本 |
9797
| `headers` | `Headers` | 响应头 |
@@ -101,6 +101,21 @@ class Response {
101101
| `expectedContentLength?` | `number` | 预计内容长度(字节) |
102102
| `textEncodingName?` | `string` | 文本编码名称(如可用) |
103103

104+
##### `Cookie` 类型
105+
106+
```ts
107+
interface Cookie {
108+
name: string
109+
value: string
110+
attributes: Record<string, string | boolean>
111+
}
112+
```
113+
114+
- `name`: cookie 名
115+
- `value`: cookie 值
116+
- `attributes`: cookie 属性,包括 `path``domain``expires`
117+
118+
104119
#### 方法
105120

106121
* `json(): Promise<any>` – 将响应解析为 JSON 对象

doc_build_fun.zip

40.2 MB
Binary file not shown.

docs/en/guide/doc_v2/Control Widget.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ Displays the control UI. Only `ControlWidgetButton` or `ControlWidgetToggle` ele
9191
export const ToggleDoorIntent = AppIntentManager.register({
9292
name: "ToggleDoorIntent",
9393
protocol: AppIntentProtocol.AppIntent,
94-
perform: async ({ id, newState }: { id: string; newState: boolean }) => {
95-
await setDoorState(id, newState)
94+
perform: async ({ id, value }: { id: string; value: boolean }) => {
95+
await setDoorState(id, value)
9696
ControlWidget.reloadToggles()
9797
}
9898
})
@@ -105,7 +105,7 @@ async function run() {
105105
ControlWidget.present(
106106
<ControlWidgetToggle
107107
privacySensitive
108-
intent={ToggleDoorIntent({ id: doorId, newState: !data.doorOpened })}
108+
intent={ToggleDoorIntent({ id: doorId, value: !data.doorOpened })}
109109
label={{
110110
title: `Door ${doorId}`,
111111
systemImage: data.doorOpened ? "door.garage.opened" : "door.garage.closed"

docs/en/guide/doc_v2/Device Capabilities/Bluetooth/_meta.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,29 @@
11
[
2+
{
3+
"type": "file",
4+
"name": "BluetoothCentralManager",
5+
"label": "BluetoothCentralManager"
6+
},
7+
{
8+
"type": "file",
9+
"name": "BluetoothPeripheral",
10+
"label": "BluetoothPeripheral"
11+
},
12+
{
13+
"type": "file",
14+
"name": "BluetoothService",
15+
"label": "BluetoothService"
16+
},
17+
{
18+
"type": "file",
19+
"name": "BluetoothCharacteristic",
20+
"label": "BluetoothCharacteristic"
21+
},
22+
{
23+
"type": "file",
24+
"name": "BluetoothPeripheralManager",
25+
"label": "BluetoothPeripheralManager"
26+
},
227
{
328
"type": "file",
429
"name": "BluetoothCentralManager",

docs/en/guide/doc_v2/Device Capabilities/Health/_meta.json

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,146 @@
274274
"name": "HealthStatistics",
275275
"label": "HealthStatistics"
276276
},
277+
{
278+
"type": "file",
279+
"name": "HealthStatisticsCollection",
280+
"label": "HealthStatisticsCollection"
281+
},
282+
{
283+
"type": "file",
284+
"name": "HealthKit Permission Behavior",
285+
"label": "HealthKit Permission Behavior"
286+
},
287+
{
288+
"type": "file",
289+
"name": "Reading Characteristic Data",
290+
"label": "Reading Characteristic Data"
291+
},
292+
{
293+
"type": "file",
294+
"name": "Reading Quantity Samples",
295+
"label": "Reading Quantity Samples"
296+
},
297+
{
298+
"type": "file",
299+
"name": "Reading Category Samples",
300+
"label": "Reading Category Samples"
301+
},
302+
{
303+
"type": "file",
304+
"name": "Reading Correlation Data",
305+
"label": "Reading Correlation Data"
306+
},
307+
{
308+
"type": "file",
309+
"name": "Reading Workout Samples",
310+
"label": "Reading Workout Samples"
311+
},
312+
{
313+
"type": "file",
314+
"name": "Reading Heartbeat Series Samples",
315+
"label": "Reading Heartbeat Series Samples"
316+
},
317+
{
318+
"type": "file",
319+
"name": "Reading Activity Summaries",
320+
"label": "Reading Activity Summaries"
321+
},
322+
{
323+
"type": "file",
324+
"name": "Query Statistics",
325+
"label": "Query Statistics"
326+
},
327+
{
328+
"type": "file",
329+
"name": "Query Statistics Collection",
330+
"label": "Query Statistics Collection"
331+
},
332+
{
333+
"type": "file",
334+
"name": "Writing Health Quantity Samples",
335+
"label": "Writing Health Quantity Samples"
336+
},
337+
{
338+
"type": "file",
339+
"name": "Writing Health Category Samples",
340+
"label": "Writing Health Category Samples"
341+
},
342+
{
343+
"type": "file",
344+
"name": "Writing Health Correlation Data",
345+
"label": "Writing Health Correlation Data"
346+
},
347+
{
348+
"type": "file",
349+
"name": "HealthQuantityType",
350+
"label": "HealthQuantityType"
351+
},
352+
{
353+
"type": "file",
354+
"name": "HealthCategoryType",
355+
"label": "HealthCategoryType"
356+
},
357+
{
358+
"type": "file",
359+
"name": "HealthCategoryValue Types",
360+
"label": "HealthCategoryValue Types"
361+
},
362+
{
363+
"type": "file",
364+
"name": "HealthUnit",
365+
"label": "HealthUnit"
366+
},
367+
{
368+
"type": "file",
369+
"name": "HealthCharacteristicType",
370+
"label": "HealthCharacteristicType"
371+
},
372+
{
373+
"type": "file",
374+
"name": "HealthQuantitySample",
375+
"label": "HealthQuantitySample"
376+
},
377+
{
378+
"type": "file",
379+
"name": "HealthCategorySample",
380+
"label": "HealthCategorySample"
381+
},
382+
{
383+
"type": "file",
384+
"name": "HealthCorrelation",
385+
"label": "HealthCorrelation"
386+
},
387+
{
388+
"type": "file",
389+
"name": "HealthWorkoutEvent",
390+
"label": "HealthWorkoutEvent"
391+
},
392+
{
393+
"type": "file",
394+
"name": "HealthWorkoutActivityType",
395+
"label": "HealthWorkoutActivityType"
396+
},
397+
{
398+
"type": "file",
399+
"name": "HealthWorkout",
400+
"label": "HealthWorkout"
401+
},
402+
{
403+
"type": "file",
404+
"name": "HealthHeartbeatSeriesSample",
405+
"label": "HealthHeartbeatSeriesSample"
406+
},
407+
{
408+
"type": "file",
409+
"name": "HealthActivitySummary",
410+
"label": "HealthActivitySummary"
411+
},
412+
{
413+
"type": "file",
414+
"name": "HealthStatistics",
415+
"label": "HealthStatistics"
416+
},
277417
{
278418
"type": "file",
279419
"name": "HealthStatisticsCollection",

0 commit comments

Comments
 (0)