Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d885f48

Browse files
Akhil-KokkulaAkhil Kokkula
andauthored
digital-twins-core version update to 2023-10-31 (Azure#34240)
### Packages impacted by this PR digital-twins-core ### Issues associated with this PR ### Describe the problem that is addressed by this PR Update digital-twins-core service version to 2023-10-31 API service version ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ Tests run in record mode: ![Screenshot 2025-05-06 225729](https://github.com/user-attachments/assets/147c7613-75d1-4578-9251-b281449b972a) ![Screenshot 2025-05-06 225818](https://github.com/user-attachments/assets/c42393dc-9fc0-4aef-abd8-723f932d463f) ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ 1. Updated the swagger/README.md in the digital-twins-core directory to consume 2023-10-31 service version 2. Ran `autorest README.md` 3. Ran `rush update` 4. Ran `rush build -t @azure/digital-twins-core` 5. Ran `.\eng\common\TestResources\New-TestResources.ps1 digitaltwins ` to create test resources 6. Added the env variables from the output in step 5 to the shell environment and added environment variable `${env:TEST_MODE} = 'record'` 7. In the digital-twins-core directory, ran `rushx build` 8. In the digital-twins-core directory, ran `rushx test` ### Checklists - [x] Added impacted package name to the issue description - [] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [x] Added a changelog (if necessary) --------- Co-authored-by: Akhil Kokkula <[email protected]>
1 parent 6c15ce4 commit d885f48

28 files changed

+2744
-559
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/digitaltwins/digital-twins-core/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
# Release History
44

5+
## 2.0.1 (2025-05-13)
6+
7+
### Features Added
8+
9+
- Updated service API version to use API version 2023-10-31 by default.
10+
511
## 2.0.0 (Unreleased)
612

713
### Features Added

sdk/digitaltwins/digital-twins-core/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "js",
44
"TagPrefix": "js/digitaltwins/digital-twins-core",
5-
"Tag": "js/digitaltwins/digital-twins-core_c24bdd8f83"
5+
"Tag": "js/digitaltwins/digital-twins-core_751f86472a"
66
}

sdk/digitaltwins/digital-twins-core/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@
5151
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
5252
},
5353
"dependencies": {
54+
"@azure/abort-controller": "^2.1.2",
5455
"@azure/core-auth": "^1.9.0",
5556
"@azure/core-client": "^1.9.2",
57+
"@azure/core-lro": "^2.0.0",
5658
"@azure/core-paging": "^1.6.2",
5759
"@azure/core-rest-pipeline": "^1.18.2",
5860
"@azure/core-tracing": "^1.2.0",

sdk/digitaltwins/digital-twins-core/review/digital-twins-core.api.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,14 @@ export interface DigitalTwinsAddRelationshipOptionalParams extends coreClient.Op
4040
}
4141

4242
// @public
43-
export type DigitalTwinsAddRelationshipResponse = DigitalTwinsAddRelationshipHeaders & Record<string, unknown>;
43+
export type DigitalTwinsAddRelationshipResponse = DigitalTwinsAddRelationshipHeaders & {
44+
[propertyName: string]: any;
45+
};
4446

4547
// @public
46-
export type DigitalTwinsAddResponse = DigitalTwinsAddHeaders & Record<string, unknown>;
48+
export type DigitalTwinsAddResponse = DigitalTwinsAddHeaders & {
49+
[propertyName: string]: any;
50+
};
4751

