@azure/arm-arizeaiobservabilityeval 1.0.0-alpha.20250619.1 → 1.0.0-alpha.20250722.2
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/api/observabilityEvalContext.js +16 -10
- package/dist/browser/api/observabilityEvalContext.js.map +1 -1
- package/dist/browser/api/operations/operations.js +8 -3
- package/dist/browser/api/operations/operations.js.map +1 -1
- package/dist/browser/api/organizations/operations.js +56 -22
- package/dist/browser/api/organizations/operations.js.map +1 -1
- package/dist/browser/classic/operations/index.js +3 -1
- package/dist/browser/classic/operations/index.js.map +1 -1
- package/dist/browser/classic/organizations/index.js +3 -1
- package/dist/browser/classic/organizations/index.js.map +1 -1
- package/dist/browser/observabilityEvalClient.js +12 -3
- package/dist/browser/observabilityEvalClient.js.map +1 -1
- package/dist/browser/restorePollerHelpers.js +11 -13
- package/dist/browser/restorePollerHelpers.js.map +1 -1
- package/dist/browser/static-helpers/pagingHelpers.js +31 -50
- package/dist/browser/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/browser/static-helpers/pollingHelpers.js +14 -11
- package/dist/browser/static-helpers/pollingHelpers.js.map +1 -1
- package/dist/browser/static-helpers/urlTemplate.js +3 -3
- package/dist/browser/static-helpers/urlTemplate.js.map +1 -1
- package/dist/commonjs/api/observabilityEvalContext.js +16 -10
- package/dist/commonjs/api/observabilityEvalContext.js.map +1 -1
- package/dist/commonjs/api/operations/operations.js +8 -3
- package/dist/commonjs/api/operations/operations.js.map +1 -1
- package/dist/commonjs/api/organizations/operations.js +56 -22
- package/dist/commonjs/api/organizations/operations.js.map +1 -1
- package/dist/commonjs/classic/operations/index.js +3 -1
- package/dist/commonjs/classic/operations/index.js.map +1 -1
- package/dist/commonjs/classic/organizations/index.js +3 -1
- package/dist/commonjs/classic/organizations/index.js.map +1 -1
- package/dist/commonjs/observabilityEvalClient.js +12 -3
- package/dist/commonjs/observabilityEvalClient.js.map +1 -1
- package/dist/commonjs/restorePollerHelpers.js +11 -13
- package/dist/commonjs/restorePollerHelpers.js.map +1 -1
- package/dist/commonjs/static-helpers/pagingHelpers.js +31 -50
- package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/commonjs/static-helpers/pollingHelpers.js +14 -11
- package/dist/commonjs/static-helpers/pollingHelpers.js.map +1 -1
- package/dist/commonjs/static-helpers/urlTemplate.js +3 -3
- package/dist/commonjs/static-helpers/urlTemplate.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/api/observabilityEvalContext.js +16 -10
- package/dist/esm/api/observabilityEvalContext.js.map +1 -1
- package/dist/esm/api/operations/operations.js +8 -3
- package/dist/esm/api/operations/operations.js.map +1 -1
- package/dist/esm/api/organizations/operations.js +56 -22
- package/dist/esm/api/organizations/operations.js.map +1 -1
- package/dist/esm/classic/operations/index.js +3 -1
- package/dist/esm/classic/operations/index.js.map +1 -1
- package/dist/esm/classic/organizations/index.js +3 -1
- package/dist/esm/classic/organizations/index.js.map +1 -1
- package/dist/esm/observabilityEvalClient.js +12 -3
- package/dist/esm/observabilityEvalClient.js.map +1 -1
- package/dist/esm/restorePollerHelpers.js +11 -13
- package/dist/esm/restorePollerHelpers.js.map +1 -1
- package/dist/esm/static-helpers/pagingHelpers.js +31 -50
- package/dist/esm/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/esm/static-helpers/pollingHelpers.js +14 -11
- package/dist/esm/static-helpers/pollingHelpers.js.map +1 -1
- package/dist/esm/static-helpers/urlTemplate.js +3 -3
- package/dist/esm/static-helpers/urlTemplate.js.map +1 -1
- package/dist/react-native/api/observabilityEvalContext.js +16 -10
- package/dist/react-native/api/observabilityEvalContext.js.map +1 -1
- package/dist/react-native/api/operations/operations.js +8 -3
- package/dist/react-native/api/operations/operations.js.map +1 -1
- package/dist/react-native/api/organizations/operations.js +56 -22
- package/dist/react-native/api/organizations/operations.js.map +1 -1
- package/dist/react-native/classic/operations/index.js +3 -1
- package/dist/react-native/classic/operations/index.js.map +1 -1
- package/dist/react-native/classic/organizations/index.js +3 -1
- package/dist/react-native/classic/organizations/index.js.map +1 -1
- package/dist/react-native/observabilityEvalClient.js +12 -3
- package/dist/react-native/observabilityEvalClient.js.map +1 -1
- package/dist/react-native/restorePollerHelpers.js +11 -13
- package/dist/react-native/restorePollerHelpers.js.map +1 -1
- package/dist/react-native/static-helpers/pagingHelpers.js +31 -50
- package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/react-native/static-helpers/pollingHelpers.js +14 -11
- package/dist/react-native/static-helpers/pollingHelpers.js.map +1 -1
- package/dist/react-native/static-helpers/urlTemplate.js +3 -3
- package/dist/react-native/static-helpers/urlTemplate.js.map +1 -1
- package/package.json +2 -2
- /package/review/{arm-arizeaiobservabilityeval-api.api.md → arm-arizeaiobservabilityeval-api-node.api.md} +0 -0
- /package/review/{arm-arizeaiobservabilityeval-api-operations.api.md → arm-arizeaiobservabilityeval-api-operations-node.api.md} +0 -0
- /package/review/{arm-arizeaiobservabilityeval-api-organizations.api.md → arm-arizeaiobservabilityeval-api-organizations-node.api.md} +0 -0
- /package/review/{arm-arizeaiobservabilityeval-models.api.md → arm-arizeaiobservabilityeval-models-node.api.md} +0 -0
- /package/review/{arm-arizeaiobservabilityeval.api.md → arm-arizeaiobservabilityeval-node.api.md} +0 -0
|
@@ -28,14 +28,19 @@ const core_client_1 = require("@azure-rest/core-client");
|
|
|
28
28
|
function _listBySubscriptionSend(context, options = {
|
|
29
29
|
requestOptions: {},
|
|
30
30
|
}) {
|
|
31
|
-
var _a, _b;
|
|
32
31
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/providers/ArizeAi.ObservabilityEval/organizations{?api%2Dversion}", {
|
|
33
32
|
subscriptionId: context.subscriptionId,
|
|
34
33
|
"api%2Dversion": context.apiVersion,
|
|
35
34
|
}, {
|
|
36
|
-
allowReserved:
|
|
35
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
36
|
+
});
|
|
37
|
+
return context.path(path).get({
|
|
38
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
39
|
+
headers: {
|
|
40
|
+
accept: "application/json",
|
|
41
|
+
...options.requestOptions?.headers,
|
|
42
|
+
},
|
|
37
43
|
});
|
|
38
|
-
return context.path(path).get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
|
|
39
44
|
}
|
|
40
45
|
async function _listBySubscriptionDeserialize(result) {
|
|
41
46
|
const expectedStatuses = ["200"];
|
|
@@ -55,15 +60,20 @@ function listBySubscription(context, options = {
|
|
|
55
60
|
function _listByResourceGroupSend(context, resourceGroupName, options = {
|
|
56
61
|
requestOptions: {},
|
|
57
62
|
}) {
|
|
58
|
-
var _a, _b;
|
|
59
63
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations{?api%2Dversion}", {
|
|
60
64
|
subscriptionId: context.subscriptionId,
|
|
61
65
|
resourceGroupName: resourceGroupName,
|
|
62
66
|
"api%2Dversion": context.apiVersion,
|
|
63
67
|
}, {
|
|
64
|
-
allowReserved:
|
|
68
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
69
|
+
});
|
|
70
|
+
return context.path(path).get({
|
|
71
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
72
|
+
headers: {
|
|
73
|
+
accept: "application/json",
|
|
74
|
+
...options.requestOptions?.headers,
|
|
75
|
+
},
|
|
65
76
|
});
|
|
66
|
-
return context.path(path).get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
|
|
67
77
|
}
|
|
68
78
|
async function _listByResourceGroupDeserialize(result) {
|
|
69
79
|
const expectedStatuses = ["200"];
|
|
@@ -81,16 +91,21 @@ function listByResourceGroup(context, resourceGroupName, options = {
|
|
|
81
91
|
return (0, pagingHelpers_js_1.buildPagedAsyncIterator)(context, () => _listByResourceGroupSend(context, resourceGroupName, options), _listByResourceGroupDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink" });
|
|
82
92
|
}
|
|
83
93
|
function _$deleteSend(context, resourceGroupName, organizationname, options = { requestOptions: {} }) {
|
|
84
|
-
var _a, _b;
|
|
85
94
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}", {
|
|
86
95
|
subscriptionId: context.subscriptionId,
|
|
87
96
|
resourceGroupName: resourceGroupName,
|
|
88
97
|
organizationname: organizationname,
|
|
89
98
|
"api%2Dversion": context.apiVersion,
|
|
90
99
|
}, {
|
|
91
|
-
allowReserved:
|
|
100
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
101
|
+
});
|
|
102
|
+
return context.path(path).delete({
|
|
103
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
104
|
+
headers: {
|
|
105
|
+
accept: "application/json",
|
|
106
|
+
...options.requestOptions?.headers,
|
|
107
|
+
},
|
|
92
108
|
});
|
|
93
|
-
return context.path(path).delete(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
|
|
94
109
|
}
|
|
95
110
|
async function _$deleteDeserialize(result) {
|
|
96
111
|
const expectedStatuses = ["202", "204", "200"];
|
|
@@ -109,23 +124,30 @@ async function _$deleteDeserialize(result) {
|
|
|
109
124
|
*/
|
|
110
125
|
function $delete(context, resourceGroupName, organizationname, options = { requestOptions: {} }) {
|
|
111
126
|
return (0, pollingHelpers_js_1.getLongRunningPoller)(context, _$deleteDeserialize, ["202", "204", "200"], {
|
|
112
|
-
updateIntervalInMs: options
|
|
113
|
-
abortSignal: options
|
|
127
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
128
|
+
abortSignal: options?.abortSignal,
|
|
114
129
|
getInitialResponse: () => _$deleteSend(context, resourceGroupName, organizationname, options),
|
|
115
130
|
resourceLocationConfig: "location",
|
|
116
131
|
});
|
|
117
132
|
}
|
|
118
133
|
function _updateSend(context, resourceGroupName, organizationname, properties, options = { requestOptions: {} }) {
|
|
119
|
-
var _a, _b;
|
|
120
134
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}", {
|
|
121
135
|
subscriptionId: context.subscriptionId,
|
|
122
136
|
resourceGroupName: resourceGroupName,
|
|
123
137
|
organizationname: organizationname,
|
|
124
138
|
"api%2Dversion": context.apiVersion,
|
|
125
139
|
}, {
|
|
126
|
-
allowReserved:
|
|
140
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
141
|
+
});
|
|
142
|
+
return context.path(path).patch({
|
|
143
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
144
|
+
contentType: "application/json",
|
|
145
|
+
headers: {
|
|
146
|
+
accept: "application/json",
|
|
147
|
+
...options.requestOptions?.headers,
|
|
148
|
+
},
|
|
149
|
+
body: (0, models_js_1.organizationResourceUpdateSerializer)(properties),
|
|
127
150
|
});
|
|
128
|
-
return context.path(path).patch(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers), body: (0, models_js_1.organizationResourceUpdateSerializer)(properties) }));
|
|
129
151
|
}
|
|
130
152
|
async function _updateDeserialize(result) {
|
|
131
153
|
const expectedStatuses = ["200"];
|
|
@@ -142,16 +164,23 @@ async function update(context, resourceGroupName, organizationname, properties,
|
|
|
142
164
|
return _updateDeserialize(result);
|
|
143
165
|
}
|
|
144
166
|
function _createOrUpdateSend(context, resourceGroupName, organizationname, resource, options = { requestOptions: {} }) {
|
|
145
|
-
var _a, _b;
|
|
146
167
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}", {
|
|
147
168
|
subscriptionId: context.subscriptionId,
|
|
148
169
|
resourceGroupName: resourceGroupName,
|
|
149
170
|
organizationname: organizationname,
|
|
150
171
|
"api%2Dversion": context.apiVersion,
|
|
151
172
|
}, {
|
|
152
|
-
allowReserved:
|
|
173
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
174
|
+
});
|
|
175
|
+
return context.path(path).put({
|
|
176
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
177
|
+
contentType: "application/json",
|
|
178
|
+
headers: {
|
|
179
|
+
accept: "application/json",
|
|
180
|
+
...options.requestOptions?.headers,
|
|
181
|
+
},
|
|
182
|
+
body: (0, models_js_1.organizationResourceSerializer)(resource),
|
|
153
183
|
});
|
|
154
|
-
return context.path(path).put(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers), body: (0, models_js_1.organizationResourceSerializer)(resource) }));
|
|
155
184
|
}
|
|
156
185
|
async function _createOrUpdateDeserialize(result) {
|
|
157
186
|
const expectedStatuses = ["200", "201"];
|
|
@@ -165,23 +194,28 @@ async function _createOrUpdateDeserialize(result) {
|
|
|
165
194
|
/** Create a OrganizationResource */
|
|
166
195
|
function createOrUpdate(context, resourceGroupName, organizationname, resource, options = { requestOptions: {} }) {
|
|
167
196
|
return (0, pollingHelpers_js_1.getLongRunningPoller)(context, _createOrUpdateDeserialize, ["200", "201"], {
|
|
168
|
-
updateIntervalInMs: options
|
|
169
|
-
abortSignal: options
|
|
197
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
198
|
+
abortSignal: options?.abortSignal,
|
|
170
199
|
getInitialResponse: () => _createOrUpdateSend(context, resourceGroupName, organizationname, resource, options),
|
|
171
200
|
resourceLocationConfig: "azure-async-operation",
|
|
172
201
|
});
|
|
173
202
|
}
|
|
174
203
|
function _getSend(context, resourceGroupName, organizationname, options = { requestOptions: {} }) {
|
|
175
|
-
var _a, _b;
|
|
176
204
|
const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}", {
|
|
177
205
|
subscriptionId: context.subscriptionId,
|
|
178
206
|
resourceGroupName: resourceGroupName,
|
|
179
207
|
organizationname: organizationname,
|
|
180
208
|
"api%2Dversion": context.apiVersion,
|
|
181
209
|
}, {
|
|
182
|
-
allowReserved:
|
|
210
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
211
|
+
});
|
|
212
|
+
return context.path(path).get({
|
|
213
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
214
|
+
headers: {
|
|
215
|
+
accept: "application/json",
|
|
216
|
+
...options.requestOptions?.headers,
|
|
217
|
+
},
|
|
183
218
|
});
|
|
184
|
-
return context.path(path).get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
|
|
185
219
|
}
|
|
186
220
|
async function _getDeserialize(result) {
|
|
187
221
|
const expectedStatuses = ["200"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/organizations/operations.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAmCl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f,iBAAyB,EACzB,gBAAwB,EACxB,UAA0C,EAAE,cAAc,EAAE,EAAE,EAAE;IAEhE,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACrF,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ObservabilityEvalContext as Client } from \"../index.js\";\nimport {\n errorResponseDeserializer,\n OrganizationResource,\n organizationResourceSerializer,\n organizationResourceDeserializer,\n OrganizationResourceUpdate,\n organizationResourceUpdateSerializer,\n _OrganizationResourceListResult,\n _organizationResourceListResultDeserializer,\n} from \"../../models/models.js\";\nimport {\n OrganizationsListBySubscriptionOptionalParams,\n OrganizationsListByResourceGroupOptionalParams,\n OrganizationsDeleteOptionalParams,\n OrganizationsUpdateOptionalParams,\n OrganizationsCreateOrUpdateOptionalParams,\n OrganizationsGetOptionalParams,\n} from \"./options.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { getLongRunningPoller } from \"../../static-helpers/pollingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\n\nexport function _listBySubscriptionSend(\n context: Client,\n options: OrganizationsListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/ArizeAi.ObservabilityEval/organizations{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listBySubscriptionDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OrganizationResourceListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _organizationResourceListResultDeserializer(result.body);\n}\n\n/** List OrganizationResource resources by subscription ID */\nexport function listBySubscription(\n context: Client,\n options: OrganizationsListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<OrganizationResource> {\n return buildPagedAsyncIterator(\n context,\n () => _listBySubscriptionSend(context, options),\n _listBySubscriptionDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _listByResourceGroupSend(\n context: Client,\n resourceGroupName: string,\n options: OrganizationsListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listByResourceGroupDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OrganizationResourceListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _organizationResourceListResultDeserializer(result.body);\n}\n\n/** List OrganizationResource resources by resource group */\nexport function listByResourceGroup(\n context: Client,\n resourceGroupName: string,\n options: OrganizationsListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<OrganizationResource> {\n return buildPagedAsyncIterator(\n context,\n () => _listByResourceGroupSend(context, resourceGroupName, options),\n _listByResourceGroupDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _$deleteSend(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n options: OrganizationsDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n organizationname: organizationname,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"202\", \"204\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return;\n}\n\n/** Delete a OrganizationResource */\n/**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\nexport function $delete(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n options: OrganizationsDeleteOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<void>, void> {\n return getLongRunningPoller(context, _$deleteDeserialize, [\"202\", \"204\", \"200\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () => _$deleteSend(context, resourceGroupName, organizationname, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<void>, void>;\n}\n\nexport function _updateSend(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n properties: OrganizationResourceUpdate,\n options: OrganizationsUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n organizationname: organizationname,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).patch({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: organizationResourceUpdateSerializer(properties),\n });\n}\n\nexport async function _updateDeserialize(\n result: PathUncheckedResponse,\n): Promise<OrganizationResource> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return organizationResourceDeserializer(result.body);\n}\n\n/** Update a OrganizationResource */\nexport async function update(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n properties: OrganizationResourceUpdate,\n options: OrganizationsUpdateOptionalParams = { requestOptions: {} },\n): Promise<OrganizationResource> {\n const result = await _updateSend(\n context,\n resourceGroupName,\n organizationname,\n properties,\n options,\n );\n return _updateDeserialize(result);\n}\n\nexport function _createOrUpdateSend(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n resource: OrganizationResource,\n options: OrganizationsCreateOrUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n organizationname: organizationname,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: organizationResourceSerializer(resource),\n });\n}\n\nexport async function _createOrUpdateDeserialize(\n result: PathUncheckedResponse,\n): Promise<OrganizationResource> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return organizationResourceDeserializer(result.body);\n}\n\n/** Create a OrganizationResource */\nexport function createOrUpdate(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n resource: OrganizationResource,\n options: OrganizationsCreateOrUpdateOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<OrganizationResource>, OrganizationResource> {\n return getLongRunningPoller(context, _createOrUpdateDeserialize, [\"200\", \"201\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _createOrUpdateSend(context, resourceGroupName, organizationname, resource, options),\n resourceLocationConfig: \"azure-async-operation\",\n }) as PollerLike<OperationState<OrganizationResource>, OrganizationResource>;\n}\n\nexport function _getSend(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n options: OrganizationsGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n organizationname: organizationname,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeserialize(\n result: PathUncheckedResponse,\n): Promise<OrganizationResource> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return organizationResourceDeserializer(result.body);\n}\n\n/** Get a OrganizationResource */\nexport async function get(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n options: OrganizationsGetOptionalParams = { requestOptions: {} },\n): Promise<OrganizationResource> {\n const result = await _getSend(context, resourceGroupName, organizationname, options);\n return _getDeserialize(result);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/organizations/operations.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAmClC,0DAuBC;AAED,wEAWC;AAGD,gDAaC;AAED,4DAyBC;AAED,0EAWC;AAGD,kDAcC;AAED,oCAyBC;AAED,kDASC;AAQD,0BAYC;AAED,kCA4BC;AAED,gDAWC;AAGD,wBAeC;AAED,kDA4BC;AAED,gEAWC;AAGD,wCAcC;AAED,4BAyBC;AAED,0CAWC;AAGD,kBAQC;AAnXD,sDASgC;AAShC,4EAG+C;AAC/C,8EAA8E;AAC9E,wEAAwE;AACxE,yDAKiC;AAGjC,SAAgB,uBAAuB,CACrC,OAAe,EACf,UAAyD;IACvD,cAAc,EAAE,EAAE;CACnB;IAED,MAAM,IAAI,GAAG,IAAA,kCAAiB,EAC5B,mGAAmG,EACnG;QACE,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,eAAe,EAAE,OAAO,CAAC,UAAU;KACpC,EACD;QACE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe;KACxD,CACF,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;QAC5B,GAAG,IAAA,iDAAmC,EAAC,OAAO,CAAC;QAC/C,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;YAC1B,GAAG,OAAO,CAAC,cAAc,EAAE,OAAO;SACnC;KACF,CAAC,CAAC;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,IAAA,6BAAe,EAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,IAAA,qCAAyB,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,IAAA,4CAAgC,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACvD,CAAC;AAED,iCAAiC;AAC1B,KAAK,UAAU,GAAG,CACvB,OAAe,EACf,iBAAyB,EACzB,gBAAwB,EACxB,UAA0C,EAAE,cAAc,EAAE,EAAE,EAAE;IAEhE,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACrF,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ObservabilityEvalContext as Client } from \"../index.js\";\nimport {\n errorResponseDeserializer,\n OrganizationResource,\n organizationResourceSerializer,\n organizationResourceDeserializer,\n OrganizationResourceUpdate,\n organizationResourceUpdateSerializer,\n _OrganizationResourceListResult,\n _organizationResourceListResultDeserializer,\n} from \"../../models/models.js\";\nimport {\n OrganizationsListBySubscriptionOptionalParams,\n OrganizationsListByResourceGroupOptionalParams,\n OrganizationsDeleteOptionalParams,\n OrganizationsUpdateOptionalParams,\n OrganizationsCreateOrUpdateOptionalParams,\n OrganizationsGetOptionalParams,\n} from \"./options.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { getLongRunningPoller } from \"../../static-helpers/pollingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\n\nexport function _listBySubscriptionSend(\n context: Client,\n options: OrganizationsListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/ArizeAi.ObservabilityEval/organizations{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listBySubscriptionDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OrganizationResourceListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _organizationResourceListResultDeserializer(result.body);\n}\n\n/** List OrganizationResource resources by subscription ID */\nexport function listBySubscription(\n context: Client,\n options: OrganizationsListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<OrganizationResource> {\n return buildPagedAsyncIterator(\n context,\n () => _listBySubscriptionSend(context, options),\n _listBySubscriptionDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _listByResourceGroupSend(\n context: Client,\n resourceGroupName: string,\n options: OrganizationsListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listByResourceGroupDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OrganizationResourceListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _organizationResourceListResultDeserializer(result.body);\n}\n\n/** List OrganizationResource resources by resource group */\nexport function listByResourceGroup(\n context: Client,\n resourceGroupName: string,\n options: OrganizationsListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<OrganizationResource> {\n return buildPagedAsyncIterator(\n context,\n () => _listByResourceGroupSend(context, resourceGroupName, options),\n _listByResourceGroupDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _$deleteSend(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n options: OrganizationsDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n organizationname: organizationname,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"202\", \"204\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return;\n}\n\n/** Delete a OrganizationResource */\n/**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\nexport function $delete(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n options: OrganizationsDeleteOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<void>, void> {\n return getLongRunningPoller(context, _$deleteDeserialize, [\"202\", \"204\", \"200\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () => _$deleteSend(context, resourceGroupName, organizationname, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<void>, void>;\n}\n\nexport function _updateSend(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n properties: OrganizationResourceUpdate,\n options: OrganizationsUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n organizationname: organizationname,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).patch({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: organizationResourceUpdateSerializer(properties),\n });\n}\n\nexport async function _updateDeserialize(\n result: PathUncheckedResponse,\n): Promise<OrganizationResource> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return organizationResourceDeserializer(result.body);\n}\n\n/** Update a OrganizationResource */\nexport async function update(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n properties: OrganizationResourceUpdate,\n options: OrganizationsUpdateOptionalParams = { requestOptions: {} },\n): Promise<OrganizationResource> {\n const result = await _updateSend(\n context,\n resourceGroupName,\n organizationname,\n properties,\n options,\n );\n return _updateDeserialize(result);\n}\n\nexport function _createOrUpdateSend(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n resource: OrganizationResource,\n options: OrganizationsCreateOrUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n organizationname: organizationname,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: organizationResourceSerializer(resource),\n });\n}\n\nexport async function _createOrUpdateDeserialize(\n result: PathUncheckedResponse,\n): Promise<OrganizationResource> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return organizationResourceDeserializer(result.body);\n}\n\n/** Create a OrganizationResource */\nexport function createOrUpdate(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n resource: OrganizationResource,\n options: OrganizationsCreateOrUpdateOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<OrganizationResource>, OrganizationResource> {\n return getLongRunningPoller(context, _createOrUpdateDeserialize, [\"200\", \"201\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _createOrUpdateSend(context, resourceGroupName, organizationname, resource, options),\n resourceLocationConfig: \"azure-async-operation\",\n }) as PollerLike<OperationState<OrganizationResource>, OrganizationResource>;\n}\n\nexport function _getSend(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n options: OrganizationsGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n organizationname: organizationname,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeserialize(\n result: PathUncheckedResponse,\n): Promise<OrganizationResource> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return organizationResourceDeserializer(result.body);\n}\n\n/** Get a OrganizationResource */\nexport async function get(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n options: OrganizationsGetOptionalParams = { requestOptions: {} },\n): Promise<OrganizationResource> {\n const result = await _getSend(context, resourceGroupName, organizationname, options);\n return _getDeserialize(result);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/operations/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAoBlC,4DAIC;AAnBD,sEAA0D;AAS1D,SAAS,cAAc,CAAC,OAAiC;IACvD,OAAO;QACL,IAAI,EAAE,CAAC,OAAsC,EAAE,EAAE,CAAC,IAAA,oBAAI,EAAC,OAAO,EAAE,OAAO,CAAC;KACzE,CAAC;AACJ,CAAC;AAED,SAAgB,wBAAwB,CAAC,OAAiC;IACxE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/operations/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAoBlC,4DAIC;AAnBD,sEAA0D;AAS1D,SAAS,cAAc,CAAC,OAAiC;IACvD,OAAO;QACL,IAAI,EAAE,CAAC,OAAsC,EAAE,EAAE,CAAC,IAAA,oBAAI,EAAC,OAAO,EAAE,OAAO,CAAC;KACzE,CAAC;AACJ,CAAC;AAED,SAAgB,wBAAwB,CAAC,OAAiC;IACxE,OAAO;QACL,GAAG,cAAc,CAAC,OAAO,CAAC;KAC3B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ObservabilityEvalContext } from \"../../api/observabilityEvalContext.js\";\nimport { Operation } from \"../../models/models.js\";\nimport { OperationsListOptionalParams } from \"../../api/operations/options.js\";\nimport { list } from \"../../api/operations/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a Operations operations. */\nexport interface OperationsOperations {\n /** List the operations for the provider */\n list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator<Operation>;\n}\n\nfunction _getOperations(context: ObservabilityEvalContext) {\n return {\n list: (options?: OperationsListOptionalParams) => list(context, options),\n };\n}\n\nexport function _getOperationsOperations(context: ObservabilityEvalContext): OperationsOperations {\n return {\n ..._getOperations(context),\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/organizations/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAoGlC,kEAMC;AA9FD,yEAO+C;AAgD/C,SAAS,iBAAiB,CAAC,OAAiC;IAC1D,OAAO;QACL,kBAAkB,EAAE,CAAC,OAAuD,EAAE,EAAE,CAC9E,IAAA,kCAAkB,EAAC,OAAO,EAAE,OAAO,CAAC;QACtC,mBAAmB,EAAE,CACnB,iBAAyB,EACzB,OAAwD,EACxD,EAAE,CAAC,IAAA,mCAAmB,EAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,CAAC;QAC7D,MAAM,EAAE,CACN,iBAAyB,EACzB,gBAAwB,EACxB,OAA2C,EAC3C,EAAE,CAAC,IAAA,uBAAO,EAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,OAAO,CAAC;QACnE,MAAM,EAAE,CACN,iBAAyB,EACzB,gBAAwB,EACxB,UAAsC,EACtC,OAA2C,EAC3C,EAAE,CAAC,IAAA,sBAAM,EAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,UAAU,EAAE,OAAO,CAAC;QAC9E,cAAc,EAAE,CACd,iBAAyB,EACzB,gBAAwB,EACxB,QAA8B,EAC9B,OAAmD,EACnD,EAAE,CAAC,IAAA,8BAAc,EAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,CAAC;QACpF,GAAG,EAAE,CACH,iBAAyB,EACzB,gBAAwB,EACxB,OAAwC,EACxC,EAAE,CAAC,IAAA,mBAAG,EAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,OAAO,CAAC;KAChE,CAAC;AACJ,CAAC;AAED,SAAgB,2BAA2B,CACzC,OAAiC;IAEjC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/organizations/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAoGlC,kEAMC;AA9FD,yEAO+C;AAgD/C,SAAS,iBAAiB,CAAC,OAAiC;IAC1D,OAAO;QACL,kBAAkB,EAAE,CAAC,OAAuD,EAAE,EAAE,CAC9E,IAAA,kCAAkB,EAAC,OAAO,EAAE,OAAO,CAAC;QACtC,mBAAmB,EAAE,CACnB,iBAAyB,EACzB,OAAwD,EACxD,EAAE,CAAC,IAAA,mCAAmB,EAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,CAAC;QAC7D,MAAM,EAAE,CACN,iBAAyB,EACzB,gBAAwB,EACxB,OAA2C,EAC3C,EAAE,CAAC,IAAA,uBAAO,EAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,OAAO,CAAC;QACnE,MAAM,EAAE,CACN,iBAAyB,EACzB,gBAAwB,EACxB,UAAsC,EACtC,OAA2C,EAC3C,EAAE,CAAC,IAAA,sBAAM,EAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,UAAU,EAAE,OAAO,CAAC;QAC9E,cAAc,EAAE,CACd,iBAAyB,EACzB,gBAAwB,EACxB,QAA8B,EAC9B,OAAmD,EACnD,EAAE,CAAC,IAAA,8BAAc,EAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,CAAC;QACpF,GAAG,EAAE,CACH,iBAAyB,EACzB,gBAAwB,EACxB,OAAwC,EACxC,EAAE,CAAC,IAAA,mBAAG,EAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,OAAO,CAAC;KAChE,CAAC;AACJ,CAAC;AAED,SAAgB,2BAA2B,CACzC,OAAiC;IAEjC,OAAO;QACL,GAAG,iBAAiB,CAAC,OAAO,CAAC;KAC9B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ObservabilityEvalContext } from \"../../api/observabilityEvalContext.js\";\nimport { OrganizationResource, OrganizationResourceUpdate } from \"../../models/models.js\";\nimport {\n OrganizationsListBySubscriptionOptionalParams,\n OrganizationsListByResourceGroupOptionalParams,\n OrganizationsDeleteOptionalParams,\n OrganizationsUpdateOptionalParams,\n OrganizationsCreateOrUpdateOptionalParams,\n OrganizationsGetOptionalParams,\n} from \"../../api/organizations/options.js\";\nimport {\n listBySubscription,\n listByResourceGroup,\n $delete,\n update,\n createOrUpdate,\n get,\n} from \"../../api/organizations/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\n\n/** Interface representing a Organizations operations. */\nexport interface OrganizationsOperations {\n /** List OrganizationResource resources by subscription ID */\n listBySubscription: (\n options?: OrganizationsListBySubscriptionOptionalParams,\n ) => PagedAsyncIterableIterator<OrganizationResource>;\n /** List OrganizationResource resources by resource group */\n listByResourceGroup: (\n resourceGroupName: string,\n options?: OrganizationsListByResourceGroupOptionalParams,\n ) => PagedAsyncIterableIterator<OrganizationResource>;\n /** Delete a OrganizationResource */\n /**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\n delete: (\n resourceGroupName: string,\n organizationname: string,\n options?: OrganizationsDeleteOptionalParams,\n ) => PollerLike<OperationState<void>, void>;\n /** Update a OrganizationResource */\n update: (\n resourceGroupName: string,\n organizationname: string,\n properties: OrganizationResourceUpdate,\n options?: OrganizationsUpdateOptionalParams,\n ) => Promise<OrganizationResource>;\n /** Create a OrganizationResource */\n createOrUpdate: (\n resourceGroupName: string,\n organizationname: string,\n resource: OrganizationResource,\n options?: OrganizationsCreateOrUpdateOptionalParams,\n ) => PollerLike<OperationState<OrganizationResource>, OrganizationResource>;\n /** Get a OrganizationResource */\n get: (\n resourceGroupName: string,\n organizationname: string,\n options?: OrganizationsGetOptionalParams,\n ) => Promise<OrganizationResource>;\n}\n\nfunction _getOrganizations(context: ObservabilityEvalContext) {\n return {\n listBySubscription: (options?: OrganizationsListBySubscriptionOptionalParams) =>\n listBySubscription(context, options),\n listByResourceGroup: (\n resourceGroupName: string,\n options?: OrganizationsListByResourceGroupOptionalParams,\n ) => listByResourceGroup(context, resourceGroupName, options),\n delete: (\n resourceGroupName: string,\n organizationname: string,\n options?: OrganizationsDeleteOptionalParams,\n ) => $delete(context, resourceGroupName, organizationname, options),\n update: (\n resourceGroupName: string,\n organizationname: string,\n properties: OrganizationResourceUpdate,\n options?: OrganizationsUpdateOptionalParams,\n ) => update(context, resourceGroupName, organizationname, properties, options),\n createOrUpdate: (\n resourceGroupName: string,\n organizationname: string,\n resource: OrganizationResource,\n options?: OrganizationsCreateOrUpdateOptionalParams,\n ) => createOrUpdate(context, resourceGroupName, organizationname, resource, options),\n get: (\n resourceGroupName: string,\n organizationname: string,\n options?: OrganizationsGetOptionalParams,\n ) => get(context, resourceGroupName, organizationname, options),\n };\n}\n\nexport function _getOrganizationsOperations(\n context: ObservabilityEvalContext,\n): OrganizationsOperations {\n return {\n ..._getOrganizations(context),\n };\n}\n"]}
|
|
@@ -7,17 +7,26 @@ const index_js_1 = require("./api/index.js");
|
|
|
7
7
|
const index_js_2 = require("./classic/organizations/index.js");
|
|
8
8
|
const index_js_3 = require("./classic/operations/index.js");
|
|
9
9
|
class ObservabilityEvalClient {
|
|
10
|
+
_client;
|
|
11
|
+
/** The pipeline used by this client to make requests */
|
|
12
|
+
pipeline;
|
|
10
13
|
constructor(credential, subscriptionId, options = {}) {
|
|
11
|
-
|
|
12
|
-
const prefixFromOptions = (_a = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _a === void 0 ? void 0 : _a.userAgentPrefix;
|
|
14
|
+
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
|
|
13
15
|
const userAgentPrefix = prefixFromOptions
|
|
14
16
|
? `${prefixFromOptions} azsdk-js-client`
|
|
15
17
|
: `azsdk-js-client`;
|
|
16
|
-
this._client = (0, index_js_1.createObservabilityEval)(credential, subscriptionId,
|
|
18
|
+
this._client = (0, index_js_1.createObservabilityEval)(credential, subscriptionId, {
|
|
19
|
+
...options,
|
|
20
|
+
userAgentOptions: { userAgentPrefix },
|
|
21
|
+
});
|
|
17
22
|
this.pipeline = this._client.pipeline;
|
|
18
23
|
this.organizations = (0, index_js_2._getOrganizationsOperations)(this._client);
|
|
19
24
|
this.operations = (0, index_js_3._getOperationsOperations)(this._client);
|
|
20
25
|
}
|
|
26
|
+
/** The operation groups for organizations */
|
|
27
|
+
organizations;
|
|
28
|
+
/** The operation groups for operations */
|
|
29
|
+
operations;
|
|
21
30
|
}
|
|
22
31
|
exports.ObservabilityEvalClient = ObservabilityEvalClient;
|
|
23
32
|
//# sourceMappingURL=observabilityEvalClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observabilityEvalClient.js","sourceRoot":"","sources":["../../src/observabilityEvalClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,6CAIwB;AACxB,+DAG0C;AAC1C,4DAA+F;AAM/F,MAAa,uBAAuB;
|
|
1
|
+
{"version":3,"file":"observabilityEvalClient.js","sourceRoot":"","sources":["../../src/observabilityEvalClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,6CAIwB;AACxB,+DAG0C;AAC1C,4DAA+F;AAM/F,MAAa,uBAAuB;IAC1B,OAAO,CAA2B;IAC1C,wDAAwD;IACxC,QAAQ,CAAW;IAEnC,YACE,UAA2B,EAC3B,cAAsB,EACtB,UAAiD,EAAE;QAEnD,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;QACrE,MAAM,eAAe,GAAG,iBAAiB;YACvC,CAAC,CAAC,GAAG,iBAAiB,kBAAkB;YACxC,CAAC,CAAC,iBAAiB,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAA,kCAAuB,EAAC,UAAU,EAAE,cAAc,EAAE;YACjE,GAAG,OAAO;YACV,gBAAgB,EAAE,EAAE,eAAe,EAAE;SACtC,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;QACtC,IAAI,CAAC,aAAa,GAAG,IAAA,sCAA2B,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/D,IAAI,CAAC,UAAU,GAAG,IAAA,mCAAwB,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,6CAA6C;IAC7B,aAAa,CAA0B;IACvD,0CAA0C;IAC1B,UAAU,CAAuB;CAClD;AA3BD,0DA2BC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n createObservabilityEval,\n ObservabilityEvalContext,\n ObservabilityEvalClientOptionalParams,\n} from \"./api/index.js\";\nimport {\n OrganizationsOperations,\n _getOrganizationsOperations,\n} from \"./classic/organizations/index.js\";\nimport { OperationsOperations, _getOperationsOperations } from \"./classic/operations/index.js\";\nimport { Pipeline } from \"@azure/core-rest-pipeline\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport { ObservabilityEvalClientOptionalParams } from \"./api/observabilityEvalContext.js\";\n\nexport class ObservabilityEvalClient {\n private _client: ObservabilityEvalContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options: ObservabilityEvalClientOptionalParams = {},\n ) {\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createObservabilityEval(credential, subscriptionId, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.organizations = _getOrganizationsOperations(this._client);\n this.operations = _getOperationsOperations(this._client);\n }\n\n /** The operation groups for organizations */\n public readonly organizations: OrganizationsOperations;\n /** The operation groups for operations */\n public readonly operations: OperationsOperations;\n}\n"]}
|
|
@@ -12,21 +12,20 @@ const core_lro_1 = require("@azure/core-lro");
|
|
|
12
12
|
* needs to be constructed after the original one is not in scope.
|
|
13
13
|
*/
|
|
14
14
|
function restorePoller(client, serializedState, sourceOperation, options) {
|
|
15
|
-
var _a, _b, _c;
|
|
16
15
|
const pollerConfig = (0, core_lro_1.deserializeState)(serializedState).config;
|
|
17
16
|
const { initialRequestUrl, requestMethod, metadata } = pollerConfig;
|
|
18
17
|
if (!initialRequestUrl || !requestMethod) {
|
|
19
|
-
throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation
|
|
18
|
+
throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`);
|
|
20
19
|
}
|
|
21
|
-
const resourceLocationConfig = metadata
|
|
22
|
-
const { deserializer, expectedStatuses = [] } =
|
|
23
|
-
const deserializeHelper =
|
|
20
|
+
const resourceLocationConfig = metadata?.["resourceLocationConfig"];
|
|
21
|
+
const { deserializer, expectedStatuses = [] } = getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};
|
|
22
|
+
const deserializeHelper = options?.processResponseBody ?? deserializer;
|
|
24
23
|
if (!deserializeHelper) {
|
|
25
|
-
throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation
|
|
24
|
+
throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`);
|
|
26
25
|
}
|
|
27
|
-
return (0, pollingHelpers_js_1.getLongRunningPoller)(
|
|
28
|
-
updateIntervalInMs: options
|
|
29
|
-
abortSignal: options
|
|
26
|
+
return (0, pollingHelpers_js_1.getLongRunningPoller)(client["_client"] ?? client, deserializeHelper, expectedStatuses, {
|
|
27
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
28
|
+
abortSignal: options?.abortSignal,
|
|
30
29
|
resourceLocationConfig,
|
|
31
30
|
restoreFrom: serializedState,
|
|
32
31
|
initialRequestUrl,
|
|
@@ -43,7 +42,6 @@ const deserializeMap = {
|
|
|
43
42
|
},
|
|
44
43
|
};
|
|
45
44
|
function getDeserializationHelper(urlStr, method) {
|
|
46
|
-
var _a, _b, _c, _d;
|
|
47
45
|
const path = new URL(urlStr).pathname;
|
|
48
46
|
const pathParts = path.split("/");
|
|
49
47
|
// Traverse list to match the longest candidate
|
|
@@ -63,13 +61,13 @@ function getDeserializationHelper(urlStr, method) {
|
|
|
63
61
|
// track if we have found a match to return the values found.
|
|
64
62
|
let found = true;
|
|
65
63
|
for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
|
|
66
|
-
if (
|
|
67
|
-
const start = candidateParts[i].indexOf("}") + 1, end =
|
|
64
|
+
if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) {
|
|
65
|
+
const start = candidateParts[i].indexOf("}") + 1, end = candidateParts[i]?.length;
|
|
68
66
|
// If the current part of the candidate is a "template" part
|
|
69
67
|
// Try to use the suffix of pattern to match the path
|
|
70
68
|
// {guid} ==> $
|
|
71
69
|
// {guid}:export ==> :export$
|
|
72
|
-
const isMatched = new RegExp(`${
|
|
70
|
+
const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(pathParts[j] || "");
|
|
73
71
|
if (!isMatched) {
|
|
74
72
|
found = false;
|
|
75
73
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAiClC,sCAoCC;AAlED,qEAAoG;AACpG,0EAA0E;AAG1E,8CAKyB;AAgBzB;;;;GAIG;AACH,SAAgB,aAAa,CAC3B,MAA+B,EAC/B,eAAuB,EACvB,eAAiF,EACjF,OAAuC
|
|
1
|
+
{"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAiClC,sCAoCC;AAlED,qEAAoG;AACpG,0EAA0E;AAG1E,8CAKyB;AAgBzB;;;;GAIG;AACH,SAAgB,aAAa,CAC3B,MAA+B,EAC/B,eAAuB,EACvB,eAAiF,EACjF,OAAuC;IAEvC,MAAM,YAAY,GAAG,IAAA,2BAAgB,EAAC,eAAe,CAAC,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC;IACpE,IAAI,CAAC,iBAAiB,IAAI,CAAC,aAAa,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CACb,6BAA6B,eAAe,wBAAwB,eAAe,EAAE,IAAI,EAAE,CAC5F,CAAC;IACJ,CAAC;IACD,MAAM,sBAAsB,GAAG,QAAQ,EAAE,CAAC,wBAAwB,CAErD,CAAC;IACd,MAAM,EAAE,YAAY,EAAE,gBAAgB,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CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ObservabilityEvalClient } from \"./observabilityEvalClient.js\";\nimport { _$deleteDeserialize, _createOrUpdateDeserialize } from \"./api/organizations/operations.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n PollerLike,\n OperationState,\n deserializeState,\n ResourceLocationConfig,\n} from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: ObservabilityEvalClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n | ResourceLocationConfig\n | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: Function;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}\":\n {\n deserializer: _$deleteDeserialize,\n expectedStatuses: [\"202\", \"204\", \"200\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}\":\n {\n deserializer: _createOrUpdateDeserialize,\n expectedStatuses: [\"200\", \"201\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
|
|
@@ -3,16 +3,14 @@
|
|
|
3
3
|
// Licensed under the MIT License.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.buildPagedAsyncIterator = buildPagedAsyncIterator;
|
|
6
|
-
const tslib_1 = require("tslib");
|
|
7
6
|
const core_client_1 = require("@azure-rest/core-client");
|
|
8
7
|
const core_rest_pipeline_1 = require("@azure/core-rest-pipeline");
|
|
9
8
|
/**
|
|
10
9
|
* Helper to paginate results in a generic way and return a PagedAsyncIterableIterator
|
|
11
10
|
*/
|
|
12
11
|
function buildPagedAsyncIterator(client, getInitialResponse, processResponseBody, expectedStatuses, options = {}) {
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
const nextLinkName = (_b = options.nextLinkName) !== null && _b !== void 0 ? _b : "nextLink";
|
|
12
|
+
const itemName = options.itemName ?? "value";
|
|
13
|
+
const nextLinkName = options.nextLinkName ?? "nextLink";
|
|
16
14
|
const pagedResult = {
|
|
17
15
|
getPage: async (pageLink) => {
|
|
18
16
|
const result = pageLink === undefined
|
|
@@ -28,7 +26,7 @@ function buildPagedAsyncIterator(client, getInitialResponse, processResponseBody
|
|
|
28
26
|
};
|
|
29
27
|
},
|
|
30
28
|
byPage: (settings) => {
|
|
31
|
-
const { continuationToken } = settings
|
|
29
|
+
const { continuationToken } = settings ?? {};
|
|
32
30
|
return getPageAsyncIterator(pagedResult, {
|
|
33
31
|
pageLink: continuationToken,
|
|
34
32
|
});
|
|
@@ -44,7 +42,6 @@ function buildPagedAsyncIterator(client, getInitialResponse, processResponseBody
|
|
|
44
42
|
* @returns a paged async iterator that iterates over results.
|
|
45
43
|
*/
|
|
46
44
|
function getPagedAsyncIterator(pagedResult) {
|
|
47
|
-
var _a;
|
|
48
45
|
const iter = getItemAsyncIterator(pagedResult);
|
|
49
46
|
return {
|
|
50
47
|
next() {
|
|
@@ -53,55 +50,39 @@ function getPagedAsyncIterator(pagedResult) {
|
|
|
53
50
|
[Symbol.asyncIterator]() {
|
|
54
51
|
return this;
|
|
55
52
|
},
|
|
56
|
-
byPage:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
53
|
+
byPage: pagedResult?.byPage ??
|
|
54
|
+
((settings) => {
|
|
55
|
+
const { continuationToken } = settings ?? {};
|
|
56
|
+
return getPageAsyncIterator(pagedResult, {
|
|
57
|
+
pageLink: continuationToken,
|
|
58
|
+
});
|
|
59
|
+
}),
|
|
62
60
|
};
|
|
63
61
|
}
|
|
64
|
-
function getItemAsyncIterator(pagedResult) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
for (var _d = true, pages_1 = tslib_1.__asyncValues(pages), pages_1_1; pages_1_1 = yield tslib_1.__await(pages_1.next()), _a = pages_1_1.done, !_a; _d = true) {
|
|
70
|
-
_c = pages_1_1.value;
|
|
71
|
-
_d = false;
|
|
72
|
-
const page = _c;
|
|
73
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
77
|
-
finally {
|
|
78
|
-
try {
|
|
79
|
-
if (!_d && !_a && (_b = pages_1.return)) yield tslib_1.__await(_b.call(pages_1));
|
|
80
|
-
}
|
|
81
|
-
finally { if (e_1) throw e_1.error; }
|
|
82
|
-
}
|
|
83
|
-
});
|
|
62
|
+
async function* getItemAsyncIterator(pagedResult) {
|
|
63
|
+
const pages = getPageAsyncIterator(pagedResult);
|
|
64
|
+
for await (const page of pages) {
|
|
65
|
+
yield* page;
|
|
66
|
+
}
|
|
84
67
|
}
|
|
85
|
-
function getPageAsyncIterator(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
68
|
+
async function* getPageAsyncIterator(pagedResult, options = {}) {
|
|
69
|
+
const { pageLink } = options;
|
|
70
|
+
let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);
|
|
71
|
+
if (!response) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
let result = response.page;
|
|
75
|
+
result.continuationToken = response.nextPageLink;
|
|
76
|
+
yield result;
|
|
77
|
+
while (response.nextPageLink) {
|
|
78
|
+
response = await pagedResult.getPage(response.nextPageLink);
|
|
89
79
|
if (!response) {
|
|
90
|
-
return
|
|
80
|
+
return;
|
|
91
81
|
}
|
|
92
|
-
|
|
82
|
+
result = response.page;
|
|
93
83
|
result.continuationToken = response.nextPageLink;
|
|
94
|
-
yield
|
|
95
|
-
|
|
96
|
-
response = yield tslib_1.__await(pagedResult.getPage(response.nextPageLink));
|
|
97
|
-
if (!response) {
|
|
98
|
-
return yield tslib_1.__await(void 0);
|
|
99
|
-
}
|
|
100
|
-
result = response.page;
|
|
101
|
-
result.continuationToken = response.nextPageLink;
|
|
102
|
-
yield yield tslib_1.__await(result);
|
|
103
|
-
}
|
|
104
|
-
});
|
|
84
|
+
yield result;
|
|
85
|
+
}
|
|
105
86
|
}
|
|
106
87
|
/**
|
|
107
88
|
* Gets for the value of nextLink in the body
|
|
@@ -127,7 +108,7 @@ function getElements(body, itemName) {
|
|
|
127
108
|
if (!Array.isArray(value)) {
|
|
128
109
|
throw new core_rest_pipeline_1.RestError(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
|
|
129
110
|
}
|
|
130
|
-
return value
|
|
111
|
+
return value ?? [];
|
|
131
112
|
}
|
|
132
113
|
/**
|
|
133
114
|
* Checks if a request failed
|