@typespec/http 1.0.0-rc.2-dev.5 → 1.0.0-rc.2-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated-defs/TypeSpec.Http.Private.d.ts +22 -1
- package/dist/generated-defs/TypeSpec.Http.Private.d.ts.map +1 -1
- package/dist/src/experimental/merge-patch/helpers.d.ts +35 -0
- package/dist/src/experimental/merge-patch/helpers.d.ts.map +1 -0
- package/dist/src/experimental/merge-patch/helpers.js +43 -0
- package/dist/src/experimental/merge-patch/helpers.js.map +1 -0
- package/dist/src/experimental/merge-patch/index.d.ts +2 -0
- package/dist/src/experimental/merge-patch/index.d.ts.map +1 -0
- package/dist/src/experimental/merge-patch/index.js +2 -0
- package/dist/src/experimental/merge-patch/index.js.map +1 -0
- package/dist/src/experimental/merge-patch/internal.d.ts +3 -0
- package/dist/src/experimental/merge-patch/internal.d.ts.map +1 -0
- package/dist/src/experimental/merge-patch/internal.js +35 -0
- package/dist/src/experimental/merge-patch/internal.js.map +1 -0
- package/dist/src/lib.d.ts +64 -4
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +29 -0
- package/dist/src/lib.js.map +1 -1
- package/dist/src/merge-patch.d.ts +5 -0
- package/dist/src/merge-patch.d.ts.map +1 -0
- package/dist/src/merge-patch.js +312 -0
- package/dist/src/merge-patch.js.map +1 -0
- package/dist/src/metadata.d.ts.map +1 -1
- package/dist/src/metadata.js +2 -2
- package/dist/src/metadata.js.map +1 -1
- package/dist/src/parameters.d.ts.map +1 -1
- package/dist/src/parameters.js +16 -1
- package/dist/src/parameters.js.map +1 -1
- package/dist/src/payload.d.ts.map +1 -1
- package/dist/src/payload.js +19 -1
- package/dist/src/payload.js.map +1 -1
- package/dist/src/tsp-index.d.ts.map +1 -1
- package/dist/src/tsp-index.js +4 -0
- package/dist/src/tsp-index.js.map +1 -1
- package/lib/main.tsp +90 -0
- package/lib/private.decorators.tsp +48 -0
- package/package.json +4 -1
|
@@ -1,20 +1,41 @@
|
|
|
1
|
-
import type { DecoratorContext, Model, Type } from "@typespec/compiler";
|
|
1
|
+
import type { DecoratorContext, Model, ModelProperty, Type } from "@typespec/compiler";
|
|
2
2
|
export interface HttpPartOptions {
|
|
3
3
|
readonly name?: string;
|
|
4
4
|
}
|
|
5
|
+
export interface ApplyMergePatchOptions {
|
|
6
|
+
readonly visibilityMode: unknown;
|
|
7
|
+
}
|
|
5
8
|
export type PlainDataDecorator = (context: DecoratorContext, target: Model) => void;
|
|
6
9
|
export type HttpFileDecorator = (context: DecoratorContext, target: Model) => void;
|
|
7
10
|
export type HttpPartDecorator = (context: DecoratorContext, target: Model, type: Type, options: HttpPartOptions) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Performs the canonical merge-patch transformation on the given model and injects its
|
|
13
|
+
* transformed properties into the target.
|
|
14
|
+
*/
|
|
15
|
+
export type ApplyMergePatchDecorator = (context: DecoratorContext, target: Model, source: Model, nameTemplate: string, options: ApplyMergePatchOptions) => void;
|
|
8
16
|
/**
|
|
9
17
|
* Specify if inapplicable metadata should be included in the payload for the given entity.
|
|
10
18
|
*
|
|
11
19
|
* @param value If true, inapplicable metadata will be included in the payload.
|
|
12
20
|
*/
|
|
13
21
|
export type IncludeInapplicableMetadataInPayloadDecorator = (context: DecoratorContext, target: Type, value: boolean) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Marks a model that was generated by applying the MergePatch
|
|
24
|
+
* transform and links to its source model
|
|
25
|
+
*/
|
|
26
|
+
export type MergePatchModelDecorator = (context: DecoratorContext, target: Model, source: Model) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Links a modelProperty mutated as part of a mergePatch transform to
|
|
29
|
+
* its source property;
|
|
30
|
+
*/
|
|
31
|
+
export type MergePatchPropertyDecorator = (context: DecoratorContext, target: ModelProperty, source: ModelProperty) => void;
|
|
14
32
|
export type TypeSpecHttpPrivateDecorators = {
|
|
15
33
|
plainData: PlainDataDecorator;
|
|
16
34
|
httpFile: HttpFileDecorator;
|
|
17
35
|
httpPart: HttpPartDecorator;
|
|
36
|
+
applyMergePatch: ApplyMergePatchDecorator;
|
|
18
37
|
includeInapplicableMetadataInPayload: IncludeInapplicableMetadataInPayloadDecorator;
|
|
38
|
+
mergePatchModel: MergePatchModelDecorator;
|
|
39
|
+
mergePatchProperty: MergePatchPropertyDecorator;
|
|
19
40
|
};
|
|
20
41
|
//# sourceMappingURL=TypeSpec.Http.Private.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeSpec.Http.Private.d.ts","sourceRoot":"","sources":["../../generated-defs/TypeSpec.Http.Private.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"TypeSpec.Http.Private.d.ts","sourceRoot":"","sources":["../../generated-defs/TypeSpec.Http.Private.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAEvF,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,KAAK,IAAI,CAAC;AAEpF,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,KAAK,IAAI,CAAC;AAEnF,MAAM,MAAM,iBAAiB,GAAG,CAC9B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,EACb,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,KACrB,IAAI,CAAC;AAEV;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,CACrC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,EACb,MAAM,EAAE,KAAK,EACb,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,sBAAsB,KAC5B,IAAI,CAAC;AAEV;;;;GAIG;AACH,MAAM,MAAM,6CAA6C,GAAG,CAC1D,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,IAAI,EACZ,KAAK,EAAE,OAAO,KACX,IAAI,CAAC;AAEV;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,CACrC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,EACb,MAAM,EAAE,KAAK,KACV,IAAI,CAAC;AAEV;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG,CACxC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,aAAa,KAClB,IAAI,CAAC;AAEV,MAAM,MAAM,6BAA6B,GAAG;IAC1C,SAAS,EAAE,kBAAkB,CAAC;IAC9B,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,eAAe,EAAE,wBAAwB,CAAC;IAC1C,oCAAoC,EAAE,6CAA6C,CAAC;IACpF,eAAe,EAAE,wBAAwB,CAAC;IAC1C,kBAAkB,EAAE,2BAA2B,CAAC;CACjD,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Model, ModelProperty, Program, Value } from "@typespec/compiler";
|
|
2
|
+
export interface MergePatchPropertyOverrides {
|
|
3
|
+
optional?: boolean;
|
|
4
|
+
erasable?: boolean;
|
|
5
|
+
updateBehavior?: "merge" | "replace";
|
|
6
|
+
}
|
|
7
|
+
export declare const getMergePatchSource: (program: Program, type: Model) => Model | undefined, setMergePatchSource: (program: Program, type: Model, value: Model) => void;
|
|
8
|
+
export declare const getMergePatchPropertySource: (program: Program, type: ModelProperty) => ModelProperty | undefined, setMergePatchPropertySource: (program: Program, type: ModelProperty, value: ModelProperty) => void;
|
|
9
|
+
export declare const getMergePatchPropertyOverrides: (program: Program, type: ModelProperty) => MergePatchPropertyOverrides | undefined, setMergePatchPropertyOverrides: (program: Program, type: ModelProperty, value: MergePatchPropertyOverrides) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Determines if the given model is part of a mergePatch transform
|
|
12
|
+
* @param program The compiled TypeSpec program
|
|
13
|
+
* @param model The model to check
|
|
14
|
+
* @returns true if the model was generated using a mergePatch template, otherwise false
|
|
15
|
+
*/
|
|
16
|
+
export declare function isMergePatch(program: Program, model: Model): boolean;
|
|
17
|
+
/** The characteristics of the property as part of a mergePatch request body */
|
|
18
|
+
export interface MergePatchProperties {
|
|
19
|
+
/** Can the property accept null */
|
|
20
|
+
erasable: boolean;
|
|
21
|
+
/** How does the property update the corresponding resource property */
|
|
22
|
+
updateBehavior: "merge" | "replace";
|
|
23
|
+
/** If this property is null, what will the corresponding value of the resource be set to (undefined if the resource property has no default) */
|
|
24
|
+
erasedValue?: Value;
|
|
25
|
+
/** The sourceProperty of this property */
|
|
26
|
+
sourceProperty?: ModelProperty;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Returns the MergePatch characteristics of the property, if the property is used in a MergePatch request
|
|
30
|
+
* @param program The compiled TypeSpec program
|
|
31
|
+
* @param property The model property to check
|
|
32
|
+
* @returns The characteristics of the property in a MergePatch request (or undefined if the property is not part of a mErgePatch request)
|
|
33
|
+
*/
|
|
34
|
+
export declare function getMergePatchProperties(program: Program, property: ModelProperty): MergePatchProperties | undefined;
|
|
35
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/experimental/merge-patch/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,EAAE,aAAa,EAAE,OAAO,EAAQ,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAIlG,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACtC;AACD,eAAO,MAAO,mBAAmB,wDAAE,mBAAmB,uDAErD,CAAC;AAEF,eAAO,MAAO,2BAA2B,wEAAE,2BAA2B,uEAGnC,CAAC;AAEpC,eAAO,MAAO,8BAA8B,sFAAE,8BAA8B,qFAGlC,CAAC;AAE3C;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAEpE;AAED,+EAA+E;AAC/E,MAAM,WAAW,oBAAoB;IACnC,mCAAmC;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,uEAAuE;IACvE,cAAc,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC,gJAAgJ;IAChJ,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,0CAA0C;IAC1C,cAAc,CAAC,EAAE,aAAa,CAAC;CAChC;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,aAAa,GACtB,oBAAoB,GAAG,SAAS,CAkBlC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { isArrayModelType } from "@typespec/compiler";
|
|
2
|
+
import { useStateMap } from "@typespec/compiler/utils";
|
|
3
|
+
import { HttpStateKeys } from "../../lib.js";
|
|
4
|
+
export const [getMergePatchSource, setMergePatchSource] = useStateMap(HttpStateKeys.mergePatchModel);
|
|
5
|
+
export const [getMergePatchPropertySource, setMergePatchPropertySource] = useStateMap(HttpStateKeys.mergePatchProperty);
|
|
6
|
+
export const [getMergePatchPropertyOverrides, setMergePatchPropertyOverrides] = useStateMap(HttpStateKeys.mergePatchPropertyOptions);
|
|
7
|
+
/**
|
|
8
|
+
* Determines if the given model is part of a mergePatch transform
|
|
9
|
+
* @param program The compiled TypeSpec program
|
|
10
|
+
* @param model The model to check
|
|
11
|
+
* @returns true if the model was generated using a mergePatch template, otherwise false
|
|
12
|
+
*/
|
|
13
|
+
export function isMergePatch(program, model) {
|
|
14
|
+
return getMergePatchSource(program, model) !== undefined;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns the MergePatch characteristics of the property, if the property is used in a MergePatch request
|
|
18
|
+
* @param program The compiled TypeSpec program
|
|
19
|
+
* @param property The model property to check
|
|
20
|
+
* @returns The characteristics of the property in a MergePatch request (or undefined if the property is not part of a mErgePatch request)
|
|
21
|
+
*/
|
|
22
|
+
export function getMergePatchProperties(program, property) {
|
|
23
|
+
function getUpdateBehavior(type) {
|
|
24
|
+
switch (type.kind) {
|
|
25
|
+
case "Model":
|
|
26
|
+
if (isArrayModelType(program, type))
|
|
27
|
+
return "merge";
|
|
28
|
+
return "replace";
|
|
29
|
+
default:
|
|
30
|
+
return "replace";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (!property.model || !isMergePatch(program, property.model))
|
|
34
|
+
return undefined;
|
|
35
|
+
const sourceProperty = getMergePatchPropertySource(program, property);
|
|
36
|
+
return {
|
|
37
|
+
erasable: sourceProperty.optional || sourceProperty.defaultValue !== undefined,
|
|
38
|
+
updateBehavior: getUpdateBehavior(sourceProperty.type),
|
|
39
|
+
sourceProperty: sourceProperty,
|
|
40
|
+
erasedValue: sourceProperty.defaultValue,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../src/experimental/merge-patch/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA8C,MAAM,oBAAoB,CAAC;AAClG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,c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
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { MergePatchProperties, MergePatchPropertyOverrides, getMergePatchProperties, getMergePatchPropertyOverrides, getMergePatchPropertySource, getMergePatchSource, isMergePatch, setMergePatchPropertyOverrides, setMergePatchPropertySource, setMergePatchSource, } from "./helpers.js";
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/experimental/merge-patch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,uBAAuB,EACvB,8BAA8B,EAC9B,2BAA2B,EAC3B,mBAAmB,EACnB,YAAY,EACZ,8BAA8B,EAC9B,2BAA2B,EAC3B,mBAAmB,GACpB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/experimental/merge-patch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,uBAAuB,EACvB,8BAA8B,EAC9B,2BAA2B,EAC3B,mBAAmB,EACnB,YAAY,EACZ,8BAA8B,EAC9B,2BAA2B,EAC3B,mBAAmB,GACpB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../src/experimental/merge-patch/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAInD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,GAAG,OAAO,CAiC1E"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { $ } from "@typespec/compiler/typekit";
|
|
2
|
+
import { getMergePatchPropertySource, isMergePatch } from "./helpers.js";
|
|
3
|
+
export function isMergePatchBody(program, bodyType) {
|
|
4
|
+
const _visitedTypes = new WeakMap();
|
|
5
|
+
function isMergePatchModel(type) {
|
|
6
|
+
if (_visitedTypes.has(type))
|
|
7
|
+
return false;
|
|
8
|
+
_visitedTypes.set(bodyType, true);
|
|
9
|
+
if (!$(program).model.is(type))
|
|
10
|
+
return false;
|
|
11
|
+
if (isMergePatch(program, type))
|
|
12
|
+
return true;
|
|
13
|
+
if ($(program).array.is(type) || $(program).record.is(type)) {
|
|
14
|
+
return isMergePatchModel(type.indexer.value);
|
|
15
|
+
}
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
switch (bodyType.kind) {
|
|
19
|
+
case "Model":
|
|
20
|
+
return (isMergePatchModel(bodyType) ||
|
|
21
|
+
bodyType.sourceModels.some((m) => isMergePatchModel(m.model)) ||
|
|
22
|
+
[...bodyType.properties.values()].some((p) => getMergePatchPropertySource(program, p) !== undefined || isMergePatchModel(p.type)));
|
|
23
|
+
case "ModelProperty":
|
|
24
|
+
return isMergePatchModel(bodyType.type);
|
|
25
|
+
case "Union":
|
|
26
|
+
return [...bodyType.variants.values()].some((v) => isMergePatchModel(v.type));
|
|
27
|
+
case "UnionVariant":
|
|
28
|
+
return isMergePatchModel(bodyType.type);
|
|
29
|
+
case "Tuple":
|
|
30
|
+
return bodyType.values.some((v) => isMergePatchModel(v));
|
|
31
|
+
default:
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=internal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../../src/experimental/merge-patch/internal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,4BAA4B,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEzE,MAAM,UAAU,gBAAgB,CAAC,OAAgB,EAAE,QAAc;IAC/D,MAAM,aAAa,GAA2B,IAAI,OAAO,EAAiB,CAAC;IAC3E,SAAS,i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C,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAChF,KAAK,cAAc;YACjB,OAAO,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC1C,KAAK,OAAO;YACV,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3D;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC"}
|
package/dist/src/lib.d.ts
CHANGED
|
@@ -95,8 +95,20 @@ export declare const $lib: import("@typespec/compiler").TypeSpecLibrary<{
|
|
|
95
95
|
"http-file-contents-not-scalar": {
|
|
96
96
|
readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
|
|
97
97
|
};
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
"patch-implicit-optional": {
|
|
99
|
+
readonly default: "Patch operation stopped applying an implicit optional transform to the body in 1.0.0. Use @patch(#{implicitOptional: false}) to restore the old behavior.";
|
|
100
|
+
};
|
|
101
|
+
"merge-patch-contains-null": {
|
|
102
|
+
readonly default: "Cannot convert model to a merge-patch compatible shape because it contains the 'null' intrinsic type.";
|
|
103
|
+
};
|
|
104
|
+
"merge-patch-content-type": {
|
|
105
|
+
readonly default: import("@typespec/compiler").CallableMessage<["contentType"]>;
|
|
106
|
+
};
|
|
107
|
+
"merge-patch-contains-metadata": {
|
|
108
|
+
readonly default: import("@typespec/compiler").CallableMessage<["metadataType", "propertyName"]>;
|
|
109
|
+
};
|
|
110
|
+
}, Record<string, any>, "path" | "authentication" | "header" | "cookie" | "query" | "body" | "bodyRoot" | "bodyIgnore" | "multipartBody" | "statusCode" | "verbs" | "patchOptions" | "servers" | "includeInapplicableMetadataInPayload" | "externalInterfaces" | "routeProducer" | "routes" | "sharedRoutes" | "routeOptions" | "file" | "httpPart" | "mergePatchModel" | "mergePatchProperty" | "mergePatchPropertyOptions">;
|
|
111
|
+
export declare const reportDiagnostic: <C extends "http-verb-duplicate" | "missing-uri-param" | "incompatible-uri-param" | "use-uri-template" | "double-slash" | "missing-server-param" | "duplicate-body" | "duplicate-route-decorator" | "operation-param-duplicate-type" | "duplicate-operation" | "multiple-status-codes" | "status-code-invalid" | "content-type-string" | "content-type-ignored" | "metadata-ignored" | "response-cookie-not-supported" | "no-service-found" | "invalid-type-for-auth" | "shared-inconsistency" | "multipart-invalid-content-type" | "multipart-model" | "no-implicit-multipart" | "multipart-part" | "multipart-nested" | "http-file-extra-property" | "http-file-disallowed-metadata" | "formdata-no-part-name" | "http-file-structured" | "http-file-content-type-not-string" | "http-file-contents-not-scalar" | "patch-implicit-optional" | "merge-patch-contains-null" | "merge-patch-content-type" | "merge-patch-contains-metadata", M extends keyof {
|
|
100
112
|
"http-verb-duplicate": {
|
|
101
113
|
readonly default: import("@typespec/compiler").CallableMessage<["entityName"]>;
|
|
102
114
|
};
|
|
@@ -193,6 +205,18 @@ export declare const reportDiagnostic: <C extends "http-verb-duplicate" | "missi
|
|
|
193
205
|
"http-file-contents-not-scalar": {
|
|
194
206
|
readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
|
|
195
207
|
};
|
|
208
|
+
"patch-implicit-optional": {
|
|
209
|
+
readonly default: "Patch operation stopped applying an implicit optional transform to the body in 1.0.0. Use @patch(#{implicitOptional: false}) to restore the old behavior.";
|
|
210
|
+
};
|
|
211
|
+
"merge-patch-contains-null": {
|
|
212
|
+
readonly default: "Cannot convert model to a merge-patch compatible shape because it contains the 'null' intrinsic type.";
|
|
213
|
+
};
|
|
214
|
+
"merge-patch-content-type": {
|
|
215
|
+
readonly default: import("@typespec/compiler").CallableMessage<["contentType"]>;
|
|
216
|
+
};
|
|
217
|
+
"merge-patch-contains-metadata": {
|
|
218
|
+
readonly default: import("@typespec/compiler").CallableMessage<["metadataType", "propertyName"]>;
|
|
219
|
+
};
|
|
196
220
|
}[C]>(program: import("@typespec/compiler").Program, diag: import("@typespec/compiler").DiagnosticReport<{
|
|
197
221
|
"http-verb-duplicate": {
|
|
198
222
|
readonly default: import("@typespec/compiler").CallableMessage<["entityName"]>;
|
|
@@ -290,7 +314,19 @@ export declare const reportDiagnostic: <C extends "http-verb-duplicate" | "missi
|
|
|
290
314
|
"http-file-contents-not-scalar": {
|
|
291
315
|
readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
|
|
292
316
|
};
|
|
293
|
-
|
|
317
|
+
"patch-implicit-optional": {
|
|
318
|
+
readonly default: "Patch operation stopped applying an implicit optional transform to the body in 1.0.0. Use @patch(#{implicitOptional: false}) to restore the old behavior.";
|
|
319
|
+
};
|
|
320
|
+
"merge-patch-contains-null": {
|
|
321
|
+
readonly default: "Cannot convert model to a merge-patch compatible shape because it contains the 'null' intrinsic type.";
|
|
322
|
+
};
|
|
323
|
+
"merge-patch-content-type": {
|
|
324
|
+
readonly default: import("@typespec/compiler").CallableMessage<["contentType"]>;
|
|
325
|
+
};
|
|
326
|
+
"merge-patch-contains-metadata": {
|
|
327
|
+
readonly default: import("@typespec/compiler").CallableMessage<["metadataType", "propertyName"]>;
|
|
328
|
+
};
|
|
329
|
+
}, C, M>) => void, createDiagnostic: <C extends "http-verb-duplicate" | "missing-uri-param" | "incompatible-uri-param" | "use-uri-template" | "double-slash" | "missing-server-param" | "duplicate-body" | "duplicate-route-decorator" | "operation-param-duplicate-type" | "duplicate-operation" | "multiple-status-codes" | "status-code-invalid" | "content-type-string" | "content-type-ignored" | "metadata-ignored" | "response-cookie-not-supported" | "no-service-found" | "invalid-type-for-auth" | "shared-inconsistency" | "multipart-invalid-content-type" | "multipart-model" | "no-implicit-multipart" | "multipart-part" | "multipart-nested" | "http-file-extra-property" | "http-file-disallowed-metadata" | "formdata-no-part-name" | "http-file-structured" | "http-file-content-type-not-string" | "http-file-contents-not-scalar" | "patch-implicit-optional" | "merge-patch-contains-null" | "merge-patch-content-type" | "merge-patch-contains-metadata", M extends keyof {
|
|
294
330
|
"http-verb-duplicate": {
|
|
295
331
|
readonly default: import("@typespec/compiler").CallableMessage<["entityName"]>;
|
|
296
332
|
};
|
|
@@ -387,6 +423,18 @@ export declare const reportDiagnostic: <C extends "http-verb-duplicate" | "missi
|
|
|
387
423
|
"http-file-contents-not-scalar": {
|
|
388
424
|
readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
|
|
389
425
|
};
|
|
426
|
+
"patch-implicit-optional": {
|
|
427
|
+
readonly default: "Patch operation stopped applying an implicit optional transform to the body in 1.0.0. Use @patch(#{implicitOptional: false}) to restore the old behavior.";
|
|
428
|
+
};
|
|
429
|
+
"merge-patch-contains-null": {
|
|
430
|
+
readonly default: "Cannot convert model to a merge-patch compatible shape because it contains the 'null' intrinsic type.";
|
|
431
|
+
};
|
|
432
|
+
"merge-patch-content-type": {
|
|
433
|
+
readonly default: import("@typespec/compiler").CallableMessage<["contentType"]>;
|
|
434
|
+
};
|
|
435
|
+
"merge-patch-contains-metadata": {
|
|
436
|
+
readonly default: import("@typespec/compiler").CallableMessage<["metadataType", "propertyName"]>;
|
|
437
|
+
};
|
|
390
438
|
}[C]>(diag: import("@typespec/compiler").DiagnosticReport<{
|
|
391
439
|
"http-verb-duplicate": {
|
|
392
440
|
readonly default: import("@typespec/compiler").CallableMessage<["entityName"]>;
|
|
@@ -484,5 +532,17 @@ export declare const reportDiagnostic: <C extends "http-verb-duplicate" | "missi
|
|
|
484
532
|
"http-file-contents-not-scalar": {
|
|
485
533
|
readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
|
|
486
534
|
};
|
|
487
|
-
|
|
535
|
+
"patch-implicit-optional": {
|
|
536
|
+
readonly default: "Patch operation stopped applying an implicit optional transform to the body in 1.0.0. Use @patch(#{implicitOptional: false}) to restore the old behavior.";
|
|
537
|
+
};
|
|
538
|
+
"merge-patch-contains-null": {
|
|
539
|
+
readonly default: "Cannot convert model to a merge-patch compatible shape because it contains the 'null' intrinsic type.";
|
|
540
|
+
};
|
|
541
|
+
"merge-patch-content-type": {
|
|
542
|
+
readonly default: import("@typespec/compiler").CallableMessage<["contentType"]>;
|
|
543
|
+
};
|
|
544
|
+
"merge-patch-contains-metadata": {
|
|
545
|
+
readonly default: import("@typespec/compiler").CallableMessage<["metadataType", "propertyName"]>;
|
|
546
|
+
};
|
|
547
|
+
}, C, M>) => import("@typespec/compiler").Diagnostic, HttpStateKeys: Record<"path" | "authentication" | "header" | "cookie" | "query" | "body" | "bodyRoot" | "bodyIgnore" | "multipartBody" | "statusCode" | "verbs" | "patchOptions" | "servers" | "includeInapplicableMetadataInPayload" | "externalInterfaces" | "routeProducer" | "routes" | "sharedRoutes" | "routeOptions" | "file" | "httpPart" | "mergePatchModel" | "mergePatchProperty" | "mergePatchPropertyOptions", symbol>;
|
|
488
548
|
//# sourceMappingURL=lib.d.ts.map
|
package/dist/src/lib.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6ZA8Pf,CAAC;AAEH,eAAO,MAAQ,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sDAAa,aAAa,sZAAS,CAAC"}
|
package/dist/src/lib.js
CHANGED
|
@@ -188,6 +188,30 @@ export const $lib = createTypeSpecLibrary({
|
|
|
188
188
|
default: paramMessage `The 'contents' property of the file model must be a scalar type that extends 'string' or 'bytes'. Found '${"type"}'.`,
|
|
189
189
|
},
|
|
190
190
|
},
|
|
191
|
+
"patch-implicit-optional": {
|
|
192
|
+
severity: "warning",
|
|
193
|
+
messages: {
|
|
194
|
+
default: `Patch operation stopped applying an implicit optional transform to the body in 1.0.0. Use @patch(#{implicitOptional: false}) to restore the old behavior.`,
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
"merge-patch-contains-null": {
|
|
198
|
+
severity: "error",
|
|
199
|
+
messages: {
|
|
200
|
+
default: "Cannot convert model to a merge-patch compatible shape because it contains the 'null' intrinsic type.",
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
"merge-patch-content-type": {
|
|
204
|
+
severity: "warning",
|
|
205
|
+
messages: {
|
|
206
|
+
default: paramMessage `The content-type of a request using a merge-patch template should be 'application/merge-patch+json' detected a header with content-type '${"contentType"}'.`,
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
"merge-patch-contains-metadata": {
|
|
210
|
+
severity: "error",
|
|
211
|
+
messages: {
|
|
212
|
+
default: paramMessage `The MergePatch transform does not operate on http envelope metadata. Remove any http metadata decorators ('@query', '@header', '@path', '@cookie', '@statusCode') from the model passed to the MergePatch template. Found '${"metadataType"}' decorating property '${"propertyName"}'`,
|
|
213
|
+
},
|
|
214
|
+
},
|
|
191
215
|
},
|
|
192
216
|
state: {
|
|
193
217
|
authentication: { description: "State for the @auth decorator" },
|
|
@@ -215,6 +239,11 @@ export const $lib = createTypeSpecLibrary({
|
|
|
215
239
|
// private
|
|
216
240
|
file: { description: "State for the @Private.file decorator" },
|
|
217
241
|
httpPart: { description: "State for the @Private.httpPart decorator" },
|
|
242
|
+
mergePatchModel: { description: "State marking mergePatch models " },
|
|
243
|
+
mergePatchProperty: { description: "State marking merge path model property source" },
|
|
244
|
+
mergePatchPropertyOptions: {
|
|
245
|
+
description: "Override options for a property in a merge patch transform",
|
|
246
|
+
},
|
|
218
247
|
},
|
|
219
248
|
});
|
|
220
249
|
export const { reportDiagnostic, createDiagnostic, stateKeys: HttpStateKeys } = $lib;
|
package/dist/src/lib.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEzE,MAAM,CAAC,MAAM,IAAI,GAAG,qBAAqB,CAAC;IACxC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE;QACX,qBAAqB,EAAE;YACrB,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,gCAAgC,YAAY,EAAE;aACpE;SACF;QACD,mBAAmB,EAAE;YACnB,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,8BAA8B,OAAO,4CAA4C;aACvG;SACF;QACD,wBAAwB,EAAE;YACxB,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,cAAc,OAAO,gCAAgC,SAAS,0BAA0B,gBAAgB,GAAG;aACjI;SACF;QACD,kBAAkB,EAAE;YAClB,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,cAAc,OA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,gBAAgB,EAAE,gBAAgB,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ApplyMergePatchDecorator, MergePatchModelDecorator, MergePatchPropertyDecorator } from "../generated-defs/TypeSpec.Http.Private.js";
|
|
2
|
+
export declare const $mergePatchModel: MergePatchModelDecorator;
|
|
3
|
+
export declare const $mergePatchProperty: MergePatchPropertyDecorator;
|
|
4
|
+
export declare const $applyMergePatch: ApplyMergePatchDecorator;
|
|
5
|
+
//# sourceMappingURL=merge-patch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-patch.d.ts","sourceRoot":"","sources":["../../src/merge-patch.ts"],"names":[],"mappings":"AAiCA,OAAO,EACL,wBAAwB,EAExB,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,4CAA4C,CAAC;AAYpD,eAAO,MAAM,gBAAgB,EAAE,wBAM9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,2BAMjC,CAAC;AAmCF,eAAO,MAAM,gBAAgB,EAAE,wBAwC9B,CAAC"}
|