@microsoft/typespec-msgraph 0.0.1-Preview.1
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/LICENSE +21 -0
- package/README.md +7 -0
- package/dist/src/components/acceptable-media-types-annotation.d.ts +6 -0
- package/dist/src/components/acceptable-media-types-annotation.d.ts.map +1 -0
- package/dist/src/components/acceptable-media-types-annotation.js +15 -0
- package/dist/src/components/acceptable-media-types-annotation.js.map +1 -0
- package/dist/src/components/alternate-keys-annotation.d.ts +6 -0
- package/dist/src/components/alternate-keys-annotation.d.ts.map +1 -0
- package/dist/src/components/alternate-keys-annotation.js +30 -0
- package/dist/src/components/alternate-keys-annotation.js.map +1 -0
- package/dist/src/components/common-elements.d.ts +128 -0
- package/dist/src/components/common-elements.d.ts.map +1 -0
- package/dist/src/components/common-elements.js +38 -0
- package/dist/src/components/common-elements.js.map +1 -0
- package/dist/src/components/computed-annotation.d.ts +6 -0
- package/dist/src/components/computed-annotation.d.ts.map +1 -0
- package/dist/src/components/computed-annotation.js +12 -0
- package/dist/src/components/computed-annotation.js.map +1 -0
- package/dist/src/components/count-restrictions-annotation.d.ts +6 -0
- package/dist/src/components/count-restrictions-annotation.d.ts.map +1 -0
- package/dist/src/components/count-restrictions-annotation.js +15 -0
- package/dist/src/components/count-restrictions-annotation.js.map +1 -0
- package/dist/src/components/description-annotation.d.ts +6 -0
- package/dist/src/components/description-annotation.d.ts.map +1 -0
- package/dist/src/components/description-annotation.js +13 -0
- package/dist/src/components/description-annotation.js.map +1 -0
- package/dist/src/components/expand-restrictions-annotation.d.ts +7 -0
- package/dist/src/components/expand-restrictions-annotation.d.ts.map +1 -0
- package/dist/src/components/expand-restrictions-annotation.js +31 -0
- package/dist/src/components/expand-restrictions-annotation.js.map +1 -0
- package/dist/src/components/index.d.ts +15 -0
- package/dist/src/components/index.d.ts.map +1 -0
- package/dist/src/components/index.js +15 -0
- package/dist/src/components/index.js.map +1 -0
- package/dist/src/components/permissions-annotation.d.ts +6 -0
- package/dist/src/components/permissions-annotation.d.ts.map +1 -0
- package/dist/src/components/permissions-annotation.js +20 -0
- package/dist/src/components/permissions-annotation.js.map +1 -0
- package/dist/src/components/program-context.d.ts +4 -0
- package/dist/src/components/program-context.d.ts.map +1 -0
- package/dist/src/components/program-context.js +3 -0
- package/dist/src/components/program-context.js.map +1 -0
- package/dist/src/components/property-element.d.ts +6 -0
- package/dist/src/components/property-element.d.ts.map +1 -0
- package/dist/src/components/property-element.js +41 -0
- package/dist/src/components/property-element.js.map +1 -0
- package/dist/src/components/revisions-annotation.d.ts +7 -0
- package/dist/src/components/revisions-annotation.d.ts.map +1 -0
- package/dist/src/components/revisions-annotation.js +60 -0
- package/dist/src/components/revisions-annotation.js.map +1 -0
- package/dist/src/components/search-restrictions-annotation.d.ts +6 -0
- package/dist/src/components/search-restrictions-annotation.d.ts.map +1 -0
- package/dist/src/components/search-restrictions-annotation.js +15 -0
- package/dist/src/components/search-restrictions-annotation.js.map +1 -0
- package/dist/src/components/skip-supported-annotation.d.ts +6 -0
- package/dist/src/components/skip-supported-annotation.d.ts.map +1 -0
- package/dist/src/components/skip-supported-annotation.js +13 -0
- package/dist/src/components/skip-supported-annotation.js.map +1 -0
- package/dist/src/components/sort-restrictions-annotation.d.ts +7 -0
- package/dist/src/components/sort-restrictions-annotation.d.ts.map +1 -0
- package/dist/src/components/sort-restrictions-annotation.js +31 -0
- package/dist/src/components/sort-restrictions-annotation.js.map +1 -0
- package/dist/src/components/structured-type-element.d.ts +6 -0
- package/dist/src/components/structured-type-element.d.ts.map +1 -0
- package/dist/src/components/structured-type-element.js +77 -0
- package/dist/src/components/structured-type-element.js.map +1 -0
- package/dist/src/components/top-supported-annotation.d.ts +6 -0
- package/dist/src/components/top-supported-annotation.d.ts.map +1 -0
- package/dist/src/components/top-supported-annotation.js +13 -0
- package/dist/src/components/top-supported-annotation.js.map +1 -0
- package/dist/src/csdl.d.ts +8 -0
- package/dist/src/csdl.d.ts.map +1 -0
- package/dist/src/csdl.js +298 -0
- package/dist/src/csdl.js.map +1 -0
- package/dist/src/decorators/abstract.d.ts +9 -0
- package/dist/src/decorators/abstract.d.ts.map +1 -0
- package/dist/src/decorators/abstract.js +19 -0
- package/dist/src/decorators/abstract.js.map +1 -0
- package/dist/src/decorators/alternate-key.d.ts +9 -0
- package/dist/src/decorators/alternate-key.d.ts.map +1 -0
- package/dist/src/decorators/alternate-key.js +13 -0
- package/dist/src/decorators/alternate-key.js.map +1 -0
- package/dist/src/decorators/attribute-builder.d.ts +2 -0
- package/dist/src/decorators/attribute-builder.d.ts.map +1 -0
- package/dist/src/decorators/attribute-builder.js +166 -0
- package/dist/src/decorators/attribute-builder.js.map +1 -0
- package/dist/src/decorators/attributes.d.ts +57 -0
- package/dist/src/decorators/attributes.d.ts.map +1 -0
- package/dist/src/decorators/attributes.js +50 -0
- package/dist/src/decorators/attributes.js.map +1 -0
- package/dist/src/decorators/complex.d.ts +9 -0
- package/dist/src/decorators/complex.d.ts.map +1 -0
- package/dist/src/decorators/complex.js +19 -0
- package/dist/src/decorators/complex.js.map +1 -0
- package/dist/src/decorators/computed.d.ts +9 -0
- package/dist/src/decorators/computed.d.ts.map +1 -0
- package/dist/src/decorators/computed.js +13 -0
- package/dist/src/decorators/computed.js.map +1 -0
- package/dist/src/decorators/contains.d.ts +9 -0
- package/dist/src/decorators/contains.d.ts.map +1 -0
- package/dist/src/decorators/contains.js +13 -0
- package/dist/src/decorators/contains.js.map +1 -0
- package/dist/src/decorators/count.d.ts +9 -0
- package/dist/src/decorators/count.d.ts.map +1 -0
- package/dist/src/decorators/count.js +13 -0
- package/dist/src/decorators/count.js.map +1 -0
- package/dist/src/decorators/deprecated-definition.d.ts +21 -0
- package/dist/src/decorators/deprecated-definition.d.ts.map +1 -0
- package/dist/src/decorators/deprecated-definition.js +18 -0
- package/dist/src/decorators/deprecated-definition.js.map +1 -0
- package/dist/src/decorators/entity.d.ts +10 -0
- package/dist/src/decorators/entity.d.ts.map +1 -0
- package/dist/src/decorators/entity.js +23 -0
- package/dist/src/decorators/entity.js.map +1 -0
- package/dist/src/decorators/expand.d.ts +11 -0
- package/dist/src/decorators/expand.d.ts.map +1 -0
- package/dist/src/decorators/expand.js +17 -0
- package/dist/src/decorators/expand.js.map +1 -0
- package/dist/src/decorators/handlers/custom/additional-query-parameters.d.ts +14 -0
- package/dist/src/decorators/handlers/custom/additional-query-parameters.d.ts.map +1 -0
- package/dist/src/decorators/handlers/custom/additional-query-parameters.js +36 -0
- package/dist/src/decorators/handlers/custom/additional-query-parameters.js.map +1 -0
- package/dist/src/decorators/handlers/custom/ags-attribute.d.ts +7 -0
- package/dist/src/decorators/handlers/custom/ags-attribute.d.ts.map +1 -0
- package/dist/src/decorators/handlers/custom/ags-attribute.js +36 -0
- package/dist/src/decorators/handlers/custom/ags-attribute.js.map +1 -0
- package/dist/src/decorators/handlers/custom/index.d.ts +3 -0
- package/dist/src/decorators/handlers/custom/index.d.ts.map +1 -0
- package/dist/src/decorators/handlers/custom/index.js +3 -0
- package/dist/src/decorators/handlers/custom/index.js.map +1 -0
- package/dist/src/decorators/handlers/index.d.ts +30 -0
- package/dist/src/decorators/handlers/index.d.ts.map +1 -0
- package/dist/src/decorators/handlers/index.js +121 -0
- package/dist/src/decorators/handlers/index.js.map +1 -0
- package/dist/src/decorators/has-stream.d.ts +11 -0
- package/dist/src/decorators/has-stream.d.ts.map +1 -0
- package/dist/src/decorators/has-stream.js +30 -0
- package/dist/src/decorators/has-stream.js.map +1 -0
- package/dist/src/decorators/index.d.ts +21 -0
- package/dist/src/decorators/index.d.ts.map +1 -0
- package/dist/src/decorators/index.js +21 -0
- package/dist/src/decorators/index.js.map +1 -0
- package/dist/src/decorators/open.d.ts +9 -0
- package/dist/src/decorators/open.d.ts.map +1 -0
- package/dist/src/decorators/open.js +19 -0
- package/dist/src/decorators/open.js.map +1 -0
- package/dist/src/decorators/order-by.d.ts +11 -0
- package/dist/src/decorators/order-by.d.ts.map +1 -0
- package/dist/src/decorators/order-by.js +17 -0
- package/dist/src/decorators/order-by.js.map +1 -0
- package/dist/src/decorators/private-preview-definition.d.ts +19 -0
- package/dist/src/decorators/private-preview-definition.d.ts.map +1 -0
- package/dist/src/decorators/private-preview-definition.js +15 -0
- package/dist/src/decorators/private-preview-definition.js.map +1 -0
- package/dist/src/decorators/private-preview.d.ts +9 -0
- package/dist/src/decorators/private-preview.d.ts.map +1 -0
- package/dist/src/decorators/private-preview.js +25 -0
- package/dist/src/decorators/private-preview.js.map +1 -0
- package/dist/src/decorators/read-only.d.ts +9 -0
- package/dist/src/decorators/read-only.d.ts.map +1 -0
- package/dist/src/decorators/read-only.js +13 -0
- package/dist/src/decorators/read-only.js.map +1 -0
- package/dist/src/decorators/references.d.ts +9 -0
- package/dist/src/decorators/references.d.ts.map +1 -0
- package/dist/src/decorators/references.js +13 -0
- package/dist/src/decorators/references.js.map +1 -0
- package/dist/src/decorators/routed-interfaces.d.ts +19 -0
- package/dist/src/decorators/routed-interfaces.d.ts.map +1 -0
- package/dist/src/decorators/routed-interfaces.js +43 -0
- package/dist/src/decorators/routed-interfaces.js.map +1 -0
- package/dist/src/decorators/search.d.ts +8 -0
- package/dist/src/decorators/search.d.ts.map +1 -0
- package/dist/src/decorators/search.js +12 -0
- package/dist/src/decorators/search.js.map +1 -0
- package/dist/src/decorators/skip.d.ts +8 -0
- package/dist/src/decorators/skip.d.ts.map +1 -0
- package/dist/src/decorators/skip.js +12 -0
- package/dist/src/decorators/skip.js.map +1 -0
- package/dist/src/decorators/top.d.ts +8 -0
- package/dist/src/decorators/top.d.ts.map +1 -0
- package/dist/src/decorators/top.js +12 -0
- package/dist/src/decorators/top.js.map +1 -0
- package/dist/src/decorators/write-only.d.ts +9 -0
- package/dist/src/decorators/write-only.d.ts.map +1 -0
- package/dist/src/decorators/write-only.js +13 -0
- package/dist/src/decorators/write-only.js.map +1 -0
- package/dist/src/dom/reconciler.d.ts +10 -0
- package/dist/src/dom/reconciler.d.ts.map +1 -0
- package/dist/src/dom/reconciler.js +95 -0
- package/dist/src/dom/reconciler.js.map +1 -0
- package/dist/src/dom/renderer.d.ts +6 -0
- package/dist/src/dom/renderer.d.ts.map +1 -0
- package/dist/src/dom/renderer.js +33 -0
- package/dist/src/dom/renderer.js.map +1 -0
- package/dist/src/dom/types.d.ts +33 -0
- package/dist/src/dom/types.d.ts.map +1 -0
- package/dist/src/dom/types.js +2 -0
- package/dist/src/dom/types.js.map +1 -0
- package/dist/src/emitter.d.ts +4 -0
- package/dist/src/emitter.d.ts.map +1 -0
- package/dist/src/emitter.js +11 -0
- package/dist/src/emitter.js.map +1 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +7 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lib.d.ts +138 -0
- package/dist/src/lib.d.ts.map +1 -0
- package/dist/src/lib.js +55 -0
- package/dist/src/lib.js.map +1 -0
- package/dist/src/linter.d.ts +3 -0
- package/dist/src/linter.d.ts.map +1 -0
- package/dist/src/linter.js +35 -0
- package/dist/src/linter.js.map +1 -0
- package/dist/src/rules/abstract.d.ts +5 -0
- package/dist/src/rules/abstract.d.ts.map +1 -0
- package/dist/src/rules/abstract.js +31 -0
- package/dist/src/rules/abstract.js.map +1 -0
- package/dist/src/rules/alternate-key.d.ts +4 -0
- package/dist/src/rules/alternate-key.d.ts.map +1 -0
- package/dist/src/rules/alternate-key.js +81 -0
- package/dist/src/rules/alternate-key.js.map +1 -0
- package/dist/src/rules/computed.d.ts +7 -0
- package/dist/src/rules/computed.d.ts.map +1 -0
- package/dist/src/rules/computed.js +47 -0
- package/dist/src/rules/computed.js.map +1 -0
- package/dist/src/rules/contains.d.ts +5 -0
- package/dist/src/rules/contains.d.ts.map +1 -0
- package/dist/src/rules/contains.js +32 -0
- package/dist/src/rules/contains.js.map +1 -0
- package/dist/src/rules/count.d.ts +5 -0
- package/dist/src/rules/count.d.ts.map +1 -0
- package/dist/src/rules/count.js +35 -0
- package/dist/src/rules/count.js.map +1 -0
- package/dist/src/rules/entity.d.ts +2 -0
- package/dist/src/rules/entity.d.ts.map +1 -0
- package/dist/src/rules/entity.js +31 -0
- package/dist/src/rules/entity.js.map +1 -0
- package/dist/src/rules/expand.d.ts +3 -0
- package/dist/src/rules/expand.d.ts.map +1 -0
- package/dist/src/rules/expand.js +69 -0
- package/dist/src/rules/expand.js.map +1 -0
- package/dist/src/rules/has-stream.d.ts +2 -0
- package/dist/src/rules/has-stream.d.ts.map +1 -0
- package/dist/src/rules/has-stream.js +29 -0
- package/dist/src/rules/has-stream.js.map +1 -0
- package/dist/src/rules/index.d.ts +21 -0
- package/dist/src/rules/index.d.ts.map +1 -0
- package/dist/src/rules/index.js +176 -0
- package/dist/src/rules/index.js.map +1 -0
- package/dist/src/rules/open.d.ts +5 -0
- package/dist/src/rules/open.d.ts.map +1 -0
- package/dist/src/rules/open.js +31 -0
- package/dist/src/rules/open.js.map +1 -0
- package/dist/src/rules/order-by.d.ts +3 -0
- package/dist/src/rules/order-by.d.ts.map +1 -0
- package/dist/src/rules/order-by.js +69 -0
- package/dist/src/rules/order-by.js.map +1 -0
- package/dist/src/rules/references.d.ts +5 -0
- package/dist/src/rules/references.d.ts.map +1 -0
- package/dist/src/rules/references.js +32 -0
- package/dist/src/rules/references.js.map +1 -0
- package/dist/src/rules/search.d.ts +5 -0
- package/dist/src/rules/search.d.ts.map +1 -0
- package/dist/src/rules/search.js +35 -0
- package/dist/src/rules/search.js.map +1 -0
- package/dist/src/rules/skip.d.ts +5 -0
- package/dist/src/rules/skip.d.ts.map +1 -0
- package/dist/src/rules/skip.js +35 -0
- package/dist/src/rules/skip.js.map +1 -0
- package/dist/src/rules/top.d.ts +5 -0
- package/dist/src/rules/top.d.ts.map +1 -0
- package/dist/src/rules/top.js +35 -0
- package/dist/src/rules/top.js.map +1 -0
- package/dist/src/testing/index.d.ts +3 -0
- package/dist/src/testing/index.d.ts.map +1 -0
- package/dist/src/testing/index.js +24 -0
- package/dist/src/testing/index.js.map +1 -0
- package/dist/src/utils.d.ts +27 -0
- package/dist/src/utils.d.ts.map +1 -0
- package/dist/src/utils.js +186 -0
- package/dist/src/utils.js.map +1 -0
- package/lib/decorators.tsp +164 -0
- package/lib/lib.tsp +35 -0
- package/lib/msgraph.tsp +2 -0
- package/package.json +68 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"csdl.js","sourceRoot":"","sources":["../../src/csdl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,UAAU,GAOX,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,EAAqB,UAAU,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE3E,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,2BAA2B,EAC3B,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,4BAA4B,EAC5B,eAAe,EACf,QAAQ,EACR,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,4BAA4B,EAC5B,gBAAgB,EAChB,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB,SAAS,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CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DecoratorContext, Model, Program } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* `@abstract` - mark a model type as abstract
|
|
4
|
+
*
|
|
5
|
+
* `@abstract` can only be applied to models.
|
|
6
|
+
*/
|
|
7
|
+
export declare function $abstract(context: DecoratorContext, entity: Model): void;
|
|
8
|
+
export declare function isAbstract(program: Program, property: Model): boolean;
|
|
9
|
+
//# sourceMappingURL=abstract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract.d.ts","sourceRoot":"","sources":["../../../src/decorators/abstract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAA2B,MAAM,oBAAoB,CAAC;AAG/F;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,QAOjE;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,WAE3D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// -- @open decorator
|
|
2
|
+
import { validateDecoratorTarget } from "@typespec/compiler";
|
|
3
|
+
const abstractKey = Symbol("abstract");
|
|
4
|
+
/**
|
|
5
|
+
* `@abstract` - mark a model type as abstract
|
|
6
|
+
*
|
|
7
|
+
* `@abstract` can only be applied to models.
|
|
8
|
+
*/
|
|
9
|
+
export function $abstract(context, entity) {
|
|
10
|
+
// TODO: Remove this and move to extern dec once Model type is defined in TypeSpec.Reflection https://github.com/microsoft/typespec/issues/1655
|
|
11
|
+
if (!validateDecoratorTarget(context, entity, "@abstract", "Model")) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
context.program.stateSet(abstractKey).add(entity);
|
|
15
|
+
}
|
|
16
|
+
export function isAbstract(program, property) {
|
|
17
|
+
return program.stateSet(abstractKey).has(property);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=abstract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract.js","sourceRoot":"","sources":["../../../src/decorators/abstract.ts"],"names":[],"mappings":"AAAA,qBAAqB;AAErB,OAAO,EAAoC,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE/F,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AACvC;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,OAAyB,EAAE,MAAa;IAChE,+IAA+I;IAC/I,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE;QACnE,OAAO;KACR;IAED,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,OAAgB,EAAE,QAAe;IAC1D,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DecoratorContext, ModelProperty, Program } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* `@alternateKey` - mark a model property as an alternateKey
|
|
4
|
+
*
|
|
5
|
+
* `@alternateKey` can only be applied to Model properties.
|
|
6
|
+
*/
|
|
7
|
+
export declare function $alternateKey(context: DecoratorContext, target: ModelProperty): void;
|
|
8
|
+
export declare function isAlternateKey(program: Program, target: ModelProperty): boolean;
|
|
9
|
+
//# sourceMappingURL=alternate-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alternate-key.d.ts","sourceRoot":"","sources":["../../../src/decorators/alternate-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAI9E;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CAEpF;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,WAErE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const alternateKey = Symbol("alternateKey");
|
|
2
|
+
/**
|
|
3
|
+
* `@alternateKey` - mark a model property as an alternateKey
|
|
4
|
+
*
|
|
5
|
+
* `@alternateKey` can only be applied to Model properties.
|
|
6
|
+
*/
|
|
7
|
+
export function $alternateKey(context, target) {
|
|
8
|
+
context.program.stateSet(alternateKey).add(target);
|
|
9
|
+
}
|
|
10
|
+
export function isAlternateKey(program, target) {
|
|
11
|
+
return program.stateSet(alternateKey).has(target);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=alternate-key.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alternate-key.js","sourceRoot":"","sources":["../../../src/decorators/alternate-key.ts"],"names":[],"mappings":"AAEA,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAE5C;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAyB,EAAE,MAAqB;IAC5E,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,OAAgB,EAAE,MAAqB;IACpE,OAAO,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attribute-builder.d.ts","sourceRoot":"","sources":["../../../src/decorators/attribute-builder.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { writeFileSync } from "fs";
|
|
2
|
+
import path, { join } from "path";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
import { attributes } from "./attributes.js";
|
|
5
|
+
const mapTargetToType = (target) => {
|
|
6
|
+
switch (target) {
|
|
7
|
+
case "Model":
|
|
8
|
+
return "Model";
|
|
9
|
+
case "ModelProperty":
|
|
10
|
+
return "ModelProperty";
|
|
11
|
+
case "Enum":
|
|
12
|
+
return "Enum";
|
|
13
|
+
case "EnumMember":
|
|
14
|
+
return "EnumMember";
|
|
15
|
+
case "Operation":
|
|
16
|
+
return "Operation";
|
|
17
|
+
case "Namespace":
|
|
18
|
+
return "Namespace";
|
|
19
|
+
default:
|
|
20
|
+
throw new Error("Should not reach here");
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const writeDecoratorsFile = () => {
|
|
24
|
+
let data = writeHeader();
|
|
25
|
+
data += writeImports();
|
|
26
|
+
attributes.forEach((attribute) => {
|
|
27
|
+
data += writeDecorator(attribute);
|
|
28
|
+
});
|
|
29
|
+
data += writeDecoratorMappings();
|
|
30
|
+
data += writeBuildAttributesFunc();
|
|
31
|
+
const __fileName = fileURLToPath(import.meta.url);
|
|
32
|
+
const __dirname = path.dirname(__fileName);
|
|
33
|
+
writeFileSync(join(__dirname, "handlers", "index.ts"), data, { flag: "w" });
|
|
34
|
+
// eslint-disable-next-line no-console
|
|
35
|
+
console.log("🚀 Success! 🚀");
|
|
36
|
+
};
|
|
37
|
+
const writeHeader = () => {
|
|
38
|
+
return `
|
|
39
|
+
/**
|
|
40
|
+
* NOTICE: This is an autogenerated file and should not be edited directly.
|
|
41
|
+
*/
|
|
42
|
+
`;
|
|
43
|
+
};
|
|
44
|
+
const writeImports = () => {
|
|
45
|
+
return `
|
|
46
|
+
import {
|
|
47
|
+
createDecoratorDefinition,
|
|
48
|
+
DecoratorContext,
|
|
49
|
+
EnumMember,
|
|
50
|
+
Enum,
|
|
51
|
+
Interface,
|
|
52
|
+
Model,
|
|
53
|
+
ModelProperty,
|
|
54
|
+
Namespace,
|
|
55
|
+
Operation,
|
|
56
|
+
Program,
|
|
57
|
+
Type,
|
|
58
|
+
} from "@typespec/compiler";
|
|
59
|
+
import * as customAttribs from "./custom/index.js";
|
|
60
|
+
`;
|
|
61
|
+
};
|
|
62
|
+
let decoratorToMethodMap = [];
|
|
63
|
+
const writeDecoratorMappings = () => {
|
|
64
|
+
const customAttribs = attributes
|
|
65
|
+
.filter((attr) => !!attr.emitter)
|
|
66
|
+
.map((attr) => `${[attr.decorator]}: customAttribs.${attr.emitter}`);
|
|
67
|
+
decoratorToMethodMap = [...decoratorToMethodMap, ...customAttribs];
|
|
68
|
+
return `
|
|
69
|
+
const decoratorToMethodMapper: { [key: string]: (p: Program, t: Type) => boolean | string | { [key: string]: string } | undefined } = {
|
|
70
|
+
${decoratorToMethodMap.join(",\n ")}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const decoratorToAgsAttributeMapper: { [key: string]: string } = {
|
|
74
|
+
${attributes
|
|
75
|
+
.filter((attr) => !attr.emitter)
|
|
76
|
+
.map((attr) => `"${attr.decorator}": "ags:${attr.attribute.name}"`)
|
|
77
|
+
.join(",\n ")}
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
};
|
|
81
|
+
const addGetMethod = (decorator) => {
|
|
82
|
+
const decoratorName = `${decorator[0].toUpperCase()}${decorator.substring(1)}`;
|
|
83
|
+
decoratorToMethodMap.push(`${decorator}: get${decoratorName}`);
|
|
84
|
+
return `
|
|
85
|
+
export function get${decoratorName}(program: Program, target: Type): string | undefined {
|
|
86
|
+
return program.stateMap(${decorator}Key).get(target);
|
|
87
|
+
}
|
|
88
|
+
`;
|
|
89
|
+
};
|
|
90
|
+
const addBoolMethod = (decorator) => {
|
|
91
|
+
const decoratorName = `${decorator[0].toUpperCase()}${decorator.substring(1)}`;
|
|
92
|
+
decoratorToMethodMap.push(`${decorator}: is${decoratorName}`);
|
|
93
|
+
return `
|
|
94
|
+
export function is${decoratorName}(program: Program, target: Type): boolean {
|
|
95
|
+
return program.stateSet(${decorator}Key).has(target);
|
|
96
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
};
|
|
99
|
+
const writeDecorator = (attribute) => {
|
|
100
|
+
var _a, _b;
|
|
101
|
+
if (attribute.emitter) {
|
|
102
|
+
return "";
|
|
103
|
+
}
|
|
104
|
+
return `
|
|
105
|
+
// -- @${attribute.decorator} decorator
|
|
106
|
+
|
|
107
|
+
const ${attribute.decorator}Key = Symbol("${attribute.decorator}");
|
|
108
|
+
const ${attribute.decorator}Decorator = createDecoratorDefinition({
|
|
109
|
+
name: "@${attribute.decorator}",
|
|
110
|
+
target: [${attribute.target.map((item) => `"${item}"`).join(", ")}],
|
|
111
|
+
${attribute.args
|
|
112
|
+
? `args: [ ${attribute.args.map((_) => '{ kind: "String" }').join(", ")} ]`
|
|
113
|
+
: `args: []`}
|
|
114
|
+
} as const);
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* ${attribute.description ? `\`@${attribute.decorator}\` - ${attribute.description}` : ""}
|
|
118
|
+
* \`@${attribute.decorator}\` can be applied to ${attribute.target.join(", ")}.
|
|
119
|
+
*/
|
|
120
|
+
export function $${attribute.decorator}(
|
|
121
|
+
context: DecoratorContext,
|
|
122
|
+
target: ${attribute.target.map((item) => mapTargetToType(item)).join(" | ")},
|
|
123
|
+
${attribute.args ? `${(_a = attribute.args) === null || _a === void 0 ? void 0 : _a.map((item) => `${item}: string`).join(", ")}` : ""}
|
|
124
|
+
) {
|
|
125
|
+
if (!${attribute.decorator}Decorator.validate(context, target, [${((_b = attribute.args) === null || _b === void 0 ? void 0 : _b.join(", ")) || ""}])) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
${attribute.args
|
|
130
|
+
? `context.program.stateMap(${attribute.decorator}Key).set(target, ${attribute.args[0]});`
|
|
131
|
+
: `context.program.stateSet(${attribute.decorator}Key).add(target);`}
|
|
132
|
+
}
|
|
133
|
+
${attribute.args ? addGetMethod(attribute.decorator) : addBoolMethod(attribute.decorator)}
|
|
134
|
+
`;
|
|
135
|
+
};
|
|
136
|
+
const writeBuildAttributesFunc = () => {
|
|
137
|
+
const decorators = attributes.map((attr) => `"${attr.decorator}"`).join(", ");
|
|
138
|
+
// generate a dict of customDecorators which will be used to unpack attribute values
|
|
139
|
+
return `
|
|
140
|
+
export function buildAttributes(
|
|
141
|
+
program: Program,
|
|
142
|
+
type: Model | ModelProperty | Namespace | Interface | Operation | Enum | EnumMember
|
|
143
|
+
) {
|
|
144
|
+
const declaredDecorators: string[] = [${decorators}];
|
|
145
|
+
let attrs = {};
|
|
146
|
+
type.decorators
|
|
147
|
+
// only handle declared decorators
|
|
148
|
+
.filter((d) => declaredDecorators.some((s) => s === d.decorator.name.substring(1)))
|
|
149
|
+
.forEach((d) => {
|
|
150
|
+
const attrName = d.decorator.name.substring(1); // name prefixed with $
|
|
151
|
+
let key = attrName as keyof typeof decoratorToMethodMapper;
|
|
152
|
+
const agsAttrParams = decoratorToMethodMapper[key](program, type);
|
|
153
|
+
if (typeof agsAttrParams === "object") {
|
|
154
|
+
attrs = { ...attrs, ...agsAttrParams };
|
|
155
|
+
} else {
|
|
156
|
+
key = attrName as keyof typeof decoratorToAgsAttributeMapper;
|
|
157
|
+
const agsAttr = decoratorToAgsAttributeMapper[key];
|
|
158
|
+
attrs = { ...attrs, ...{ [agsAttr]: agsAttrParams } };
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
return attrs;
|
|
162
|
+
}
|
|
163
|
+
`;
|
|
164
|
+
};
|
|
165
|
+
writeDecoratorsFile();
|
|
166
|
+
//# sourceMappingURL=attribute-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attribute-builder.js","sourceRoot":"","sources":["../../../src/decorators/attribute-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACnC,OAAO,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,M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CAAC,CAAC,CAAC,GAAG,MAAA,SAAS,CAAC,IAAI,0CAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,IAAI,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;;SAEjF,SAAS,CAAC,SAAS,wCACxB,CAAA,MAAA,SAAS,CAAC,IAAI,0CAAE,IAAI,CAAC,IAAI,CAAC,KAAI,EAChC;;;;IAKE,SAAS,CAAC,IAAI;QACZ,CAAC,CAAC,4BAA4B,SAAS,CAAC,SAAS,oBAAoB,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;QAC1F,CAAC,CAAC,4BAA4B,SAAS,CAAC,SAAS,mBACrD;;EAEA,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC,SAAS,CAAC;CACxF,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAG,GAAG,EAAE;IACpC,MAAM,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE9E,oFAAoF;IAEpF,OAAO;;;;;0CAKiC,UAAU;;;;;;;;;;;;;;;;;;;GAmBjD,CAAC;AACJ,CAAC,CAAC;AAEF,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the structure of an attribute
|
|
3
|
+
*/
|
|
4
|
+
export interface AttributeType {
|
|
5
|
+
decorator: string;
|
|
6
|
+
target: string[];
|
|
7
|
+
attribute: any;
|
|
8
|
+
description?: string;
|
|
9
|
+
args?: string[];
|
|
10
|
+
emitter?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* NOTE: If you need custom handlers you declare them here and
|
|
15
|
+
* create a separate file for it in ./decorators/handlers/custom
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* `@attributes` - declares supported ags:attributes
|
|
19
|
+
*/
|
|
20
|
+
export declare const attributes: ({
|
|
21
|
+
decorator: string;
|
|
22
|
+
description: string;
|
|
23
|
+
target: string[];
|
|
24
|
+
attribute: {
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
args?: undefined;
|
|
28
|
+
emitter?: undefined;
|
|
29
|
+
} | {
|
|
30
|
+
decorator: string;
|
|
31
|
+
target: string[];
|
|
32
|
+
attribute: {
|
|
33
|
+
name: string;
|
|
34
|
+
};
|
|
35
|
+
description?: undefined;
|
|
36
|
+
args?: undefined;
|
|
37
|
+
emitter?: undefined;
|
|
38
|
+
} | {
|
|
39
|
+
decorator: string;
|
|
40
|
+
args: string[];
|
|
41
|
+
target: string[];
|
|
42
|
+
attribute: {
|
|
43
|
+
name: string;
|
|
44
|
+
};
|
|
45
|
+
description?: undefined;
|
|
46
|
+
emitter?: undefined;
|
|
47
|
+
} | {
|
|
48
|
+
decorator: string;
|
|
49
|
+
args: string[];
|
|
50
|
+
target: string[];
|
|
51
|
+
emitter: string;
|
|
52
|
+
attribute: {
|
|
53
|
+
name: string;
|
|
54
|
+
};
|
|
55
|
+
description?: undefined;
|
|
56
|
+
})[];
|
|
57
|
+
//# sourceMappingURL=attributes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../src/decorators/attributes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,GAAG,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwCtB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* NOTE: If you need custom handlers you declare them here and
|
|
4
|
+
* create a separate file for it in ./decorators/handlers/custom
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* `@attributes` - declares supported ags:attributes
|
|
8
|
+
*/
|
|
9
|
+
export const attributes = [
|
|
10
|
+
{
|
|
11
|
+
decorator: "isOwner",
|
|
12
|
+
description: "specify the name of the workload associated with the model",
|
|
13
|
+
target: ["Model", "ModelProperty", "Enum", "EnumMember"],
|
|
14
|
+
attribute: { name: "IsOwner" },
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
decorator: "privileged",
|
|
18
|
+
target: ["Model", "ModelProperty", "Enum", "EnumMember", "Operation", "Namespace"],
|
|
19
|
+
attribute: { name: "IsHidden" },
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
decorator: "workloadName",
|
|
23
|
+
args: ["workloadName"],
|
|
24
|
+
target: ["Model", "ModelProperty", "Enum", "EnumMember"],
|
|
25
|
+
attribute: { name: "WorkloadName" },
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
decorator: "workloadNameMsa",
|
|
29
|
+
args: ["workloadNameMsa"],
|
|
30
|
+
target: ["Model", "ModelProperty", "Enum", "EnumMember"],
|
|
31
|
+
attribute: { name: "WorkloadNameMsa" },
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
decorator: "additionalQueryParameters",
|
|
35
|
+
args: ["name", "value"],
|
|
36
|
+
target: ["Namespace"],
|
|
37
|
+
emitter: "unpackAdditionalQueryParameters",
|
|
38
|
+
attribute: {
|
|
39
|
+
name: "AdditionalQueryParameters",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
decorator: "agsAttribute",
|
|
44
|
+
args: ["name", "value"],
|
|
45
|
+
target: ["Model", "ModelProperty", "Enum", "EnumMember", "Interface", "Operation"],
|
|
46
|
+
emitter: "unpackAgsAttributes",
|
|
47
|
+
attribute: { name: "AgsAttribute" },
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
//# sourceMappingURL=attributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attributes.js","sourceRoot":"","sources":["../../../src/decorators/attributes.ts"],"names":[],"mappings":"AAYA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB;QACE,SAAS,EAAE,SAAS;QACpB,WAAW,EAAE,4DAA4D;QACzE,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,YAAY,CAAC;QACxD,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC/B;IACD;QACE,SAAS,EAAE,YAAY;QACvB,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,CAAC;QAClF,SAAS,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;KAChC;IACD;QACE,SAAS,EAAE,cAAc;QACzB,IAAI,EAAE,CAAC,cAAc,CAAC;QACtB,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,YAAY,CAAC;QACxD,SAAS,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE;KACpC;IACD;QACE,SAAS,EAAE,iBAAiB;QAC5B,IAAI,EAAE,CAAC,iBAAiB,CAAC;QACzB,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,YAAY,CAAC;QACxD,SAAS,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE;KACvC;IACD;QACE,SAAS,EAAE,2BAA2B;QACtC,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;QACvB,MAAM,EAAE,CAAC,WAAW,CAAC;QACrB,OAAO,EAAE,iCAAiC;QAC1C,SAAS,EAAE;YACT,IAAI,EAAE,2BAA2B;SAClC;KACF;IACD;QACE,SAAS,EAAE,cAAc;QACzB,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;QACvB,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,CAAC;QAClF,OAAO,EAAE,qBAAqB;QAC9B,SAAS,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE;KACpC;CACF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DecoratorContext, Model, Program } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* `@complex` - mark a model as a complex type
|
|
4
|
+
*
|
|
5
|
+
* `@complex` can only be applied to models.
|
|
6
|
+
*/
|
|
7
|
+
export declare function $complex(context: DecoratorContext, complex: Model): void;
|
|
8
|
+
export declare function isComplex(program: Program, complex: Model): boolean;
|
|
9
|
+
//# sourceMappingURL=complex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complex.d.ts","sourceRoot":"","sources":["../../../src/decorators/complex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAA2B,MAAM,oBAAoB,CAAC;AAI/F;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,KAAK,QAQjE;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,WAEzD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { validateDecoratorTarget } from "@typespec/compiler";
|
|
2
|
+
const complexKey = Symbol("complex");
|
|
3
|
+
/**
|
|
4
|
+
* `@complex` - mark a model as a complex type
|
|
5
|
+
*
|
|
6
|
+
* `@complex` can only be applied to models.
|
|
7
|
+
*/
|
|
8
|
+
export function $complex(context, complex) {
|
|
9
|
+
// TODO: Remove this and move to extern dec once Model type is defined in TypeSpec.Reflection https://github.com/microsoft/typespec/issues/1655
|
|
10
|
+
if (!validateDecoratorTarget(context, complex, "@complex", "Model")) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
// Register the complex property
|
|
14
|
+
context.program.stateSet(complexKey).add(complex);
|
|
15
|
+
}
|
|
16
|
+
export function isComplex(program, complex) {
|
|
17
|
+
return program.stateSet(complexKey).has(complex);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=complex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complex.js","sourceRoot":"","sources":["../../../src/decorators/complex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE/F,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAErC;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAyB,EAAE,OAAc;IAChE,+IAA+I;IAC/I,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE;QACnE,OAAO;KACR;IAED,gCAAgC;IAChC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAgB,EAAE,OAAc;IACxD,OAAO,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DecoratorContext, ModelProperty, Program } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* `@computed` - mark a model property as a computed property
|
|
4
|
+
*
|
|
5
|
+
* `@computed` can only be applied to model properties.
|
|
6
|
+
*/
|
|
7
|
+
export declare function $computed(context: DecoratorContext, property: ModelProperty): void;
|
|
8
|
+
export declare function isComputed(program: Program, property: ModelProperty): boolean;
|
|
9
|
+
//# sourceMappingURL=computed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computed.d.ts","sourceRoot":"","sources":["../../../src/decorators/computed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAG9E;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,aAAa,QAE3E;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,WAEnE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const computedKey = Symbol("computed");
|
|
2
|
+
/**
|
|
3
|
+
* `@computed` - mark a model property as a computed property
|
|
4
|
+
*
|
|
5
|
+
* `@computed` can only be applied to model properties.
|
|
6
|
+
*/
|
|
7
|
+
export function $computed(context, property) {
|
|
8
|
+
context.program.stateSet(computedKey).add(property);
|
|
9
|
+
}
|
|
10
|
+
export function isComputed(program, property) {
|
|
11
|
+
return program.stateSet(computedKey).has(property);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=computed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computed.js","sourceRoot":"","sources":["../../../src/decorators/computed.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AACvC;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,OAAyB,EAAE,QAAuB;IAC1E,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,OAAgB,EAAE,QAAuB;IAClE,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DecoratorContext, ModelProperty, Program } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* `@contains` - mark a model property as a contained navigation property
|
|
4
|
+
*
|
|
5
|
+
* `@contains` can only be applied to navigation model properties.
|
|
6
|
+
*/
|
|
7
|
+
export declare function $contains(context: DecoratorContext, entity: ModelProperty): void;
|
|
8
|
+
export declare function isContains(program: Program, property: ModelProperty): boolean;
|
|
9
|
+
//# sourceMappingURL=contains.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contains.d.ts","sourceRoot":"","sources":["../../../src/decorators/contains.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAI9E;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,aAAa,QAEzE;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,WAEnE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const containsKey = Symbol("contains");
|
|
2
|
+
/**
|
|
3
|
+
* `@contains` - mark a model property as a contained navigation property
|
|
4
|
+
*
|
|
5
|
+
* `@contains` can only be applied to navigation model properties.
|
|
6
|
+
*/
|
|
7
|
+
export function $contains(context, entity) {
|
|
8
|
+
context.program.stateSet(containsKey).add(entity);
|
|
9
|
+
}
|
|
10
|
+
export function isContains(program, property) {
|
|
11
|
+
return program.stateSet(containsKey).has(property);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=contains.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contains.js","sourceRoot":"","sources":["../../../src/decorators/contains.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAEvC;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,OAAyB,EAAE,MAAqB;IACxE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,OAAgB,EAAE,QAAuB;IAClE,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DecoratorContext, Operation, Program } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* `@count` - Applies to: get operations that return collections.
|
|
4
|
+
* Indicates that the get operation supports both the OData $count query parameter and the $count trailing segment added to the collection route.
|
|
5
|
+
* These are indivisible for the sake of customer simplicity.
|
|
6
|
+
*/
|
|
7
|
+
export declare function $count(context: DecoratorContext, target: Operation): void;
|
|
8
|
+
export declare function isCount(program: Program, target: Operation): boolean;
|
|
9
|
+
//# sourceMappingURL=count.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"count.d.ts","sourceRoot":"","sources":["../../../src/decorators/count.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAI1E;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,QAElE;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,WAE1D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const countKey = Symbol("count");
|
|
2
|
+
/**
|
|
3
|
+
* `@count` - Applies to: get operations that return collections.
|
|
4
|
+
* Indicates that the get operation supports both the OData $count query parameter and the $count trailing segment added to the collection route.
|
|
5
|
+
* These are indivisible for the sake of customer simplicity.
|
|
6
|
+
*/
|
|
7
|
+
export function $count(context, target) {
|
|
8
|
+
context.program.stateSet(countKey).add(target);
|
|
9
|
+
}
|
|
10
|
+
export function isCount(program, target) {
|
|
11
|
+
return program.stateSet(countKey).has(target);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=count.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"count.js","sourceRoot":"","sources":["../../../src/decorators/count.ts"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;AAEjC;;;;GAIG;AACH,MAAM,UAAU,MAAM,CAAC,OAAyB,EAAE,MAAiB;IACjE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,OAAgB,EAAE,MAAiB;IACzD,OAAO,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DecoratorContext, Namespace, Program } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* `@deprecatedDefinition` - create a reusable deprecation definition.
|
|
4
|
+
*
|
|
5
|
+
* `@deprecatedDefinition` can only be applied to namespaces.
|
|
6
|
+
*/
|
|
7
|
+
export interface DeprecatedDefinitionParameters {
|
|
8
|
+
name: string;
|
|
9
|
+
category: string;
|
|
10
|
+
announcementDate: string;
|
|
11
|
+
removalDate: string;
|
|
12
|
+
description: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* `@deprecatedDefinition` - Allow us create a reusable deprecation definition.
|
|
16
|
+
* `@deprecatedDefinition` - Applies only to namespaces.
|
|
17
|
+
*/
|
|
18
|
+
export declare function $deprecatedDefinition(context: DecoratorContext, target: Namespace, name: string, category: string, announcementDate: string, removalDate: string, description: string): void;
|
|
19
|
+
export declare function hasDeprecatedDefinitions(program: Program, target: Namespace): boolean;
|
|
20
|
+
export declare function getDeprecatedDefinitions(program: Program, target: Namespace): Map<string, DeprecatedDefinitionParameters>;
|
|
21
|
+
//# sourceMappingURL=deprecated-definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecated-definition.d.ts","sourceRoot":"","sources":["../../../src/decorators/deprecated-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE1E;;;;GAIG;AACH,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAID;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,MAAM,EACxB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,QAMpB;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAErF;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,GAChB,GAAG,CAAC,MAAM,EAAE,8BAA8B,CAAC,CAK7C"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const deprecatedDefinitionKey = Symbol("deprecatedDefinition");
|
|
2
|
+
/**
|
|
3
|
+
* `@deprecatedDefinition` - Allow us create a reusable deprecation definition.
|
|
4
|
+
* `@deprecatedDefinition` - Applies only to namespaces.
|
|
5
|
+
*/
|
|
6
|
+
export function $deprecatedDefinition(context, target, name, category, announcementDate, removalDate, description) {
|
|
7
|
+
const definitions = getDeprecatedDefinitions(context.program, target);
|
|
8
|
+
definitions.set(name, { name, category, announcementDate, removalDate, description });
|
|
9
|
+
context.program.stateMap(deprecatedDefinitionKey).set(target, definitions);
|
|
10
|
+
}
|
|
11
|
+
export function hasDeprecatedDefinitions(program, target) {
|
|
12
|
+
return program.stateMap(deprecatedDefinitionKey).has(target);
|
|
13
|
+
}
|
|
14
|
+
export function getDeprecatedDefinitions(program, target) {
|
|
15
|
+
return (program.stateMap(deprecatedDefinitionKey).get(target) ||
|
|
16
|
+
new Map());
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=deprecated-definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecated-definition.js","sourceRoot":"","sources":["../../../src/decorators/deprecated-definition.ts"],"names":[],"mappings":"AAeA,MAAM,uBAAuB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAyB,EACzB,MAAiB,EACjB,IAAY,EACZ,QAAgB,EAChB,gBAAwB,EACxB,WAAmB,EACnB,WAAmB;IAEnB,MAAM,WAAW,GAAG,wBAAwB,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACtE,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,CAAC;IAEtF,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAC7E,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,OAAgB,EAAE,MAAiB;IAC1E,OAAO,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAAgB,EAChB,MAAiB;IAEjB,OAAO,CACL,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;QACrD,IAAI,GAAG,EAA0C,CAClD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DecoratorContext, Model, Program } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* `@entity` - mark a model as an entity type
|
|
4
|
+
*
|
|
5
|
+
* `@entity` can only be applied to models.
|
|
6
|
+
*/
|
|
7
|
+
export declare function $entity(context: DecoratorContext, entity: Model): void;
|
|
8
|
+
export declare function isEntity(program: Program, entity: Model): boolean;
|
|
9
|
+
export declare function getEntity(program: Program, name: string): Model | undefined;
|
|
10
|
+
//# sourceMappingURL=entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../src/decorators/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAA2B,MAAM,oBAAoB,CAAC;AAI/F;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,QAQ/D;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,WAEvD;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAM3E"}
|