@azure/digital-twins-core 2.0.0-alpha.20250513.1 → 2.0.0-alpha.20250514.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
|
@@ -40,7 +40,7 @@ export class EventRoutesImpl {
|
|
|
40
40
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
41
41
|
}
|
|
42
42
|
return this.listPagingPage(options, settings);
|
|
43
|
-
}
|
|
43
|
+
},
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
listPagingPage(options, settings) {
|
|
@@ -114,10 +114,11 @@ export class EventRoutesImpl {
|
|
|
114
114
|
* * EventRouteIdInvalid - The event route id is invalid.
|
|
115
115
|
* * LimitExceeded - The maximum number of event routes allowed has been reached.
|
|
116
116
|
* @param id The id for an event route. The id is unique within event routes and case sensitive.
|
|
117
|
+
* @param eventRoute The event route data
|
|
117
118
|
* @param options The options parameters.
|
|
118
119
|
*/
|
|
119
|
-
add(id, options) {
|
|
120
|
-
return this.client.sendOperationRequest({ id, options }, addOperationSpec);
|
|
120
|
+
add(id, eventRoute, options) {
|
|
121
|
+
return this.client.sendOperationRequest({ id, eventRoute, options }, addOperationSpec);
|
|
121
122
|
}
|
|
122
123
|
/**
|
|
123
124
|
* Deletes an event route.
|
|
@@ -147,32 +148,34 @@ const listOperationSpec = {
|
|
|
147
148
|
httpMethod: "GET",
|
|
148
149
|
responses: {
|
|
149
150
|
200: {
|
|
150
|
-
bodyMapper: Mappers.EventRouteCollection
|
|
151
|
+
bodyMapper: Mappers.EventRouteCollection,
|
|
151
152
|
},
|
|
152
153
|
default: {
|
|
153
|
-
bodyMapper: Mappers.ErrorResponse
|
|
154
|
-
|
|
154
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
155
|
+
headersMapper: Mappers.EventRoutesListExceptionHeaders,
|
|
156
|
+
},
|
|
155
157
|
},
|
|
156
158
|
queryParameters: [Parameters.apiVersion],
|
|
157
159
|
urlParameters: [Parameters.$host],
|
|
158
160
|
headerParameters: [Parameters.accept, Parameters.resultsPerPage],
|
|
159
|
-
serializer
|
|
161
|
+
serializer,
|
|
160
162
|
};
|
|
161
163
|
const getByIdOperationSpec = {
|
|
162
164
|
path: "/eventroutes/{id}",
|
|
163
165
|
httpMethod: "GET",
|
|
164
166
|
responses: {
|
|
165
167
|
200: {
|
|
166
|
-
bodyMapper: Mappers.EventRoute
|
|
168
|
+
bodyMapper: Mappers.EventRoute,
|
|
167
169
|
},
|
|
168
170
|
default: {
|
|
169
|
-
bodyMapper: Mappers.ErrorResponse
|
|
170
|
-
|
|
171
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
172
|
+
headersMapper: Mappers.EventRoutesGetByIdExceptionHeaders,
|
|
173
|
+
},
|
|
171
174
|
},
|
|
172
175
|
queryParameters: [Parameters.apiVersion],
|
|
173
176
|
urlParameters: [Parameters.$host, Parameters.id],
|
|
174
177
|
headerParameters: [Parameters.accept],
|
|
175
|
-
serializer
|
|
178
|
+
serializer,
|
|
176
179
|
};
|
|
177
180
|
const addOperationSpec = {
|
|
178
181
|
path: "/eventroutes/{id}",
|
|
@@ -180,15 +183,16 @@ const addOperationSpec = {
|
|
|
180
183
|
responses: {
|
|
181
184
|
204: {},
|
|
182
185
|
default: {
|
|
183
|
-
bodyMapper: Mappers.ErrorResponse
|
|
184
|
-
|
|
186
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
187
|
+
headersMapper: Mappers.EventRoutesAddExceptionHeaders,
|
|
188
|
+
},
|
|
185
189
|
},
|
|
186
190
|
requestBody: Parameters.eventRoute,
|
|
187
191
|
queryParameters: [Parameters.apiVersion],
|
|
188
192
|
urlParameters: [Parameters.$host, Parameters.id],
|
|
189
193
|
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
190
194
|
mediaType: "json",
|
|
191
|
-
serializer
|
|
195
|
+
serializer,
|
|
192
196
|
};
|
|
193
197
|
const deleteOperationSpec = {
|
|
194
198
|
path: "/eventroutes/{id}",
|
|
@@ -196,27 +200,29 @@ const deleteOperationSpec = {
|
|
|
196
200
|
responses: {
|
|
197
201
|
204: {},
|
|
198
202
|
default: {
|
|
199
|
-
bodyMapper: Mappers.ErrorResponse
|
|
200
|
-
|
|
203
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
204
|
+
headersMapper: Mappers.EventRoutesDeleteExceptionHeaders,
|
|
205
|
+
},
|
|
201
206
|
},
|
|
202
207
|
queryParameters: [Parameters.apiVersion],
|
|
203
208
|
urlParameters: [Parameters.$host, Parameters.id],
|
|
204
209
|
headerParameters: [Parameters.accept],
|
|
205
|
-
serializer
|
|
210
|
+
serializer,
|
|
206
211
|
};
|
|
207
212
|
const listNextOperationSpec = {
|
|
208
213
|
path: "{nextLink}",
|
|
209
214
|
httpMethod: "GET",
|
|
210
215
|
responses: {
|
|
211
216
|
200: {
|
|
212
|
-
bodyMapper: Mappers.EventRouteCollection
|
|
217
|
+
bodyMapper: Mappers.EventRouteCollection,
|
|
213
218
|
},
|
|
214
219
|
default: {
|
|
215
|
-
bodyMapper: Mappers.ErrorResponse
|
|
216
|
-
|
|
220
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
221
|
+
headersMapper: Mappers.EventRoutesListNextExceptionHeaders,
|
|
222
|
+
},
|
|
217
223
|
},
|
|
218
224
|
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
219
225
|
headerParameters: [Parameters.accept, Parameters.resultsPerPage],
|
|
220
|
-
serializer
|
|
226
|
+
serializer,
|
|
221
227
|
};
|
|
222
228
|
//# sourceMappingURL=eventRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventRoutes.js","sourceRoot":"","sources":["../../../../src/generated/operations/eventRoutes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AActD,4CAA4C;AAC5C,+CAA+C;AAC/C,MAAM,OAAO,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,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AAC,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;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,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AActD,4CAA4C;AAC5C,+CAA+C;AAC/C,MAAM,OAAO,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,O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AC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,CAAC;IAChD,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,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,260 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
|
+
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
|
+
import * as coreClient from "@azure/core-client";
|
|
11
|
+
import * as Mappers from "../models/mappers.js";
|
|
12
|
+
import * as Parameters from "../models/parameters.js";
|
|
13
|
+
/// <reference lib="esnext.asynciterable" />
|
|
14
|
+
/** Class containing ImportJobs operations. */
|
|
15
|
+
export class ImportJobsImpl {
|
|
16
|
+
/**
|
|
17
|
+
* Initialize a new instance of the class ImportJobs class.
|
|
18
|
+
* @param client Reference to the service client
|
|
19
|
+
*/
|
|
20
|
+
constructor(client) {
|
|
21
|
+
this.client = client;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Retrieves all import jobs.
|
|
25
|
+
* Status codes:
|
|
26
|
+
* * 200 OK
|
|
27
|
+
* @param options The options parameters.
|
|
28
|
+
*/
|
|
29
|
+
list(options) {
|
|
30
|
+
const iter = this.listPagingAll(options);
|
|
31
|
+
return {
|
|
32
|
+
next() {
|
|
33
|
+
return iter.next();
|
|
34
|
+
},
|
|
35
|
+
[Symbol.asyncIterator]() {
|
|
36
|
+
return this;
|
|
37
|
+
},
|
|
38
|
+
byPage: (settings) => {
|
|
39
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
40
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
41
|
+
}
|
|
42
|
+
return this.listPagingPage(options, settings);
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
listPagingPage(options, settings) {
|
|
47
|
+
return __asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
48
|
+
let result;
|
|
49
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
50
|
+
if (!continuationToken) {
|
|
51
|
+
result = yield __await(this._list(options));
|
|
52
|
+
let page = result.value || [];
|
|
53
|
+
continuationToken = result.nextLink;
|
|
54
|
+
setContinuationToken(page, continuationToken);
|
|
55
|
+
yield yield __await(page);
|
|
56
|
+
}
|
|
57
|
+
while (continuationToken) {
|
|
58
|
+
result = yield __await(this._listNext(continuationToken, options));
|
|
59
|
+
continuationToken = result.nextLink;
|
|
60
|
+
let page = result.value || [];
|
|
61
|
+
setContinuationToken(page, continuationToken);
|
|
62
|
+
yield yield __await(page);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
listPagingAll(options) {
|
|
67
|
+
return __asyncGenerator(this, arguments, function* listPagingAll_1() {
|
|
68
|
+
var _a, e_1, _b, _c;
|
|
69
|
+
try {
|
|
70
|
+
for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
71
|
+
_c = _f.value;
|
|
72
|
+
_d = false;
|
|
73
|
+
const page = _c;
|
|
74
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
78
|
+
finally {
|
|
79
|
+
try {
|
|
80
|
+
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
81
|
+
}
|
|
82
|
+
finally { if (e_1) throw e_1.error; }
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Retrieves all import jobs.
|
|
88
|
+
* Status codes:
|
|
89
|
+
* * 200 OK
|
|
90
|
+
* @param options The options parameters.
|
|
91
|
+
*/
|
|
92
|
+
_list(options) {
|
|
93
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Creates an import job.
|
|
97
|
+
* Status codes:
|
|
98
|
+
* * 201 Created
|
|
99
|
+
* * 400 Bad Request
|
|
100
|
+
* * JobLimitReached - The maximum number of import jobs allowed has been reached.
|
|
101
|
+
* * ValidationFailed - The import job request is not valid.
|
|
102
|
+
* @param id The id for the import job. The id is unique within the service and case sensitive.
|
|
103
|
+
* @param importJob The import job being added.
|
|
104
|
+
* @param options The options parameters.
|
|
105
|
+
*/
|
|
106
|
+
add(id, importJob, options) {
|
|
107
|
+
return this.client.sendOperationRequest({ id, importJob, options }, addOperationSpec);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Retrieves an import job.
|
|
111
|
+
* Status codes:
|
|
112
|
+
* * 200 OK
|
|
113
|
+
* * 404 Not Found
|
|
114
|
+
* * ImportJobNotFound - The import job was not found.
|
|
115
|
+
* @param id The id for the import job. The id is unique within the service and case sensitive.
|
|
116
|
+
* @param options The options parameters.
|
|
117
|
+
*/
|
|
118
|
+
getById(id, options) {
|
|
119
|
+
return this.client.sendOperationRequest({ id, options }, getByIdOperationSpec);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Deletes an import job. This is simply used to remove a job id, so it may be reused later. It can not
|
|
123
|
+
* be used to stop entities from being imported.
|
|
124
|
+
* Status codes:
|
|
125
|
+
* * 204 No Content
|
|
126
|
+
* * 400 Bad Request
|
|
127
|
+
* * ValidationFailed - The import job request is not valid.
|
|
128
|
+
* @param id The id for the import job. The id is unique within the service and case sensitive.
|
|
129
|
+
* @param options The options parameters.
|
|
130
|
+
*/
|
|
131
|
+
delete(id, options) {
|
|
132
|
+
return this.client.sendOperationRequest({ id, options }, deleteOperationSpec);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Cancels an import job that is currently running. Service will stop any import operations triggered
|
|
136
|
+
* by the current import job that are in progress, and go to a cancelled state. Please note that this
|
|
137
|
+
* will leave your instance in an unknown state as there won't be any rollback operation.
|
|
138
|
+
* Status codes:
|
|
139
|
+
* * 200 Request Accepted
|
|
140
|
+
* * 400 Bad Request
|
|
141
|
+
* * ValidationFailed - The import job request is not valid.
|
|
142
|
+
* @param id The id for the import job. The id is unique within the service and case sensitive.
|
|
143
|
+
* @param options The options parameters.
|
|
144
|
+
*/
|
|
145
|
+
cancel(id, options) {
|
|
146
|
+
return this.client.sendOperationRequest({ id, options }, cancelOperationSpec);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* ListNext
|
|
150
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
151
|
+
* @param options The options parameters.
|
|
152
|
+
*/
|
|
153
|
+
_listNext(nextLink, options) {
|
|
154
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
// Operation Specifications
|
|
158
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
159
|
+
const listOperationSpec = {
|
|
160
|
+
path: "/jobs/imports",
|
|
161
|
+
httpMethod: "GET",
|
|
162
|
+
responses: {
|
|
163
|
+
200: {
|
|
164
|
+
bodyMapper: Mappers.ImportJobCollection,
|
|
165
|
+
},
|
|
166
|
+
default: {
|
|
167
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
168
|
+
headersMapper: Mappers.ImportJobsListExceptionHeaders,
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
queryParameters: [Parameters.apiVersion],
|
|
172
|
+
urlParameters: [Parameters.$host],
|
|
173
|
+
headerParameters: [Parameters.accept, Parameters.resultsPerPage],
|
|
174
|
+
serializer,
|
|
175
|
+
};
|
|
176
|
+
const addOperationSpec = {
|
|
177
|
+
path: "/jobs/imports/{id}",
|
|
178
|
+
httpMethod: "PUT",
|
|
179
|
+
responses: {
|
|
180
|
+
201: {
|
|
181
|
+
bodyMapper: Mappers.ImportJob,
|
|
182
|
+
},
|
|
183
|
+
default: {
|
|
184
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
185
|
+
headersMapper: Mappers.ImportJobsAddExceptionHeaders,
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
requestBody: Parameters.importJob,
|
|
189
|
+
queryParameters: [Parameters.apiVersion],
|
|
190
|
+
urlParameters: [Parameters.$host, Parameters.id],
|
|
191
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
192
|
+
mediaType: "json",
|
|
193
|
+
serializer,
|
|
194
|
+
};
|
|
195
|
+
const getByIdOperationSpec = {
|
|
196
|
+
path: "/jobs/imports/{id}",
|
|
197
|
+
httpMethod: "GET",
|
|
198
|
+
responses: {
|
|
199
|
+
200: {
|
|
200
|
+
bodyMapper: Mappers.ImportJob,
|
|
201
|
+
},
|
|
202
|
+
default: {
|
|
203
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
204
|
+
headersMapper: Mappers.ImportJobsGetByIdExceptionHeaders,
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
queryParameters: [Parameters.apiVersion],
|
|
208
|
+
urlParameters: [Parameters.$host, Parameters.id],
|
|
209
|
+
headerParameters: [Parameters.accept],
|
|
210
|
+
serializer,
|
|
211
|
+
};
|
|
212
|
+
const deleteOperationSpec = {
|
|
213
|
+
path: "/jobs/imports/{id}",
|
|
214
|
+
httpMethod: "DELETE",
|
|
215
|
+
responses: {
|
|
216
|
+
204: {},
|
|
217
|
+
default: {
|
|
218
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
219
|
+
headersMapper: Mappers.ImportJobsDeleteExceptionHeaders,
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
queryParameters: [Parameters.apiVersion],
|
|
223
|
+
urlParameters: [Parameters.$host, Parameters.id],
|
|
224
|
+
headerParameters: [Parameters.accept],
|
|
225
|
+
serializer,
|
|
226
|
+
};
|
|
227
|
+
const cancelOperationSpec = {
|
|
228
|
+
path: "/jobs/imports/{id}/cancel",
|
|
229
|
+
httpMethod: "POST",
|
|
230
|
+
responses: {
|
|
231
|
+
200: {
|
|
232
|
+
bodyMapper: Mappers.ImportJob,
|
|
233
|
+
},
|
|
234
|
+
default: {
|
|
235
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
236
|
+
headersMapper: Mappers.ImportJobsCancelExceptionHeaders,
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
queryParameters: [Parameters.apiVersion],
|
|
240
|
+
urlParameters: [Parameters.$host, Parameters.id],
|
|
241
|
+
headerParameters: [Parameters.accept],
|
|
242
|
+
serializer,
|
|
243
|
+
};
|
|
244
|
+
const listNextOperationSpec = {
|
|
245
|
+
path: "{nextLink}",
|
|
246
|
+
httpMethod: "GET",
|
|
247
|
+
responses: {
|
|
248
|
+
200: {
|
|
249
|
+
bodyMapper: Mappers.ImportJobCollection,
|
|
250
|
+
},
|
|
251
|
+
default: {
|
|
252
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
253
|
+
headersMapper: Mappers.ImportJobsListNextExceptionHeaders,
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
257
|
+
headerParameters: [Parameters.accept, Parameters.resultsPerPage],
|
|
258
|
+
serializer,
|
|
259
|
+
};
|
|
260
|
+
//# 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,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAiBtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAM,OAAO,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,GA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AC,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,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/operations/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,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\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,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,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\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"]}
|
|
@@ -43,11 +43,12 @@ const queryTwinsOperationSpec = {
|
|
|
43
43
|
responses: {
|
|
44
44
|
200: {
|
|
45
45
|
bodyMapper: Mappers.QueryResult,
|
|
46
|
-
headersMapper: Mappers.QueryQueryTwinsHeaders
|
|
46
|
+
headersMapper: Mappers.QueryQueryTwinsHeaders,
|
|
47
47
|
},
|
|
48
48
|
default: {
|
|
49
|
-
bodyMapper: Mappers.ErrorResponse
|
|
50
|
-
|
|
49
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
50
|
+
headersMapper: Mappers.QueryQueryTwinsExceptionHeaders,
|
|
51
|
+
},
|
|
51
52
|
},
|
|
52
53
|
requestBody: Parameters.querySpecification,
|
|
53
54
|
queryParameters: [Parameters.apiVersion],
|
|
@@ -55,9 +56,9 @@ const queryTwinsOperationSpec = {
|
|
|
55
56
|
headerParameters: [
|
|
56
57
|
Parameters.contentType,
|
|
57
58
|
Parameters.accept,
|
|
58
|
-
Parameters.resultsPerPage
|
|
59
|
+
Parameters.resultsPerPage,
|
|
59
60
|
],
|
|
60
61
|
mediaType: "json",
|
|
61
|
-
serializer
|
|
62
|
+
serializer,
|
|
62
63
|
};
|
|
63
64
|
//# sourceMappingURL=query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/generated/operations/query.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAQtD,yCAAyC;AACzC,MAAM,OAAO,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,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,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"]}
|