@microsoft/typespec-msgraph 0.0.1-Preview.3 → 0.0.1-Preview.5
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/dist/src/components/alternate-keys-annotation.js +4 -4
- package/dist/src/components/alternate-keys-annotation.js.map +1 -1
- package/dist/src/components/annotations.d.ts +9 -0
- package/dist/src/components/annotations.d.ts.map +1 -0
- package/dist/src/components/annotations.js +50 -0
- package/dist/src/components/annotations.js.map +1 -0
- package/dist/src/components/common-elements.d.ts +17 -4
- package/dist/src/components/common-elements.d.ts.map +1 -1
- package/dist/src/components/common-elements.js +2 -2
- package/dist/src/components/common-elements.js.map +1 -1
- package/dist/src/components/computed-annotation.js +1 -1
- package/dist/src/components/computed-annotation.js.map +1 -1
- package/dist/src/components/count-restrictions-annotation.d.ts.map +1 -1
- package/dist/src/components/count-restrictions-annotation.js +3 -8
- package/dist/src/components/count-restrictions-annotation.js.map +1 -1
- package/dist/src/components/description-annotation.d.ts.map +1 -1
- package/dist/src/components/description-annotation.js +1 -0
- package/dist/src/components/description-annotation.js.map +1 -1
- package/dist/src/components/entity-container-element.d.ts +18 -3
- package/dist/src/components/entity-container-element.d.ts.map +1 -1
- package/dist/src/components/entity-container-element.js +6 -42
- package/dist/src/components/entity-container-element.js.map +1 -1
- package/dist/src/components/expand-restrictions-annotation.d.ts.map +1 -1
- package/dist/src/components/expand-restrictions-annotation.js +7 -13
- package/dist/src/components/expand-restrictions-annotation.js.map +1 -1
- package/dist/src/components/operation-element.js +3 -3
- package/dist/src/components/operation-element.js.map +1 -1
- package/dist/src/components/schema-element.d.ts.map +1 -1
- package/dist/src/components/schema-element.js +6 -3
- package/dist/src/components/schema-element.js.map +1 -1
- package/dist/src/components/search-restrictions-annotation.d.ts.map +1 -1
- package/dist/src/components/search-restrictions-annotation.js +3 -8
- package/dist/src/components/search-restrictions-annotation.js.map +1 -1
- package/dist/src/components/skip-supported-annotation.d.ts.map +1 -1
- package/dist/src/components/skip-supported-annotation.js +1 -6
- package/dist/src/components/skip-supported-annotation.js.map +1 -1
- package/dist/src/components/sort-restrictions-annotation.d.ts.map +1 -1
- package/dist/src/components/sort-restrictions-annotation.js +7 -13
- package/dist/src/components/sort-restrictions-annotation.js.map +1 -1
- package/dist/src/components/structured-type-element.d.ts +4 -7
- package/dist/src/components/structured-type-element.d.ts.map +1 -1
- package/dist/src/components/structured-type-element.js +21 -23
- package/dist/src/components/structured-type-element.js.map +1 -1
- package/dist/src/components/top-supported-annotation.d.ts.map +1 -1
- package/dist/src/components/top-supported-annotation.js +1 -4
- package/dist/src/components/top-supported-annotation.js.map +1 -1
- package/dist/src/decorators/{handlers/custom/additional-query-parameters.d.ts → additional-query-parameters.d.ts} +4 -3
- package/dist/src/decorators/additional-query-parameters.d.ts.map +1 -0
- package/dist/src/decorators/additional-query-parameters.js +21 -0
- package/dist/src/decorators/additional-query-parameters.js.map +1 -0
- package/dist/src/decorators/ags-attribute.d.ts +13 -0
- package/dist/src/decorators/ags-attribute.d.ts.map +1 -0
- package/dist/src/decorators/ags-attribute.js +68 -0
- package/dist/src/decorators/ags-attribute.js.map +1 -0
- package/dist/src/decorators/delta-collection.d.ts +8 -0
- package/dist/src/decorators/delta-collection.d.ts.map +1 -0
- package/dist/src/decorators/delta-collection.js +12 -0
- package/dist/src/decorators/delta-collection.js.map +1 -0
- package/dist/src/decorators/deprecated-definition.d.ts +3 -4
- package/dist/src/decorators/deprecated-definition.d.ts.map +1 -1
- package/dist/src/decorators/deprecated-definition.js +1 -7
- package/dist/src/decorators/deprecated-definition.js.map +1 -1
- package/dist/src/decorators/expand.d.ts +1 -2
- package/dist/src/decorators/expand.d.ts.map +1 -1
- package/dist/src/decorators/expand.js +1 -1
- package/dist/src/decorators/expand.js.map +1 -1
- package/dist/src/decorators/function.d.ts +1 -2
- package/dist/src/decorators/function.d.ts.map +1 -1
- package/dist/src/decorators/function.js +1 -1
- package/dist/src/decorators/function.js.map +1 -1
- package/dist/src/decorators/graph-route.d.ts +9 -0
- package/dist/src/decorators/graph-route.d.ts.map +1 -0
- package/dist/src/decorators/graph-route.js +84 -0
- package/dist/src/decorators/graph-route.js.map +1 -0
- package/dist/src/decorators/has-stream.d.ts +1 -2
- package/dist/src/decorators/has-stream.d.ts.map +1 -1
- package/dist/src/decorators/has-stream.js +1 -1
- package/dist/src/decorators/has-stream.js.map +1 -1
- package/dist/src/decorators/index.d.ts +9 -2
- package/dist/src/decorators/index.d.ts.map +1 -1
- package/dist/src/decorators/index.js +9 -2
- package/dist/src/decorators/index.js.map +1 -1
- package/dist/src/decorators/is-owner.d.ts +9 -0
- package/dist/src/decorators/is-owner.d.ts.map +1 -0
- package/dist/src/decorators/is-owner.js +14 -0
- package/dist/src/decorators/is-owner.js.map +1 -0
- package/dist/src/decorators/order-by.d.ts +1 -2
- package/dist/src/decorators/order-by.d.ts.map +1 -1
- package/dist/src/decorators/order-by.js +1 -1
- package/dist/src/decorators/order-by.js.map +1 -1
- package/dist/src/decorators/paged-collection.d.ts +8 -0
- package/dist/src/decorators/paged-collection.d.ts.map +1 -0
- package/dist/src/decorators/paged-collection.js +12 -0
- package/dist/src/decorators/paged-collection.js.map +1 -0
- package/dist/src/decorators/private-preview-definition.d.ts +3 -4
- package/dist/src/decorators/private-preview-definition.d.ts.map +1 -1
- package/dist/src/decorators/private-preview-definition.js +1 -6
- package/dist/src/decorators/private-preview-definition.js.map +1 -1
- package/dist/src/decorators/private-preview.d.ts +1 -2
- package/dist/src/decorators/private-preview.d.ts.map +1 -1
- package/dist/src/decorators/private-preview.js +1 -1
- package/dist/src/decorators/private-preview.js.map +1 -1
- package/dist/src/decorators/privileged.d.ts +9 -0
- package/dist/src/decorators/privileged.d.ts.map +1 -0
- package/dist/src/decorators/privileged.js +13 -0
- package/dist/src/decorators/privileged.js.map +1 -0
- package/dist/src/decorators/workload-name-msa.d.ts +9 -0
- package/dist/src/decorators/workload-name-msa.d.ts.map +1 -0
- package/dist/src/decorators/workload-name-msa.js +13 -0
- package/dist/src/decorators/workload-name-msa.js.map +1 -0
- package/dist/src/decorators/workload-name.d.ts +9 -0
- package/dist/src/decorators/workload-name.d.ts.map +1 -0
- package/dist/src/decorators/workload-name.js +13 -0
- package/dist/src/decorators/workload-name.js.map +1 -0
- package/dist/src/entities/annotations.d.ts +30 -0
- package/dist/src/entities/annotations.d.ts.map +1 -0
- package/dist/src/entities/annotations.js +97 -0
- package/dist/src/entities/annotations.js.map +1 -0
- package/dist/src/entities/entity-container.d.ts +3 -24
- package/dist/src/entities/entity-container.d.ts.map +1 -1
- package/dist/src/entities/entity-container.js +24 -118
- package/dist/src/entities/entity-container.js.map +1 -1
- package/dist/src/entities/enum.d.ts.map +1 -1
- package/dist/src/entities/enum.js +3 -3
- package/dist/src/entities/enum.js.map +1 -1
- package/dist/src/entities/model.d.ts +12 -22
- package/dist/src/entities/model.d.ts.map +1 -1
- package/dist/src/entities/model.js +64 -101
- package/dist/src/entities/model.js.map +1 -1
- package/dist/src/entities/namespace.d.ts +7 -2
- package/dist/src/entities/namespace.d.ts.map +1 -1
- package/dist/src/entities/namespace.js +20 -13
- package/dist/src/entities/namespace.js.map +1 -1
- package/dist/src/entities/operation.d.ts +2 -2
- package/dist/src/entities/operation.d.ts.map +1 -1
- package/dist/src/entities/operation.js +30 -14
- package/dist/src/entities/operation.js.map +1 -1
- package/dist/src/linter.d.ts.map +1 -1
- package/dist/src/linter.js +25 -25
- package/dist/src/linter.js.map +1 -1
- package/dist/src/rules/count.d.ts.map +1 -1
- package/dist/src/rules/count.js +3 -1
- package/dist/src/rules/count.js.map +1 -1
- package/dist/src/rules/entity.d.ts.map +1 -1
- package/dist/src/rules/entity.js +4 -1
- package/dist/src/rules/entity.js.map +1 -1
- package/dist/src/rules/expand.d.ts.map +1 -1
- package/dist/src/rules/expand.js +5 -7
- package/dist/src/rules/expand.js.map +1 -1
- package/dist/src/rules/index.d.ts.map +1 -1
- package/dist/src/rules/index.js +1 -0
- package/dist/src/rules/index.js.map +1 -1
- package/dist/src/rules/order-by.d.ts +1 -1
- package/dist/src/rules/order-by.d.ts.map +1 -1
- package/dist/src/rules/order-by.js +11 -10
- package/dist/src/rules/order-by.js.map +1 -1
- package/dist/src/rules/search.d.ts.map +1 -1
- package/dist/src/rules/search.js +3 -1
- package/dist/src/rules/search.js.map +1 -1
- package/dist/src/rules/skip.d.ts.map +1 -1
- package/dist/src/rules/skip.js +3 -1
- package/dist/src/rules/skip.js.map +1 -1
- package/dist/src/rules/top.d.ts.map +1 -1
- package/dist/src/rules/top.js +3 -1
- package/dist/src/rules/top.js.map +1 -1
- package/dist/src/utils.d.ts +16 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +89 -1
- package/dist/src/utils.js.map +1 -1
- package/lib/decorators.tsp +90 -14
- package/lib/deployment.tsp +18 -0
- package/lib/lib.tsp +9 -14
- package/lib/msgraph.tsp +4 -0
- package/lib/porcelain.tsp +135 -0
- package/lib/responses.tsp +82 -0
- package/lib/shared-models.tsp +74 -0
- package/package.json +6 -10
- package/dist/src/decorators/attribute-builder.d.ts +0 -2
- package/dist/src/decorators/attribute-builder.d.ts.map +0 -1
- package/dist/src/decorators/attribute-builder.js +0 -166
- package/dist/src/decorators/attribute-builder.js.map +0 -1
- package/dist/src/decorators/attributes.d.ts +0 -57
- package/dist/src/decorators/attributes.d.ts.map +0 -1
- package/dist/src/decorators/attributes.js +0 -50
- package/dist/src/decorators/attributes.js.map +0 -1
- package/dist/src/decorators/decorator-parameter.d.ts +0 -4
- package/dist/src/decorators/decorator-parameter.d.ts.map +0 -1
- package/dist/src/decorators/decorator-parameter.js +0 -2
- package/dist/src/decorators/decorator-parameter.js.map +0 -1
- package/dist/src/decorators/handlers/custom/additional-query-parameters.d.ts.map +0 -1
- package/dist/src/decorators/handlers/custom/additional-query-parameters.js +0 -38
- package/dist/src/decorators/handlers/custom/additional-query-parameters.js.map +0 -1
- package/dist/src/decorators/handlers/custom/ags-attribute.d.ts +0 -8
- package/dist/src/decorators/handlers/custom/ags-attribute.d.ts.map +0 -1
- package/dist/src/decorators/handlers/custom/ags-attribute.js +0 -36
- package/dist/src/decorators/handlers/custom/ags-attribute.js.map +0 -1
- package/dist/src/decorators/handlers/custom/index.d.ts +0 -3
- package/dist/src/decorators/handlers/custom/index.d.ts.map +0 -1
- package/dist/src/decorators/handlers/custom/index.js +0 -3
- package/dist/src/decorators/handlers/custom/index.js.map +0 -1
- package/dist/src/decorators/handlers/index.d.ts +0 -31
- package/dist/src/decorators/handlers/index.d.ts.map +0 -1
- package/dist/src/decorators/handlers/index.js +0 -121
- package/dist/src/decorators/handlers/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"has-stream.js","sourceRoot":"","sources":["../../../src/decorators/has-stream.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"has-stream.js","sourceRoot":"","sources":["../../../src/decorators/has-stream.ts"],"names":[],"mappings":"AAEA,MAAM,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AAEzC;;;;GAIG;AACH,MAAM,UAAU,UAAU,CACxB,OAAyB,EACzB,MAAa,EACb,IAAa,EACb,GAAG,UAAoB;IAEvB,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAChD,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,GAAG,CACxC,MAAM,EACN,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAC9B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAgB,EAAE,MAAa;IACvD,OAAO,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,OAAgB,EAAE,MAAa;IAC5D,OAAO,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AAC1D,CAAC"}
|
|
@@ -1,25 +1,32 @@
|
|
|
1
1
|
export * from "./abstract.js";
|
|
2
|
+
export * from "./additional-query-parameters.js";
|
|
3
|
+
export * from "./ags-attribute.js";
|
|
2
4
|
export * from "./alternate-key.js";
|
|
3
5
|
export * from "./complex.js";
|
|
4
6
|
export * from "./computed.js";
|
|
5
7
|
export * from "./contains.js";
|
|
6
8
|
export * from "./count.js";
|
|
9
|
+
export * from "./delta-collection.js";
|
|
7
10
|
export * from "./deprecated-definition.js";
|
|
8
11
|
export * from "./entity.js";
|
|
9
12
|
export * from "./expand.js";
|
|
10
13
|
export * from "./function.js";
|
|
11
|
-
export * from "./
|
|
12
|
-
export * from "./handlers/index.js";
|
|
14
|
+
export * from "./graph-route.js";
|
|
13
15
|
export * from "./has-stream.js";
|
|
16
|
+
export * from "./is-owner.js";
|
|
14
17
|
export * from "./open.js";
|
|
15
18
|
export * from "./operation-parameters.js";
|
|
16
19
|
export * from "./order-by.js";
|
|
20
|
+
export * from "./paged-collection.js";
|
|
17
21
|
export * from "./private-preview-definition.js";
|
|
18
22
|
export * from "./private-preview.js";
|
|
23
|
+
export * from "./privileged.js";
|
|
19
24
|
export * from "./read-only.js";
|
|
20
25
|
export * from "./references.js";
|
|
21
26
|
export * from "./search.js";
|
|
22
27
|
export * from "./skip.js";
|
|
23
28
|
export * from "./top.js";
|
|
29
|
+
export * from "./workload-name-msa.js";
|
|
30
|
+
export * from "./workload-name.js";
|
|
24
31
|
export * from "./write-only.js";
|
|
25
32
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC;AACjD,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,25 +1,32 @@
|
|
|
1
1
|
export * from "./abstract.js";
|
|
2
|
+
export * from "./additional-query-parameters.js";
|
|
3
|
+
export * from "./ags-attribute.js";
|
|
2
4
|
export * from "./alternate-key.js";
|
|
3
5
|
export * from "./complex.js";
|
|
4
6
|
export * from "./computed.js";
|
|
5
7
|
export * from "./contains.js";
|
|
6
8
|
export * from "./count.js";
|
|
9
|
+
export * from "./delta-collection.js";
|
|
7
10
|
export * from "./deprecated-definition.js";
|
|
8
11
|
export * from "./entity.js";
|
|
9
12
|
export * from "./expand.js";
|
|
10
13
|
export * from "./function.js";
|
|
11
|
-
export * from "./
|
|
12
|
-
export * from "./handlers/index.js";
|
|
14
|
+
export * from "./graph-route.js";
|
|
13
15
|
export * from "./has-stream.js";
|
|
16
|
+
export * from "./is-owner.js";
|
|
14
17
|
export * from "./open.js";
|
|
15
18
|
export * from "./operation-parameters.js";
|
|
16
19
|
export * from "./order-by.js";
|
|
20
|
+
export * from "./paged-collection.js";
|
|
17
21
|
export * from "./private-preview-definition.js";
|
|
18
22
|
export * from "./private-preview.js";
|
|
23
|
+
export * from "./privileged.js";
|
|
19
24
|
export * from "./read-only.js";
|
|
20
25
|
export * from "./references.js";
|
|
21
26
|
export * from "./search.js";
|
|
22
27
|
export * from "./skip.js";
|
|
23
28
|
export * from "./top.js";
|
|
29
|
+
export * from "./workload-name-msa.js";
|
|
30
|
+
export * from "./workload-name.js";
|
|
24
31
|
export * from "./write-only.js";
|
|
25
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC;AACjD,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DecoratorContext, Model, ModelProperty, Program, Type } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* `@isOwner` - specify that this workload is the primary owner of this entity model
|
|
4
|
+
*
|
|
5
|
+
* `@isOwner` can be applied to Model where the model also has an @entity decorator or a ModelProperty where it has either an @contains or @references decorator.
|
|
6
|
+
*/
|
|
7
|
+
export declare function $isOwner(context: DecoratorContext, target: Model | ModelProperty): void;
|
|
8
|
+
export declare function isIsOwner(program: Program, target: Type): boolean;
|
|
9
|
+
//# sourceMappingURL=is-owner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-owner.d.ts","sourceRoot":"","sources":["../../../src/decorators/is-owner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAK3F;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,GAAG,aAAa,QAEhF;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG,OAAO,CAEjE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const isOwnerKey = Symbol("isOwner");
|
|
2
|
+
// ToDo: add unit tests for isOwner
|
|
3
|
+
/**
|
|
4
|
+
* `@isOwner` - specify that this workload is the primary owner of this entity model
|
|
5
|
+
*
|
|
6
|
+
* `@isOwner` can be applied to Model where the model also has an @entity decorator or a ModelProperty where it has either an @contains or @references decorator.
|
|
7
|
+
*/
|
|
8
|
+
export function $isOwner(context, target) {
|
|
9
|
+
context.program.stateSet(isOwnerKey).add(target);
|
|
10
|
+
}
|
|
11
|
+
export function isIsOwner(program, target) {
|
|
12
|
+
return program.stateSet(isOwnerKey).has(target);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=is-owner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-owner.js","sourceRoot":"","sources":["../../../src/decorators/is-owner.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAErC,mCAAmC;AACnC;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAyB,EAAE,MAA6B;IAC/E,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAgB,EAAE,MAAY;IACtD,OAAO,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { DecoratorContext, Operation, Program } from "@typespec/compiler";
|
|
2
|
-
import { DecoratorParameter } from "./decorator-parameter.js";
|
|
3
2
|
/**
|
|
4
3
|
* `@orderBy` - Applies to: get operations that return collections of @entity or @complex models.
|
|
5
4
|
* Indicates that the get operation supports the OData $orderBy query parameter.
|
|
6
5
|
*
|
|
7
6
|
* `properties` - List of property names in the model returned from the get operation that can be used in a $orderBy query parameter.
|
|
8
7
|
*/
|
|
9
|
-
export declare function $orderBy(context: DecoratorContext, target: Operation, ...properties:
|
|
8
|
+
export declare function $orderBy(context: DecoratorContext, target: Operation, ...properties: string[]): void;
|
|
10
9
|
export declare function getOrderBy(program: Program, target: Operation): string[];
|
|
11
10
|
export declare function isOrderBy(program: Program, target: Operation): boolean;
|
|
12
11
|
//# sourceMappingURL=order-by.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-by.d.ts","sourceRoot":"","sources":["../../../src/decorators/order-by.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"order-by.d.ts","sourceRoot":"","sources":["../../../src/decorators/order-by.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAI1E;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,UAAU,EAAE,MAAM,EAAE,QAE7F;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM,EAAE,CAExE;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAEtE"}
|
|
@@ -6,7 +6,7 @@ const orderByKey = Symbol("orderBy");
|
|
|
6
6
|
* `properties` - List of property names in the model returned from the get operation that can be used in a $orderBy query parameter.
|
|
7
7
|
*/
|
|
8
8
|
export function $orderBy(context, target, ...properties) {
|
|
9
|
-
context.program.stateMap(orderByKey).set(target, properties
|
|
9
|
+
context.program.stateMap(orderByKey).set(target, properties);
|
|
10
10
|
}
|
|
11
11
|
export function getOrderBy(program, target) {
|
|
12
12
|
return program.stateMap(orderByKey).get(target) || [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-by.js","sourceRoot":"","sources":["../../../src/decorators/order-by.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"order-by.js","sourceRoot":"","sources":["../../../src/decorators/order-by.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAErC;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAyB,EAAE,MAAiB,EAAE,GAAG,UAAoB;IAC5F,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,OAAgB,EAAE,MAAiB;IAC5D,OAAO,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAgB,EAAE,MAAiB;IAC3D,OAAO,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DecoratorContext, Model, Program } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* `@pagedCollection` - Applies to: models.
|
|
4
|
+
* Indicates that the model is a body response containing a paged collection.
|
|
5
|
+
*/
|
|
6
|
+
export declare function $pagedCollection(context: DecoratorContext, target: Model): void;
|
|
7
|
+
export declare function isPagedCollection(program: Program, target: Model): boolean;
|
|
8
|
+
//# sourceMappingURL=paged-collection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paged-collection.d.ts","sourceRoot":"","sources":["../../../src/decorators/paged-collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAItE;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,QAExE;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,WAEhE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const pagedCollectionKey = Symbol("pagedCollection");
|
|
2
|
+
/**
|
|
3
|
+
* `@pagedCollection` - Applies to: models.
|
|
4
|
+
* Indicates that the model is a body response containing a paged collection.
|
|
5
|
+
*/
|
|
6
|
+
export function $pagedCollection(context, target) {
|
|
7
|
+
context.program.stateSet(pagedCollectionKey).add(target);
|
|
8
|
+
}
|
|
9
|
+
export function isPagedCollection(program, target) {
|
|
10
|
+
return program.stateSet(pagedCollectionKey).has(target);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=paged-collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paged-collection.js","sourceRoot":"","sources":["../../../src/decorators/paged-collection.ts"],"names":[],"mappings":"AAEA,MAAM,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAErD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAyB,EAAE,MAAa;IACvE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAgB,EAAE,MAAa;IAC/D,OAAO,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { DecoratorContext, Namespace, Program } from "@typespec/compiler";
|
|
2
|
-
import { DecoratorParameter } from "./decorator-parameter.js";
|
|
3
2
|
/**
|
|
4
3
|
* `@privatePreviewDefinition` - create a reusable private preview definition.
|
|
5
4
|
*
|
|
6
5
|
* `@privatePreviewDefinition` can only be applied to namespaces.
|
|
7
6
|
*/
|
|
8
|
-
export interface
|
|
7
|
+
export interface PrivatePreviewDefinitionParameters {
|
|
9
8
|
name: string;
|
|
10
9
|
announcementDate: string;
|
|
11
10
|
removalDate: string;
|
|
@@ -15,6 +14,6 @@ export interface PrivatePreviewDecoratorParameters {
|
|
|
15
14
|
* `@privatePreviewDefinition` - Allow us create a reusable private preview definition.
|
|
16
15
|
* `@privatePreviewDefinition` - Applies only to namespaces.
|
|
17
16
|
*/
|
|
18
|
-
export declare function $privatePreviewDefinition(context: DecoratorContext, target: Namespace, name:
|
|
19
|
-
export declare function getPrivatePreviewDefinitions(program: Program, target: Namespace): Map<string,
|
|
17
|
+
export declare function $privatePreviewDefinition(context: DecoratorContext, target: Namespace, name: string, announcementDate: string, removalDate: string, owner: string): void;
|
|
18
|
+
export declare function getPrivatePreviewDefinitions(program: Program, target: Namespace): Map<string, PrivatePreviewDefinitionParameters>;
|
|
20
19
|
//# sourceMappingURL=private-preview-definition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-preview-definition.d.ts","sourceRoot":"","sources":["../../../src/decorators/private-preview-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"private-preview-definition.d.ts","sourceRoot":"","sources":["../../../src/decorators/private-preview-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE1E;;;;GAIG;AACH,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAID;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,MAAM,EACZ,gBAAgB,EAAE,MAAM,EACxB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,QAMd;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,GAChB,GAAG,CAAC,MAAM,EAAE,kCAAkC,CAAC,CAKjD"}
|
|
@@ -5,12 +5,7 @@ const privatePreviewDefinitionKey = Symbol("privatePreviewDefinition");
|
|
|
5
5
|
*/
|
|
6
6
|
export function $privatePreviewDefinition(context, target, name, announcementDate, removalDate, owner) {
|
|
7
7
|
const definitions = getPrivatePreviewDefinitions(context.program, target);
|
|
8
|
-
definitions.set(name
|
|
9
|
-
name: name.value,
|
|
10
|
-
announcementDate: announcementDate.value,
|
|
11
|
-
removalDate: removalDate.value,
|
|
12
|
-
owner: owner.value
|
|
13
|
-
});
|
|
8
|
+
definitions.set(name, { name, announcementDate, removalDate, owner });
|
|
14
9
|
context.program.stateMap(privatePreviewDefinitionKey).set(target, definitions);
|
|
15
10
|
}
|
|
16
11
|
export function getPrivatePreviewDefinitions(program, target) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-preview-definition.js","sourceRoot":"","sources":["../../../src/decorators/private-preview-definition.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"private-preview-definition.js","sourceRoot":"","sources":["../../../src/decorators/private-preview-definition.ts"],"names":[],"mappings":"AAcA,MAAM,2BAA2B,GAAG,MAAM,CAAC,0BAA0B,CAAC,CAAC;AAEvE;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CACvC,OAAyB,EACzB,MAAiB,EACjB,IAAY,EACZ,gBAAwB,EACxB,WAAmB,EACnB,KAAa;IAEb,MAAM,WAAW,GAAG,4BAA4B,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1E,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC;IAEtE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AACjF,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,OAAgB,EAChB,MAAiB;IAEjB,OAAO,CACL,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;QACzD,IAAI,GAAG,EAA8C,CACtD,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { DecoratorContext, Enum, EnumMember, Model, ModelProperty, Namespace, Operation, Program, Type } from "@typespec/compiler";
|
|
2
|
-
import { DecoratorParameter } from "./decorator-parameter.js";
|
|
3
2
|
/**
|
|
4
3
|
* `@privatePreview` - Allow us to deprecate a defined element.
|
|
5
4
|
* `@privatePreview` - Applies to models, model properties, enums, enum members, namespaces and operations.
|
|
6
5
|
*/
|
|
7
|
-
export declare function $privatePreview(context: DecoratorContext, target: Model | ModelProperty | EnumMember | Enum | Operation | Namespace, name:
|
|
6
|
+
export declare function $privatePreview(context: DecoratorContext, target: Model | ModelProperty | EnumMember | Enum | Operation | Namespace, name: string): void;
|
|
8
7
|
export declare function getPrivatePreview(program: Program, target: Type): string;
|
|
9
8
|
export declare function isPrivatePreview(program: Program, target: Type): boolean;
|
|
10
9
|
//# sourceMappingURL=private-preview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-preview.d.ts","sourceRoot":"","sources":["../../../src/decorators/private-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,KAAK,EACL,aAAa,EACb,SAAS,EACT,SAAS,EACT,OAAO,EACP,IAAI,EACL,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"private-preview.d.ts","sourceRoot":"","sources":["../../../src/decorators/private-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,KAAK,EACL,aAAa,EACb,SAAS,EACT,SAAS,EACT,OAAO,EACP,IAAI,EACL,MAAM,oBAAoB,CAAC;AAI5B;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,GAAG,aAAa,GAAG,UAAU,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,EACzE,IAAI,EAAE,MAAM,QAGb;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG,MAAM,CAExE;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,WAE9D"}
|
|
@@ -4,7 +4,7 @@ const privatePreviewKey = Symbol("privatePreview");
|
|
|
4
4
|
* `@privatePreview` - Applies to models, model properties, enums, enum members, namespaces and operations.
|
|
5
5
|
*/
|
|
6
6
|
export function $privatePreview(context, target, name) {
|
|
7
|
-
context.program.stateMap(privatePreviewKey).set(target, name
|
|
7
|
+
context.program.stateMap(privatePreviewKey).set(target, name);
|
|
8
8
|
}
|
|
9
9
|
export function getPrivatePreview(program, target) {
|
|
10
10
|
return program.stateMap(privatePreviewKey).get(target);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-preview.js","sourceRoot":"","sources":["../../../src/decorators/private-preview.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"private-preview.js","sourceRoot":"","sources":["../../../src/decorators/private-preview.ts"],"names":[],"mappings":"AAYA,MAAM,iBAAiB,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAEnD;;;GAGG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAyB,EACzB,MAAyE,EACzE,IAAY;IAEZ,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAgB,EAAE,MAAY;IAC9D,OAAO,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAAgB,EAAE,MAAY;IAC7D,OAAO,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACzD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DecoratorContext, Model, ModelProperty, Enum, EnumMember, Operation, Namespace, Program, Type } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* `@privileged` - mark the entity as privileged
|
|
4
|
+
*
|
|
5
|
+
* `@privileged` can be applied to Model, ModelProperty, Enum, EnumMember, Operation, Namespace.
|
|
6
|
+
*/
|
|
7
|
+
export declare function $privileged(context: DecoratorContext, target: Model | ModelProperty | Enum | EnumMember | Operation | Namespace): void;
|
|
8
|
+
export declare function isPrivileged(program: Program, target: Type): boolean;
|
|
9
|
+
//# sourceMappingURL=privileged.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privileged.d.ts","sourceRoot":"","sources":["../../../src/decorators/privileged.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,KAAK,EACL,aAAa,EACb,IAAI,EACJ,UAAU,EACV,SAAS,EACT,SAAS,EACT,OAAO,EACP,IAAI,EACL,MAAM,oBAAoB,CAAC;AAI5B;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,GAAG,aAAa,GAAG,IAAI,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,QAG1E;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG,OAAO,CAEpE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const privilegedKey = Symbol("privileged");
|
|
2
|
+
/**
|
|
3
|
+
* `@privileged` - mark the entity as privileged
|
|
4
|
+
*
|
|
5
|
+
* `@privileged` can be applied to Model, ModelProperty, Enum, EnumMember, Operation, Namespace.
|
|
6
|
+
*/
|
|
7
|
+
export function $privileged(context, target) {
|
|
8
|
+
context.program.stateSet(privilegedKey).add(target);
|
|
9
|
+
}
|
|
10
|
+
export function isPrivileged(program, target) {
|
|
11
|
+
return program.stateSet(privilegedKey).has(target);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=privileged.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privileged.js","sourceRoot":"","sources":["../../../src/decorators/privileged.ts"],"names":[],"mappings":"AAYA,MAAM,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAE3C;;;;GAIG;AACH,MAAM,UAAU,WAAW,CACzB,OAAyB,EACzB,MAAyE;IAEzE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,OAAgB,EAAE,MAAY;IACzD,OAAO,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DecoratorContext, Model, ModelProperty, Enum, EnumMember, Program, Type } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* `@workloadNameMsa` - specifies the name used by the underlying workload for consumer use cases
|
|
4
|
+
*
|
|
5
|
+
* `@workloadNameMsa` can be applied to Model, ModelProperty, Enum, EnumMember.
|
|
6
|
+
*/
|
|
7
|
+
export declare function $workloadNameMsa(context: DecoratorContext, target: Model | ModelProperty | Enum | EnumMember, workloadNameMsa: string): void;
|
|
8
|
+
export declare function getWorkloadNameMsa(program: Program, target: Type): string | undefined;
|
|
9
|
+
//# sourceMappingURL=workload-name-msa.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workload-name-msa.d.ts","sourceRoot":"","sources":["../../../src/decorators/workload-name-msa.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,KAAK,EACL,aAAa,EACb,IAAI,EACJ,UAAU,EACV,OAAO,EACP,IAAI,EACL,MAAM,oBAAoB,CAAC;AAI5B;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,GAAG,aAAa,GAAG,IAAI,GAAG,UAAU,EACjD,eAAe,EAAE,MAAM,QAGxB;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAErF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const workloadNameMsaKey = Symbol("workloadNameMsa");
|
|
2
|
+
/**
|
|
3
|
+
* `@workloadNameMsa` - specifies the name used by the underlying workload for consumer use cases
|
|
4
|
+
*
|
|
5
|
+
* `@workloadNameMsa` can be applied to Model, ModelProperty, Enum, EnumMember.
|
|
6
|
+
*/
|
|
7
|
+
export function $workloadNameMsa(context, target, workloadNameMsa) {
|
|
8
|
+
context.program.stateMap(workloadNameMsaKey).set(target, workloadNameMsa);
|
|
9
|
+
}
|
|
10
|
+
export function getWorkloadNameMsa(program, target) {
|
|
11
|
+
return program.stateMap(workloadNameMsaKey).get(target);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=workload-name-msa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workload-name-msa.js","sourceRoot":"","sources":["../../../src/decorators/workload-name-msa.ts"],"names":[],"mappings":"AAUA,MAAM,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAErD;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAAyB,EACzB,MAAiD,EACjD,eAAuB;IAEvB,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,OAAgB,EAAE,MAAY;IAC/D,OAAO,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DecoratorContext, Model, ModelProperty, Enum, EnumMember, Program, Type } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* `@workloadName` - specifies the name used by the underlying workload
|
|
4
|
+
*
|
|
5
|
+
* `@workloadName` can be applied to Model, ModelProperty, Enum, EnumMember.
|
|
6
|
+
*/
|
|
7
|
+
export declare function $workloadName(context: DecoratorContext, target: Model | ModelProperty | Enum | EnumMember, workloadName: string): void;
|
|
8
|
+
export declare function getWorkloadName(program: Program, target: Type): string | undefined;
|
|
9
|
+
//# sourceMappingURL=workload-name.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workload-name.d.ts","sourceRoot":"","sources":["../../../src/decorators/workload-name.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,KAAK,EACL,aAAa,EACb,IAAI,EACJ,UAAU,EACV,OAAO,EACP,IAAI,EACL,MAAM,oBAAoB,CAAC;AAI5B;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,GAAG,aAAa,GAAG,IAAI,GAAG,UAAU,EACjD,YAAY,EAAE,MAAM,QAGrB;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAElF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const workloadNameKey = Symbol("workloadName");
|
|
2
|
+
/**
|
|
3
|
+
* `@workloadName` - specifies the name used by the underlying workload
|
|
4
|
+
*
|
|
5
|
+
* `@workloadName` can be applied to Model, ModelProperty, Enum, EnumMember.
|
|
6
|
+
*/
|
|
7
|
+
export function $workloadName(context, target, workloadName) {
|
|
8
|
+
context.program.stateMap(workloadNameKey).set(target, workloadName);
|
|
9
|
+
}
|
|
10
|
+
export function getWorkloadName(program, target) {
|
|
11
|
+
return program.stateMap(workloadNameKey).get(target);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=workload-name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workload-name.js","sourceRoot":"","sources":["../../../src/decorators/workload-name.ts"],"names":[],"mappings":"AAUA,MAAM,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAE/C;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,OAAyB,EACzB,MAAiD,EACjD,YAAoB;IAEpB,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AACtE,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAgB,EAAE,MAAY;IAC5D,OAAO,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Interface, Program } from "@typespec/compiler";
|
|
2
|
+
export interface SingletonAnnotations {
|
|
3
|
+
Target: string | undefined;
|
|
4
|
+
HasGetOnItem: boolean;
|
|
5
|
+
HasPatchOnItem: boolean;
|
|
6
|
+
HasDeleteOnItem: boolean;
|
|
7
|
+
HasExpandOperation: boolean;
|
|
8
|
+
NonExpandableProperties: string[] | undefined;
|
|
9
|
+
Description: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface EntitySetAnnotations {
|
|
12
|
+
Target: string | undefined;
|
|
13
|
+
HasGetOnCollection: boolean;
|
|
14
|
+
HasGetOnItem: boolean;
|
|
15
|
+
HasPostOnCollection: boolean;
|
|
16
|
+
HasPatchOnItem: boolean;
|
|
17
|
+
HasDeleteOnItem: boolean;
|
|
18
|
+
HasCountOperation: boolean;
|
|
19
|
+
HasExpandOperation: boolean;
|
|
20
|
+
NonExpandableProperties: string[] | undefined;
|
|
21
|
+
HasSearchOperation: boolean;
|
|
22
|
+
HasSkipOperation: boolean;
|
|
23
|
+
HasSortOperation: boolean;
|
|
24
|
+
NonSortableProperties: string[] | undefined;
|
|
25
|
+
HasTopOperation: boolean;
|
|
26
|
+
Description: string | undefined;
|
|
27
|
+
}
|
|
28
|
+
export declare function GetSingletonAnnotations(program: Program, namespaceName: string, navigationSources: Interface[]): SingletonAnnotations[];
|
|
29
|
+
export declare function GetEntitySetAnnotations(program: Program, namespaceName: string, navigationSources: Interface[]): EntitySetAnnotations[];
|
|
30
|
+
//# sourceMappingURL=annotations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../../src/entities/annotations.ts"],"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97 @@
|
|
|
1
|
+
import { getDoc, walkPropertiesInherited } from "@typespec/compiler";
|
|
2
|
+
import { getInterfaceNavigationSourceType, getInterfacesOfKinds } from "../utils.js";
|
|
3
|
+
import { getOperationVerb } from "@typespec/http";
|
|
4
|
+
import { getExpand, getOrderBy, isContains, isCount, isExpand, isOrderBy, isReferences, isSearch, isSkip, isTop } from "../index.js";
|
|
5
|
+
export function GetSingletonAnnotations(program, namespaceName, navigationSources) {
|
|
6
|
+
const singletonMap = getInterfacesOfKinds(program, navigationSources, ["Singleton"]);
|
|
7
|
+
const annotations = [...singletonMap].map(([routePath, entity]) => getSingletonAnnotations(program, namespaceName, routePath, entity));
|
|
8
|
+
return annotations;
|
|
9
|
+
}
|
|
10
|
+
function getSingletonAnnotations(program, namespaceName, routePath, entity) {
|
|
11
|
+
const singleton = entity.theInterface;
|
|
12
|
+
const operations = entity.operations;
|
|
13
|
+
const type = getInterfaceNavigationSourceType(program, singleton);
|
|
14
|
+
const operationMethods = [...operations].map(operation => ({
|
|
15
|
+
operation,
|
|
16
|
+
verb: getOperationVerb(program, operation),
|
|
17
|
+
}));
|
|
18
|
+
const [hasExpandOperation, nonExpandableProperties] = getExpandProperties(program, type, singleton);
|
|
19
|
+
const annotations = {
|
|
20
|
+
Target: `${namespaceName}.container/${routePath}`,
|
|
21
|
+
HasGetOnItem: operationMethods.some(({ verb }) => verb === "get"),
|
|
22
|
+
HasPatchOnItem: operationMethods.some(({ verb }) => verb === "patch"),
|
|
23
|
+
HasDeleteOnItem: operationMethods.some(({ verb }) => verb === "delete"),
|
|
24
|
+
HasExpandOperation: hasExpandOperation,
|
|
25
|
+
NonExpandableProperties: nonExpandableProperties,
|
|
26
|
+
Description: getDoc(program, singleton),
|
|
27
|
+
};
|
|
28
|
+
return annotations;
|
|
29
|
+
}
|
|
30
|
+
export function GetEntitySetAnnotations(program, namespaceName, navigationSources) {
|
|
31
|
+
const entitySetMap = getInterfacesOfKinds(program, navigationSources, ["EntitySet", "EntitySetResource"]);
|
|
32
|
+
const annotations = [...entitySetMap].map(([routePath, entity]) => getEntitySetAnnotations(program, namespaceName, routePath, entity));
|
|
33
|
+
return annotations;
|
|
34
|
+
}
|
|
35
|
+
function getEntitySetAnnotations(program, namespaceName, routePath, entity) {
|
|
36
|
+
const entitySet = entity.theInterface;
|
|
37
|
+
const operations = entity.operations;
|
|
38
|
+
const type = getInterfaceNavigationSourceType(program, entitySet);
|
|
39
|
+
const operationMethods = operations.map(operation => ({
|
|
40
|
+
operation,
|
|
41
|
+
verb: getOperationVerb(program, operation),
|
|
42
|
+
hasEmptyParameters: operation.parameters.properties.size === 0,
|
|
43
|
+
}));
|
|
44
|
+
const [hasExpandOperation, nonExpandableProperties] = getExpandProperties(program, type, entitySet);
|
|
45
|
+
const [hasSortOperation, nonSortableProperties] = getSortProperties(program, type, entitySet);
|
|
46
|
+
const annotations = {
|
|
47
|
+
Target: `${namespaceName}.container/${routePath}`,
|
|
48
|
+
HasGetOnCollection: operationMethods.some(({ verb, hasEmptyParameters }) => hasEmptyParameters && verb === "get"),
|
|
49
|
+
HasGetOnItem: operationMethods.some(({ verb, hasEmptyParameters }) => !hasEmptyParameters && verb === "get"),
|
|
50
|
+
HasPostOnCollection: operationMethods.some(({ verb }) => verb === "post"),
|
|
51
|
+
HasPatchOnItem: operationMethods.some(({ verb, hasEmptyParameters }) => !hasEmptyParameters && verb === "patch"),
|
|
52
|
+
HasDeleteOnItem: operationMethods.some(({ verb, hasEmptyParameters }) => !hasEmptyParameters && verb === "delete"),
|
|
53
|
+
HasCountOperation: operationMethods.some(({ operation }) => isCount(program, operation)),
|
|
54
|
+
HasSearchOperation: operationMethods.some(({ operation }) => isSearch(program, operation)),
|
|
55
|
+
HasSkipOperation: operationMethods.some(({ operation }) => isSkip(program, operation)),
|
|
56
|
+
HasExpandOperation: hasExpandOperation,
|
|
57
|
+
NonExpandableProperties: nonExpandableProperties,
|
|
58
|
+
HasSortOperation: hasSortOperation,
|
|
59
|
+
NonSortableProperties: nonSortableProperties,
|
|
60
|
+
HasTopOperation: operationMethods.some(({ operation }) => isTop(program, operation)),
|
|
61
|
+
Description: getDoc(program, entitySet),
|
|
62
|
+
};
|
|
63
|
+
return annotations;
|
|
64
|
+
}
|
|
65
|
+
function getExpandProperties(program, type, entity) {
|
|
66
|
+
const expandedOperation = [...entity.operations].find(([_, operation]) => getOperationVerb(program, operation) === "get" &&
|
|
67
|
+
operation.parameters.properties.size === 0 &&
|
|
68
|
+
isExpand(program, operation));
|
|
69
|
+
if (expandedOperation) {
|
|
70
|
+
// Destructuring to get the operation from the [string, Operation] expandedOperation tuple
|
|
71
|
+
const [_, operation] = expandedOperation;
|
|
72
|
+
const expandableProperties = getExpand(program, operation);
|
|
73
|
+
const navigationProperties = [...walkPropertiesInherited(type)]
|
|
74
|
+
.filter((property) => isContains(program, property) || isReferences(program, property))
|
|
75
|
+
.map((property) => property.name);
|
|
76
|
+
const nonExpandableProperties = navigationProperties.filter((property) => { var _a; return (_a = !(expandableProperties === null || expandableProperties === void 0 ? void 0 : expandableProperties.includes(property))) !== null && _a !== void 0 ? _a : false; });
|
|
77
|
+
return [true, nonExpandableProperties];
|
|
78
|
+
}
|
|
79
|
+
return [false, undefined];
|
|
80
|
+
}
|
|
81
|
+
function getSortProperties(program, type, entity) {
|
|
82
|
+
const sortOperation = [...entity.operations].find(([_, operation]) => getOperationVerb(program, operation) === "get" &&
|
|
83
|
+
operation.parameters.properties.size === 0 &&
|
|
84
|
+
isOrderBy(program, operation));
|
|
85
|
+
if (sortOperation) {
|
|
86
|
+
// Destructuring to get the operation from the [string, Operation] orderedOperation tuple
|
|
87
|
+
const [_, operation] = sortOperation;
|
|
88
|
+
const sortableProperties = getOrderBy(program, operation);
|
|
89
|
+
const nonNavigationProperties = [...walkPropertiesInherited(type)]
|
|
90
|
+
.filter((property) => !isContains(program, property) && !isReferences(program, property))
|
|
91
|
+
.map((property) => property.name);
|
|
92
|
+
const nonSortableProperties = nonNavigationProperties.filter((property) => !sortableProperties.includes(property));
|
|
93
|
+
return [true, nonSortableProperties];
|
|
94
|
+
}
|
|
95
|
+
return [false, undefined];
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=annotations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotations.js","sourceRoot":"","sources":["../../../src/entities/annotations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,MAAM,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC3G,OAAO,EAAE,gCAAgC,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAmCrI,MAAM,UAAU,uBAAuB,CAAC,OAAgB,EAAE,aAAqB,EAAE,iBAA8B;IAC7G,MAAM,YAAY,GAAG,oBAAoB,CAAC,OAAO,EAAE,iBAAiB,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAErF,MAAM,WAAW,GAAG,CAAC,GAAG,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,EAAE,CAChE,uBAAuB,CAAC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;IAEtE,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAS,uBAAuB,CAC9B,OAAgB,EAChB,aAAqB,EACrB,SAAiB,EACjB,MAAwB;IAExB,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;IACtC,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAErC,MAAM,IAAI,GAAG,gCAAgC,CAAC,OAAO,EAAE,SAAS,CAAE,CAAC;IAEnE,MAAM,gBAAgB,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IAAI,KAAK,CAAC;QAC1C,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,CAChC,CAAC;IAEF,IAAI,aAAa,EAAE;QACjB,yFAAyF;QACzF,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,aAAa,CAAC;QACrC,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAE1D,MAAM,uBAAuB,GAAG,CAAC,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC;aAC/D,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;aACxF,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEpC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;QAEnH,OAAO,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;KACtC;IAED,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -1,35 +1,14 @@
|
|
|
1
|
-
import { Program,
|
|
2
|
-
export interface EntityContainer {
|
|
3
|
-
AgsAttributes: Record<string, string>;
|
|
4
|
-
SingletonElements: Singleton[];
|
|
5
|
-
EntitySetElements: EntitySet[];
|
|
6
|
-
}
|
|
1
|
+
import { Program, Interface } from "@typespec/compiler";
|
|
7
2
|
export interface Singleton {
|
|
8
3
|
Name: string | undefined;
|
|
9
4
|
TypeName: string;
|
|
10
5
|
AgsAttributes: Record<string, string>;
|
|
11
|
-
HasExpandOperation: boolean;
|
|
12
|
-
NonExpandableProperties: string[] | undefined;
|
|
13
|
-
Description: string | undefined;
|
|
14
6
|
}
|
|
15
7
|
export interface EntitySet {
|
|
16
8
|
Name: string | undefined;
|
|
17
9
|
TypeName: string;
|
|
18
10
|
AgsAttributes: Record<string, string | boolean | undefined>;
|
|
19
|
-
HasGetOnCollection: boolean;
|
|
20
|
-
HasGetOnItem: boolean;
|
|
21
|
-
HasPostOnCollection: boolean;
|
|
22
|
-
HasPatchOnItem: boolean;
|
|
23
|
-
HasDeleteOnItem: boolean;
|
|
24
|
-
HasCountOperation: boolean;
|
|
25
|
-
HasExpandOperation: boolean;
|
|
26
|
-
NonExpandableProperties: string[] | undefined;
|
|
27
|
-
HasSearchOperation: boolean;
|
|
28
|
-
HasSkipOperation: boolean;
|
|
29
|
-
HasSortOperation: boolean;
|
|
30
|
-
NonSortableProperties: string[] | undefined;
|
|
31
|
-
HasTopOperation: boolean;
|
|
32
|
-
Description: string | undefined;
|
|
33
11
|
}
|
|
34
|
-
export declare function
|
|
12
|
+
export declare function GetSingletons(program: Program, navigationSources: Interface[]): Singleton[];
|
|
13
|
+
export declare function GetEntitySets(program: Program, navigationSources: Interface[]): EntitySet[];
|
|
35
14
|
//# sourceMappingURL=entity-container.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-container.d.ts","sourceRoot":"","sources":["../../../src/entities/entity-container.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"entity-container.d.ts","sourceRoot":"","sources":["../../../src/entities/entity-container.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,SAAS,EAEV,MAAM,oBAAoB,CAAC;AAS5B,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;CAC7D;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAO3F;AAkBD,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAO3F"}
|