@azure-tools/typespec-azure-core 0.47.0-dev.3 → 0.48.0-dev.0
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.
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import type { DecoratorContext, EnumMember, Model, ModelProperty, Type } from "@typespec/compiler";
|
|
2
|
-
/**
|
|
3
|
-
* `@trait` marks a model type as representing a 'trait' and performs basic validation
|
|
4
|
-
* checks.
|
|
5
|
-
*
|
|
6
|
-
* @param target The model type to mark as a trait.
|
|
7
|
-
* @param traitName An optional name to uniquely identify the trait. If unspecified,
|
|
8
|
-
* the model type name is used.
|
|
9
|
-
*/
|
|
10
|
-
export type TraitDecorator = (context: DecoratorContext, target: Model, traitName?: string) => void;
|
|
11
2
|
/**
|
|
12
3
|
* `@traitLocation` sets the applicable location for a trait on its envelope property.
|
|
13
4
|
*
|
|
@@ -24,6 +15,15 @@ export type TraitLocationDecorator = (context: DecoratorContext, target: ModelPr
|
|
|
24
15
|
* applicable contexts.
|
|
25
16
|
*/
|
|
26
17
|
export type TraitContextDecorator = (context: DecoratorContext, target: ModelProperty, contexts: Type) => void;
|
|
18
|
+
/**
|
|
19
|
+
* `@trait` marks a model type as representing a 'trait' and performs basic validation
|
|
20
|
+
* checks.
|
|
21
|
+
*
|
|
22
|
+
* @param target The model type to mark as a trait.
|
|
23
|
+
* @param traitName An optional name to uniquely identify the trait. If unspecified,
|
|
24
|
+
* the model type name is used.
|
|
25
|
+
*/
|
|
26
|
+
export type TraitDecorator = (context: DecoratorContext, target: Model, traitName?: string) => void;
|
|
27
27
|
/**
|
|
28
28
|
* Sets the version for when the trait was added to the specification. Can be applied
|
|
29
29
|
* to either a trait model type or its envelope property.
|
|
@@ -32,9 +32,9 @@ export type TraitContextDecorator = (context: DecoratorContext, target: ModelPro
|
|
|
32
32
|
*/
|
|
33
33
|
export type TraitAddedDecorator = (context: DecoratorContext, target: Model | ModelProperty, addedVersion: Type) => void;
|
|
34
34
|
export type AzureCoreTraitsDecorators = {
|
|
35
|
-
trait: TraitDecorator;
|
|
36
35
|
traitLocation: TraitLocationDecorator;
|
|
37
36
|
traitContext: TraitContextDecorator;
|
|
37
|
+
trait: TraitDecorator;
|
|
38
38
|
traitAdded: TraitAddedDecorator;
|
|
39
39
|
};
|
|
40
40
|
//# sourceMappingURL=Azure.Core.Traits.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Azure.Core.Traits.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.Core.Traits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAEnG
|
|
1
|
+
{"version":3,"file":"Azure.Core.Traits.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.Core.Traits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAEnG;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,GAAG,CACnC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,UAAU,KACjB,IAAI,CAAC;AAEV;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAClC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,IAAI,KACX,IAAI,CAAC;AAEV;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AAEpG;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAChC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,GAAG,aAAa,EAC7B,YAAY,EAAE,IAAI,KACf,IAAI,CAAC;AAEV,MAAM,MAAM,yBAAyB,GAAG;IACtC,aAAa,EAAE,sBAAsB,CAAC;IACtC,YAAY,EAAE,qBAAqB,CAAC;IACpC,KAAK,EAAE,cAAc,CAAC;IACtB,UAAU,EAAE,mBAAmB,CAAC;CACjC,CAAC"}
|
|
@@ -20,10 +20,6 @@ export type FinalLocationDecorator = (context: DecoratorContext, entity: ModelPr
|
|
|
20
20
|
* property is ResourceLocation<Resource>
|
|
21
21
|
*/
|
|
22
22
|
export type PollingLocationDecorator = (context: DecoratorContext, entity: ModelProperty, options?: Type) => void;
|
|
23
|
-
/**
|
|
24
|
-
* Marks a Model as a paged collection.
|
|
25
|
-
*/
|
|
26
|
-
export type PagedResultDecorator = (context: DecoratorContext, entity: Model) => void;
|
|
27
23
|
/**
|
|
28
24
|
* Identifies the ModelProperty that contains the paged items. Can only be used on a Model marked with `@pagedResult`.
|
|
29
25
|
*/
|
|
@@ -32,6 +28,10 @@ export type ItemsDecorator = (context: DecoratorContext, entity: ModelProperty)
|
|
|
32
28
|
* Identifies a ModelProperty that contains the next link value. Can only be used on a Model marked with `@pagedResult`.
|
|
33
29
|
*/
|
|
34
30
|
export type NextLinkDecorator = (context: DecoratorContext, entity: ModelProperty) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Marks a Model as a paged collection.
|
|
33
|
+
*/
|
|
34
|
+
export type PagedResultDecorator = (context: DecoratorContext, entity: Model) => void;
|
|
35
35
|
/**
|
|
36
36
|
* Marks an Enum as being fixed since enums in Azure are
|
|
37
37
|
* assumed to be extensible.
|
|
@@ -115,9 +115,9 @@ export type AzureCoreDecorators = {
|
|
|
115
115
|
lroStatus: LroStatusDecorator;
|
|
116
116
|
finalLocation: FinalLocationDecorator;
|
|
117
117
|
pollingLocation: PollingLocationDecorator;
|
|
118
|
-
pagedResult: PagedResultDecorator;
|
|
119
118
|
items: ItemsDecorator;
|
|
120
119
|
nextLink: NextLinkDecorator;
|
|
120
|
+
pagedResult: PagedResultDecorator;
|
|
121
121
|
fixed: FixedDecorator;
|
|
122
122
|
lroSucceeded: LroSucceededDecorator;
|
|
123
123
|
lroCanceled: LroCanceledDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Azure.Core.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.Core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,KAAK,EACL,aAAa,EACb,SAAS,EACT,IAAI,EACJ,KAAK,EACL,YAAY,EACb,MAAM,oBAAoB,CAAC;AAE5B;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAC/B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,IAAI,GAAG,KAAK,GAAG,aAAa,KACjC,IAAI,CAAC;AAEV;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG,CACnC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,EACrB,WAAW,CAAC,EAAE,IAAI,KACf,IAAI,CAAC;AAEV;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,GAAG,CACrC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,EACrB,OAAO,CAAC,EAAE,IAAI,KACX,IAAI,CAAC;AAEV;;GAEG;AACH,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"Azure.Core.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.Core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,KAAK,EACL,aAAa,EACb,SAAS,EACT,IAAI,EACJ,KAAK,EACL,YAAY,EACb,MAAM,oBAAoB,CAAC;AAE5B;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAC/B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,IAAI,GAAG,KAAK,GAAG,aAAa,KACjC,IAAI,CA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AkB,CAAC;IAC9B,aAAa,EAAE,sBAAsB,CAAC;IACtC,eAAe,EAAE,wBAAwB,CAAC;IAC1C,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,WAAW,EAAE,oBAAoB,CAAC;IAClC,KAAK,EAAE,cAAc,CAAC;IACtB,YAAY,EAAE,qBAAqB,CAAC;IACpC,WAAW,EAAE,oBAAoB,CAAC;IAClC,SAAS,EAAE,kBAAkB,CAAC;IAC9B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,cAAc,EAAE,uBAAuB,CAAC;IACxC,aAAa,EAAE,sBAAsB,CAAC;IACtC,yBAAyB,EAAE,kCAAkC,CAAC;IAC9D,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C,cAAc,EAAE,uBAAuB,CAAC;IACxC,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C,iBAAiB,EAAE,0BAA0B,CAAC;CAC/C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0-dev.0",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Core library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|
|
@@ -39,18 +39,18 @@
|
|
|
39
39
|
"!dist/test/**"
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@typespec/compiler": "~0.
|
|
43
|
-
"@typespec/http": "~0.
|
|
44
|
-
"@typespec/rest": "~0.
|
|
42
|
+
"@typespec/compiler": "~0.61.0 || >=0.62.0-dev <0.62.0",
|
|
43
|
+
"@typespec/http": "~0.61.0 || >=0.62.0-dev <0.62.0",
|
|
44
|
+
"@typespec/rest": "~0.61.0 || >=0.62.0-dev <0.62.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/node": "~22.7.1",
|
|
48
|
-
"@typespec/compiler": "~0.
|
|
49
|
-
"@typespec/http": "~0.
|
|
50
|
-
"@typespec/library-linter": "~0.
|
|
51
|
-
"@typespec/openapi": "~0.
|
|
52
|
-
"@typespec/rest": "~0.
|
|
53
|
-
"@typespec/versioning": "~0.
|
|
48
|
+
"@typespec/compiler": "~0.61.0 || >=0.62.0-dev <0.62.0",
|
|
49
|
+
"@typespec/http": "~0.61.0 || >=0.62.0-dev <0.62.0",
|
|
50
|
+
"@typespec/library-linter": "~0.61.0 || >=0.62.0-dev <0.62.0",
|
|
51
|
+
"@typespec/openapi": "~0.61.0 || >=0.62.0-dev <0.62.0",
|
|
52
|
+
"@typespec/rest": "~0.61.0 || >=0.62.0-dev <0.62.0",
|
|
53
|
+
"@typespec/versioning": "~0.61.0 || >=0.62.0-dev <0.62.0",
|
|
54
54
|
"@vitest/coverage-v8": "^2.1.1",
|
|
55
55
|
"@vitest/ui": "^2.1.1",
|
|
56
56
|
"c8": "^10.1.2",
|