@azure/digital-twins-core 2.0.0-alpha.20250513.1 → 2.0.0-alpha.20250515.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/browser/digitalTwinsClient.d.ts.map +1 -1
- package/dist/browser/digitalTwinsClient.js +7 -6
- package/dist/browser/digitalTwinsClient.js.map +1 -1
- package/dist/browser/generated/azureDigitalTwinsAPI.d.ts +5 -1
- package/dist/browser/generated/azureDigitalTwinsAPI.d.ts.map +1 -1
- package/dist/browser/generated/azureDigitalTwinsAPI.js +8 -6
- package/dist/browser/generated/azureDigitalTwinsAPI.js.map +1 -1
- package/dist/browser/generated/lroImpl.d.ts +11 -0
- package/dist/browser/generated/lroImpl.d.ts.map +1 -0
- package/dist/browser/generated/lroImpl.js +21 -0
- package/dist/browser/generated/lroImpl.js.map +1 -0
- package/dist/browser/generated/models/index.d.ts +368 -16
- package/dist/browser/generated/models/index.d.ts.map +1 -1
- package/dist/browser/generated/models/index.js.map +1 -1
- package/dist/browser/generated/models/mappers.d.ts +43 -0
- package/dist/browser/generated/models/mappers.d.ts.map +1 -1
- package/dist/browser/generated/models/mappers.js +892 -157
- package/dist/browser/generated/models/mappers.js.map +1 -1
- package/dist/browser/generated/models/parameters.d.ts +3 -0
- package/dist/browser/generated/models/parameters.d.ts.map +1 -1
- package/dist/browser/generated/models/parameters.js +107 -84
- package/dist/browser/generated/models/parameters.js.map +1 -1
- package/dist/browser/generated/operations/deleteJobs.d.ts +71 -0
- package/dist/browser/generated/operations/deleteJobs.d.ts.map +1 -0
- package/dist/browser/generated/operations/deleteJobs.js +261 -0
- package/dist/browser/generated/operations/deleteJobs.js.map +1 -0
- package/dist/browser/generated/operations/digitalTwinModels.d.ts +2 -1
- package/dist/browser/generated/operations/digitalTwinModels.d.ts.map +1 -1
- package/dist/browser/generated/operations/digitalTwinModels.js +36 -29
- package/dist/browser/generated/operations/digitalTwinModels.js.map +1 -1
- package/dist/browser/generated/operations/digitalTwins.js +90 -77
- package/dist/browser/generated/operations/digitalTwins.js.map +1 -1
- package/dist/browser/generated/operations/eventRoutes.d.ts +2 -1
- package/dist/browser/generated/operations/eventRoutes.d.ts.map +1 -1
- package/dist/browser/generated/operations/eventRoutes.js +27 -21
- package/dist/browser/generated/operations/eventRoutes.js.map +1 -1
- package/dist/browser/generated/operations/importJobs.d.ts +81 -0
- package/dist/browser/generated/operations/importJobs.d.ts.map +1 -0
- package/dist/browser/generated/operations/importJobs.js +260 -0
- package/dist/browser/generated/operations/importJobs.js.map +1 -0
- package/dist/browser/generated/operations/index.d.ts +2 -0
- package/dist/browser/generated/operations/index.d.ts.map +1 -1
- package/dist/browser/generated/operations/index.js +2 -0
- package/dist/browser/generated/operations/index.js.map +1 -1
- package/dist/browser/generated/operations/query.js +6 -5
- package/dist/browser/generated/operations/query.js.map +1 -1
- package/dist/browser/generated/operationsInterfaces/deleteJobs.d.ts +47 -0
- package/dist/browser/generated/operationsInterfaces/deleteJobs.d.ts.map +1 -0
- package/dist/browser/generated/operationsInterfaces/deleteJobs.js +9 -0
- package/dist/browser/generated/operationsInterfaces/deleteJobs.js.map +1 -0
- package/dist/browser/generated/operationsInterfaces/digitalTwinModels.d.ts +2 -1
- package/dist/browser/generated/operationsInterfaces/digitalTwinModels.d.ts.map +1 -1
- package/dist/browser/generated/operationsInterfaces/digitalTwinModels.js.map +1 -1
- package/dist/browser/generated/operationsInterfaces/digitalTwins.js.map +1 -1
- package/dist/browser/generated/operationsInterfaces/eventRoutes.d.ts +2 -1
- package/dist/browser/generated/operationsInterfaces/eventRoutes.d.ts.map +1 -1
- package/dist/browser/generated/operationsInterfaces/eventRoutes.js.map +1 -1
- package/dist/browser/generated/operationsInterfaces/importJobs.d.ts +58 -0
- package/dist/browser/generated/operationsInterfaces/importJobs.d.ts.map +1 -0
- package/dist/browser/generated/operationsInterfaces/importJobs.js +9 -0
- package/dist/browser/generated/operationsInterfaces/importJobs.js.map +1 -0
- package/dist/browser/generated/operationsInterfaces/index.d.ts +2 -0
- package/dist/browser/generated/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/browser/generated/operationsInterfaces/index.js +2 -0
- package/dist/browser/generated/operationsInterfaces/index.js.map +1 -1
- package/dist/browser/generated/operationsInterfaces/query.js.map +1 -1
- package/dist/browser/generated/pagingHelper.js.map +1 -1
- package/dist/commonjs/digitalTwinsClient.d.ts.map +1 -1
- package/dist/commonjs/digitalTwinsClient.js +7 -6
- package/dist/commonjs/digitalTwinsClient.js.map +1 -1
- package/dist/commonjs/generated/azureDigitalTwinsAPI.d.ts +5 -1
- package/dist/commonjs/generated/azureDigitalTwinsAPI.d.ts.map +1 -1
- package/dist/commonjs/generated/azureDigitalTwinsAPI.js +7 -5
- package/dist/commonjs/generated/azureDigitalTwinsAPI.js.map +1 -1
- package/dist/commonjs/generated/lroImpl.d.ts +11 -0
- package/dist/commonjs/generated/lroImpl.d.ts.map +1 -0
- package/dist/commonjs/generated/lroImpl.js +24 -0
- package/dist/commonjs/generated/lroImpl.js.map +1 -0
- package/dist/commonjs/generated/models/index.d.ts +368 -16
- package/dist/commonjs/generated/models/index.d.ts.map +1 -1
- package/dist/commonjs/generated/models/index.js.map +1 -1
- package/dist/commonjs/generated/models/mappers.d.ts +43 -0
- package/dist/commonjs/generated/models/mappers.d.ts.map +1 -1
- package/dist/commonjs/generated/models/mappers.js +894 -158
- package/dist/commonjs/generated/models/mappers.js.map +1 -1
- package/dist/commonjs/generated/models/parameters.d.ts +3 -0
- package/dist/commonjs/generated/models/parameters.d.ts.map +1 -1
- package/dist/commonjs/generated/models/parameters.js +107 -84
- package/dist/commonjs/generated/models/parameters.js.map +1 -1
- package/dist/commonjs/generated/operations/deleteJobs.d.ts +71 -0
- package/dist/commonjs/generated/operations/deleteJobs.d.ts.map +1 -0
- package/dist/commonjs/generated/operations/deleteJobs.js +265 -0
- package/dist/commonjs/generated/operations/deleteJobs.js.map +1 -0
- package/dist/commonjs/generated/operations/digitalTwinModels.d.ts +2 -1
- package/dist/commonjs/generated/operations/digitalTwinModels.d.ts.map +1 -1
- package/dist/commonjs/generated/operations/digitalTwinModels.js +36 -29
- package/dist/commonjs/generated/operations/digitalTwinModels.js.map +1 -1
- package/dist/commonjs/generated/operations/digitalTwins.js +90 -77
- package/dist/commonjs/generated/operations/digitalTwins.js.map +1 -1
- package/dist/commonjs/generated/operations/eventRoutes.d.ts +2 -1
- package/dist/commonjs/generated/operations/eventRoutes.d.ts.map +1 -1
- package/dist/commonjs/generated/operations/eventRoutes.js +27 -21
- package/dist/commonjs/generated/operations/eventRoutes.js.map +1 -1
- package/dist/commonjs/generated/operations/importJobs.d.ts +81 -0
- package/dist/commonjs/generated/operations/importJobs.d.ts.map +1 -0
- package/dist/commonjs/generated/operations/importJobs.js +264 -0
- package/dist/commonjs/generated/operations/importJobs.js.map +1 -0
- package/dist/commonjs/generated/operations/index.d.ts +2 -0
- package/dist/commonjs/generated/operations/index.d.ts.map +1 -1
- package/dist/commonjs/generated/operations/index.js +2 -0
- package/dist/commonjs/generated/operations/index.js.map +1 -1
- package/dist/commonjs/generated/operations/query.js +6 -5
- package/dist/commonjs/generated/operations/query.js.map +1 -1
- package/dist/commonjs/generated/operationsInterfaces/deleteJobs.d.ts +47 -0
- package/dist/commonjs/generated/operationsInterfaces/deleteJobs.d.ts.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/deleteJobs.js +10 -0
- package/dist/commonjs/generated/operationsInterfaces/deleteJobs.js.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/digitalTwinModels.d.ts +2 -1
- package/dist/commonjs/generated/operationsInterfaces/digitalTwinModels.d.ts.map +1 -1
- package/dist/commonjs/generated/operationsInterfaces/digitalTwinModels.js.map +1 -1
- package/dist/commonjs/generated/operationsInterfaces/digitalTwins.js.map +1 -1
- package/dist/commonjs/generated/operationsInterfaces/eventRoutes.d.ts +2 -1
- package/dist/commonjs/generated/operationsInterfaces/eventRoutes.d.ts.map +1 -1
- package/dist/commonjs/generated/operationsInterfaces/eventRoutes.js.map +1 -1
- package/dist/commonjs/generated/operationsInterfaces/importJobs.d.ts +58 -0
- package/dist/commonjs/generated/operationsInterfaces/importJobs.d.ts.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/importJobs.js +10 -0
- package/dist/commonjs/generated/operationsInterfaces/importJobs.js.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/index.d.ts +2 -0
- package/dist/commonjs/generated/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/commonjs/generated/operationsInterfaces/index.js +2 -0
- package/dist/commonjs/generated/operationsInterfaces/index.js.map +1 -1
- package/dist/commonjs/generated/operationsInterfaces/query.js.map +1 -1
- package/dist/commonjs/generated/pagingHelper.js.map +1 -1
- package/dist/esm/digitalTwinsClient.d.ts.map +1 -1
- package/dist/esm/digitalTwinsClient.js +7 -6
- package/dist/esm/digitalTwinsClient.js.map +1 -1
- package/dist/esm/generated/azureDigitalTwinsAPI.d.ts +5 -1
- package/dist/esm/generated/azureDigitalTwinsAPI.d.ts.map +1 -1
- package/dist/esm/generated/azureDigitalTwinsAPI.js +8 -6
- package/dist/esm/generated/azureDigitalTwinsAPI.js.map +1 -1
- package/dist/esm/generated/lroImpl.d.ts +11 -0
- package/dist/esm/generated/lroImpl.d.ts.map +1 -0
- package/dist/esm/generated/lroImpl.js +21 -0
- package/dist/esm/generated/lroImpl.js.map +1 -0
- package/dist/esm/generated/models/index.d.ts +368 -16
- package/dist/esm/generated/models/index.d.ts.map +1 -1
- package/dist/esm/generated/models/index.js.map +1 -1
- package/dist/esm/generated/models/mappers.d.ts +43 -0
- package/dist/esm/generated/models/mappers.d.ts.map +1 -1
- package/dist/esm/generated/models/mappers.js +892 -157
- package/dist/esm/generated/models/mappers.js.map +1 -1
- package/dist/esm/generated/models/parameters.d.ts +3 -0
- package/dist/esm/generated/models/parameters.d.ts.map +1 -1
- package/dist/esm/generated/models/parameters.js +107 -84
- package/dist/esm/generated/models/parameters.js.map +1 -1
- package/dist/esm/generated/operations/deleteJobs.d.ts +71 -0
- package/dist/esm/generated/operations/deleteJobs.d.ts.map +1 -0
- package/dist/esm/generated/operations/deleteJobs.js +261 -0
- package/dist/esm/generated/operations/deleteJobs.js.map +1 -0
- package/dist/esm/generated/operations/digitalTwinModels.d.ts +2 -1
- package/dist/esm/generated/operations/digitalTwinModels.d.ts.map +1 -1
- package/dist/esm/generated/operations/digitalTwinModels.js +36 -29
- package/dist/esm/generated/operations/digitalTwinModels.js.map +1 -1
- package/dist/esm/generated/operations/digitalTwins.js +90 -77
- package/dist/esm/generated/operations/digitalTwins.js.map +1 -1
- package/dist/esm/generated/operations/eventRoutes.d.ts +2 -1
- package/dist/esm/generated/operations/eventRoutes.d.ts.map +1 -1
- package/dist/esm/generated/operations/eventRoutes.js +27 -21
- package/dist/esm/generated/operations/eventRoutes.js.map +1 -1
- package/dist/esm/generated/operations/importJobs.d.ts +81 -0
- package/dist/esm/generated/operations/importJobs.d.ts.map +1 -0
- package/dist/esm/generated/operations/importJobs.js +260 -0
- package/dist/esm/generated/operations/importJobs.js.map +1 -0
- package/dist/esm/generated/operations/index.d.ts +2 -0
- package/dist/esm/generated/operations/index.d.ts.map +1 -1
- package/dist/esm/generated/operations/index.js +2 -0
- package/dist/esm/generated/operations/index.js.map +1 -1
- package/dist/esm/generated/operations/query.js +6 -5
- package/dist/esm/generated/operations/query.js.map +1 -1
- package/dist/esm/generated/operationsInterfaces/deleteJobs.d.ts +47 -0
- package/dist/esm/generated/operationsInterfaces/deleteJobs.d.ts.map +1 -0
- package/dist/esm/generated/operationsInterfaces/deleteJobs.js +9 -0
- package/dist/esm/generated/operationsInterfaces/deleteJobs.js.map +1 -0
- package/dist/esm/generated/operationsInterfaces/digitalTwinModels.d.ts +2 -1
- package/dist/esm/generated/operationsInterfaces/digitalTwinModels.d.ts.map +1 -1
- package/dist/esm/generated/operationsInterfaces/digitalTwinModels.js.map +1 -1
- package/dist/esm/generated/operationsInterfaces/digitalTwins.js.map +1 -1
- package/dist/esm/generated/operationsInterfaces/eventRoutes.d.ts +2 -1
- package/dist/esm/generated/operationsInterfaces/eventRoutes.d.ts.map +1 -1
- package/dist/esm/generated/operationsInterfaces/eventRoutes.js.map +1 -1
- package/dist/esm/generated/operationsInterfaces/importJobs.d.ts +58 -0
- package/dist/esm/generated/operationsInterfaces/importJobs.d.ts.map +1 -0
- package/dist/esm/generated/operationsInterfaces/importJobs.js +9 -0
- package/dist/esm/generated/operationsInterfaces/importJobs.js.map +1 -0
- package/dist/esm/generated/operationsInterfaces/index.d.ts +2 -0
- package/dist/esm/generated/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/esm/generated/operationsInterfaces/index.js +2 -0
- package/dist/esm/generated/operationsInterfaces/index.js.map +1 -1
- package/dist/esm/generated/operationsInterfaces/query.js.map +1 -1
- package/dist/esm/generated/pagingHelper.js.map +1 -1
- package/dist/react-native/digitalTwinsClient.d.ts.map +1 -1
- package/dist/react-native/digitalTwinsClient.js +7 -6
- package/dist/react-native/digitalTwinsClient.js.map +1 -1
- package/dist/react-native/generated/azureDigitalTwinsAPI.d.ts +5 -1
- package/dist/react-native/generated/azureDigitalTwinsAPI.d.ts.map +1 -1
- package/dist/react-native/generated/azureDigitalTwinsAPI.js +8 -6
- package/dist/react-native/generated/azureDigitalTwinsAPI.js.map +1 -1
- package/dist/react-native/generated/lroImpl.d.ts +11 -0
- package/dist/react-native/generated/lroImpl.d.ts.map +1 -0
- package/dist/react-native/generated/lroImpl.js +21 -0
- package/dist/react-native/generated/lroImpl.js.map +1 -0
- package/dist/react-native/generated/models/index.d.ts +368 -16
- package/dist/react-native/generated/models/index.d.ts.map +1 -1
- package/dist/react-native/generated/models/index.js.map +1 -1
- package/dist/react-native/generated/models/mappers.d.ts +43 -0
- package/dist/react-native/generated/models/mappers.d.ts.map +1 -1
- package/dist/react-native/generated/models/mappers.js +892 -157
- package/dist/react-native/generated/models/mappers.js.map +1 -1
- package/dist/react-native/generated/models/parameters.d.ts +3 -0
- package/dist/react-native/generated/models/parameters.d.ts.map +1 -1
- package/dist/react-native/generated/models/parameters.js +107 -84
- package/dist/react-native/generated/models/parameters.js.map +1 -1
- package/dist/react-native/generated/operations/deleteJobs.d.ts +71 -0
- package/dist/react-native/generated/operations/deleteJobs.d.ts.map +1 -0
- package/dist/react-native/generated/operations/deleteJobs.js +261 -0
- package/dist/react-native/generated/operations/deleteJobs.js.map +1 -0
- package/dist/react-native/generated/operations/digitalTwinModels.d.ts +2 -1
- package/dist/react-native/generated/operations/digitalTwinModels.d.ts.map +1 -1
- package/dist/react-native/generated/operations/digitalTwinModels.js +36 -29
- package/dist/react-native/generated/operations/digitalTwinModels.js.map +1 -1
- package/dist/react-native/generated/operations/digitalTwins.js +90 -77
- package/dist/react-native/generated/operations/digitalTwins.js.map +1 -1
- package/dist/react-native/generated/operations/eventRoutes.d.ts +2 -1
- package/dist/react-native/generated/operations/eventRoutes.d.ts.map +1 -1
- package/dist/react-native/generated/operations/eventRoutes.js +27 -21
- package/dist/react-native/generated/operations/eventRoutes.js.map +1 -1
- package/dist/react-native/generated/operations/importJobs.d.ts +81 -0
- package/dist/react-native/generated/operations/importJobs.d.ts.map +1 -0
- package/dist/react-native/generated/operations/importJobs.js +260 -0
- package/dist/react-native/generated/operations/importJobs.js.map +1 -0
- package/dist/react-native/generated/operations/index.d.ts +2 -0
- package/dist/react-native/generated/operations/index.d.ts.map +1 -1
- package/dist/react-native/generated/operations/index.js +2 -0
- package/dist/react-native/generated/operations/index.js.map +1 -1
- package/dist/react-native/generated/operations/query.js +6 -5
- package/dist/react-native/generated/operations/query.js.map +1 -1
- package/dist/react-native/generated/operationsInterfaces/deleteJobs.d.ts +47 -0
- package/dist/react-native/generated/operationsInterfaces/deleteJobs.d.ts.map +1 -0
- package/dist/react-native/generated/operationsInterfaces/deleteJobs.js +9 -0
- package/dist/react-native/generated/operationsInterfaces/deleteJobs.js.map +1 -0
- package/dist/react-native/generated/operationsInterfaces/digitalTwinModels.d.ts +2 -1
- package/dist/react-native/generated/operationsInterfaces/digitalTwinModels.d.ts.map +1 -1
- package/dist/react-native/generated/operationsInterfaces/digitalTwinModels.js.map +1 -1
- package/dist/react-native/generated/operationsInterfaces/digitalTwins.js.map +1 -1
- package/dist/react-native/generated/operationsInterfaces/eventRoutes.d.ts +2 -1
- package/dist/react-native/generated/operationsInterfaces/eventRoutes.d.ts.map +1 -1
- package/dist/react-native/generated/operationsInterfaces/eventRoutes.js.map +1 -1
- package/dist/react-native/generated/operationsInterfaces/importJobs.d.ts +58 -0
- package/dist/react-native/generated/operationsInterfaces/importJobs.d.ts.map +1 -0
- package/dist/react-native/generated/operationsInterfaces/importJobs.js +9 -0
- package/dist/react-native/generated/operationsInterfaces/importJobs.js.map +1 -0
- package/dist/react-native/generated/operationsInterfaces/index.d.ts +2 -0
- package/dist/react-native/generated/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/react-native/generated/operationsInterfaces/index.js +2 -0
- package/dist/react-native/generated/operationsInterfaces/index.js.map +1 -1
- package/dist/react-native/generated/operationsInterfaces/query.js.map +1 -1
- package/dist/react-native/generated/pagingHelper.js.map +1 -1
- package/package.json +3 -1
|
@@ -43,7 +43,7 @@ class EventRoutesImpl {
|
|
|
43
43
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
44
44
|
}
|
|
45
45
|
return this.listPagingPage(options, settings);
|
|
46
|
-
}
|
|
46
|
+
},
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
listPagingPage(options, settings) {
|
|
@@ -117,10 +117,11 @@ class EventRoutesImpl {
|
|
|
117
117
|
* * EventRouteIdInvalid - The event route id is invalid.
|
|
118
118
|
* * LimitExceeded - The maximum number of event routes allowed has been reached.
|
|
119
119
|
* @param id The id for an event route. The id is unique within event routes and case sensitive.
|
|
120
|
+
* @param eventRoute The event route data
|
|
120
121
|
* @param options The options parameters.
|
|
121
122
|
*/
|
|
122
|
-
add(id, options) {
|
|
123
|
-
return this.client.sendOperationRequest({ id, options }, addOperationSpec);
|
|
123
|
+
add(id, eventRoute, options) {
|
|
124
|
+
return this.client.sendOperationRequest({ id, eventRoute, options }, addOperationSpec);
|
|
124
125
|
}
|
|
125
126
|
/**
|
|
126
127
|
* Deletes an event route.
|
|
@@ -151,32 +152,34 @@ const listOperationSpec = {
|
|
|
151
152
|
httpMethod: "GET",
|
|
152
153
|
responses: {
|
|
153
154
|
200: {
|
|
154
|
-
bodyMapper: Mappers.EventRouteCollection
|
|
155
|
+
bodyMapper: Mappers.EventRouteCollection,
|
|
155
156
|
},
|
|
156
157
|
default: {
|
|
157
|
-
bodyMapper: Mappers.ErrorResponse
|
|
158
|
-
|
|
158
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
159
|
+
headersMapper: Mappers.EventRoutesListExceptionHeaders,
|
|
160
|
+
},
|
|
159
161
|
},
|
|
160
162
|
queryParameters: [Parameters.apiVersion],
|
|
161
163
|
urlParameters: [Parameters.$host],
|
|
162
164
|
headerParameters: [Parameters.accept, Parameters.resultsPerPage],
|
|
163
|
-
serializer
|
|
165
|
+
serializer,
|
|
164
166
|
};
|
|
165
167
|
const getByIdOperationSpec = {
|
|
166
168
|
path: "/eventroutes/{id}",
|
|
167
169
|
httpMethod: "GET",
|
|
168
170
|
responses: {
|
|
169
171
|
200: {
|
|
170
|
-
bodyMapper: Mappers.EventRoute
|
|
172
|
+
bodyMapper: Mappers.EventRoute,
|
|
171
173
|
},
|
|
172
174
|
default: {
|
|
173
|
-
bodyMapper: Mappers.ErrorResponse
|
|
174
|
-
|
|
175
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
176
|
+
headersMapper: Mappers.EventRoutesGetByIdExceptionHeaders,
|
|
177
|
+
},
|
|
175
178
|
},
|
|
176
179
|
queryParameters: [Parameters.apiVersion],
|
|
177
180
|
urlParameters: [Parameters.$host, Parameters.id],
|
|
178
181
|
headerParameters: [Parameters.accept],
|
|
179
|
-
serializer
|
|
182
|
+
serializer,
|
|
180
183
|
};
|
|
181
184
|
const addOperationSpec = {
|
|
182
185
|
path: "/eventroutes/{id}",
|
|
@@ -184,15 +187,16 @@ const addOperationSpec = {
|
|
|
184
187
|
responses: {
|
|
185
188
|
204: {},
|
|
186
189
|
default: {
|
|
187
|
-
bodyMapper: Mappers.ErrorResponse
|
|
188
|
-
|
|
190
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
191
|
+
headersMapper: Mappers.EventRoutesAddExceptionHeaders,
|
|
192
|
+
},
|
|
189
193
|
},
|
|
190
194
|
requestBody: Parameters.eventRoute,
|
|
191
195
|
queryParameters: [Parameters.apiVersion],
|
|
192
196
|
urlParameters: [Parameters.$host, Parameters.id],
|
|
193
197
|
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
194
198
|
mediaType: "json",
|
|
195
|
-
serializer
|
|
199
|
+
serializer,
|
|
196
200
|
};
|
|
197
201
|
const deleteOperationSpec = {
|
|
198
202
|
path: "/eventroutes/{id}",
|
|
@@ -200,27 +204,29 @@ const deleteOperationSpec = {
|
|
|
200
204
|
responses: {
|
|
201
205
|
204: {},
|
|
202
206
|
default: {
|
|
203
|
-
bodyMapper: Mappers.ErrorResponse
|
|
204
|
-
|
|
207
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
208
|
+
headersMapper: Mappers.EventRoutesDeleteExceptionHeaders,
|
|
209
|
+
},
|
|
205
210
|
},
|
|
206
211
|
queryParameters: [Parameters.apiVersion],
|
|
207
212
|
urlParameters: [Parameters.$host, Parameters.id],
|
|
208
213
|
headerParameters: [Parameters.accept],
|
|
209
|
-
serializer
|
|
214
|
+
serializer,
|
|
210
215
|
};
|
|
211
216
|
const listNextOperationSpec = {
|
|
212
217
|
path: "{nextLink}",
|
|
213
218
|
httpMethod: "GET",
|
|
214
219
|
responses: {
|
|
215
220
|
200: {
|
|
216
|
-
bodyMapper: Mappers.EventRouteCollection
|
|
221
|
+
bodyMapper: Mappers.EventRouteCollection,
|
|
217
222
|
},
|
|
218
223
|
default: {
|
|
219
|
-
bodyMapper: Mappers.ErrorResponse
|
|
220
|
-
|
|
224
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
225
|
+
headersMapper: Mappers.EventRoutesListNextExceptionHeaders,
|
|
226
|
+
},
|
|
221
227
|
},
|
|
222
228
|
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
223
229
|
headerParameters: [Parameters.accept, Parameters.resultsPerPage],
|
|
224
|
-
serializer
|
|
230
|
+
serializer,
|
|
225
231
|
};
|
|
226
232
|
//# sourceMappingURL=eventRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventRoutes.js","sourceRoot":"","sources":["../../../../src/generated/operations/eventRoutes.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AActD,4CAA4C;AAC5C,+CAA+C;AAC/C,MAAa,eAAe;IAG1B;;;OAGG;IACH,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,IAAI,CACT,OAAuC;QAEvC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,OAAuC,EACvC,QAAuB;;YAEvB,IAAI,MAA+B,CAAC;YACpC,I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qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,cAAc,CAAC;IAChE,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { EventRoutes } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { AzureDigitalTwinsAPI } from \"../azureDigitalTwinsAPI.js\";\nimport {\n EventRoute,\n EventRoutesListNextOptionalParams,\n EventRoutesListOptionalParams,\n EventRoutesListResponse,\n EventRoutesGetByIdOptionalParams,\n EventRoutesGetByIdResponse,\n EventRoutesAddOptionalParams,\n EventRoutesDeleteOptionalParams,\n EventRoutesListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing EventRoutes operations. */\nexport class EventRoutesImpl implements EventRoutes {\n private readonly client: AzureDigitalTwinsAPI;\n\n /**\n * Initialize a new instance of the class EventRoutes class.\n * @param client Reference to the service client\n */\n constructor(client: AzureDigitalTwinsAPI) {\n this.client = client;\n }\n\n /**\n * Retrieves all event routes.\n * Status codes:\n * * 200 OK\n * @param options The options parameters.\n */\n public list(\n options?: EventRoutesListOptionalParams\n ): PagedAsyncIterableIterator<EventRoute> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n options?: EventRoutesListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<EventRoute[]> {\n let result: EventRoutesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: EventRoutesListOptionalParams\n ): AsyncIterableIterator<EventRoute> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Retrieves all event routes.\n * Status codes:\n * * 200 OK\n * @param options The options parameters.\n */\n private _list(\n options?: EventRoutesListOptionalParams\n ): Promise<EventRoutesListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Retrieves an event route.\n * Status codes:\n * * 200 OK\n * * 404 Not Found\n * * EventRouteNotFound - The event route was not found.\n * @param id The id for an event route. The id is unique within event routes and case sensitive.\n * @param options The options parameters.\n */\n getById(\n id: string,\n options?: EventRoutesGetByIdOptionalParams\n ): Promise<EventRoutesGetByIdResponse> {\n return this.client.sendOperationRequest(\n { id, options },\n getByIdOperationSpec\n );\n }\n\n /**\n * Adds or replaces an event route.\n * Status codes:\n * * 204 No Content\n * * 400 Bad Request\n * * EventRouteEndpointInvalid - The endpoint provided does not exist or is not active.\n * * EventRouteFilterInvalid - The event route filter is invalid.\n * * EventRouteIdInvalid - The event route id is invalid.\n * * LimitExceeded - The maximum number of event routes allowed has been reached.\n * @param id The id for an event route. The id is unique within event routes and case sensitive.\n * @param options The options parameters.\n */\n add(id: string, options?: EventRoutesAddOptionalParams): Promise<void> {\n return this.client.sendOperationRequest({ id, options }, addOperationSpec);\n }\n\n /**\n * Deletes an event route.\n * Status codes:\n * * 204 No Content\n * * 404 Not Found\n * * EventRouteNotFound - The event route was not found.\n * @param id The id for an event route. The id is unique within event routes and case sensitive.\n * @param options The options parameters.\n */\n delete(id: string, options?: EventRoutesDeleteOptionalParams): Promise<void> {\n return this.client.sendOperationRequest(\n { id, options },\n deleteOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: EventRoutesListNextOptionalParams\n ): Promise<EventRoutesListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/eventroutes\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventRouteCollection\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept, Parameters.resultsPerPage],\n serializer\n};\nconst getByIdOperationSpec: coreClient.OperationSpec = {\n path: \"/eventroutes/{id}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventRoute\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst addOperationSpec: coreClient.OperationSpec = {\n path: \"/eventroutes/{id}\",\n httpMethod: \"PUT\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.eventRoute,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.id],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/eventroutes/{id}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventRouteCollection\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept, Parameters.resultsPerPage],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"eventRoutes.js","sourceRoot":"","sources":["../../../../src/generated/operations/eventRoutes.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AActD,4CAA4C;AAC5C,+CAA+C;AAC/C,MAAa,eAAe;IAG1B;;;OAGG;IACH,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,IAAI,CACT,OAAuC;QAEvC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;o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ACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,mBAAmB;IACzB,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;YACjC,aAAa,EAAE,OAAO,CAAC,iCAAiC;SACzD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,CAAC;IAChD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;YACjC,aAAa,EAAE,OAAO,CAAC,mCAAmC;SAC3D;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,cAAc,CAAC;IAChE,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { EventRoutes } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { AzureDigitalTwinsAPI } from \"../azureDigitalTwinsAPI.js\";\nimport {\n EventRoute,\n EventRoutesListNextOptionalParams,\n EventRoutesListOptionalParams,\n EventRoutesListResponse,\n EventRoutesGetByIdOptionalParams,\n EventRoutesGetByIdResponse,\n EventRoutesAddOptionalParams,\n EventRoutesDeleteOptionalParams,\n EventRoutesListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing EventRoutes operations. */\nexport class EventRoutesImpl implements EventRoutes {\n private readonly client: AzureDigitalTwinsAPI;\n\n /**\n * Initialize a new instance of the class EventRoutes class.\n * @param client Reference to the service client\n */\n constructor(client: AzureDigitalTwinsAPI) {\n this.client = client;\n }\n\n /**\n * Retrieves all event routes.\n * Status codes:\n * * 200 OK\n * @param options The options parameters.\n */\n public list(\n options?: EventRoutesListOptionalParams,\n ): PagedAsyncIterableIterator<EventRoute> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: EventRoutesListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<EventRoute[]> {\n let result: EventRoutesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: EventRoutesListOptionalParams,\n ): AsyncIterableIterator<EventRoute> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Retrieves all event routes.\n * Status codes:\n * * 200 OK\n * @param options The options parameters.\n */\n private _list(\n options?: EventRoutesListOptionalParams,\n ): Promise<EventRoutesListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Retrieves an event route.\n * Status codes:\n * * 200 OK\n * * 404 Not Found\n * * EventRouteNotFound - The event route was not found.\n * @param id The id for an event route. The id is unique within event routes and case sensitive.\n * @param options The options parameters.\n */\n getById(\n id: string,\n options?: EventRoutesGetByIdOptionalParams,\n ): Promise<EventRoutesGetByIdResponse> {\n return this.client.sendOperationRequest(\n { id, options },\n getByIdOperationSpec,\n );\n }\n\n /**\n * Adds or replaces an event route.\n * Status codes:\n * * 204 No Content\n * * 400 Bad Request\n * * EventRouteEndpointInvalid - The endpoint provided does not exist or is not active.\n * * EventRouteFilterInvalid - The event route filter is invalid.\n * * EventRouteIdInvalid - The event route id is invalid.\n * * LimitExceeded - The maximum number of event routes allowed has been reached.\n * @param id The id for an event route. The id is unique within event routes and case sensitive.\n * @param eventRoute The event route data\n * @param options The options parameters.\n */\n add(\n id: string,\n eventRoute: EventRoute,\n options?: EventRoutesAddOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { id, eventRoute, options },\n addOperationSpec,\n );\n }\n\n /**\n * Deletes an event route.\n * Status codes:\n * * 204 No Content\n * * 404 Not Found\n * * EventRouteNotFound - The event route was not found.\n * @param id The id for an event route. The id is unique within event routes and case sensitive.\n * @param options The options parameters.\n */\n delete(id: string, options?: EventRoutesDeleteOptionalParams): Promise<void> {\n return this.client.sendOperationRequest(\n { id, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: EventRoutesListNextOptionalParams,\n ): Promise<EventRoutesListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/eventroutes\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventRouteCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.EventRoutesListExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept, Parameters.resultsPerPage],\n serializer,\n};\nconst getByIdOperationSpec: coreClient.OperationSpec = {\n path: \"/eventroutes/{id}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventRoute,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.EventRoutesGetByIdExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst addOperationSpec: coreClient.OperationSpec = {\n path: \"/eventroutes/{id}\",\n httpMethod: \"PUT\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.EventRoutesAddExceptionHeaders,\n },\n },\n requestBody: Parameters.eventRoute,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.id],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/eventroutes/{id}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.EventRoutesDeleteExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EventRouteCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.EventRoutesListNextExceptionHeaders,\n },\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept, Parameters.resultsPerPage],\n serializer,\n};\n"]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
2
|
+
import { ImportJobs } from "../operationsInterfaces/index.js";
|
|
3
|
+
import { AzureDigitalTwinsAPI } from "../azureDigitalTwinsAPI.js";
|
|
4
|
+
import { ImportJob, ImportJobsListOptionalParams, ImportJobsAddOptionalParams, ImportJobsAddResponse, ImportJobsGetByIdOptionalParams, ImportJobsGetByIdResponse, ImportJobsDeleteOptionalParams, ImportJobsCancelOptionalParams, ImportJobsCancelResponse } from "../models/index.js";
|
|
5
|
+
/** Class containing ImportJobs operations. */
|
|
6
|
+
export declare class ImportJobsImpl implements ImportJobs {
|
|
7
|
+
private readonly client;
|
|
8
|
+
/**
|
|
9
|
+
* Initialize a new instance of the class ImportJobs class.
|
|
10
|
+
* @param client Reference to the service client
|
|
11
|
+
*/
|
|
12
|
+
constructor(client: AzureDigitalTwinsAPI);
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves all import jobs.
|
|
15
|
+
* Status codes:
|
|
16
|
+
* * 200 OK
|
|
17
|
+
* @param options The options parameters.
|
|
18
|
+
*/
|
|
19
|
+
list(options?: ImportJobsListOptionalParams): PagedAsyncIterableIterator<ImportJob>;
|
|
20
|
+
private listPagingPage;
|
|
21
|
+
private listPagingAll;
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves all import jobs.
|
|
24
|
+
* Status codes:
|
|
25
|
+
* * 200 OK
|
|
26
|
+
* @param options The options parameters.
|
|
27
|
+
*/
|
|
28
|
+
private _list;
|
|
29
|
+
/**
|
|
30
|
+
* Creates an import job.
|
|
31
|
+
* Status codes:
|
|
32
|
+
* * 201 Created
|
|
33
|
+
* * 400 Bad Request
|
|
34
|
+
* * JobLimitReached - The maximum number of import jobs allowed has been reached.
|
|
35
|
+
* * ValidationFailed - The import job request is not valid.
|
|
36
|
+
* @param id The id for the import job. The id is unique within the service and case sensitive.
|
|
37
|
+
* @param importJob The import job being added.
|
|
38
|
+
* @param options The options parameters.
|
|
39
|
+
*/
|
|
40
|
+
add(id: string, importJob: ImportJob, options?: ImportJobsAddOptionalParams): Promise<ImportJobsAddResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* Retrieves an import job.
|
|
43
|
+
* Status codes:
|
|
44
|
+
* * 200 OK
|
|
45
|
+
* * 404 Not Found
|
|
46
|
+
* * ImportJobNotFound - The import job was not found.
|
|
47
|
+
* @param id The id for the import job. The id is unique within the service and case sensitive.
|
|
48
|
+
* @param options The options parameters.
|
|
49
|
+
*/
|
|
50
|
+
getById(id: string, options?: ImportJobsGetByIdOptionalParams): Promise<ImportJobsGetByIdResponse>;
|
|
51
|
+
/**
|
|
52
|
+
* Deletes an import job. This is simply used to remove a job id, so it may be reused later. It can not
|
|
53
|
+
* be used to stop entities from being imported.
|
|
54
|
+
* Status codes:
|
|
55
|
+
* * 204 No Content
|
|
56
|
+
* * 400 Bad Request
|
|
57
|
+
* * ValidationFailed - The import job request is not valid.
|
|
58
|
+
* @param id The id for the import job. The id is unique within the service and case sensitive.
|
|
59
|
+
* @param options The options parameters.
|
|
60
|
+
*/
|
|
61
|
+
delete(id: string, options?: ImportJobsDeleteOptionalParams): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Cancels an import job that is currently running. Service will stop any import operations triggered
|
|
64
|
+
* by the current import job that are in progress, and go to a cancelled state. Please note that this
|
|
65
|
+
* will leave your instance in an unknown state as there won't be any rollback operation.
|
|
66
|
+
* Status codes:
|
|
67
|
+
* * 200 Request Accepted
|
|
68
|
+
* * 400 Bad Request
|
|
69
|
+
* * ValidationFailed - The import job request is not valid.
|
|
70
|
+
* @param id The id for the import job. The id is unique within the service and case sensitive.
|
|
71
|
+
* @param options The options parameters.
|
|
72
|
+
*/
|
|
73
|
+
cancel(id: string, options?: ImportJobsCancelOptionalParams): Promise<ImportJobsCancelResponse>;
|
|
74
|
+
/**
|
|
75
|
+
* ListNext
|
|
76
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
77
|
+
* @param options The options parameters.
|
|
78
|
+
*/
|
|
79
|
+
private _listNext;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=importJobs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importJobs.d.ts","sourceRoot":"","sources":["../../../../src/generated/operations/importJobs.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAgB,MAAM,oBAAoB,CAAC;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAI9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EACL,SAAS,EAET,4BAA4B,EAE5B,2BAA2B,EAC3B,qBAAqB,EACrB,+BAA+B,EAC/B,yBAAyB,EACzB,8BAA8B,EAC9B,8BAA8B,EAC9B,wBAAwB,EAEzB,MAAM,oBAAoB,CAAC;AAG5B,8CAA8C;AAC9C,qBAAa,cAAe,YAAW,UAAU;IAC/C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuB;IAE9C;;;OAGG;gBACS,MAAM,EAAE,oBAAoB;IAIxC;;;;;OAKG;IACI,IAAI,CACT,OAAO,CAAC,EAAE,4BAA4B,GACrC,0BAA0B,CAAC,SAAS,CAAC;YAkBzB,cAAc;YAsBd,aAAa;IAQ5B;;;;;OAKG;IACH,OAAO,CAAC,KAAK;IAMb;;;;;;;;;;OAUG;IACH,GAAG,CACD,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,SAAS,EACpB,OAAO,CAAC,EAAE,2BAA2B,GACpC,OAAO,CAAC,qBAAqB,CAAC;IAOjC;;;;;;;;OAQG;IACH,OAAO,CACL,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,+BAA+B,GACxC,OAAO,CAAC,yBAAyB,CAAC;IAOrC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,8BAA8B,GAAG,OAAO,CAAC,IAAI,CAAC;IAO3E;;;;;;;;;;OAUG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,8BAA8B,GACvC,OAAO,CAAC,wBAAwB,CAAC;IAOpC;;;;OAIG;IACH,OAAO,CAAC,SAAS;CASlB"}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*
|
|
6
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
7
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.ImportJobsImpl = void 0;
|
|
11
|
+
const tslib_1 = require("tslib");
|
|
12
|
+
const pagingHelper_js_1 = require("../pagingHelper.js");
|
|
13
|
+
const coreClient = tslib_1.__importStar(require("@azure/core-client"));
|
|
14
|
+
const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
|
|
15
|
+
const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
16
|
+
/// <reference lib="esnext.asynciterable" />
|
|
17
|
+
/** Class containing ImportJobs operations. */
|
|
18
|
+
class ImportJobsImpl {
|
|
19
|
+
/**
|
|
20
|
+
* Initialize a new instance of the class ImportJobs class.
|
|
21
|
+
* @param client Reference to the service client
|
|
22
|
+
*/
|
|
23
|
+
constructor(client) {
|
|
24
|
+
this.client = client;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves all import jobs.
|
|
28
|
+
* Status codes:
|
|
29
|
+
* * 200 OK
|
|
30
|
+
* @param options The options parameters.
|
|
31
|
+
*/
|
|
32
|
+
list(options) {
|
|
33
|
+
const iter = this.listPagingAll(options);
|
|
34
|
+
return {
|
|
35
|
+
next() {
|
|
36
|
+
return iter.next();
|
|
37
|
+
},
|
|
38
|
+
[Symbol.asyncIterator]() {
|
|
39
|
+
return this;
|
|
40
|
+
},
|
|
41
|
+
byPage: (settings) => {
|
|
42
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
43
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
44
|
+
}
|
|
45
|
+
return this.listPagingPage(options, settings);
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
listPagingPage(options, settings) {
|
|
50
|
+
return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
51
|
+
let result;
|
|
52
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
53
|
+
if (!continuationToken) {
|
|
54
|
+
result = yield tslib_1.__await(this._list(options));
|
|
55
|
+
let page = result.value || [];
|
|
56
|
+
continuationToken = result.nextLink;
|
|
57
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
58
|
+
yield yield tslib_1.__await(page);
|
|
59
|
+
}
|
|
60
|
+
while (continuationToken) {
|
|
61
|
+
result = yield tslib_1.__await(this._listNext(continuationToken, options));
|
|
62
|
+
continuationToken = result.nextLink;
|
|
63
|
+
let page = result.value || [];
|
|
64
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
65
|
+
yield yield tslib_1.__await(page);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
listPagingAll(options) {
|
|
70
|
+
return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
|
|
71
|
+
var _a, e_1, _b, _c;
|
|
72
|
+
try {
|
|
73
|
+
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
74
|
+
_c = _f.value;
|
|
75
|
+
_d = false;
|
|
76
|
+
const page = _c;
|
|
77
|
+
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
81
|
+
finally {
|
|
82
|
+
try {
|
|
83
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
84
|
+
}
|
|
85
|
+
finally { if (e_1) throw e_1.error; }
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Retrieves all import jobs.
|
|
91
|
+
* Status codes:
|
|
92
|
+
* * 200 OK
|
|
93
|
+
* @param options The options parameters.
|
|
94
|
+
*/
|
|
95
|
+
_list(options) {
|
|
96
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Creates an import job.
|
|
100
|
+
* Status codes:
|
|
101
|
+
* * 201 Created
|
|
102
|
+
* * 400 Bad Request
|
|
103
|
+
* * JobLimitReached - The maximum number of import jobs allowed has been reached.
|
|
104
|
+
* * ValidationFailed - The import job request is not valid.
|
|
105
|
+
* @param id The id for the import job. The id is unique within the service and case sensitive.
|
|
106
|
+
* @param importJob The import job being added.
|
|
107
|
+
* @param options The options parameters.
|
|
108
|
+
*/
|
|
109
|
+
add(id, importJob, options) {
|
|
110
|
+
return this.client.sendOperationRequest({ id, importJob, options }, addOperationSpec);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Retrieves an import job.
|
|
114
|
+
* Status codes:
|
|
115
|
+
* * 200 OK
|
|
116
|
+
* * 404 Not Found
|
|
117
|
+
* * ImportJobNotFound - The import job was not found.
|
|
118
|
+
* @param id The id for the import job. The id is unique within the service and case sensitive.
|
|
119
|
+
* @param options The options parameters.
|
|
120
|
+
*/
|
|
121
|
+
getById(id, options) {
|
|
122
|
+
return this.client.sendOperationRequest({ id, options }, getByIdOperationSpec);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Deletes an import job. This is simply used to remove a job id, so it may be reused later. It can not
|
|
126
|
+
* be used to stop entities from being imported.
|
|
127
|
+
* Status codes:
|
|
128
|
+
* * 204 No Content
|
|
129
|
+
* * 400 Bad Request
|
|
130
|
+
* * ValidationFailed - The import job request is not valid.
|
|
131
|
+
* @param id The id for the import job. The id is unique within the service and case sensitive.
|
|
132
|
+
* @param options The options parameters.
|
|
133
|
+
*/
|
|
134
|
+
delete(id, options) {
|
|
135
|
+
return this.client.sendOperationRequest({ id, options }, deleteOperationSpec);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Cancels an import job that is currently running. Service will stop any import operations triggered
|
|
139
|
+
* by the current import job that are in progress, and go to a cancelled state. Please note that this
|
|
140
|
+
* will leave your instance in an unknown state as there won't be any rollback operation.
|
|
141
|
+
* Status codes:
|
|
142
|
+
* * 200 Request Accepted
|
|
143
|
+
* * 400 Bad Request
|
|
144
|
+
* * ValidationFailed - The import job request is not valid.
|
|
145
|
+
* @param id The id for the import job. The id is unique within the service and case sensitive.
|
|
146
|
+
* @param options The options parameters.
|
|
147
|
+
*/
|
|
148
|
+
cancel(id, options) {
|
|
149
|
+
return this.client.sendOperationRequest({ id, options }, cancelOperationSpec);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* ListNext
|
|
153
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
154
|
+
* @param options The options parameters.
|
|
155
|
+
*/
|
|
156
|
+
_listNext(nextLink, options) {
|
|
157
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
exports.ImportJobsImpl = ImportJobsImpl;
|
|
161
|
+
// Operation Specifications
|
|
162
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
163
|
+
const listOperationSpec = {
|
|
164
|
+
path: "/jobs/imports",
|
|
165
|
+
httpMethod: "GET",
|
|
166
|
+
responses: {
|
|
167
|
+
200: {
|
|
168
|
+
bodyMapper: Mappers.ImportJobCollection,
|
|
169
|
+
},
|
|
170
|
+
default: {
|
|
171
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
172
|
+
headersMapper: Mappers.ImportJobsListExceptionHeaders,
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
queryParameters: [Parameters.apiVersion],
|
|
176
|
+
urlParameters: [Parameters.$host],
|
|
177
|
+
headerParameters: [Parameters.accept, Parameters.resultsPerPage],
|
|
178
|
+
serializer,
|
|
179
|
+
};
|
|
180
|
+
const addOperationSpec = {
|
|
181
|
+
path: "/jobs/imports/{id}",
|
|
182
|
+
httpMethod: "PUT",
|
|
183
|
+
responses: {
|
|
184
|
+
201: {
|
|
185
|
+
bodyMapper: Mappers.ImportJob,
|
|
186
|
+
},
|
|
187
|
+
default: {
|
|
188
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
189
|
+
headersMapper: Mappers.ImportJobsAddExceptionHeaders,
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
requestBody: Parameters.importJob,
|
|
193
|
+
queryParameters: [Parameters.apiVersion],
|
|
194
|
+
urlParameters: [Parameters.$host, Parameters.id],
|
|
195
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
196
|
+
mediaType: "json",
|
|
197
|
+
serializer,
|
|
198
|
+
};
|
|
199
|
+
const getByIdOperationSpec = {
|
|
200
|
+
path: "/jobs/imports/{id}",
|
|
201
|
+
httpMethod: "GET",
|
|
202
|
+
responses: {
|
|
203
|
+
200: {
|
|
204
|
+
bodyMapper: Mappers.ImportJob,
|
|
205
|
+
},
|
|
206
|
+
default: {
|
|
207
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
208
|
+
headersMapper: Mappers.ImportJobsGetByIdExceptionHeaders,
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
queryParameters: [Parameters.apiVersion],
|
|
212
|
+
urlParameters: [Parameters.$host, Parameters.id],
|
|
213
|
+
headerParameters: [Parameters.accept],
|
|
214
|
+
serializer,
|
|
215
|
+
};
|
|
216
|
+
const deleteOperationSpec = {
|
|
217
|
+
path: "/jobs/imports/{id}",
|
|
218
|
+
httpMethod: "DELETE",
|
|
219
|
+
responses: {
|
|
220
|
+
204: {},
|
|
221
|
+
default: {
|
|
222
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
223
|
+
headersMapper: Mappers.ImportJobsDeleteExceptionHeaders,
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
queryParameters: [Parameters.apiVersion],
|
|
227
|
+
urlParameters: [Parameters.$host, Parameters.id],
|
|
228
|
+
headerParameters: [Parameters.accept],
|
|
229
|
+
serializer,
|
|
230
|
+
};
|
|
231
|
+
const cancelOperationSpec = {
|
|
232
|
+
path: "/jobs/imports/{id}/cancel",
|
|
233
|
+
httpMethod: "POST",
|
|
234
|
+
responses: {
|
|
235
|
+
200: {
|
|
236
|
+
bodyMapper: Mappers.ImportJob,
|
|
237
|
+
},
|
|
238
|
+
default: {
|
|
239
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
240
|
+
headersMapper: Mappers.ImportJobsCancelExceptionHeaders,
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
queryParameters: [Parameters.apiVersion],
|
|
244
|
+
urlParameters: [Parameters.$host, Parameters.id],
|
|
245
|
+
headerParameters: [Parameters.accept],
|
|
246
|
+
serializer,
|
|
247
|
+
};
|
|
248
|
+
const listNextOperationSpec = {
|
|
249
|
+
path: "{nextLink}",
|
|
250
|
+
httpMethod: "GET",
|
|
251
|
+
responses: {
|
|
252
|
+
200: {
|
|
253
|
+
bodyMapper: Mappers.ImportJobCollection,
|
|
254
|
+
},
|
|
255
|
+
default: {
|
|
256
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
257
|
+
headersMapper: Mappers.ImportJobsListNextExceptionHeaders,
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
261
|
+
headerParameters: [Parameters.accept, Parameters.resultsPerPage],
|
|
262
|
+
serializer,
|
|
263
|
+
};
|
|
264
|
+
//# sourceMappingURL=importJobs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importJobs.js","sourceRoot":"","sources":["../../../../src/generated/operations/importJobs.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAiBtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,IAAI,CACT,OAAsC;QAEtC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,OAAsC,EACtC,QAAuB;;YAEvB,IAAI,MAA8B,CAAC;YACnC,IAAI,iBAAiB,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,iBAAiB,CAAC;YACpD,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACvB,MAAM,GAAG,sBAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA,CAAC;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D,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,CAAC;IAChD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,2BAA2B;IACjC,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,SAAS;SAC9B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;YACjC,aAAa,EAAE,OAAO,CAAC,gCAAgC;SACxD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,CAAC;IAChD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;YACjC,aAAa,EAAE,OAAO,CAAC,kCAAkC;SAC1D;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,cAAc,CAAC;IAChE,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { ImportJobs } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { AzureDigitalTwinsAPI } from \"../azureDigitalTwinsAPI.js\";\nimport {\n ImportJob,\n ImportJobsListNextOptionalParams,\n ImportJobsListOptionalParams,\n ImportJobsListResponse,\n ImportJobsAddOptionalParams,\n ImportJobsAddResponse,\n ImportJobsGetByIdOptionalParams,\n ImportJobsGetByIdResponse,\n ImportJobsDeleteOptionalParams,\n ImportJobsCancelOptionalParams,\n ImportJobsCancelResponse,\n ImportJobsListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ImportJobs operations. */\nexport class ImportJobsImpl implements ImportJobs {\n private readonly client: AzureDigitalTwinsAPI;\n\n /**\n * Initialize a new instance of the class ImportJobs class.\n * @param client Reference to the service client\n */\n constructor(client: AzureDigitalTwinsAPI) {\n this.client = client;\n }\n\n /**\n * Retrieves all import jobs.\n * Status codes:\n * * 200 OK\n * @param options The options parameters.\n */\n public list(\n options?: ImportJobsListOptionalParams,\n ): PagedAsyncIterableIterator<ImportJob> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: ImportJobsListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<ImportJob[]> {\n let result: ImportJobsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: ImportJobsListOptionalParams,\n ): AsyncIterableIterator<ImportJob> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Retrieves all import jobs.\n * Status codes:\n * * 200 OK\n * @param options The options parameters.\n */\n private _list(\n options?: ImportJobsListOptionalParams,\n ): Promise<ImportJobsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Creates an import job.\n * Status codes:\n * * 201 Created\n * * 400 Bad Request\n * * JobLimitReached - The maximum number of import jobs allowed has been reached.\n * * ValidationFailed - The import job request is not valid.\n * @param id The id for the import job. The id is unique within the service and case sensitive.\n * @param importJob The import job being added.\n * @param options The options parameters.\n */\n add(\n id: string,\n importJob: ImportJob,\n options?: ImportJobsAddOptionalParams,\n ): Promise<ImportJobsAddResponse> {\n return this.client.sendOperationRequest(\n { id, importJob, options },\n addOperationSpec,\n );\n }\n\n /**\n * Retrieves an import job.\n * Status codes:\n * * 200 OK\n * * 404 Not Found\n * * ImportJobNotFound - The import job was not found.\n * @param id The id for the import job. The id is unique within the service and case sensitive.\n * @param options The options parameters.\n */\n getById(\n id: string,\n options?: ImportJobsGetByIdOptionalParams,\n ): Promise<ImportJobsGetByIdResponse> {\n return this.client.sendOperationRequest(\n { id, options },\n getByIdOperationSpec,\n );\n }\n\n /**\n * Deletes an import job. This is simply used to remove a job id, so it may be reused later. It can not\n * be used to stop entities from being imported.\n * Status codes:\n * * 204 No Content\n * * 400 Bad Request\n * * ValidationFailed - The import job request is not valid.\n * @param id The id for the import job. The id is unique within the service and case sensitive.\n * @param options The options parameters.\n */\n delete(id: string, options?: ImportJobsDeleteOptionalParams): Promise<void> {\n return this.client.sendOperationRequest(\n { id, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Cancels an import job that is currently running. Service will stop any import operations triggered\n * by the current import job that are in progress, and go to a cancelled state. Please note that this\n * will leave your instance in an unknown state as there won't be any rollback operation.\n * Status codes:\n * * 200 Request Accepted\n * * 400 Bad Request\n * * ValidationFailed - The import job request is not valid.\n * @param id The id for the import job. The id is unique within the service and case sensitive.\n * @param options The options parameters.\n */\n cancel(\n id: string,\n options?: ImportJobsCancelOptionalParams,\n ): Promise<ImportJobsCancelResponse> {\n return this.client.sendOperationRequest(\n { id, options },\n cancelOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: ImportJobsListNextOptionalParams,\n ): Promise<ImportJobsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/jobs/imports\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ImportJobCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.ImportJobsListExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept, Parameters.resultsPerPage],\n serializer,\n};\nconst addOperationSpec: coreClient.OperationSpec = {\n path: \"/jobs/imports/{id}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.ImportJob,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.ImportJobsAddExceptionHeaders,\n },\n },\n requestBody: Parameters.importJob,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.id],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst getByIdOperationSpec: coreClient.OperationSpec = {\n path: \"/jobs/imports/{id}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ImportJob,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.ImportJobsGetByIdExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/jobs/imports/{id}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.ImportJobsDeleteExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst cancelOperationSpec: coreClient.OperationSpec = {\n path: \"/jobs/imports/{id}/cancel\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.ImportJob,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.ImportJobsCancelExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ImportJobCollection,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.ImportJobsListNextExceptionHeaders,\n },\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept, Parameters.resultsPerPage],\n serializer,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/operations/index.ts"],"names":[],"mappings":"AAQA,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/operations/index.ts"],"names":[],"mappings":"AAQA,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
|
|
@@ -12,4 +12,6 @@ tslib_1.__exportStar(require("./digitalTwinModels.js"), exports);
|
|
|
12
12
|
tslib_1.__exportStar(require("./query.js"), exports);
|
|
13
13
|
tslib_1.__exportStar(require("./digitalTwins.js"), exports);
|
|
14
14
|
tslib_1.__exportStar(require("./eventRoutes.js"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./importJobs.js"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./deleteJobs.js"), exports);
|
|
15
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/operations/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,iEAAuC;AACvC,qDAA2B;AAC3B,4DAAkC;AAClC,2DAAiC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./digitalTwinModels.js\";\nexport * from \"./query.js\";\nexport * from \"./digitalTwins.js\";\nexport * from \"./eventRoutes.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/operations/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,iEAAuC;AACvC,qDAA2B;AAC3B,4DAAkC;AAClC,2DAAiC;AACjC,0DAAgC;AAChC,0DAAgC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./digitalTwinModels.js\";\nexport * from \"./query.js\";\nexport * from \"./digitalTwins.js\";\nexport * from \"./eventRoutes.js\";\nexport * from \"./importJobs.js\";\nexport * from \"./deleteJobs.js\";\n"]}
|
|
@@ -48,11 +48,12 @@ const queryTwinsOperationSpec = {
|
|
|
48
48
|
responses: {
|
|
49
49
|
200: {
|
|
50
50
|
bodyMapper: Mappers.QueryResult,
|
|
51
|
-
headersMapper: Mappers.QueryQueryTwinsHeaders
|
|
51
|
+
headersMapper: Mappers.QueryQueryTwinsHeaders,
|
|
52
52
|
},
|
|
53
53
|
default: {
|
|
54
|
-
bodyMapper: Mappers.ErrorResponse
|
|
55
|
-
|
|
54
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
55
|
+
headersMapper: Mappers.QueryQueryTwinsExceptionHeaders,
|
|
56
|
+
},
|
|
56
57
|
},
|
|
57
58
|
requestBody: Parameters.querySpecification,
|
|
58
59
|
queryParameters: [Parameters.apiVersion],
|
|
@@ -60,9 +61,9 @@ const queryTwinsOperationSpec = {
|
|
|
60
61
|
headerParameters: [
|
|
61
62
|
Parameters.contentType,
|
|
62
63
|
Parameters.accept,
|
|
63
|
-
Parameters.resultsPerPage
|
|
64
|
+
Parameters.resultsPerPage,
|
|
64
65
|
],
|
|
65
66
|
mediaType: "json",
|
|
66
|
-
serializer
|
|
67
|
+
serializer,
|
|
67
68
|
};
|
|
68
69
|
//# sourceMappingURL=query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/generated/operations/query.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,yCAAyC;AACzC,MAAa,SAAS;IAGpB;;;OAGG;IACH,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,UAAU,CACR,kBAAsC,EACtC,OAAuC;QAEvC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,kBAAkB,EAAE,OAAO,EAAE,EAC/B,uBAAuB,CACxB,CAAC;IACJ,CAAC;CACF;AAlCD,8BAkCC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,uBAAuB,GAA6B;IACxD,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,WAAW;YAC/B,aAAa,EAAE,OAAO,CAAC,sBAAsB;SAC9C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/generated/operations/query.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,yCAAyC;AACzC,MAAa,SAAS;IAGpB;;;OAGG;IACH,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,UAAU,CACR,kBAAsC,EACtC,OAAuC;QAEvC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,kBAAkB,EAAE,OAAO,EAAE,EAC/B,uBAAuB,CACxB,CAAC;IACJ,CAAC;CACF;AAlCD,8BAkCC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,uBAAuB,GAA6B;IACxD,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,WAAW;YAC/B,aAAa,EAAE,OAAO,CAAC,sBAAsB;SAC9C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;YACjC,aAAa,EAAE,OAAO,CAAC,+BAA+B;SACvD;KACF;IACD,WAAW,EAAE,UAAU,CAAC,kBAAkB;IAC1C,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE;QAChB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,cAAc;KAC1B;IACD,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Query } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { AzureDigitalTwinsAPI } from \"../azureDigitalTwinsAPI.js\";\nimport {\n QuerySpecification,\n QueryQueryTwinsOptionalParams,\n QueryQueryTwinsResponse,\n} from \"../models/index.js\";\n\n/** Class containing Query operations. */\nexport class QueryImpl implements Query {\n private readonly client: AzureDigitalTwinsAPI;\n\n /**\n * Initialize a new instance of the class Query class.\n * @param client Reference to the service client\n */\n constructor(client: AzureDigitalTwinsAPI) {\n this.client = client;\n }\n\n /**\n * Executes a query that allows traversing relationships and filtering by property values.\n * Status codes:\n * * 200 OK\n * * 400 Bad Request\n * * BadRequest - The continuation token is invalid.\n * * SqlQueryError - The query contains some errors.\n * * TimeoutError - The query execution timed out after 60 seconds. Try simplifying the query or\n * adding conditions to reduce the result size.\n * * 429 Too Many Requests\n * * QuotaReachedError - The maximum query rate limit has been reached.\n * @param querySpecification The query specification to execute.\n * @param options The options parameters.\n */\n queryTwins(\n querySpecification: QuerySpecification,\n options?: QueryQueryTwinsOptionalParams,\n ): Promise<QueryQueryTwinsResponse> {\n return this.client.sendOperationRequest(\n { querySpecification, options },\n queryTwinsOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst queryTwinsOperationSpec: coreClient.OperationSpec = {\n path: \"/query\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.QueryResult,\n headersMapper: Mappers.QueryQueryTwinsHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.QueryQueryTwinsExceptionHeaders,\n },\n },\n requestBody: Parameters.querySpecification,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.resultsPerPage,\n ],\n mediaType: \"json\",\n serializer,\n};\n"]}
|