@azure-tools/typespec-azure-core 0.45.0-dev.0 → 0.45.0-dev.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/README.md +1 -1
- package/dist/generated-defs/Azure.Core.Foundations.Private.d.ts +47 -0
- package/dist/generated-defs/Azure.Core.Foundations.Private.d.ts.map +1 -0
- package/dist/generated-defs/Azure.Core.Foundations.Private.js +2 -0
- package/dist/generated-defs/Azure.Core.Foundations.Private.js.map +1 -0
- package/dist/generated-defs/Azure.Core.Foundations.d.ts +18 -0
- package/dist/generated-defs/Azure.Core.Foundations.d.ts.map +1 -0
- package/dist/generated-defs/Azure.Core.Foundations.js +2 -0
- package/dist/generated-defs/Azure.Core.Foundations.js.map +1 -0
- package/dist/generated-defs/Azure.Core.Foundations.ts-test.d.ts +2 -0
- package/dist/generated-defs/Azure.Core.Foundations.ts-test.d.ts.map +1 -0
- package/dist/generated-defs/Azure.Core.Foundations.ts-test.js +9 -0
- package/dist/generated-defs/Azure.Core.Foundations.ts-test.js.map +1 -0
- package/dist/generated-defs/Azure.Core.Traits.Private.d.ts +51 -0
- package/dist/generated-defs/Azure.Core.Traits.Private.d.ts.map +1 -0
- package/dist/generated-defs/Azure.Core.Traits.Private.js +2 -0
- package/dist/generated-defs/Azure.Core.Traits.Private.js.map +1 -0
- package/dist/generated-defs/Azure.Core.Traits.d.ts +34 -0
- package/dist/generated-defs/Azure.Core.Traits.d.ts.map +1 -0
- package/dist/generated-defs/Azure.Core.Traits.js +2 -0
- package/dist/generated-defs/Azure.Core.Traits.js.map +1 -0
- package/dist/generated-defs/Azure.Core.Traits.ts-test.d.ts +2 -0
- package/dist/generated-defs/Azure.Core.Traits.ts-test.d.ts.map +1 -0
- package/dist/generated-defs/Azure.Core.Traits.ts-test.js +10 -0
- package/dist/generated-defs/Azure.Core.Traits.ts-test.js.map +1 -0
- package/dist/generated-defs/Azure.Core.d.ts +114 -0
- package/dist/generated-defs/Azure.Core.d.ts.map +1 -0
- package/dist/generated-defs/Azure.Core.js +2 -0
- package/dist/generated-defs/Azure.Core.js.map +1 -0
- package/dist/generated-defs/Azure.Core.ts-test.d.ts +2 -0
- package/dist/generated-defs/Azure.Core.ts-test.d.ts.map +1 -0
- package/dist/generated-defs/Azure.Core.ts-test.js +24 -0
- package/dist/generated-defs/Azure.Core.ts-test.js.map +1 -0
- package/dist/src/decorators.d.ts +31 -30
- package/dist/src/decorators.d.ts.map +1 -1
- package/dist/src/decorators.js +125 -139
- package/dist/src/decorators.js.map +1 -1
- package/dist/src/lib.d.ts +2 -2
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +33 -1
- package/dist/src/lib.js.map +1 -1
- package/dist/src/traits.d.ts +13 -11
- package/dist/src/traits.d.ts.map +1 -1
- package/dist/src/traits.js +34 -35
- package/dist/src/traits.js.map +1 -1
- package/lib/traits.tsp +5 -5
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { DecoratorContext, Model, Operation, Scalar, Type } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* Provides a Model describing parameter customizations to spread into the target.
|
|
4
|
+
*
|
|
5
|
+
* @param customizations Model describing the customization to spread
|
|
6
|
+
*/
|
|
7
|
+
export type SpreadCustomParametersDecorator = (context: DecoratorContext, entity: Model, customizations: Type) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Provides a Model describing response property customizations to spread into the target.
|
|
10
|
+
*
|
|
11
|
+
* @param customizations Model describing the customization to spread
|
|
12
|
+
*/
|
|
13
|
+
export type SpreadCustomResponsePropertiesDecorator = (context: DecoratorContext, entity: Model, customizations: Type) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Checks the Resource parameter of an operation signature to ensure it's a valid resource type.
|
|
16
|
+
* Also marks the operation as a resource operation.
|
|
17
|
+
*
|
|
18
|
+
* @param resourceType The possible resource Type to validate.
|
|
19
|
+
*/
|
|
20
|
+
export type EnsureResourceTypeDecorator = (context: DecoratorContext, entity: Operation, resourceType: Type) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Identifies that a model should be treated as an embedding vector.
|
|
23
|
+
*/
|
|
24
|
+
export type EmbeddingVectorDecorator = (context: DecoratorContext, entity: Model, type: Scalar) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Configuration for the armResourceIdentifier scalar
|
|
27
|
+
*/
|
|
28
|
+
export type ArmResourceIdentifierConfigDecorator = (context: DecoratorContext, target: Scalar, options: Type) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Checks the Resource parameter of an operation signature to ensure it's a valid resource type.
|
|
31
|
+
*/
|
|
32
|
+
export type NeedsRouteDecorator = (context: DecoratorContext, entity: Operation) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Issues a warning if an operation which derives from an operation templated marked with `@ensureVerb`
|
|
35
|
+
* differs from the verb specified.
|
|
36
|
+
*
|
|
37
|
+
* @param templateName : Name of the template operation.
|
|
38
|
+
* @param verb The intended HTTP verb.
|
|
39
|
+
*/
|
|
40
|
+
export type EnsureVerbDecorator = (context: DecoratorContext, entity: Operation, templateName: string, verb: string) => void;
|
|
41
|
+
/**
|
|
42
|
+
* Sets the priority order of default final-state-via options for an operation
|
|
43
|
+
*
|
|
44
|
+
* @param states : list of final-state-via options in priority order
|
|
45
|
+
*/
|
|
46
|
+
export type DefaultFinalStateViaDecorator = (context: DecoratorContext, target: Operation, states: unknown) => void;
|
|
47
|
+
//# sourceMappingURL=Azure.Core.Foundations.Private.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.Foundations.Private.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.Core.Foundations.Private.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE3F;;;;GAIG;AACH,MAAM,MAAM,+BAA+B,GAAG,CAC5C,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,EACb,cAAc,EAAE,IAAI,KACjB,IAAI,CAAC;AAEV;;;;GAIG;AACH,MAAM,MAAM,uCAAuC,GAAG,CACpD,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,EACb,cAAc,EAAE,IAAI,KACjB,IAAI,CAAC;AAEV;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GAAG,CACxC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,YAAY,EAAE,IAAI,KACf,IAAI,CAAC;AAEV;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,CACrC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,EACb,IAAI,EAAE,MAAM,KACT,IAAI,CAAC;AAEV;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,CACjD,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,IAAI,KACV,IAAI,CAAC;AAEV;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC;AAEzF;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAChC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,MAAM,KACT,IAAI,CAAC;AAEV;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAC1C,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,OAAO,KACZ,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.Foundations.Private.js","sourceRoot":"","sources":["../../generated-defs/Azure.Core.Foundations.Private.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DecoratorContext, Model } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* Deletes any key properties from the model.
|
|
4
|
+
*/
|
|
5
|
+
export type OmitKeyPropertiesDecorator = (context: DecoratorContext, entity: Model) => void;
|
|
6
|
+
/**
|
|
7
|
+
* Identifies a property on a request model that serves as a linked operation parameter.
|
|
8
|
+
*
|
|
9
|
+
* @param name Property name on the target
|
|
10
|
+
*/
|
|
11
|
+
export type RequestParameterDecorator = (context: DecoratorContext, entity: Model, name: string) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Identifies a property on *all* non-error response models that serve as a linked operation parameter.
|
|
14
|
+
*
|
|
15
|
+
* @param name Property name on the target
|
|
16
|
+
*/
|
|
17
|
+
export type ResponsePropertyDecorator = (context: DecoratorContext, entity: Model, name: string) => void;
|
|
18
|
+
//# sourceMappingURL=Azure.Core.Foundations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.Foundations.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.Core.Foundations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,KAAK,IAAI,CAAC;AAE5F;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,CACtC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,EACb,IAAI,EAAE,MAAM,KACT,IAAI,CAAC;AAEV;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,CACtC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,EACb,IAAI,EAAE,MAAM,KACT,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.Foundations.js","sourceRoot":"","sources":["../../generated-defs/Azure.Core.Foundations.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.Foundations.ts-test.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.Core.Foundations.ts-test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** An error here would mean that the decorator is not exported or doesn't have the right name. */
|
|
2
|
+
import { $omitKeyProperties, $requestParameter, $responseProperty, } from "@azure-tools/typespec-azure-core";
|
|
3
|
+
/** An error here would mean that the exported decorator is not using the same signature. Make sure to have export const $decName: DecNameDecorator = (...) => ... */
|
|
4
|
+
const _ = {
|
|
5
|
+
$omitKeyProperties,
|
|
6
|
+
$requestParameter,
|
|
7
|
+
$responseProperty,
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=Azure.Core.Foundations.ts-test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.Foundations.ts-test.js","sourceRoot":"","sources":["../../generated-defs/Azure.Core.Foundations.ts-test.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,kCAAkC,CAAC;AAa1C,qKAAqK;AACrK,MAAM,CAAC,GAAe;IACpB,kBAAkB;IAClB,iBAAiB;IACjB,iBAAiB;CAClB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { DecoratorContext, EnumMember, Interface, Model, ModelProperty, Operation, Type } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* `@applyTraitOverride` copies the `traitModel` into `target` and renames its envelope
|
|
4
|
+
* property to enable the trait to override another trait sharing the same name.
|
|
5
|
+
*
|
|
6
|
+
* @param target The model into which the trait will be copied.
|
|
7
|
+
* @param traitModel The trait model type to be overridden.
|
|
8
|
+
*/
|
|
9
|
+
export type ApplyTraitOverrideDecorator = (context: DecoratorContext, target: Model, traitModel: Model) => void;
|
|
10
|
+
/**
|
|
11
|
+
* `@ensureAllQueryParams` checks the properties of `paramModel` to ensure they all are marked
|
|
12
|
+
* with the `@query` decorator.
|
|
13
|
+
*
|
|
14
|
+
* @param target The model type where this check will be established.
|
|
15
|
+
* @param paramModel The actual model type to check for query parameters.
|
|
16
|
+
*/
|
|
17
|
+
export type EnsureAllQueryParamsDecorator = (context: DecoratorContext, target: Model, paramModel: Model) => void;
|
|
18
|
+
/**
|
|
19
|
+
* `@ensureAllHeaderParams` checks the properties of `paramModel` to ensure they all are marked
|
|
20
|
+
* with the `@header` decorator.
|
|
21
|
+
*
|
|
22
|
+
* @param target The model type where this check will be established.
|
|
23
|
+
* @param paramModel The actual model type to check for header properties.
|
|
24
|
+
*/
|
|
25
|
+
export type EnsureAllHeaderParamsDecorator = (context: DecoratorContext, target: Model, paramModel: Model) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Copies trait properties from `traitModel` into `target` which conform to the
|
|
28
|
+
* specified location and contexts.
|
|
29
|
+
*
|
|
30
|
+
* @param traitModel The trait model type to be applied.
|
|
31
|
+
* @param traitLocation The trait location to use for selecting trait properties.
|
|
32
|
+
* @param traitContexts The trait contexts to use for selecting trait properties.
|
|
33
|
+
*/
|
|
34
|
+
export type AddTraitPropertiesDecorator = (context: DecoratorContext, target: Model, traitModel: Model, traitLocation: EnumMember, traitContexts: Type) => void;
|
|
35
|
+
/**
|
|
36
|
+
* `@traitSource` stores the `traitName` of its original trait on the envelope property.
|
|
37
|
+
*
|
|
38
|
+
* @param target The trait envelope property where `traitName` will be stored.
|
|
39
|
+
* @param traitName The name of the original trait to which this property belongs.
|
|
40
|
+
*/
|
|
41
|
+
export type TraitSourceDecorator = (context: DecoratorContext, target: ModelProperty, traitName: string) => void;
|
|
42
|
+
/**
|
|
43
|
+
* `@ensureTraitsPresent` checks the envelope properties of `traitModel` to ensure all
|
|
44
|
+
* of the `expectedTraits` are present as envelope properties.
|
|
45
|
+
*
|
|
46
|
+
* @param target The interface or operation where the `traitModel` should be checked.
|
|
47
|
+
* @param traitModel The trait model type to check.
|
|
48
|
+
* @param expectedTraits The array of `ExpectedTrait` models which describe each expected trait.
|
|
49
|
+
*/
|
|
50
|
+
export type EnsureTraitsPresentDecorator = (context: DecoratorContext, target: Interface | Operation, traitModel: Model, expectedTraits: Type) => void;
|
|
51
|
+
//# sourceMappingURL=Azure.Core.Traits.Private.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.Traits.Private.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.Core.Traits.Private.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACV,SAAS,EACT,KAAK,EACL,aAAa,EACb,SAAS,EACT,IAAI,EACL,MAAM,oBAAoB,CAAC;AAE5B;;;;;;GAMG;AACH,MAAM,MAAM,2BAA2B,GAAG,CACxC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,EACb,UAAU,EAAE,KAAK,KACd,IAAI,CAAC;AAEV;;;;;;GAMG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAC1C,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,EACb,UAAU,EAAE,KAAK,KACd,IAAI,CAAC;AAEV;;;;;;GAMG;AACH,MAAM,MAAM,8BAA8B,GAAG,CAC3C,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,EACb,UAAU,EAAE,KAAK,KACd,IAAI,CAAC;AAEV;;;;;;;GAOG;AACH,MAAM,MAAM,2BAA2B,GAAG,CACxC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,EACb,UAAU,EAAE,KAAK,EACjB,aAAa,EAAE,UAAU,EACzB,aAAa,EAAE,IAAI,KAChB,IAAI,CAAC;AAEV;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,CACjC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,MAAM,KACd,IAAI,CAAC;AAEV;;;;;;;GAOG;AACH,MAAM,MAAM,4BAA4B,GAAG,CACzC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,GAAG,SAAS,EAC7B,UAAU,EAAE,KAAK,EACjB,cAAc,EAAE,IAAI,KACjB,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.Traits.Private.js","sourceRoot":"","sources":["../../generated-defs/Azure.Core.Traits.Private.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
/**
|
|
12
|
+
* `@traitLocation` sets the applicable location for a trait on its envelope property.
|
|
13
|
+
*
|
|
14
|
+
* @param target The trait envelope property where the context will be applied.
|
|
15
|
+
* @param contexts An enum member or union of enum members representing the trait's
|
|
16
|
+
* applicable contexts.
|
|
17
|
+
*/
|
|
18
|
+
export type TraitLocationDecorator = (context: DecoratorContext, target: ModelProperty, contexts: EnumMember) => void;
|
|
19
|
+
/**
|
|
20
|
+
* `@traitContext` sets the applicable context for a trait on its envelope property.
|
|
21
|
+
*
|
|
22
|
+
* @param target The trait envelope property where the context will be applied.
|
|
23
|
+
* @param contexts An enum member or union of enum members representing the trait's
|
|
24
|
+
* applicable contexts.
|
|
25
|
+
*/
|
|
26
|
+
export type TraitContextDecorator = (context: DecoratorContext, target: ModelProperty, contexts: Type) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Sets the version for when the trait was added to the specification. Can be applied
|
|
29
|
+
* to either a trait model type or its envelope property.
|
|
30
|
+
*
|
|
31
|
+
* @param addedVersion The enum member representing the service version.
|
|
32
|
+
*/
|
|
33
|
+
export type TraitAddedDecorator = (context: DecoratorContext, target: Model | ModelProperty, addedVersion: Type) => void;
|
|
34
|
+
//# sourceMappingURL=Azure.Core.Traits.d.ts.map
|
|
@@ -0,0 +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;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AAEpG;;;;;;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;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAChC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,GAAG,aAAa,EAC7B,YAAY,EAAE,IAAI,KACf,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.Traits.js","sourceRoot":"","sources":["../../generated-defs/Azure.Core.Traits.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.Traits.ts-test.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.Core.Traits.ts-test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** An error here would mean that the decorator is not exported or doesn't have the right name. */
|
|
2
|
+
import { $trait, $traitAdded, $traitContext, $traitLocation, } from "@azure-tools/typespec-azure-core";
|
|
3
|
+
/** An error here would mean that the exported decorator is not using the same signature. Make sure to have export const $decName: DecNameDecorator = (...) => ... */
|
|
4
|
+
const _ = {
|
|
5
|
+
$trait,
|
|
6
|
+
$traitLocation,
|
|
7
|
+
$traitContext,
|
|
8
|
+
$traitAdded,
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=Azure.Core.Traits.ts-test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.Traits.ts-test.js","sourceRoot":"","sources":["../../generated-defs/Azure.Core.Traits.ts-test.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,cAAc,GACf,MAAM,kCAAkC,CAAC;AAe1C,qKAAqK;AACrK,MAAM,CAAC,GAAe;IACpB,MAAM;IACN,cAAc;IACd,aAAa;IACb,WAAW;CACZ,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { DecoratorContext, Enum, EnumMember, Model, ModelProperty, Operation, Type, Union, UnionVariant } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* Used for custom StatusMonitor implementation.
|
|
4
|
+
* Identifies an Enum or ModelProperty as containing long-running operation
|
|
5
|
+
* status.
|
|
6
|
+
*/
|
|
7
|
+
export type LroStatusDecorator = (context: DecoratorContext, entity: Enum | Union | ModelProperty) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Identifies a ModelProperty as containing the final location for the operation result.
|
|
10
|
+
*
|
|
11
|
+
* @param finalResult Sets the expected return value for the final result. Overrides
|
|
12
|
+
* any value provided in the decorated property, if the property uses ResourceLocation<Resource>.
|
|
13
|
+
*/
|
|
14
|
+
export type FinalLocationDecorator = (context: DecoratorContext, entity: ModelProperty, finalResult?: Type) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Identifies a model property as containing the location to poll for operation state.
|
|
17
|
+
*
|
|
18
|
+
* @param options PollingOptions for the poller pointed to by this link. Overrides
|
|
19
|
+
* settings derived from property value it is decorating, if the value of the
|
|
20
|
+
* property is ResourceLocation<Resource>
|
|
21
|
+
*/
|
|
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
|
+
/**
|
|
28
|
+
* Identifies the ModelProperty that contains the paged items. Can only be used on a Model marked with `@pagedResult`.
|
|
29
|
+
*/
|
|
30
|
+
export type ItemsDecorator = (context: DecoratorContext, entity: ModelProperty) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Identifies a ModelProperty that contains the next link value. Can only be used on a Model marked with `@pagedResult`.
|
|
33
|
+
*/
|
|
34
|
+
export type NextLinkDecorator = (context: DecoratorContext, entity: ModelProperty) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Marks an Enum as being fixed since enums in Azure are
|
|
37
|
+
* assumed to be extensible.
|
|
38
|
+
*/
|
|
39
|
+
export type FixedDecorator = (context: DecoratorContext, target: Enum) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Used for custom StatusMonitor implementation.
|
|
42
|
+
* Identifies an EnumMember as a long-running "Succeeded" terminal state.
|
|
43
|
+
*/
|
|
44
|
+
export type LroSucceededDecorator = (context: DecoratorContext, entity: EnumMember | UnionVariant) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Used for custom StatusMonitor implementation.
|
|
47
|
+
* Identifies an EnumMember as a long-running "Canceled" terminal state.
|
|
48
|
+
*/
|
|
49
|
+
export type LroCanceledDecorator = (context: DecoratorContext, entity: EnumMember | UnionVariant) => void;
|
|
50
|
+
/**
|
|
51
|
+
* Used for custom StatusMonitor implementation.
|
|
52
|
+
* Identifies an enum member as a long-running "Failed" terminal state.
|
|
53
|
+
*/
|
|
54
|
+
export type LroFailedDecorator = (context: DecoratorContext, entity: EnumMember | UnionVariant) => void;
|
|
55
|
+
/**
|
|
56
|
+
* Used for custom StatusMonitor implementation.
|
|
57
|
+
* Identifies a model property of a StatusMonitor as containing the result
|
|
58
|
+
* of a long-running operation that terminates successfully (Succeeded).
|
|
59
|
+
*/
|
|
60
|
+
export type LroResultDecorator = (context: DecoratorContext, entity: ModelProperty) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Used for custom StatusMonitor implementation.
|
|
63
|
+
* Identifies a model property of a StatusMonitor as containing the result
|
|
64
|
+
* of a long-running operation that terminates unsuccessfully (Failed).
|
|
65
|
+
*/
|
|
66
|
+
export type LroErrorResultDecorator = (context: DecoratorContext, entity: ModelProperty) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Identifies an operation that is linked to the target operation.
|
|
69
|
+
*
|
|
70
|
+
* @param linkedOperation The linked Operation
|
|
71
|
+
* @param linkType A string indicating the role of the linked operation
|
|
72
|
+
* @param parameters Map of `RequestParameter<Name>` and/or `ResponseProperty<Name>` that will
|
|
73
|
+
* be passed to the linked operation request.
|
|
74
|
+
*/
|
|
75
|
+
export type OperationLinkDecorator = (context: DecoratorContext, entity: Operation, linkedOperation: Operation, linkType: string, parameters?: Type) => void;
|
|
76
|
+
/**
|
|
77
|
+
* Used to define how to call custom polling operations for long-running operations.
|
|
78
|
+
*
|
|
79
|
+
* @param targetParameter A reference to the polling operation parameter this parameter
|
|
80
|
+
* provides a value for, or the name of that parameter. The default value is the name of
|
|
81
|
+
* the decorated parameter or property.
|
|
82
|
+
*/
|
|
83
|
+
export type PollingOperationParameterDecorator = (context: DecoratorContext, entity: ModelProperty, targetParameter?: Type) => void;
|
|
84
|
+
/**
|
|
85
|
+
* Identifies that an operation is a polling operation for an LRO.
|
|
86
|
+
*
|
|
87
|
+
* @param linkedOperation The linked Operation
|
|
88
|
+
* @param parameters Map of `RequestParameter<Name>` and/or `ResponseProperty<Name>` that will
|
|
89
|
+
* be passed to the linked operation request.
|
|
90
|
+
*/
|
|
91
|
+
export type PollingOperationDecorator = (context: DecoratorContext, entity: Operation, linkedOperation: Operation, parameters?: Type) => void;
|
|
92
|
+
/**
|
|
93
|
+
* Identifies that an operation is the final operation for an LRO.
|
|
94
|
+
*
|
|
95
|
+
* @param linkedOperation The linked Operation
|
|
96
|
+
* @param parameters Map of `RequestParameter<Name>` and/or `ResponseProperty<Name>` that will
|
|
97
|
+
* be passed to the linked operation request.
|
|
98
|
+
*/
|
|
99
|
+
export type FinalOperationDecorator = (context: DecoratorContext, entity: Operation, linkedOperation: Operation, parameters?: Type) => void;
|
|
100
|
+
/**
|
|
101
|
+
* Overrides the final state value for an operation
|
|
102
|
+
*
|
|
103
|
+
* @param finalState The desired final state value
|
|
104
|
+
*/
|
|
105
|
+
export type UseFinalStateViaDecorator = (context: DecoratorContext, entity: Operation, finalState: "original-uri" | "operation-location" | "location" | "azure-async-operation") => void;
|
|
106
|
+
/**
|
|
107
|
+
* Identifies that an operation is used to retrieve the next page for paged operations.
|
|
108
|
+
*
|
|
109
|
+
* @param linkedOperation The linked Operation
|
|
110
|
+
* @param parameters Map of `RequestParameter<Name>` and/or `ResponseProperty<Name>` that will
|
|
111
|
+
* be passed to the linked operation request.
|
|
112
|
+
*/
|
|
113
|
+
export type NextPageOperationDecorator = (context: DecoratorContext, entity: Operation, linkedOperation: Operation, parameters?: Type) => void;
|
|
114
|
+
//# sourceMappingURL=Azure.Core.d.ts.map
|
|
@@ -0,0 +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,oBAAoB,GAAG,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,KAAK,IAAI,CAAC;AAEtF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;AAExF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;AAE3F;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,KAAK,IAAI,CAAC;AAE/E;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAClC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,UAAU,GAAG,YAAY,KAC9B,IAAI,CAAC;AAEV;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,CACjC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,UAAU,GAAG,YAAY,KAC9B,IAAI,CAAC;AAEV;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAC/B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,UAAU,GAAG,YAAY,KAC9B,IAAI,CAAC;AAEV;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;AAE5F;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;AAEjG;;;;;;;GAOG;AACH,MAAM,MAAM,sBAAsB,GAAG,CACnC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,SAAS,EAC1B,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,IAAI,KACd,IAAI,CAAC;AAEV;;;;;;GAMG;AACH,MAAM,MAAM,kCAAkC,GAAG,CAC/C,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,EACrB,eAAe,CAAC,EAAE,IAAI,KACnB,IAAI,CAAC;AAEV;;;;;;GAMG;AACH,MAAM,MAAM,yBAAyB,GAAG,CACtC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,SAAS,EAC1B,UAAU,CAAC,EAAE,IAAI,KACd,IAAI,CAAC;AAEV;;;;;;GAMG;AACH,MAAM,MAAM,uBAAuB,GAAG,CACpC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,SAAS,EAC1B,UAAU,CAAC,EAAE,IAAI,KACd,IAAI,CAAC;AAEV;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,CACtC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,cAAc,GAAG,oBAAoB,GAAG,UAAU,GAAG,uBAAuB,KACrF,IAAI,CAAC;AAEV;;;;;;GAMG;AACH,MAAM,MAAM,0BAA0B,GAAG,CACvC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,SAAS,EAC1B,UAAU,CAAC,EAAE,IAAI,KACd,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.js","sourceRoot":"","sources":["../../generated-defs/Azure.Core.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.ts-test.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.Core.ts-test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** An error here would mean that the decorator is not exported or doesn't have the right name. */
|
|
2
|
+
import { $finalLocation, $finalOperation, $fixed, $items, $lroCanceled, $lroErrorResult, $lroFailed, $lroResult, $lroStatus, $lroSucceeded, $nextLink, $nextPageOperation, $operationLink, $pagedResult, $pollingLocation, $pollingOperation, $pollingOperationParameter, $useFinalStateVia, } from "@azure-tools/typespec-azure-core";
|
|
3
|
+
/** An error here would mean that the exported decorator is not using the same signature. Make sure to have export const $decName: DecNameDecorator = (...) => ... */
|
|
4
|
+
const _ = {
|
|
5
|
+
$lroStatus,
|
|
6
|
+
$finalLocation,
|
|
7
|
+
$pollingLocation,
|
|
8
|
+
$pagedResult,
|
|
9
|
+
$items,
|
|
10
|
+
$nextLink,
|
|
11
|
+
$fixed,
|
|
12
|
+
$lroSucceeded,
|
|
13
|
+
$lroCanceled,
|
|
14
|
+
$lroFailed,
|
|
15
|
+
$lroResult,
|
|
16
|
+
$lroErrorResult,
|
|
17
|
+
$operationLink,
|
|
18
|
+
$pollingOperationParameter,
|
|
19
|
+
$pollingOperation,
|
|
20
|
+
$finalOperation,
|
|
21
|
+
$useFinalStateVia,
|
|
22
|
+
$nextPageOperation,
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=Azure.Core.ts-test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.ts-test.js","sourceRoot":"","sources":["../../generated-defs/Azure.Core.ts-test.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,EACL,cAAc,EACd,eAAe,EACf,MAAM,EACN,MAAM,EACN,YAAY,EACZ,eAAe,EACf,UAAU,EACV,UAAU,EACV,UAAU,EACV,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,0BAA0B,EAC1B,iBAAiB,GAClB,MAAM,kCAAkC,CAAC;AA2C1C,qKAAqK;AACrK,MAAM,CAAC,GAAe;IACpB,UAAU;IACV,cAAc;IACd,gBAAgB;IAChB,YAAY;IACZ,MAAM;IACN,SAAS;IACT,MAAM;IACN,aAAa;IACb,YAAY;IACZ,UAAU;IACV,UAAU;IACV,eAAe;IACf,cAAc;IACd,0BAA0B;IAC1B,iBAAiB;IACjB,eAAe;IACf,iBAAiB;IACjB,kBAAkB;CACnB,CAAC"}
|
package/dist/src/decorators.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { DecoratorContext, Diagnostic, Enum, EnumMember, IntrinsicType, Model, ModelProperty, Operation, Program, Scalar,
|
|
1
|
+
import { DecoratorContext, Diagnostic, Enum, EnumMember, IntrinsicType, Model, ModelProperty, Operation, Program, Scalar, Type, UnionVariant } from "@typespec/compiler";
|
|
2
|
+
import { OmitKeyPropertiesDecorator } from "../generated-defs/Azure.Core.Foundations.js";
|
|
3
|
+
import { DefaultFinalStateViaDecorator, EnsureResourceTypeDecorator, EnsureVerbDecorator, NeedsRouteDecorator, SpreadCustomResponsePropertiesDecorator } from "../generated-defs/Azure.Core.Foundations.Private.js";
|
|
4
|
+
import { FinalLocationDecorator, FinalOperationDecorator, FixedDecorator, ItemsDecorator, LroCanceledDecorator, LroErrorResultDecorator, LroFailedDecorator, LroStatusDecorator, LroSucceededDecorator, NextLinkDecorator, NextPageOperationDecorator, OperationLinkDecorator, PagedResultDecorator, PollingLocationDecorator, PollingOperationDecorator, PollingOperationParameterDecorator, UseFinalStateViaDecorator } from "../generated-defs/Azure.Core.js";
|
|
2
5
|
import { FinalStateValue, OperationLink } from "./lro-helpers.js";
|
|
3
6
|
import { PropertyMap, ResultInfo, StatusMonitorMetadata } from "./lro-info.js";
|
|
4
7
|
export declare const PollingOperationKey: string;
|
|
5
8
|
export declare const FinalOperationKey = "final";
|
|
6
|
-
export declare
|
|
9
|
+
export declare const $fixed: FixedDecorator;
|
|
7
10
|
export declare function isFixed(program: Program, target: Enum): boolean;
|
|
8
|
-
export declare
|
|
11
|
+
export declare const $pagedResult: PagedResultDecorator;
|
|
9
12
|
export interface PagedResultMetadata {
|
|
10
13
|
modelType: Model;
|
|
11
14
|
itemsProperty?: ModelProperty;
|
|
@@ -26,12 +29,12 @@ export interface PagedResultMetadata {
|
|
|
26
29
|
* response and return the PagedResultMetadata for that response.
|
|
27
30
|
*/
|
|
28
31
|
export declare function getPagedResult(program: Program, entity: Model | Operation): PagedResultMetadata | undefined;
|
|
29
|
-
export declare
|
|
32
|
+
export declare const $items: ItemsDecorator;
|
|
30
33
|
/**
|
|
31
34
|
* Returns `true` if the property is marked with `@items`.
|
|
32
35
|
*/
|
|
33
36
|
export declare function getItems(program: Program, entity: Type): boolean | undefined;
|
|
34
|
-
export declare
|
|
37
|
+
export declare const $nextLink: NextLinkDecorator;
|
|
35
38
|
/**
|
|
36
39
|
* Returns `true` if the property is marked with `@nextLink`.
|
|
37
40
|
*/
|
|
@@ -46,7 +49,7 @@ export interface LongRunningStates {
|
|
|
46
49
|
canceledState: string[];
|
|
47
50
|
states: string[];
|
|
48
51
|
}
|
|
49
|
-
export declare
|
|
52
|
+
export declare const $lroStatus: LroStatusDecorator;
|
|
50
53
|
export declare function extractLroStates(program: Program, entity: Type): [LongRunningStates | undefined, readonly Diagnostic[]];
|
|
51
54
|
/**
|
|
52
55
|
* Returns the `LongRunningStates` associated with `entity`.
|
|
@@ -64,7 +67,7 @@ export declare function getLroStatusProperty(program: Program, target: Model): M
|
|
|
64
67
|
* @param context The decorator execution context.
|
|
65
68
|
* @param entity The model property that contains the logical result.
|
|
66
69
|
*/
|
|
67
|
-
export declare
|
|
70
|
+
export declare const $lroResult: (context: DecoratorContext, entity: ModelProperty) => void;
|
|
68
71
|
/**
|
|
69
72
|
* Gets the logical result property from a StatusMonitor
|
|
70
73
|
* @param program The program to process.
|
|
@@ -79,7 +82,7 @@ export declare function getLroResult(program: Program, entity: Model, useDefault
|
|
|
79
82
|
* @param context The decorator execution context.
|
|
80
83
|
* @param entity The model property that contains the error result.
|
|
81
84
|
*/
|
|
82
|
-
export declare
|
|
85
|
+
export declare const $lroErrorResult: LroErrorResultDecorator;
|
|
83
86
|
/**
|
|
84
87
|
* Gets the error result property from a StatusMonitor
|
|
85
88
|
* @param program The program to process.
|
|
@@ -88,19 +91,19 @@ export declare function $lroErrorResult(context: DecoratorContext, entity: Model
|
|
|
88
91
|
* property is marked. (defaults to true)
|
|
89
92
|
*/
|
|
90
93
|
export declare function getLroErrorResult(program: Program, entity: Model, useDefault?: boolean): [ModelProperty | undefined, readonly Diagnostic[]];
|
|
91
|
-
export declare
|
|
94
|
+
export declare const $pollingOperationParameter: PollingOperationParameterDecorator;
|
|
92
95
|
export declare function getPollingOperationParameter(program: Program, entity: ModelProperty): string | ModelProperty | undefined;
|
|
93
|
-
export declare
|
|
96
|
+
export declare const $lroSucceeded: LroSucceededDecorator;
|
|
94
97
|
/**
|
|
95
98
|
* Returns `true` if the enum member represents a "succeeded" state.
|
|
96
99
|
*/
|
|
97
100
|
export declare function isLroSucceededState(program: Program, entity: EnumMember | UnionVariant): boolean;
|
|
98
|
-
export declare
|
|
101
|
+
export declare const $lroCanceled: LroCanceledDecorator;
|
|
99
102
|
/**
|
|
100
103
|
* Returns `true` if the enum member represents a "canceled" state.
|
|
101
104
|
*/
|
|
102
105
|
export declare function isLroCanceledState(program: Program, entity: EnumMember | UnionVariant): boolean;
|
|
103
|
-
export declare
|
|
106
|
+
export declare const $lroFailed: LroFailedDecorator;
|
|
104
107
|
/**
|
|
105
108
|
* Returns `true` if the enum member represents a "failed" state.
|
|
106
109
|
*/
|
|
@@ -128,7 +131,7 @@ export interface StatusMonitorPollingLocationInfo extends PollingLocationBase {
|
|
|
128
131
|
export declare enum pollingOptionsKind {
|
|
129
132
|
StatusMonitor = "statusMonitor"
|
|
130
133
|
}
|
|
131
|
-
export declare
|
|
134
|
+
export declare const $pollingLocation: PollingLocationDecorator;
|
|
132
135
|
/**
|
|
133
136
|
* Gets polling information stored with a field that contains a link to an Lro polling endpoint
|
|
134
137
|
* @param program The program to check
|
|
@@ -139,7 +142,7 @@ export declare function getPollingLocationInfo(program: Program, target: ModelPr
|
|
|
139
142
|
* Returns `true` if the property is marked with @pollingLocation.
|
|
140
143
|
*/
|
|
141
144
|
export declare function isPollingLocation(program: Program, entity: ModelProperty): boolean;
|
|
142
|
-
export declare
|
|
145
|
+
export declare const $finalLocation: FinalLocationDecorator;
|
|
143
146
|
/**
|
|
144
147
|
* Returns `true` if the property is marked with @finalLocation.
|
|
145
148
|
*/
|
|
@@ -151,8 +154,7 @@ export declare function getFinalLocationValue(program: Program, entity: ModelPro
|
|
|
151
154
|
* @param entity The decorated operation
|
|
152
155
|
* @param finalState The desired value for final-state-via
|
|
153
156
|
*/
|
|
154
|
-
export declare
|
|
155
|
-
type LroHeader = "azure-asyncoperation" | "location" | "operation-location";
|
|
157
|
+
export declare const $useFinalStateVia: UseFinalStateViaDecorator;
|
|
156
158
|
/**
|
|
157
159
|
* Get the overridden final state value for this operation, if any
|
|
158
160
|
* @param program The program to process
|
|
@@ -160,7 +162,7 @@ type LroHeader = "azure-asyncoperation" | "location" | "operation-location";
|
|
|
160
162
|
* @returns The FInalStateValue if it exists, otherwise undefined
|
|
161
163
|
*/
|
|
162
164
|
export declare function getFinalStateOverride(program: Program, operation: Operation): FinalStateValue | undefined;
|
|
163
|
-
export declare
|
|
165
|
+
export declare const $omitKeyProperties: OmitKeyPropertiesDecorator;
|
|
164
166
|
export interface OperationLinkMetadata {
|
|
165
167
|
parameters?: Type;
|
|
166
168
|
linkedOperation: Operation;
|
|
@@ -169,7 +171,7 @@ export interface OperationLinkMetadata {
|
|
|
169
171
|
parameterMap?: Map<string, PropertyMap>;
|
|
170
172
|
result?: ResultInfo;
|
|
171
173
|
}
|
|
172
|
-
export declare
|
|
174
|
+
export declare const $operationLink: OperationLinkDecorator;
|
|
173
175
|
/**
|
|
174
176
|
* Returns the `OperationLinkMetadata` for a given operation and link type, or undefined.
|
|
175
177
|
*/
|
|
@@ -178,20 +180,20 @@ export declare function getOperationLink(program: Program, entity: Operation, li
|
|
|
178
180
|
* Returns the collection of `OperationLinkMetadata` for a given operation, if any, or undefined.
|
|
179
181
|
*/
|
|
180
182
|
export declare function getOperationLinks(program: Program, entity: Operation): Map<string, OperationLinkMetadata> | undefined;
|
|
181
|
-
export declare
|
|
182
|
-
export declare
|
|
183
|
-
export declare
|
|
184
|
-
export declare
|
|
183
|
+
export declare const $pollingOperation: PollingOperationDecorator;
|
|
184
|
+
export declare const $finalOperation: FinalOperationDecorator;
|
|
185
|
+
export declare const $nextPageOperation: NextPageOperationDecorator;
|
|
186
|
+
export declare const $requestParameter: (context: DecoratorContext, entity: Model, name: string) => void;
|
|
185
187
|
export declare function getRequestParameter(program: Program, entity: ModelProperty): string | undefined;
|
|
186
|
-
export declare
|
|
188
|
+
export declare const $responseProperty: (context: DecoratorContext, entity: Model, name: string) => void;
|
|
187
189
|
export declare function getResponseProperty(program: Program, entity: ModelProperty): string | undefined;
|
|
188
|
-
export declare
|
|
189
|
-
export declare
|
|
190
|
-
export declare
|
|
190
|
+
export declare const $spreadCustomParameters: (context: DecoratorContext, entity: Model, customizations: Model) => void;
|
|
191
|
+
export declare const $spreadCustomResponseProperties: SpreadCustomResponsePropertiesDecorator;
|
|
192
|
+
export declare const $ensureResourceType: EnsureResourceTypeDecorator;
|
|
191
193
|
export declare function isResourceOperation(program: Program, operation: Operation): boolean;
|
|
192
|
-
export declare
|
|
194
|
+
export declare const $needsRoute: NeedsRouteDecorator;
|
|
193
195
|
export declare function checkRpcRoutes(program: Program): void;
|
|
194
|
-
export declare
|
|
196
|
+
export declare const $ensureVerb: EnsureVerbDecorator;
|
|
195
197
|
export declare function checkEnsureVerb(program: Program): void;
|
|
196
198
|
export interface EmbeddingVectorMetadata {
|
|
197
199
|
elementType: Type;
|
|
@@ -218,6 +220,5 @@ export interface ArmResourceIdentifierAllowedResource {
|
|
|
218
220
|
}
|
|
219
221
|
/** Returns the config attached to an armResourceIdentifierScalar */
|
|
220
222
|
export declare function getArmResourceIdentifierConfig(program: Program, entity: Scalar): ArmResourceIdentifierConfig;
|
|
221
|
-
export declare
|
|
222
|
-
export {};
|
|
223
|
+
export declare const $defaultFinalStateVia: DefaultFinalStateViaDecorator;
|
|
223
224
|
//# sourceMappingURL=decorators.d.ts.map
|