@azure/digital-twins-core 1.1.0-alpha.20220104.2 → 1.1.0-alpha.20220131.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/dist/index.js +106 -86
- package/dist/index.js.map +1 -1
- package/package.json +7 -8
package/dist/index.js
CHANGED
|
@@ -7,6 +7,26 @@ var coreHttp = require('@azure/core-http');
|
|
|
7
7
|
var coreTracing = require('@azure/core-tracing');
|
|
8
8
|
var logger$1 = require('@azure/logger');
|
|
9
9
|
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n["default"] = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var coreHttp__namespace = /*#__PURE__*/_interopNamespace(coreHttp);
|
|
29
|
+
|
|
10
30
|
/*
|
|
11
31
|
* Copyright (c) Microsoft Corporation.
|
|
12
32
|
* Licensed under the MIT License.
|
|
@@ -768,8 +788,8 @@ class DigitalTwinModels {
|
|
|
768
788
|
* @param options The options parameters.
|
|
769
789
|
*/
|
|
770
790
|
add(options) {
|
|
771
|
-
const operationOptions =
|
|
772
|
-
return this.client.sendOperationRequest({ options: operationOptions }, addOperationSpec);
|
|
791
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
792
|
+
return this.client.sendOperationRequest({ options: operationOptions }, addOperationSpec$2);
|
|
773
793
|
}
|
|
774
794
|
/**
|
|
775
795
|
* Retrieves model metadata and, optionally, model definitions.
|
|
@@ -783,8 +803,8 @@ class DigitalTwinModels {
|
|
|
783
803
|
* @param options The options parameters.
|
|
784
804
|
*/
|
|
785
805
|
list(options) {
|
|
786
|
-
const operationOptions =
|
|
787
|
-
return this.client.sendOperationRequest({ options: operationOptions }, listOperationSpec);
|
|
806
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
807
|
+
return this.client.sendOperationRequest({ options: operationOptions }, listOperationSpec$1);
|
|
788
808
|
}
|
|
789
809
|
/**
|
|
790
810
|
* Retrieves model metadata and optionally the model definition.
|
|
@@ -799,8 +819,8 @@ class DigitalTwinModels {
|
|
|
799
819
|
* @param options The options parameters.
|
|
800
820
|
*/
|
|
801
821
|
getById(id, options) {
|
|
802
|
-
const operationOptions =
|
|
803
|
-
return this.client.sendOperationRequest({ id, options: operationOptions }, getByIdOperationSpec);
|
|
822
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
823
|
+
return this.client.sendOperationRequest({ id, options: operationOptions }, getByIdOperationSpec$2);
|
|
804
824
|
}
|
|
805
825
|
/**
|
|
806
826
|
* Updates the metadata for a model.
|
|
@@ -820,8 +840,8 @@ class DigitalTwinModels {
|
|
|
820
840
|
* @param options The options parameters.
|
|
821
841
|
*/
|
|
822
842
|
update(id, updateModel, options) {
|
|
823
|
-
const operationOptions =
|
|
824
|
-
return this.client.sendOperationRequest({ id, updateModel, options: operationOptions }, updateOperationSpec);
|
|
843
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
844
|
+
return this.client.sendOperationRequest({ id, updateModel, options: operationOptions }, updateOperationSpec$1);
|
|
825
845
|
}
|
|
826
846
|
/**
|
|
827
847
|
* Deletes a model. A model can only be deleted if no other models reference it.
|
|
@@ -838,8 +858,8 @@ class DigitalTwinModels {
|
|
|
838
858
|
* @param options The options parameters.
|
|
839
859
|
*/
|
|
840
860
|
delete(id, options) {
|
|
841
|
-
const operationOptions =
|
|
842
|
-
return this.client.sendOperationRequest({ id, options: operationOptions }, deleteOperationSpec);
|
|
861
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
862
|
+
return this.client.sendOperationRequest({ id, options: operationOptions }, deleteOperationSpec$2);
|
|
843
863
|
}
|
|
844
864
|
/**
|
|
845
865
|
* ListNext
|
|
@@ -847,13 +867,13 @@ class DigitalTwinModels {
|
|
|
847
867
|
* @param options The options parameters.
|
|
848
868
|
*/
|
|
849
869
|
listNext(nextLink, options) {
|
|
850
|
-
const operationOptions =
|
|
851
|
-
return this.client.sendOperationRequest({ nextLink, options: operationOptions }, listNextOperationSpec);
|
|
870
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
871
|
+
return this.client.sendOperationRequest({ nextLink, options: operationOptions }, listNextOperationSpec$1);
|
|
852
872
|
}
|
|
853
873
|
}
|
|
854
874
|
// Operation Specifications
|
|
855
|
-
const serializer = new
|
|
856
|
-
const addOperationSpec = {
|
|
875
|
+
const serializer$3 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
|
|
876
|
+
const addOperationSpec$2 = {
|
|
857
877
|
path: "/models",
|
|
858
878
|
httpMethod: "POST",
|
|
859
879
|
responses: {
|
|
@@ -880,9 +900,9 @@ const addOperationSpec = {
|
|
|
880
900
|
tracestate
|
|
881
901
|
],
|
|
882
902
|
mediaType: "json",
|
|
883
|
-
serializer
|
|
903
|
+
serializer: serializer$3
|
|
884
904
|
};
|
|
885
|
-
const listOperationSpec = {
|
|
905
|
+
const listOperationSpec$1 = {
|
|
886
906
|
path: "/models",
|
|
887
907
|
httpMethod: "GET",
|
|
888
908
|
responses: {
|
|
@@ -904,9 +924,9 @@ const listOperationSpec = {
|
|
|
904
924
|
tracestate,
|
|
905
925
|
maxItemsPerPage
|
|
906
926
|
],
|
|
907
|
-
serializer
|
|
927
|
+
serializer: serializer$3
|
|
908
928
|
};
|
|
909
|
-
const getByIdOperationSpec = {
|
|
929
|
+
const getByIdOperationSpec$2 = {
|
|
910
930
|
path: "/models/{id}",
|
|
911
931
|
httpMethod: "GET",
|
|
912
932
|
responses: {
|
|
@@ -920,9 +940,9 @@ const getByIdOperationSpec = {
|
|
|
920
940
|
queryParameters: [apiVersion, includeModelDefinition],
|
|
921
941
|
urlParameters: [$host, id],
|
|
922
942
|
headerParameters: [traceparent, tracestate],
|
|
923
|
-
serializer
|
|
943
|
+
serializer: serializer$3
|
|
924
944
|
};
|
|
925
|
-
const updateOperationSpec = {
|
|
945
|
+
const updateOperationSpec$1 = {
|
|
926
946
|
path: "/models/{id}",
|
|
927
947
|
httpMethod: "PATCH",
|
|
928
948
|
responses: {
|
|
@@ -940,9 +960,9 @@ const updateOperationSpec = {
|
|
|
940
960
|
contentType1
|
|
941
961
|
],
|
|
942
962
|
mediaType: "json",
|
|
943
|
-
serializer
|
|
963
|
+
serializer: serializer$3
|
|
944
964
|
};
|
|
945
|
-
const deleteOperationSpec = {
|
|
965
|
+
const deleteOperationSpec$2 = {
|
|
946
966
|
path: "/models/{id}",
|
|
947
967
|
httpMethod: "DELETE",
|
|
948
968
|
responses: {
|
|
@@ -954,9 +974,9 @@ const deleteOperationSpec = {
|
|
|
954
974
|
queryParameters: [apiVersion],
|
|
955
975
|
urlParameters: [$host, id],
|
|
956
976
|
headerParameters: [traceparent, tracestate],
|
|
957
|
-
serializer
|
|
977
|
+
serializer: serializer$3
|
|
958
978
|
};
|
|
959
|
-
const listNextOperationSpec = {
|
|
979
|
+
const listNextOperationSpec$1 = {
|
|
960
980
|
path: "{nextLink}",
|
|
961
981
|
httpMethod: "GET",
|
|
962
982
|
responses: {
|
|
@@ -978,7 +998,7 @@ const listNextOperationSpec = {
|
|
|
978
998
|
tracestate,
|
|
979
999
|
maxItemsPerPage
|
|
980
1000
|
],
|
|
981
|
-
serializer
|
|
1001
|
+
serializer: serializer$3
|
|
982
1002
|
};
|
|
983
1003
|
|
|
984
1004
|
/*
|
|
@@ -1012,12 +1032,12 @@ class Query {
|
|
|
1012
1032
|
* @param options The options parameters.
|
|
1013
1033
|
*/
|
|
1014
1034
|
queryTwins(querySpecification, options) {
|
|
1015
|
-
const operationOptions =
|
|
1035
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1016
1036
|
return this.client.sendOperationRequest({ querySpecification, options: operationOptions }, queryTwinsOperationSpec);
|
|
1017
1037
|
}
|
|
1018
1038
|
}
|
|
1019
1039
|
// Operation Specifications
|
|
1020
|
-
const serializer$
|
|
1040
|
+
const serializer$2 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
|
|
1021
1041
|
const queryTwinsOperationSpec = {
|
|
1022
1042
|
path: "/query",
|
|
1023
1043
|
httpMethod: "POST",
|
|
@@ -1040,7 +1060,7 @@ const queryTwinsOperationSpec = {
|
|
|
1040
1060
|
maxItemsPerPage
|
|
1041
1061
|
],
|
|
1042
1062
|
mediaType: "json",
|
|
1043
|
-
serializer: serializer$
|
|
1063
|
+
serializer: serializer$2
|
|
1044
1064
|
};
|
|
1045
1065
|
|
|
1046
1066
|
/*
|
|
@@ -1073,7 +1093,7 @@ class DigitalTwins {
|
|
|
1073
1093
|
* @param options The options parameters.
|
|
1074
1094
|
*/
|
|
1075
1095
|
getById(id, options) {
|
|
1076
|
-
const operationOptions =
|
|
1096
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1077
1097
|
return this.client.sendOperationRequest({ id, options: operationOptions }, getByIdOperationSpec$1);
|
|
1078
1098
|
}
|
|
1079
1099
|
/**
|
|
@@ -1092,7 +1112,7 @@ class DigitalTwins {
|
|
|
1092
1112
|
* @param options The options parameters.
|
|
1093
1113
|
*/
|
|
1094
1114
|
add(id, twin, options) {
|
|
1095
|
-
const operationOptions =
|
|
1115
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1096
1116
|
return this.client.sendOperationRequest({ id, twin, options: operationOptions }, addOperationSpec$1);
|
|
1097
1117
|
}
|
|
1098
1118
|
/**
|
|
@@ -1110,7 +1130,7 @@ class DigitalTwins {
|
|
|
1110
1130
|
* @param options The options parameters.
|
|
1111
1131
|
*/
|
|
1112
1132
|
delete(id, options) {
|
|
1113
|
-
const operationOptions =
|
|
1133
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1114
1134
|
return this.client.sendOperationRequest({ id, options: operationOptions }, deleteOperationSpec$1);
|
|
1115
1135
|
}
|
|
1116
1136
|
/**
|
|
@@ -1131,8 +1151,8 @@ class DigitalTwins {
|
|
|
1131
1151
|
* @param options The options parameters.
|
|
1132
1152
|
*/
|
|
1133
1153
|
update(id, patchDocument, options) {
|
|
1134
|
-
const operationOptions =
|
|
1135
|
-
return this.client.sendOperationRequest({ id, patchDocument, options: operationOptions }, updateOperationSpec
|
|
1154
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1155
|
+
return this.client.sendOperationRequest({ id, patchDocument, options: operationOptions }, updateOperationSpec);
|
|
1136
1156
|
}
|
|
1137
1157
|
/**
|
|
1138
1158
|
* Retrieves a relationship between two digital twins.
|
|
@@ -1149,7 +1169,7 @@ class DigitalTwins {
|
|
|
1149
1169
|
* @param options The options parameters.
|
|
1150
1170
|
*/
|
|
1151
1171
|
getRelationshipById(id, relationshipId, options) {
|
|
1152
|
-
const operationOptions =
|
|
1172
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1153
1173
|
return this.client.sendOperationRequest({ id, relationshipId, options: operationOptions }, getRelationshipByIdOperationSpec);
|
|
1154
1174
|
}
|
|
1155
1175
|
/**
|
|
@@ -1173,7 +1193,7 @@ class DigitalTwins {
|
|
|
1173
1193
|
* @param options The options parameters.
|
|
1174
1194
|
*/
|
|
1175
1195
|
addRelationship(id, relationshipId, relationship, options) {
|
|
1176
|
-
const operationOptions =
|
|
1196
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1177
1197
|
return this.client.sendOperationRequest({ id, relationshipId, relationship, options: operationOptions }, addRelationshipOperationSpec);
|
|
1178
1198
|
}
|
|
1179
1199
|
/**
|
|
@@ -1193,7 +1213,7 @@ class DigitalTwins {
|
|
|
1193
1213
|
* @param options The options parameters.
|
|
1194
1214
|
*/
|
|
1195
1215
|
deleteRelationship(id, relationshipId, options) {
|
|
1196
|
-
const operationOptions =
|
|
1216
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1197
1217
|
return this.client.sendOperationRequest({ id, relationshipId, options: operationOptions }, deleteRelationshipOperationSpec);
|
|
1198
1218
|
}
|
|
1199
1219
|
/**
|
|
@@ -1219,7 +1239,7 @@ class DigitalTwins {
|
|
|
1219
1239
|
* @param options The options parameters.
|
|
1220
1240
|
*/
|
|
1221
1241
|
updateRelationship(id, relationshipId, patchDocument, options) {
|
|
1222
|
-
const operationOptions =
|
|
1242
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1223
1243
|
return this.client.sendOperationRequest({ id, relationshipId, patchDocument, options: operationOptions }, updateRelationshipOperationSpec);
|
|
1224
1244
|
}
|
|
1225
1245
|
/**
|
|
@@ -1234,7 +1254,7 @@ class DigitalTwins {
|
|
|
1234
1254
|
* @param options The options parameters.
|
|
1235
1255
|
*/
|
|
1236
1256
|
listRelationships(id, options) {
|
|
1237
|
-
const operationOptions =
|
|
1257
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1238
1258
|
return this.client.sendOperationRequest({ id, options: operationOptions }, listRelationshipsOperationSpec);
|
|
1239
1259
|
}
|
|
1240
1260
|
/**
|
|
@@ -1249,7 +1269,7 @@ class DigitalTwins {
|
|
|
1249
1269
|
* @param options The options parameters.
|
|
1250
1270
|
*/
|
|
1251
1271
|
listIncomingRelationships(id, options) {
|
|
1252
|
-
const operationOptions =
|
|
1272
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1253
1273
|
return this.client.sendOperationRequest({ id, options: operationOptions }, listIncomingRelationshipsOperationSpec);
|
|
1254
1274
|
}
|
|
1255
1275
|
/**
|
|
@@ -1268,7 +1288,7 @@ class DigitalTwins {
|
|
|
1268
1288
|
* @param options The options parameters.
|
|
1269
1289
|
*/
|
|
1270
1290
|
sendTelemetry(id, messageId, telemetry, options) {
|
|
1271
|
-
const operationOptions =
|
|
1291
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1272
1292
|
return this.client.sendOperationRequest({ id, messageId, telemetry, options: operationOptions }, sendTelemetryOperationSpec);
|
|
1273
1293
|
}
|
|
1274
1294
|
/**
|
|
@@ -1289,7 +1309,7 @@ class DigitalTwins {
|
|
|
1289
1309
|
* @param options The options parameters.
|
|
1290
1310
|
*/
|
|
1291
1311
|
sendComponentTelemetry(id, componentPath, messageId, telemetry, options) {
|
|
1292
|
-
const operationOptions =
|
|
1312
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1293
1313
|
return this.client.sendOperationRequest({ id, componentPath, messageId, telemetry, options: operationOptions }, sendComponentTelemetryOperationSpec);
|
|
1294
1314
|
}
|
|
1295
1315
|
/**
|
|
@@ -1306,7 +1326,7 @@ class DigitalTwins {
|
|
|
1306
1326
|
* @param options The options parameters.
|
|
1307
1327
|
*/
|
|
1308
1328
|
getComponent(id, componentPath, options) {
|
|
1309
|
-
const operationOptions =
|
|
1329
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1310
1330
|
return this.client.sendOperationRequest({ id, componentPath, options: operationOptions }, getComponentOperationSpec);
|
|
1311
1331
|
}
|
|
1312
1332
|
/**
|
|
@@ -1328,7 +1348,7 @@ class DigitalTwins {
|
|
|
1328
1348
|
* @param options The options parameters.
|
|
1329
1349
|
*/
|
|
1330
1350
|
updateComponent(id, componentPath, patchDocument, options) {
|
|
1331
|
-
const operationOptions =
|
|
1351
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1332
1352
|
return this.client.sendOperationRequest({ id, componentPath, patchDocument, options: operationOptions }, updateComponentOperationSpec);
|
|
1333
1353
|
}
|
|
1334
1354
|
/**
|
|
@@ -1338,7 +1358,7 @@ class DigitalTwins {
|
|
|
1338
1358
|
* @param options The options parameters.
|
|
1339
1359
|
*/
|
|
1340
1360
|
listRelationshipsNext(id, nextLink, options) {
|
|
1341
|
-
const operationOptions =
|
|
1361
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1342
1362
|
return this.client.sendOperationRequest({ id, nextLink, options: operationOptions }, listRelationshipsNextOperationSpec);
|
|
1343
1363
|
}
|
|
1344
1364
|
/**
|
|
@@ -1349,12 +1369,12 @@ class DigitalTwins {
|
|
|
1349
1369
|
* @param options The options parameters.
|
|
1350
1370
|
*/
|
|
1351
1371
|
listIncomingRelationshipsNext(id, nextLink, options) {
|
|
1352
|
-
const operationOptions =
|
|
1372
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1353
1373
|
return this.client.sendOperationRequest({ id, nextLink, options: operationOptions }, listIncomingRelationshipsNextOperationSpec);
|
|
1354
1374
|
}
|
|
1355
1375
|
}
|
|
1356
1376
|
// Operation Specifications
|
|
1357
|
-
const serializer$
|
|
1377
|
+
const serializer$1 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
|
|
1358
1378
|
const getByIdOperationSpec$1 = {
|
|
1359
1379
|
path: "/digitaltwins/{id}",
|
|
1360
1380
|
httpMethod: "GET",
|
|
@@ -1370,7 +1390,7 @@ const getByIdOperationSpec$1 = {
|
|
|
1370
1390
|
queryParameters: [apiVersion],
|
|
1371
1391
|
urlParameters: [$host, id],
|
|
1372
1392
|
headerParameters: [traceparent, tracestate],
|
|
1373
|
-
serializer: serializer$
|
|
1393
|
+
serializer: serializer$1
|
|
1374
1394
|
};
|
|
1375
1395
|
const addOperationSpec$1 = {
|
|
1376
1396
|
path: "/digitaltwins/{id}",
|
|
@@ -1395,7 +1415,7 @@ const addOperationSpec$1 = {
|
|
|
1395
1415
|
ifNoneMatch
|
|
1396
1416
|
],
|
|
1397
1417
|
mediaType: "json",
|
|
1398
|
-
serializer: serializer$
|
|
1418
|
+
serializer: serializer$1
|
|
1399
1419
|
};
|
|
1400
1420
|
const deleteOperationSpec$1 = {
|
|
1401
1421
|
path: "/digitaltwins/{id}",
|
|
@@ -1413,9 +1433,9 @@ const deleteOperationSpec$1 = {
|
|
|
1413
1433
|
tracestate,
|
|
1414
1434
|
ifMatch
|
|
1415
1435
|
],
|
|
1416
|
-
serializer: serializer$
|
|
1436
|
+
serializer: serializer$1
|
|
1417
1437
|
};
|
|
1418
|
-
const updateOperationSpec
|
|
1438
|
+
const updateOperationSpec = {
|
|
1419
1439
|
path: "/digitaltwins/{id}",
|
|
1420
1440
|
httpMethod: "PATCH",
|
|
1421
1441
|
responses: {
|
|
@@ -1437,7 +1457,7 @@ const updateOperationSpec$1 = {
|
|
|
1437
1457
|
ifMatch
|
|
1438
1458
|
],
|
|
1439
1459
|
mediaType: "json",
|
|
1440
|
-
serializer: serializer$
|
|
1460
|
+
serializer: serializer$1
|
|
1441
1461
|
};
|
|
1442
1462
|
const getRelationshipByIdOperationSpec = {
|
|
1443
1463
|
path: "/digitaltwins/{id}/relationships/{relationshipId}",
|
|
@@ -1454,7 +1474,7 @@ const getRelationshipByIdOperationSpec = {
|
|
|
1454
1474
|
queryParameters: [apiVersion],
|
|
1455
1475
|
urlParameters: [$host, id, relationshipId],
|
|
1456
1476
|
headerParameters: [traceparent, tracestate],
|
|
1457
|
-
serializer: serializer$
|
|
1477
|
+
serializer: serializer$1
|
|
1458
1478
|
};
|
|
1459
1479
|
const addRelationshipOperationSpec = {
|
|
1460
1480
|
path: "/digitaltwins/{id}/relationships/{relationshipId}",
|
|
@@ -1478,7 +1498,7 @@ const addRelationshipOperationSpec = {
|
|
|
1478
1498
|
ifNoneMatch
|
|
1479
1499
|
],
|
|
1480
1500
|
mediaType: "json",
|
|
1481
|
-
serializer: serializer$
|
|
1501
|
+
serializer: serializer$1
|
|
1482
1502
|
};
|
|
1483
1503
|
const deleteRelationshipOperationSpec = {
|
|
1484
1504
|
path: "/digitaltwins/{id}/relationships/{relationshipId}",
|
|
@@ -1496,7 +1516,7 @@ const deleteRelationshipOperationSpec = {
|
|
|
1496
1516
|
tracestate,
|
|
1497
1517
|
ifMatch
|
|
1498
1518
|
],
|
|
1499
|
-
serializer: serializer$
|
|
1519
|
+
serializer: serializer$1
|
|
1500
1520
|
};
|
|
1501
1521
|
const updateRelationshipOperationSpec = {
|
|
1502
1522
|
path: "/digitaltwins/{id}/relationships/{relationshipId}",
|
|
@@ -1519,7 +1539,7 @@ const updateRelationshipOperationSpec = {
|
|
|
1519
1539
|
ifMatch
|
|
1520
1540
|
],
|
|
1521
1541
|
mediaType: "json",
|
|
1522
|
-
serializer: serializer$
|
|
1542
|
+
serializer: serializer$1
|
|
1523
1543
|
};
|
|
1524
1544
|
const listRelationshipsOperationSpec = {
|
|
1525
1545
|
path: "/digitaltwins/{id}/relationships",
|
|
@@ -1535,7 +1555,7 @@ const listRelationshipsOperationSpec = {
|
|
|
1535
1555
|
queryParameters: [apiVersion, relationshipName],
|
|
1536
1556
|
urlParameters: [$host, id],
|
|
1537
1557
|
headerParameters: [traceparent, tracestate],
|
|
1538
|
-
serializer: serializer$
|
|
1558
|
+
serializer: serializer$1
|
|
1539
1559
|
};
|
|
1540
1560
|
const listIncomingRelationshipsOperationSpec = {
|
|
1541
1561
|
path: "/digitaltwins/{id}/incomingrelationships",
|
|
@@ -1551,7 +1571,7 @@ const listIncomingRelationshipsOperationSpec = {
|
|
|
1551
1571
|
queryParameters: [apiVersion],
|
|
1552
1572
|
urlParameters: [$host, id],
|
|
1553
1573
|
headerParameters: [traceparent, tracestate],
|
|
1554
|
-
serializer: serializer$
|
|
1574
|
+
serializer: serializer$1
|
|
1555
1575
|
};
|
|
1556
1576
|
const sendTelemetryOperationSpec = {
|
|
1557
1577
|
path: "/digitaltwins/{id}/telemetry",
|
|
@@ -1573,7 +1593,7 @@ const sendTelemetryOperationSpec = {
|
|
|
1573
1593
|
telemetrySourceTime
|
|
1574
1594
|
],
|
|
1575
1595
|
mediaType: "json",
|
|
1576
|
-
serializer: serializer$
|
|
1596
|
+
serializer: serializer$1
|
|
1577
1597
|
};
|
|
1578
1598
|
const sendComponentTelemetryOperationSpec = {
|
|
1579
1599
|
path: "/digitaltwins/{id}/components/{componentPath}/telemetry",
|
|
@@ -1595,7 +1615,7 @@ const sendComponentTelemetryOperationSpec = {
|
|
|
1595
1615
|
telemetrySourceTime
|
|
1596
1616
|
],
|
|
1597
1617
|
mediaType: "json",
|
|
1598
|
-
serializer: serializer$
|
|
1618
|
+
serializer: serializer$1
|
|
1599
1619
|
};
|
|
1600
1620
|
const getComponentOperationSpec = {
|
|
1601
1621
|
path: "/digitaltwins/{id}/components/{componentPath}",
|
|
@@ -1612,7 +1632,7 @@ const getComponentOperationSpec = {
|
|
|
1612
1632
|
queryParameters: [apiVersion],
|
|
1613
1633
|
urlParameters: [$host, id, componentPath],
|
|
1614
1634
|
headerParameters: [traceparent, tracestate],
|
|
1615
|
-
serializer: serializer$
|
|
1635
|
+
serializer: serializer$1
|
|
1616
1636
|
};
|
|
1617
1637
|
const updateComponentOperationSpec = {
|
|
1618
1638
|
path: "/digitaltwins/{id}/components/{componentPath}",
|
|
@@ -1636,7 +1656,7 @@ const updateComponentOperationSpec = {
|
|
|
1636
1656
|
ifMatch
|
|
1637
1657
|
],
|
|
1638
1658
|
mediaType: "json",
|
|
1639
|
-
serializer: serializer$
|
|
1659
|
+
serializer: serializer$1
|
|
1640
1660
|
};
|
|
1641
1661
|
const listRelationshipsNextOperationSpec = {
|
|
1642
1662
|
path: "{nextLink}",
|
|
@@ -1652,7 +1672,7 @@ const listRelationshipsNextOperationSpec = {
|
|
|
1652
1672
|
queryParameters: [apiVersion, relationshipName],
|
|
1653
1673
|
urlParameters: [$host, id, nextLink],
|
|
1654
1674
|
headerParameters: [traceparent, tracestate],
|
|
1655
|
-
serializer: serializer$
|
|
1675
|
+
serializer: serializer$1
|
|
1656
1676
|
};
|
|
1657
1677
|
const listIncomingRelationshipsNextOperationSpec = {
|
|
1658
1678
|
path: "{nextLink}",
|
|
@@ -1668,7 +1688,7 @@ const listIncomingRelationshipsNextOperationSpec = {
|
|
|
1668
1688
|
queryParameters: [apiVersion],
|
|
1669
1689
|
urlParameters: [$host, id, nextLink],
|
|
1670
1690
|
headerParameters: [traceparent, tracestate],
|
|
1671
|
-
serializer: serializer$
|
|
1691
|
+
serializer: serializer$1
|
|
1672
1692
|
};
|
|
1673
1693
|
|
|
1674
1694
|
/*
|
|
@@ -1696,8 +1716,8 @@ class EventRoutes {
|
|
|
1696
1716
|
* @param options The options parameters.
|
|
1697
1717
|
*/
|
|
1698
1718
|
list(options) {
|
|
1699
|
-
const operationOptions =
|
|
1700
|
-
return this.client.sendOperationRequest({ options: operationOptions }, listOperationSpec
|
|
1719
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1720
|
+
return this.client.sendOperationRequest({ options: operationOptions }, listOperationSpec);
|
|
1701
1721
|
}
|
|
1702
1722
|
/**
|
|
1703
1723
|
* Retrieves an event route.
|
|
@@ -1709,8 +1729,8 @@ class EventRoutes {
|
|
|
1709
1729
|
* @param options The options parameters.
|
|
1710
1730
|
*/
|
|
1711
1731
|
getById(id, options) {
|
|
1712
|
-
const operationOptions =
|
|
1713
|
-
return this.client.sendOperationRequest({ id, options: operationOptions }, getByIdOperationSpec
|
|
1732
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1733
|
+
return this.client.sendOperationRequest({ id, options: operationOptions }, getByIdOperationSpec);
|
|
1714
1734
|
}
|
|
1715
1735
|
/**
|
|
1716
1736
|
* Adds or replaces an event route.
|
|
@@ -1725,8 +1745,8 @@ class EventRoutes {
|
|
|
1725
1745
|
* @param options The options parameters.
|
|
1726
1746
|
*/
|
|
1727
1747
|
add(id, options) {
|
|
1728
|
-
const operationOptions =
|
|
1729
|
-
return this.client.sendOperationRequest({ id, options: operationOptions }, addOperationSpec
|
|
1748
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1749
|
+
return this.client.sendOperationRequest({ id, options: operationOptions }, addOperationSpec);
|
|
1730
1750
|
}
|
|
1731
1751
|
/**
|
|
1732
1752
|
* Deletes an event route.
|
|
@@ -1738,8 +1758,8 @@ class EventRoutes {
|
|
|
1738
1758
|
* @param options The options parameters.
|
|
1739
1759
|
*/
|
|
1740
1760
|
delete(id, options) {
|
|
1741
|
-
const operationOptions =
|
|
1742
|
-
return this.client.sendOperationRequest({ id, options: operationOptions }, deleteOperationSpec
|
|
1761
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1762
|
+
return this.client.sendOperationRequest({ id, options: operationOptions }, deleteOperationSpec);
|
|
1743
1763
|
}
|
|
1744
1764
|
/**
|
|
1745
1765
|
* ListNext
|
|
@@ -1747,13 +1767,13 @@ class EventRoutes {
|
|
|
1747
1767
|
* @param options The options parameters.
|
|
1748
1768
|
*/
|
|
1749
1769
|
listNext(nextLink, options) {
|
|
1750
|
-
const operationOptions =
|
|
1751
|
-
return this.client.sendOperationRequest({ nextLink, options: operationOptions }, listNextOperationSpec
|
|
1770
|
+
const operationOptions = coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {});
|
|
1771
|
+
return this.client.sendOperationRequest({ nextLink, options: operationOptions }, listNextOperationSpec);
|
|
1752
1772
|
}
|
|
1753
1773
|
}
|
|
1754
1774
|
// Operation Specifications
|
|
1755
|
-
const serializer
|
|
1756
|
-
const listOperationSpec
|
|
1775
|
+
const serializer = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
|
|
1776
|
+
const listOperationSpec = {
|
|
1757
1777
|
path: "/eventroutes",
|
|
1758
1778
|
httpMethod: "GET",
|
|
1759
1779
|
responses: {
|
|
@@ -1771,9 +1791,9 @@ const listOperationSpec$1 = {
|
|
|
1771
1791
|
tracestate,
|
|
1772
1792
|
maxItemsPerPage
|
|
1773
1793
|
],
|
|
1774
|
-
serializer
|
|
1794
|
+
serializer
|
|
1775
1795
|
};
|
|
1776
|
-
const getByIdOperationSpec
|
|
1796
|
+
const getByIdOperationSpec = {
|
|
1777
1797
|
path: "/eventroutes/{id}",
|
|
1778
1798
|
httpMethod: "GET",
|
|
1779
1799
|
responses: {
|
|
@@ -1787,9 +1807,9 @@ const getByIdOperationSpec$2 = {
|
|
|
1787
1807
|
queryParameters: [apiVersion],
|
|
1788
1808
|
urlParameters: [$host, id],
|
|
1789
1809
|
headerParameters: [traceparent, tracestate],
|
|
1790
|
-
serializer
|
|
1810
|
+
serializer
|
|
1791
1811
|
};
|
|
1792
|
-
const addOperationSpec
|
|
1812
|
+
const addOperationSpec = {
|
|
1793
1813
|
path: "/eventroutes/{id}",
|
|
1794
1814
|
httpMethod: "PUT",
|
|
1795
1815
|
responses: {
|
|
@@ -1807,9 +1827,9 @@ const addOperationSpec$2 = {
|
|
|
1807
1827
|
tracestate
|
|
1808
1828
|
],
|
|
1809
1829
|
mediaType: "json",
|
|
1810
|
-
serializer
|
|
1830
|
+
serializer
|
|
1811
1831
|
};
|
|
1812
|
-
const deleteOperationSpec
|
|
1832
|
+
const deleteOperationSpec = {
|
|
1813
1833
|
path: "/eventroutes/{id}",
|
|
1814
1834
|
httpMethod: "DELETE",
|
|
1815
1835
|
responses: {
|
|
@@ -1821,9 +1841,9 @@ const deleteOperationSpec$2 = {
|
|
|
1821
1841
|
queryParameters: [apiVersion],
|
|
1822
1842
|
urlParameters: [$host, id],
|
|
1823
1843
|
headerParameters: [traceparent, tracestate],
|
|
1824
|
-
serializer
|
|
1844
|
+
serializer
|
|
1825
1845
|
};
|
|
1826
|
-
const listNextOperationSpec
|
|
1846
|
+
const listNextOperationSpec = {
|
|
1827
1847
|
path: "{nextLink}",
|
|
1828
1848
|
httpMethod: "GET",
|
|
1829
1849
|
responses: {
|
|
@@ -1841,7 +1861,7 @@ const listNextOperationSpec$1 = {
|
|
|
1841
1861
|
tracestate,
|
|
1842
1862
|
maxItemsPerPage
|
|
1843
1863
|
],
|
|
1844
|
-
serializer
|
|
1864
|
+
serializer
|
|
1845
1865
|
};
|
|
1846
1866
|
|
|
1847
1867
|
/*
|
|
@@ -1853,7 +1873,7 @@ const listNextOperationSpec$1 = {
|
|
|
1853
1873
|
*/
|
|
1854
1874
|
const packageName = "@azure/digital-twins-core";
|
|
1855
1875
|
const packageVersion = "1.1.0";
|
|
1856
|
-
class AzureDigitalTwinsAPIContext extends
|
|
1876
|
+
class AzureDigitalTwinsAPIContext extends coreHttp__namespace.ServiceClient {
|
|
1857
1877
|
/**
|
|
1858
1878
|
* Initializes a new instance of the AzureDigitalTwinsAPIContext class.
|
|
1859
1879
|
* @param options The parameter options
|
|
@@ -1864,7 +1884,7 @@ class AzureDigitalTwinsAPIContext extends coreHttp.ServiceClient {
|
|
|
1864
1884
|
options = {};
|
|
1865
1885
|
}
|
|
1866
1886
|
if (!options.userAgent) {
|
|
1867
|
-
const defaultUserAgent =
|
|
1887
|
+
const defaultUserAgent = coreHttp__namespace.getDefaultUserAgentValue();
|
|
1868
1888
|
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
|
|
1869
1889
|
}
|
|
1870
1890
|
super(undefined, options);
|