@azure-tools/typespec-azure-resource-manager 0.37.0-dev.1 → 0.37.0-dev.3
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 +46 -0
- package/dist/src/lib.js +1 -1
- package/dist/src/lib.js.map +1 -1
- package/dist/src/rules/{unsupported-types.d.ts → unsupported-type.d.ts} +1 -1
- package/dist/src/rules/unsupported-type.d.ts.map +1 -0
- package/dist/src/rules/{unsupported-types.js → unsupported-type.js} +2 -1
- package/dist/src/rules/unsupported-type.js.map +1 -0
- package/lib/operations.tsp +13 -11
- package/package.json +4 -3
- package/dist/src/rules/unsupported-types.d.ts.map +0 -1
- package/dist/src/rules/unsupported-types.js.map +0 -1
package/README.md
CHANGED
|
@@ -8,6 +8,52 @@ TypeSpec Azure Resource Manager library
|
|
|
8
8
|
npm install @azure-tools/typespec-azure-resource-manager
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## Linter
|
|
12
|
+
|
|
13
|
+
### Usage
|
|
14
|
+
|
|
15
|
+
Add the following in `tspconfig.yaml`:
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
linter:
|
|
19
|
+
extends:
|
|
20
|
+
- "@azure-tools/typespec-azure-resource-manager/all"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### RuleSets
|
|
24
|
+
|
|
25
|
+
Available ruleSets:
|
|
26
|
+
|
|
27
|
+
- [`@azure-tools/typespec-azure-resource-manager/all`](#@azure-tools/typespec-azure-resource-manager/all)
|
|
28
|
+
|
|
29
|
+
### Rules
|
|
30
|
+
|
|
31
|
+
| Name | Description |
|
|
32
|
+
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
33
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-action-no-segment` | `@armResourceAction` should not be used with `@segment`. |
|
|
34
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-property` | Warn about duplicate properties in resources. |
|
|
35
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator` | Each resource interface must have an @armResourceOperations decorator. |
|
|
36
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-action-verb` | Actions must be HTTP Post operations. |
|
|
37
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property` | Check for invalid resource envelope properties. |
|
|
38
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-version-format` | Check for valid versions. |
|
|
39
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-key-invalid-chars` | Arm resource key must contain only alphanumeric characters. |
|
|
40
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-operation-response` | [RPC 008]: PUT, GET, PATCH & LIST must return the same resource schema. |
|
|
41
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-patch` | Validate ARM PATCH operations. |
|
|
42
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-path-segment-invalid-chars` | Arm resource name must contain only alphanumeric characters. |
|
|
43
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state` | Check for properly configured provisioningState property. |
|
|
44
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-common-types-version` | Specify the ARM common-types version using @armCommonTypesVersion. |
|
|
45
|
+
| `@azure-tools/typespec-azure-resource-manager/beyond-nesting-levels` | Tracked Resources must use 3 or fewer levels of nesting. |
|
|
46
|
+
| `@azure-tools/typespec-azure-resource-manager/arm-resource-operation` | Validate ARM Resource operations. |
|
|
47
|
+
| `@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation` | Check for resources that must have a delete operation. |
|
|
48
|
+
| `@azure-tools/typespec-azure-resource-manager/empty-updateable-properties` | Should have updateable properties. |
|
|
49
|
+
| `@azure-tools/typespec-azure-resource-manager/improper-subscription-list-operation` | Tenant and Extension resources should not define a list by subscription operation. |
|
|
50
|
+
| `@azure-tools/typespec-azure-resource-manager/no-response-body` | The body of 202 response should be empty. |
|
|
51
|
+
| `@azure-tools/typespec-azure-resource-manager/missing-operations-endpoint` | Check for missing Operations interface. |
|
|
52
|
+
| `@azure-tools/typespec-azure-resource-manager/patch-envelope` | Patch envelope properties should match the resource properties. |
|
|
53
|
+
| `@azure-tools/typespec-azure-resource-manager/resource-name` | Check the resource name. |
|
|
54
|
+
| `@azure-tools/typespec-azure-resource-manager/retry-after` | Check if retry-after header appears in response body. |
|
|
55
|
+
| [`@azure-tools/typespec-azure-resource-manager/unsupported-type`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/unsupported-type) | Check for unsupported ARM types. |
|
|
56
|
+
|
|
11
57
|
## Decorators
|
|
12
58
|
|
|
13
59
|
### Azure.ResourceManager
|
package/dist/src/lib.js
CHANGED
|
@@ -21,7 +21,7 @@ import { operationsInterfaceMissingRule } from "./rules/operations-interface-mis
|
|
|
21
21
|
import { patchEnvelopePropertiesRules } from "./rules/patch-envelope-properties.js";
|
|
22
22
|
import { resourceNameRule } from "./rules/resource-name.js";
|
|
23
23
|
import { retryAfterRule } from "./rules/retry-after.js";
|
|
24
|
-
import { unsupportedTypeRule } from "./rules/unsupported-
|
|
24
|
+
import { unsupportedTypeRule } from "./rules/unsupported-type.js";
|
|
25
25
|
export const $lib = createTypeSpecLibrary({
|
|
26
26
|
name: "@azure-tools/typespec-azure-resource-manager",
|
|
27
27
|
diagnostics: {
|
package/dist/src/lib.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAChG,OAAO,EAAE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EAAE,IAAI;oBAClF,CAAC,gDAAgD,+BAA+B,CAAC,IAAI,EAAE,CAAC,EACtF,IAAI;oBACN,CAAC,gDAAgD,gCAAgC,CAAC,IAAI,EAAE,CAAC,EACvF,IAAI;oBACN,+EAA+E;oBAC/E,CAAC,gDAAgD,yBAAyB,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK;oBACzF,CAAC,gDAAgD,iBAAiB,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI;oBAChF,CAAC,gDAAgD,kBAAkB,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI;oBACjF,CAAC,gDAAgD,0BAA0B,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI;oBACzF,CAAC,gDAAgD,uBAAuB,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI;oBACtF,CAAC,gDAAgD,sBAAsB,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI;oBACrF,CAAC,gDAAgD,kBAAkB,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI;oBACjF,CAAC,gDAAgD,8BAA8B,CAAC,IAAI,EAAE,CAAC,EACrF,IAAI;oBACN,CAAC,gDAAgD,4BAA4B,CAAC,IAAI,EAAE,CAAC,EACnF,IAAI;oBACN,CAAC,gDAAgD,gBAAgB,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI;oBAC/E,CAAC,gDAAgD,cAAc,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI;oBAC7E,CAAC,gDAAgD,mBAAmB,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI;iBACnF;gBACD,OAAO,EAAE,CAAC,sCAAsC,CAAC;aAClD;SACF;KACF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC"}
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
export declare const unsupportedTypeRule: import("@typespec/compiler").LinterRuleDefinition<"unsupported-type", {
|
|
5
5
|
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
6
6
|
}>;
|
|
7
|
-
//# sourceMappingURL=unsupported-
|
|
7
|
+
//# sourceMappingURL=unsupported-type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unsupported-type.d.ts","sourceRoot":"","sources":["../../../src/rules/unsupported-type.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,mBAAmB;;EAqC9B,CAAC"}
|
|
@@ -7,6 +7,7 @@ export const unsupportedTypeRule = createRule({
|
|
|
7
7
|
name: "unsupported-type",
|
|
8
8
|
severity: "warning",
|
|
9
9
|
description: "Check for unsupported ARM types.",
|
|
10
|
+
url: "https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/unsupported-type",
|
|
10
11
|
messages: {
|
|
11
12
|
default: paramMessage `Model type '${"typeName"}' is not supported in Azure resource manager APIs.`,
|
|
12
13
|
},
|
|
@@ -39,4 +40,4 @@ export const unsupportedTypeRule = createRule({
|
|
|
39
40
|
}
|
|
40
41
|
},
|
|
41
42
|
});
|
|
42
|
-
//# sourceMappingURL=unsupported-
|
|
43
|
+
//# sourceMappingURL=unsupported-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unsupported-type.js","sourceRoot":"","sources":["../../../src/rules/unsupported-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEtF,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AACpG;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CAAC;IAC5C,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,kCAAkC;IAC/C,GAAG,EAAE,qGAAqG;IAC1G,QAAQ,EAAE;QACR,OAAO,EAAE,YAAY,CAAA,eAAe,UAAU,oDAAoD;KACnG;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,aAAa,EAAE,CAAC,QAAQ,EAAE,EAAE;gBAC1B,oBAAoB,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;YACD,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE;gBAChB,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YAC1C,CAAC;SACF,CAAC;QAEF,SAAS,oBAAoB,CAAC,IAAU,EAAE,MAAwB;YAChE,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE;gBACnD,OAAO;aACR;YACD,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;gBAC1B,IAAI,yBAAyB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;oBAC5C,OAAO,CAAC,gBAAgB,CAAC;wBACvB,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE;wBAC/B,MAAM;qBACP,CAAC,CAAC;iBACJ;aACF;YACD,IAAI,IAAI,CAAC,cAAc,EAAE;gBACvB,KAAK,MAAM,WAAW,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE;oBAClD,oBAAoB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;iBAC3C;aACF;QACH,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
|
package/lib/operations.tsp
CHANGED
|
@@ -329,8 +329,8 @@ op ArmResourceDeleteSync<
|
|
|
329
329
|
@post
|
|
330
330
|
op ArmResourceActionAsyncBase<
|
|
331
331
|
TResource extends ArmResource,
|
|
332
|
-
TRequest extends TypeSpec.Reflection.Model,
|
|
333
|
-
TResponse,
|
|
332
|
+
TRequest extends TypeSpec.Reflection.Model | void,
|
|
333
|
+
TResponse extends TypeSpec.Reflection.Model | void,
|
|
334
334
|
TBaseParameters extends TypeSpec.Reflection.Model
|
|
335
335
|
>(
|
|
336
336
|
...ResourceInstanceParameters<TResource, TBaseParameters>,
|
|
@@ -347,15 +347,16 @@ op ArmResourceActionAsyncBase<
|
|
|
347
347
|
* @template TResponse The response model for the action
|
|
348
348
|
* @template TBaseParameters Optional. Allows overriding the parameters for the operation
|
|
349
349
|
*/
|
|
350
|
+
@returnsDoc("ARM operation completed successfully.")
|
|
350
351
|
op ArmResourceActionAsync<
|
|
351
352
|
TResource extends ArmResource,
|
|
352
|
-
TRequest extends TypeSpec.Reflection.Model,
|
|
353
|
-
TResponse extends TypeSpec.Reflection.Model,
|
|
353
|
+
TRequest extends TypeSpec.Reflection.Model | void,
|
|
354
|
+
TResponse extends TypeSpec.Reflection.Model | void,
|
|
354
355
|
TBaseParameters extends TypeSpec.Reflection.Model = BaseParameters<TResource>
|
|
355
356
|
> is ArmResourceActionAsyncBase<
|
|
356
357
|
TResource,
|
|
357
358
|
TRequest,
|
|
358
|
-
ArmAcceptedLroResponse |
|
|
359
|
+
ArmAcceptedLroResponse | TResponse,
|
|
359
360
|
TBaseParameters
|
|
360
361
|
>;
|
|
361
362
|
|
|
@@ -369,10 +370,11 @@ op ArmResourceActionAsync<
|
|
|
369
370
|
@autoRoute
|
|
370
371
|
@armResourceAction(TResource)
|
|
371
372
|
@post
|
|
373
|
+
@returnsDoc("ARM operation completed successfully.")
|
|
372
374
|
op ArmResourceActionSync<
|
|
373
375
|
TResource extends ArmResource,
|
|
374
|
-
TRequest extends TypeSpec.Reflection.Model,
|
|
375
|
-
TResponse extends TypeSpec.Reflection.Model,
|
|
376
|
+
TRequest extends TypeSpec.Reflection.Model | void,
|
|
377
|
+
TResponse extends TypeSpec.Reflection.Model | void,
|
|
376
378
|
TBaseParameters = BaseParameters<TResource>
|
|
377
379
|
>(
|
|
378
380
|
...ResourceInstanceParameters<TResource, TBaseParameters>,
|
|
@@ -380,7 +382,7 @@ op ArmResourceActionSync<
|
|
|
380
382
|
@doc("The content of the action request")
|
|
381
383
|
@body
|
|
382
384
|
body: TRequest,
|
|
383
|
-
):
|
|
385
|
+
): TResponse | ErrorResponse;
|
|
384
386
|
|
|
385
387
|
/**
|
|
386
388
|
* A long-running resource action that returns no content. DEPRECATED: Use 'ArmResourceActionNoResponseContentAsync' instead
|
|
@@ -390,7 +392,7 @@ op ArmResourceActionSync<
|
|
|
390
392
|
*/
|
|
391
393
|
op ArmResourceActionNoContentAsync<
|
|
392
394
|
TResource extends ArmResource,
|
|
393
|
-
TRequest extends TypeSpec.Reflection.Model,
|
|
395
|
+
TRequest extends TypeSpec.Reflection.Model | void,
|
|
394
396
|
TBaseParameters extends TypeSpec.Reflection.Model = BaseParameters<TResource>
|
|
395
397
|
> is ArmResourceActionAsyncBase<
|
|
396
398
|
TResource,
|
|
@@ -407,7 +409,7 @@ op ArmResourceActionNoContentAsync<
|
|
|
407
409
|
*/
|
|
408
410
|
op ArmResourceActionNoResponseContentAsync<
|
|
409
411
|
TResource extends ArmResource,
|
|
410
|
-
TRequest extends TypeSpec.Reflection.Model,
|
|
412
|
+
TRequest extends TypeSpec.Reflection.Model | void,
|
|
411
413
|
TBaseParameters extends TypeSpec.Reflection.Model = BaseParameters<TResource>
|
|
412
414
|
> is ArmResourceActionAsyncBase<TResource, TRequest, ArmAcceptedLroResponse, TBaseParameters>;
|
|
413
415
|
|
|
@@ -422,7 +424,7 @@ op ArmResourceActionNoResponseContentAsync<
|
|
|
422
424
|
@post
|
|
423
425
|
op ArmResourceActionNoContentSync<
|
|
424
426
|
TResource extends ArmResource,
|
|
425
|
-
TRequest extends TypeSpec.Reflection.Model,
|
|
427
|
+
TRequest extends TypeSpec.Reflection.Model | void,
|
|
426
428
|
TBaseParameters = BaseParameters<TResource>
|
|
427
429
|
>(
|
|
428
430
|
...ResourceInstanceParameters<TResource, TBaseParameters>,
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-resource-manager",
|
|
3
|
-
"version": "0.37.0-dev.
|
|
3
|
+
"version": "0.37.0-dev.3",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Resource Manager library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|
|
7
|
+
"docusaurusWebsite": "https://azure.github.io/typespec-azure/docs",
|
|
7
8
|
"readme": "https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-resource-manager/README.md",
|
|
8
9
|
"license": "MIT",
|
|
9
10
|
"repository": {
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
"peerDependencies": {
|
|
41
42
|
"@typespec/compiler": "~0.50.0 || >=0.51.0-dev <0.51.0",
|
|
42
43
|
"@azure-tools/typespec-azure-core": "~0.36.0 || >=0.37.0-dev <0.37.0",
|
|
43
|
-
"@azure-tools/typespec-autorest": "~0.36.
|
|
44
|
+
"@azure-tools/typespec-autorest": "~0.36.1 || >=0.37.0-dev <0.37.0",
|
|
44
45
|
"@typespec/openapi": "~0.50.0 || >=0.51.0-dev <0.51.0",
|
|
45
46
|
"@typespec/rest": "~0.50.0 || >=0.51.0-dev <0.51.0",
|
|
46
47
|
"@typespec/http": "~0.50.0 || >=0.51.0-dev <0.51.0",
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
"@typespec/compiler": "~0.50.0 || >=0.51.0-dev <0.51.0",
|
|
51
52
|
"@typespec/openapi": "~0.50.0 || >=0.51.0-dev <0.51.0",
|
|
52
53
|
"@azure-tools/typespec-azure-core": "~0.36.0 || >=0.37.0-dev <0.37.0",
|
|
53
|
-
"@azure-tools/typespec-autorest": "~0.36.
|
|
54
|
+
"@azure-tools/typespec-autorest": "~0.36.1 || >=0.37.0-dev <0.37.0",
|
|
54
55
|
"@typespec/rest": "~0.50.0 || >=0.51.0-dev <0.51.0",
|
|
55
56
|
"@typespec/http": "~0.50.0 || >=0.51.0-dev <0.51.0",
|
|
56
57
|
"@typespec/versioning": "~0.50.0 || >=0.51.0-dev <0.51.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unsupported-types.d.ts","sourceRoot":"","sources":["../../../src/rules/unsupported-types.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,mBAAmB;;EAoC9B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unsupported-types.js","sourceRoot":"","sources":["../../../src/rules/unsupported-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEtF,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AACpG;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CAAC;IAC5C,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,kCAAkC;IAC/C,QAAQ,EAAE;QACR,OAAO,EAAE,YAAY,CAAA,eAAe,UAAU,oDAAoD;KACnG;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,aAAa,EAAE,CAAC,QAAQ,EAAE,EAAE;gBAC1B,oBAAoB,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;YACD,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE;gBAChB,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YAC1C,CAAC;SACF,CAAC;QAEF,SAAS,oBAAoB,CAAC,IAAU,EAAE,MAAwB;YAChE,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE;gBACnD,OAAO;aACR;YACD,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;gBA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