4852
// @public
4953
export class DigitalTwinsClient {
@@ -94,23 +98,29 @@ export interface DigitalTwinsGetByIdHeaders {
9498
}
9599

96100
// @public
97-
export type DigitalTwinsGetByIdResponse = DigitalTwinsGetByIdHeaders & Record<string, unknown>;
101+
export type DigitalTwinsGetByIdResponse = DigitalTwinsGetByIdHeaders & {
102+
[propertyName: string]: any;
103+
};
98104

99105
// @public
100106
export interface DigitalTwinsGetComponentHeaders {
101107
etag?: string;
102108
}
103109

104110
// @public
105-
export type DigitalTwinsGetComponentResponse = DigitalTwinsGetComponentHeaders & Record<string, unknown>;
111+
export type DigitalTwinsGetComponentResponse = DigitalTwinsGetComponentHeaders & {
112+
[propertyName: string]: any;
113+
};
106114

107115
// @public
108116
export interface DigitalTwinsGetRelationshipByIdHeaders {
109117
etag?: string;
110118
}
111119

112120
// @public
113-
export type DigitalTwinsGetRelationshipByIdResponse = DigitalTwinsGetRelationshipByIdHeaders & Record<string, unknown>;
121+
export type DigitalTwinsGetRelationshipByIdResponse = DigitalTwinsGetRelationshipByIdHeaders & {
122+
[propertyName: string]: any;
123+
};
114124

115125
// @public
116126
export type DigitalTwinsListIncomingRelationshipsResponse = IncomingRelationshipCollection;
@@ -181,7 +191,7 @@ export interface EventRoute {
181191
// @public
182192
export interface EventRouteCollection {
183193
nextLink?: string;
184-
value?: EventRoute[];
194+
value: EventRoute[];
185195
}
186196

187197
// @public
@@ -207,7 +217,7 @@ export interface IncomingRelationship {
207217
export interface IncomingRelationshipCollection {
208218
nextLink?: string;
209219
// (undocumented)
210-
value?: IncomingRelationship[];
220+
value: IncomingRelationship[];
211221
}
212222

213223
// @public
@@ -234,7 +244,7 @@ export interface ListRelationshipsOptions extends coreClient.OperationOptions {
234244
// @public
235245
export interface PagedDigitalTwinsModelDataCollection {
236246
nextLink?: string;
237-
value?: DigitalTwinsModelData[];
247+
value: DigitalTwinsModelData[];
238248
}
239249

240250
// @public
@@ -248,7 +258,7 @@ export type QueryQueryTwinsResponse = QueryQueryTwinsHeaders & QueryResult;
248258
// @public
249259
export interface QueryResult {
250260
continuationToken?: string;
251-
value?: Record<string, unknown>[];
261+
value: Record<string, unknown>[];
252262
}
253263

254264
// @public
@@ -265,7 +275,7 @@ export interface QueryTwinsOptions extends coreClient.OperationOptions {
265275
// @public
266276
export interface RelationshipCollection {
267277
nextLink?: string;
268-
value?: Record<string, unknown>[];
278+
value: Record<string, unknown>[];
269279
}
270280

271281
// (No @packageDocumentation comment for this package)

sdk/digitaltwins/digital-twins-core/src/digitalTwinsClient.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ export class DigitalTwinsClient {
504504
models: dtdlModels,
505505
},
506506
async (updatedOptions) => {
507-
return this.client.digitalTwinModels.add(updatedOptions);
507+
return this.client.digitalTwinModels.add(dtdlModels, updatedOptions);
508508
},
509509
);
510510
}
@@ -595,17 +595,18 @@ export class DigitalTwinsClient {
595595
filter: string,
596596
options: OperationOptions = {},
597597
): Promise<void> {
598+
const eventRoute = {
599+
endpointName: endpointId,
600+
filter,
601+
};
598602
return tracingClient.withSpan(
599603
"DigitalTwinsClient.upsertEventRoute",
600604
{
601-
eventRoute: {
602-
endpointName: endpointId,
603-
filter,
604-
},
605+
eventRoute,
605606
...options,
606607
},
607608
async (updatedOptions) => {
608-
return this.client.eventRoutes.add(eventRouteId, updatedOptions);
609+
return this.client.eventRoutes.add(eventRouteId, eventRoute, updatedOptions);
609610
},
610611
);
611612
}

sdk/digitaltwins/digital-twins-core/src/generated/azureDigitalTwinsAPI.ts

Lines changed: 20 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/digitaltwins/digital-twins-core/src/generated/lroImpl.ts

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)