@microsoft/typespec-msgraph 0.0.1-Preview.18 → 0.0.1-Preview.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/components/acceptable-media-types-annotation.js.map +1 -1
- package/dist/src/components/alternate-keys-annotation.js.map +1 -1
- package/dist/src/components/common-elements.d.ts +1 -1
- package/dist/src/components/common-elements.d.ts.map +1 -1
- package/dist/src/components/common-elements.js.map +1 -1
- package/dist/src/components/delta-annotation.d.ts +6 -0
- package/dist/src/components/delta-annotation.d.ts.map +1 -0
- package/dist/src/components/delta-annotation.js +18 -0
- package/dist/src/components/delta-annotation.js.map +1 -0
- package/dist/src/components/entity-container-element.d.ts.map +1 -1
- package/dist/src/components/entity-container-element.js +4 -1
- package/dist/src/components/entity-container-element.js.map +1 -1
- package/dist/src/components/is-url-annotation.d.ts +5 -0
- package/dist/src/components/is-url-annotation.d.ts.map +1 -0
- package/dist/src/components/is-url-annotation.js +6 -0
- package/dist/src/components/is-url-annotation.js.map +1 -0
- package/dist/src/components/operation-element.d.ts.map +1 -1
- package/dist/src/components/operation-element.js +4 -2
- package/dist/src/components/operation-element.js.map +1 -1
- package/dist/src/components/permissions-annotation.js.map +1 -1
- package/dist/src/components/property-element.d.ts.map +1 -1
- package/dist/src/components/property-element.js +6 -2
- package/dist/src/components/property-element.js.map +1 -1
- package/dist/src/components/revisions-annotation.js.map +1 -1
- package/dist/src/components/schema-element.js.map +1 -1
- package/dist/src/decorators/ags-attribute.js.map +1 -1
- package/dist/src/decorators/allowed-values.js.map +1 -1
- package/dist/src/decorators/delta.d.ts +10 -0
- package/dist/src/decorators/delta.d.ts.map +1 -0
- package/dist/src/decorators/delta.js +14 -0
- package/dist/src/decorators/delta.js.map +1 -0
- package/dist/src/decorators/expand.d.ts +1 -0
- package/dist/src/decorators/expand.d.ts.map +1 -1
- package/dist/src/decorators/expand.js +5 -1
- package/dist/src/decorators/expand.js.map +1 -1
- package/dist/src/decorators/filter.js +4 -4
- package/dist/src/decorators/filter.js.map +1 -1
- package/dist/src/decorators/function.d.ts.map +1 -1
- package/dist/src/decorators/function.js +3 -0
- package/dist/src/decorators/function.js.map +1 -1
- package/dist/src/decorators/graph-route.js.map +1 -1
- package/dist/src/decorators/index.d.ts +2 -0
- package/dist/src/decorators/index.d.ts.map +1 -1
- package/dist/src/decorators/index.js +2 -0
- package/dist/src/decorators/index.js.map +1 -1
- package/dist/src/decorators/public-namespace.js.map +1 -1
- package/dist/src/decorators/reference-target.js.map +1 -1
- package/dist/src/decorators/return-source.d.ts +9 -0
- package/dist/src/decorators/return-source.d.ts.map +1 -0
- package/dist/src/decorators/return-source.js +26 -0
- package/dist/src/decorators/return-source.js.map +1 -0
- package/dist/src/decorators/workload-namespace.js.map +1 -1
- package/dist/src/dom/error-interceptor.js.map +1 -1
- package/dist/src/dom/reconciler.js.map +1 -1
- package/dist/src/dom/renderer.js.map +1 -1
- package/dist/src/emitter.d.ts.map +1 -1
- package/dist/src/emitter.js +21 -2
- package/dist/src/emitter.js.map +1 -1
- package/dist/src/entities/address-url.js.map +1 -1
- package/dist/src/entities/annotations.d.ts.map +1 -1
- package/dist/src/entities/annotations.js +9 -22
- package/dist/src/entities/annotations.js.map +1 -1
- package/dist/src/entities/entity-container.d.ts +2 -0
- package/dist/src/entities/entity-container.d.ts.map +1 -1
- package/dist/src/entities/entity-container.js +4 -1
- package/dist/src/entities/entity-container.js.map +1 -1
- package/dist/src/entities/model.d.ts +6 -0
- package/dist/src/entities/model.d.ts.map +1 -1
- package/dist/src/entities/model.js +37 -1
- package/dist/src/entities/model.js.map +1 -1
- package/dist/src/entities/ms-graph-route.js.map +1 -1
- package/dist/src/entities/namespace.d.ts.map +1 -1
- package/dist/src/entities/namespace.js.map +1 -1
- package/dist/src/entities/operation.d.ts +1 -0
- package/dist/src/entities/operation.d.ts.map +1 -1
- package/dist/src/entities/operation.js +3 -2
- package/dist/src/entities/operation.js.map +1 -1
- package/dist/src/entities/property.js.map +1 -1
- package/dist/src/entities/revision-definition.js.map +1 -1
- package/dist/src/lib.d.ts +22 -0
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +11 -0
- package/dist/src/lib.js.map +1 -1
- package/dist/src/rules/abstract.js.map +1 -1
- package/dist/src/rules/address-url.js.map +1 -1
- package/dist/src/rules/allowed-values.js.map +1 -1
- package/dist/src/rules/alternate-key.js.map +1 -1
- package/dist/src/rules/collection-navigation-properties-not-nullable.js.map +1 -1
- package/dist/src/rules/complex.d.ts +3 -0
- package/dist/src/rules/complex.d.ts.map +1 -0
- package/dist/src/rules/complex.js +27 -0
- package/dist/src/rules/complex.js.map +1 -0
- package/dist/src/rules/computed.js.map +1 -1
- package/dist/src/rules/contains.js.map +1 -1
- package/dist/src/rules/count.js.map +1 -1
- package/dist/src/rules/delta.d.ts +8 -0
- package/dist/src/rules/delta.d.ts.map +1 -0
- package/dist/src/rules/delta.js +204 -0
- package/dist/src/rules/delta.js.map +1 -0
- package/dist/src/rules/disallowed-typespec-decorators.js.map +1 -1
- package/dist/src/rules/entity.d.ts +1 -0
- package/dist/src/rules/entity.d.ts.map +1 -1
- package/dist/src/rules/entity.js +19 -1
- package/dist/src/rules/entity.js.map +1 -1
- package/dist/src/rules/enum.js.map +1 -1
- package/dist/src/rules/expand.d.ts.map +1 -1
- package/dist/src/rules/expand.js +7 -1
- package/dist/src/rules/expand.js.map +1 -1
- package/dist/src/rules/extends-on-same-type.js.map +1 -1
- package/dist/src/rules/filter.d.ts +1 -0
- package/dist/src/rules/filter.d.ts.map +1 -1
- package/dist/src/rules/filter.js +45 -25
- package/dist/src/rules/filter.js.map +1 -1
- package/dist/src/rules/function.js.map +1 -1
- package/dist/src/rules/global-operation.js.map +1 -1
- package/dist/src/rules/graph-deprecated.js.map +1 -1
- package/dist/src/rules/graph-route.js.map +1 -1
- package/dist/src/rules/index.d.ts +3 -0
- package/dist/src/rules/index.d.ts.map +1 -1
- package/dist/src/rules/index.js +3 -0
- package/dist/src/rules/index.js.map +1 -1
- package/dist/src/rules/limited-charset.js.map +1 -1
- package/dist/src/rules/media.js.map +1 -1
- package/dist/src/rules/model.js.map +1 -1
- package/dist/src/rules/namespace.js.map +1 -1
- package/dist/src/rules/open.js.map +1 -1
- package/dist/src/rules/operation-inside-interface.d.ts +1 -0
- package/dist/src/rules/operation-inside-interface.d.ts.map +1 -1
- package/dist/src/rules/operation-inside-interface.js +38 -2
- package/dist/src/rules/operation-inside-interface.js.map +1 -1
- package/dist/src/rules/order-by.js.map +1 -1
- package/dist/src/rules/ownerless.js.map +1 -1
- package/dist/src/rules/partial.js.map +1 -1
- package/dist/src/rules/record-t.js.map +1 -1
- package/dist/src/rules/reference-target.js.map +1 -1
- package/dist/src/rules/references.js.map +1 -1
- package/dist/src/rules/required-for-create.js.map +1 -1
- package/dist/src/rules/return-source.d.ts +3 -0
- package/dist/src/rules/return-source.d.ts.map +1 -0
- package/dist/src/rules/return-source.js +27 -0
- package/dist/src/rules/return-source.js.map +1 -0
- package/dist/src/rules/search.js.map +1 -1
- package/dist/src/rules/skip.js.map +1 -1
- package/dist/src/rules/top.js.map +1 -1
- package/dist/src/utils.d.ts +9 -3
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +210 -33
- package/dist/src/utils.js.map +1 -1
- package/dist/src/validate.d.ts.map +1 -1
- package/dist/src/validate.js +11 -0
- package/dist/src/validate.js.map +1 -1
- package/lib/decorators.tsp +15 -1
- package/lib/lib.tsp +3 -1
- package/lib/porcelain.tsp +19 -4
- package/package.json +13 -12
package/lib/decorators.tsp
CHANGED
|
@@ -104,6 +104,14 @@ extern dec contains(target: ModelProperty);
|
|
|
104
104
|
*/
|
|
105
105
|
extern dec count(target: Operation);
|
|
106
106
|
|
|
107
|
+
/**
|
|
108
|
+
* `@delta` - mark an operation as a delta operation
|
|
109
|
+
*
|
|
110
|
+
* `@delta` can only be applied to operations.
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
extern dec delta(target: Operation);
|
|
114
|
+
|
|
107
115
|
/**
|
|
108
116
|
* `@deltaCollection` - mark a model as representing a delta paged collection.
|
|
109
117
|
*
|
|
@@ -202,7 +210,7 @@ extern dec flags(target: Enum);
|
|
|
202
210
|
*
|
|
203
211
|
* `@function` can only be applied to operations.
|
|
204
212
|
*/
|
|
205
|
-
extern dec function(target: Operation, name?: valueof string, isComposable?: valueof boolean);
|
|
213
|
+
extern dec function(target: Operation, name?: valueof string | null, isComposable?: valueof boolean);
|
|
206
214
|
|
|
207
215
|
/**
|
|
208
216
|
* `@globalOperation` - mark an operation as a globalOperation
|
|
@@ -383,6 +391,12 @@ extern dec references(target: ModelProperty);
|
|
|
383
391
|
*/
|
|
384
392
|
extern dec requiredForCreate(target: ModelProperty);
|
|
385
393
|
|
|
394
|
+
/**
|
|
395
|
+
* '@returnSource' - mark an action or a function as having an entitysetpath.
|
|
396
|
+
* '@returnSource' - can only be applied to action and function operations.
|
|
397
|
+
*/
|
|
398
|
+
extern dec returnSource(target: Operation, path : valueof string | null);
|
|
399
|
+
|
|
386
400
|
/**
|
|
387
401
|
* `@search` - Applies to: get operations that return collections.
|
|
388
402
|
* Indicates that the get operation supports the OData $search query parameter.
|
package/lib/lib.tsp
CHANGED
package/lib/porcelain.tsp
CHANGED
|
@@ -11,6 +11,7 @@ using TypeSpec.Http;
|
|
|
11
11
|
using MsGraph;
|
|
12
12
|
using MsGraph.SharedModels;
|
|
13
13
|
using MsGraph.Responses;
|
|
14
|
+
using MsGraph.Bodies;
|
|
14
15
|
|
|
15
16
|
namespace MsGraph;
|
|
16
17
|
|
|
@@ -144,22 +145,36 @@ namespace MsGraph;
|
|
|
144
145
|
TResource, TParams, TResponse, TErrorResponse>;
|
|
145
146
|
|
|
146
147
|
|
|
147
|
-
@action op Action<
|
|
148
|
+
@action @returnSource(TSourceRoute) op Action<
|
|
148
149
|
TReturnType = void,
|
|
149
150
|
TActionParams extends {} = {},
|
|
150
151
|
TResource = Automatic.CalculatedResourceType,
|
|
151
152
|
TParams = {... Automatic.GraphRouteParams, ... TActionParams},
|
|
152
153
|
TResponse = TReturnType,
|
|
153
|
-
TErrorResponse = MsGraph.Responses.OperationErrorResponse
|
|
154
|
+
TErrorResponse = MsGraph.Responses.OperationErrorResponse,
|
|
155
|
+
TSourceRoute extends valueof string | null = null
|
|
154
156
|
>(...TParams): TResponse | TErrorResponse;
|
|
155
157
|
|
|
156
|
-
@function op Function<
|
|
158
|
+
@function(TNameOverride, TComposable) @returnSource(TSourceRoute) op Function<
|
|
157
159
|
TReturnType,
|
|
158
160
|
TFunctionParams extends {} = {},
|
|
159
161
|
TResource = Automatic.CalculatedResourceType,
|
|
160
162
|
TParams = {... Automatic.GraphRouteParams, ... TFunctionParams},
|
|
161
163
|
TResponse = TReturnType,
|
|
162
|
-
TErrorResponse = MsGraph.Responses.OperationErrorResponse
|
|
164
|
+
TErrorResponse = MsGraph.Responses.OperationErrorResponse,
|
|
165
|
+
TComposable extends valueof boolean = false,
|
|
166
|
+
TNameOverride extends valueof string | null = null,
|
|
167
|
+
TSourceRoute extends valueof string | null = null
|
|
168
|
+
>(...TParams): TResponse | TErrorResponse;
|
|
169
|
+
|
|
170
|
+
@delta @function @returnSource(TSourceRoute) op Delta<
|
|
171
|
+
TReturnType=DeltaCollectionBody<Automatic.CalculatedResourceType>,
|
|
172
|
+
TFunctionParams extends {} = {},
|
|
173
|
+
TResource = Automatic.CalculatedResourceType,
|
|
174
|
+
TParams = {... Automatic.GraphRouteParams, ... TFunctionParams},
|
|
175
|
+
TResponse = TReturnType,
|
|
176
|
+
TErrorResponse = MsGraph.Responses.OperationErrorResponse,
|
|
177
|
+
TSourceRoute extends valueof string | null = null
|
|
163
178
|
>(...TParams): TResponse | TErrorResponse;
|
|
164
179
|
|
|
165
180
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/typespec-msgraph",
|
|
3
|
-
"version": "0.0.1-Preview.
|
|
3
|
+
"version": "0.0.1-Preview.19",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec for Microsoft Graph provides a description of the Microsoft Graph APIs. It is used for generating API description languages, client and service code, documentation, and other assets.",
|
|
6
6
|
"homepage": "https://github.com/microsoftgraph/typespec-msgraph",
|
|
@@ -55,23 +55,24 @@
|
|
|
55
55
|
"@xmldom/xmldom": "~0.8.4",
|
|
56
56
|
"@typespec/compiler": "~0.55.0",
|
|
57
57
|
"@typespec/http": "~0.55.0",
|
|
58
|
-
"prettier": "~3.
|
|
59
|
-
"react-dom": "~18.
|
|
60
|
-
"react": "~18.
|
|
61
|
-
"react-reconciler": "~0.
|
|
58
|
+
"prettier": "~3.2.5",
|
|
59
|
+
"react-dom": "~18.3.1",
|
|
60
|
+
"react": "~18.3.1",
|
|
61
|
+
"react-reconciler": "~0.29.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@types/mocha": "~10.0.1",
|
|
65
|
-
"@types/node": "~
|
|
66
|
-
"@types/react": "~18.
|
|
65
|
+
"@types/node": "~20.12.7",
|
|
66
|
+
"@types/react": "~18.3.1",
|
|
67
67
|
"@types/react-reconciler": "~0.28.0",
|
|
68
68
|
"@typespec/eslint-config-typespec": "~0.55.0",
|
|
69
|
-
"c8": "~
|
|
70
|
-
"eslint": "^
|
|
71
|
-
"mocha": "~10.
|
|
69
|
+
"c8": "~9.1.0",
|
|
70
|
+
"eslint": "^9.1.1",
|
|
71
|
+
"mocha": "~10.4.0",
|
|
72
72
|
"rimraf": "~5.0.1",
|
|
73
|
-
"typescript": "~5.
|
|
73
|
+
"typescript": "~5.4.5",
|
|
74
74
|
"xpath": "~0.0.32",
|
|
75
|
-
"tsx": "~
|
|
75
|
+
"tsx": "~4.8.1",
|
|
76
|
+
"source-map-support": "latest"
|
|
76
77
|
}
|
|
77
78
|
}
|