@azure/arm-healthdataaiservices 1.0.0-alpha.20250718.1 → 1.0.0-alpha.20250730.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/api/deidServices/index.js +18 -12
- package/dist/browser/api/deidServices/index.js.map +1 -1
- package/dist/browser/api/healthDataAIServicesContext.js +11 -8
- package/dist/browser/api/healthDataAIServicesContext.js.map +1 -1
- package/dist/browser/api/operations/index.js +1 -1
- package/dist/browser/api/operations/index.js.map +1 -1
- package/dist/browser/api/privateEndpointConnections/index.js +11 -8
- package/dist/browser/api/privateEndpointConnections/index.js.map +1 -1
- package/dist/browser/api/privateLinks/index.js +1 -1
- package/dist/browser/api/privateLinks/index.js.map +1 -1
- package/dist/browser/classic/deidServices/index.js +3 -1
- package/dist/browser/classic/deidServices/index.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/privateEndpointConnections/index.js +3 -1
- package/dist/browser/classic/privateEndpointConnections/index.js.map +1 -1
- package/dist/browser/classic/privateLinks/index.js +3 -1
- package/dist/browser/classic/privateLinks/index.js.map +1 -1
- package/dist/browser/healthDataAIServicesClient.js +16 -3
- package/dist/browser/healthDataAIServicesClient.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/commonjs/api/deidServices/index.js +18 -12
- package/dist/commonjs/api/deidServices/index.js.map +1 -1
- package/dist/commonjs/api/healthDataAIServicesContext.js +11 -8
- package/dist/commonjs/api/healthDataAIServicesContext.js.map +1 -1
- package/dist/commonjs/api/operations/index.js +1 -1
- package/dist/commonjs/api/operations/index.js.map +1 -1
- package/dist/commonjs/api/privateEndpointConnections/index.js +11 -8
- package/dist/commonjs/api/privateEndpointConnections/index.js.map +1 -1
- package/dist/commonjs/api/privateLinks/index.js +1 -1
- package/dist/commonjs/api/privateLinks/index.js.map +1 -1
- package/dist/commonjs/classic/deidServices/index.js +3 -1
- package/dist/commonjs/classic/deidServices/index.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/privateEndpointConnections/index.js +3 -1
- package/dist/commonjs/classic/privateEndpointConnections/index.js.map +1 -1
- package/dist/commonjs/classic/privateLinks/index.js +3 -1
- package/dist/commonjs/classic/privateLinks/index.js.map +1 -1
- package/dist/commonjs/healthDataAIServicesClient.js +16 -3
- package/dist/commonjs/healthDataAIServicesClient.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/tsdoc-metadata.json +11 -11
- package/dist/esm/api/deidServices/index.js +18 -12
- package/dist/esm/api/deidServices/index.js.map +1 -1
- package/dist/esm/api/healthDataAIServicesContext.js +11 -8
- package/dist/esm/api/healthDataAIServicesContext.js.map +1 -1
- package/dist/esm/api/operations/index.js +1 -1
- package/dist/esm/api/operations/index.js.map +1 -1
- package/dist/esm/api/privateEndpointConnections/index.js +11 -8
- package/dist/esm/api/privateEndpointConnections/index.js.map +1 -1
- package/dist/esm/api/privateLinks/index.js +1 -1
- package/dist/esm/api/privateLinks/index.js.map +1 -1
- package/dist/esm/classic/deidServices/index.js +3 -1
- package/dist/esm/classic/deidServices/index.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/privateEndpointConnections/index.js +3 -1
- package/dist/esm/classic/privateEndpointConnections/index.js.map +1 -1
- package/dist/esm/classic/privateLinks/index.js +3 -1
- package/dist/esm/classic/privateLinks/index.js.map +1 -1
- package/dist/esm/healthDataAIServicesClient.js +16 -3
- package/dist/esm/healthDataAIServicesClient.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/react-native/api/deidServices/index.js +18 -12
- package/dist/react-native/api/deidServices/index.js.map +1 -1
- package/dist/react-native/api/healthDataAIServicesContext.js +11 -8
- package/dist/react-native/api/healthDataAIServicesContext.js.map +1 -1
- package/dist/react-native/api/operations/index.js +1 -1
- package/dist/react-native/api/operations/index.js.map +1 -1
- package/dist/react-native/api/privateEndpointConnections/index.js +11 -8
- package/dist/react-native/api/privateEndpointConnections/index.js.map +1 -1
- package/dist/react-native/api/privateLinks/index.js +1 -1
- package/dist/react-native/api/privateLinks/index.js.map +1 -1
- package/dist/react-native/classic/deidServices/index.js +3 -1
- package/dist/react-native/classic/deidServices/index.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/privateEndpointConnections/index.js +3 -1
- package/dist/react-native/classic/privateEndpointConnections/index.js.map +1 -1
- package/dist/react-native/classic/privateLinks/index.js +3 -1
- package/dist/react-native/classic/privateLinks/index.js.map +1 -1
- package/dist/react-native/healthDataAIServicesClient.js +16 -3
- package/dist/react-native/healthDataAIServicesClient.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/package.json +2 -2
- package/review/arm-healthdataaiservices-models-node.api.md +225 -225
- package/review/arm-healthdataaiservices-node.api.md +357 -357
|
@@ -7,7 +7,7 @@ import { createRestError, operationOptionsToRequestParameters, } from "@azure-re
|
|
|
7
7
|
export function _privateEndpointConnectionsGetSend(context, subscriptionId, resourceGroupName, deidServiceName, privateEndpointConnectionName, options = { requestOptions: {} }) {
|
|
8
8
|
return context
|
|
9
9
|
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", subscriptionId, resourceGroupName, deidServiceName, privateEndpointConnectionName)
|
|
10
|
-
.get(
|
|
10
|
+
.get({ ...operationOptionsToRequestParameters(options) });
|
|
11
11
|
}
|
|
12
12
|
export async function _privateEndpointConnectionsGetDeserialize(result) {
|
|
13
13
|
const expectedStatuses = ["200"];
|
|
@@ -26,7 +26,10 @@ export function _privateEndpointConnectionsCreateSend(context, subscriptionId, r
|
|
|
26
26
|
}) {
|
|
27
27
|
return context
|
|
28
28
|
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", subscriptionId, resourceGroupName, deidServiceName, privateEndpointConnectionName)
|
|
29
|
-
.put(
|
|
29
|
+
.put({
|
|
30
|
+
...operationOptionsToRequestParameters(options),
|
|
31
|
+
body: privateEndpointConnectionResourceSerializer(resource),
|
|
32
|
+
});
|
|
30
33
|
}
|
|
31
34
|
export async function _privateEndpointConnectionsCreateDeserialize(result) {
|
|
32
35
|
const expectedStatuses = ["200", "201"];
|
|
@@ -40,8 +43,8 @@ export function privateEndpointConnectionsCreate(context, subscriptionId, resour
|
|
|
40
43
|
requestOptions: {},
|
|
41
44
|
}) {
|
|
42
45
|
return getLongRunningPoller(context, _privateEndpointConnectionsCreateDeserialize, ["200", "201"], {
|
|
43
|
-
updateIntervalInMs: options
|
|
44
|
-
abortSignal: options
|
|
46
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
47
|
+
abortSignal: options?.abortSignal,
|
|
45
48
|
getInitialResponse: () => _privateEndpointConnectionsCreateSend(context, subscriptionId, resourceGroupName, deidServiceName, privateEndpointConnectionName, resource, options),
|
|
46
49
|
resourceLocationConfig: "azure-async-operation",
|
|
47
50
|
});
|
|
@@ -51,7 +54,7 @@ export function _privateEndpointConnectionsDeleteSend(context, subscriptionId, r
|
|
|
51
54
|
}) {
|
|
52
55
|
return context
|
|
53
56
|
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", subscriptionId, resourceGroupName, deidServiceName, privateEndpointConnectionName)
|
|
54
|
-
.delete(
|
|
57
|
+
.delete({ ...operationOptionsToRequestParameters(options) });
|
|
55
58
|
}
|
|
56
59
|
export async function _privateEndpointConnectionsDeleteDeserialize(result) {
|
|
57
60
|
const expectedStatuses = ["202", "204", "200"];
|
|
@@ -65,8 +68,8 @@ export function privateEndpointConnectionsDelete(context, subscriptionId, resour
|
|
|
65
68
|
requestOptions: {},
|
|
66
69
|
}) {
|
|
67
70
|
return getLongRunningPoller(context, _privateEndpointConnectionsDeleteDeserialize, ["202", "204", "200"], {
|
|
68
|
-
updateIntervalInMs: options
|
|
69
|
-
abortSignal: options
|
|
71
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
72
|
+
abortSignal: options?.abortSignal,
|
|
70
73
|
getInitialResponse: () => _privateEndpointConnectionsDeleteSend(context, subscriptionId, resourceGroupName, deidServiceName, privateEndpointConnectionName, options),
|
|
71
74
|
resourceLocationConfig: "location",
|
|
72
75
|
});
|
|
@@ -76,7 +79,7 @@ export function _privateEndpointConnectionsListByDeidServiceSend(context, subscr
|
|
|
76
79
|
}) {
|
|
77
80
|
return context
|
|
78
81
|
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections", subscriptionId, resourceGroupName, deidServiceName)
|
|
79
|
-
.get(
|
|
82
|
+
.get({ ...operationOptionsToRequestParameters(options) });
|
|
80
83
|
}
|
|
81
84
|
export async function _privateEndpointConnectionsListByDeidServiceDeserialize(result) {
|
|
82
85
|
const expectedStatuses = ["200"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/privateEndpointConnections/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,EAEL,2CAA2C,EAC3C,6CAA6C,EAE7C,wDAAwD,GACzD,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CAAC;AAGjC,MAAM,UAAU,kCAAkC,CAChD,OAAe,EACf,cAAsB,EACtB,iBAAyB,EACzB,eAAuB,EACvB,6BAAqC,EACrC,UAAuD,EAAE,cAAc,EAAE,EAAE,EAAE;IAE7E,OAAO,OAAO;SACX,IAAI,CACH,uMAAuM,EACvM,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,6BAA6B,CAC9B;SACA,GAAG,mBAAM,mCAAmC,CAAC,OAAO,CAAC,EAAG,CAAC;AAC9D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,yCAAyC,CAC7D,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MA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C,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,OAAO,CACR,EACH,uDAAuD,EACvD,CAAC,KAAK,CAAC,EACP,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAChD,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n HealthDataAIServicesContext as Client,\n PrivateEndpointConnectionsCreateOptionalParams,\n PrivateEndpointConnectionsDeleteOptionalParams,\n PrivateEndpointConnectionsGetOptionalParams,\n PrivateEndpointConnectionsListByDeidServiceOptionalParams,\n} from \"../index.js\";\nimport {\n PrivateEndpointConnectionResource,\n privateEndpointConnectionResourceSerializer,\n privateEndpointConnectionResourceDeserializer,\n _PrivateEndpointConnectionResourceListResult,\n _privateEndpointConnectionResourceListResultDeserializer,\n} from \"../../models/models.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { getLongRunningPoller } from \"../../static-helpers/pollingHelpers.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 _privateEndpointConnectionsGetSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n options: PrivateEndpointConnectionsGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}\",\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n privateEndpointConnectionName,\n )\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _privateEndpointConnectionsGetDeserialize(\n result: PathUncheckedResponse,\n): Promise<PrivateEndpointConnectionResource> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return privateEndpointConnectionResourceDeserializer(result.body);\n}\n\n/** Get a specific private connection */\nexport async function privateEndpointConnectionsGet(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n options: PrivateEndpointConnectionsGetOptionalParams = { requestOptions: {} },\n): Promise<PrivateEndpointConnectionResource> {\n const result = await _privateEndpointConnectionsGetSend(\n context,\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n privateEndpointConnectionName,\n options,\n );\n return _privateEndpointConnectionsGetDeserialize(result);\n}\n\nexport function _privateEndpointConnectionsCreateSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n resource: PrivateEndpointConnectionResource,\n options: PrivateEndpointConnectionsCreateOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}\",\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n privateEndpointConnectionName,\n )\n .put({\n ...operationOptionsToRequestParameters(options),\n body: privateEndpointConnectionResourceSerializer(resource),\n });\n}\n\nexport async function _privateEndpointConnectionsCreateDeserialize(\n result: PathUncheckedResponse,\n): Promise<PrivateEndpointConnectionResource> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return privateEndpointConnectionResourceDeserializer(result.body);\n}\n\n/** Create a Private endpoint connection */\nexport function privateEndpointConnectionsCreate(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n resource: PrivateEndpointConnectionResource,\n options: PrivateEndpointConnectionsCreateOptionalParams = {\n requestOptions: {},\n },\n): PollerLike<\n OperationState<PrivateEndpointConnectionResource>,\n PrivateEndpointConnectionResource\n> {\n return getLongRunningPoller(\n context,\n _privateEndpointConnectionsCreateDeserialize,\n [\"200\", \"201\"],\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _privateEndpointConnectionsCreateSend(\n context,\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n privateEndpointConnectionName,\n resource,\n options,\n ),\n resourceLocationConfig: \"azure-async-operation\",\n },\n ) as PollerLike<\n OperationState<PrivateEndpointConnectionResource>,\n PrivateEndpointConnectionResource\n >;\n}\n\nexport function _privateEndpointConnectionsDeleteSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n options: PrivateEndpointConnectionsDeleteOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}\",\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n privateEndpointConnectionName,\n )\n .delete({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _privateEndpointConnectionsDeleteDeserialize(\n result: PathUncheckedResponse,\n): Promise<void> {\n const expectedStatuses = [\"202\", \"204\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return;\n}\n\n/** Delete the private endpoint connection */\nexport function privateEndpointConnectionsDelete(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n options: PrivateEndpointConnectionsDeleteOptionalParams = {\n requestOptions: {},\n },\n): PollerLike<OperationState<void>, void> {\n return getLongRunningPoller(\n context,\n _privateEndpointConnectionsDeleteDeserialize,\n [\"202\", \"204\", \"200\"],\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _privateEndpointConnectionsDeleteSend(\n context,\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n privateEndpointConnectionName,\n options,\n ),\n resourceLocationConfig: \"location\",\n },\n ) as PollerLike<OperationState<void>, void>;\n}\n\nexport function _privateEndpointConnectionsListByDeidServiceSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n options: PrivateEndpointConnectionsListByDeidServiceOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections\",\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n )\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _privateEndpointConnectionsListByDeidServiceDeserialize(\n result: PathUncheckedResponse,\n): Promise<_PrivateEndpointConnectionResourceListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return _privateEndpointConnectionResourceListResultDeserializer(result.body);\n}\n\n/** List private endpoint connections on the given resource */\nexport function privateEndpointConnectionsListByDeidService(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n options: PrivateEndpointConnectionsListByDeidServiceOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<PrivateEndpointConnectionResource> {\n return buildPagedAsyncIterator(\n context,\n () =>\n _privateEndpointConnectionsListByDeidServiceSend(\n context,\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n options,\n ),\n _privateEndpointConnectionsListByDeidServiceDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/privateEndpointConnections/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,EAEL,2CAA2C,EAC3C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KAAuK,EACvK,cAAc,EACd,iBAAiB,EACjB,eAAe,CAChB;SACA,GAAG,CAAC,EAAE,GAAG,mCAAmC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,uDAAuD,CAC3E,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,eAAe,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,wDAAwD,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC/E,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,2CAA2C,CACzD,OAAe,EACf,cAAsB,EACtB,iBAAyB,EACzB,eAAuB,EACvB,UAAqE;IACnE,cAAc,EAAE,EAAE;CACnB;IAED,OAAO,uBAAuB,CAC5B,OAAO,EACP,GAAG,EAAE,CACH,gDAAgD,CAC9C,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,OAAO,CACR,EACH,uDAAuD,EACvD,CAAC,KAAK,CAAC,EACP,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAChD,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n HealthDataAIServicesContext as Client,\n PrivateEndpointConnectionsCreateOptionalParams,\n PrivateEndpointConnectionsDeleteOptionalParams,\n PrivateEndpointConnectionsGetOptionalParams,\n PrivateEndpointConnectionsListByDeidServiceOptionalParams,\n} from \"../index.js\";\nimport {\n PrivateEndpointConnectionResource,\n privateEndpointConnectionResourceSerializer,\n privateEndpointConnectionResourceDeserializer,\n _PrivateEndpointConnectionResourceListResult,\n _privateEndpointConnectionResourceListResultDeserializer,\n} from \"../../models/models.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { getLongRunningPoller } from \"../../static-helpers/pollingHelpers.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 _privateEndpointConnectionsGetSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n options: PrivateEndpointConnectionsGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}\",\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n privateEndpointConnectionName,\n )\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _privateEndpointConnectionsGetDeserialize(\n result: PathUncheckedResponse,\n): Promise<PrivateEndpointConnectionResource> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return privateEndpointConnectionResourceDeserializer(result.body);\n}\n\n/** Get a specific private connection */\nexport async function privateEndpointConnectionsGet(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n options: PrivateEndpointConnectionsGetOptionalParams = { requestOptions: {} },\n): Promise<PrivateEndpointConnectionResource> {\n const result = await _privateEndpointConnectionsGetSend(\n context,\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n privateEndpointConnectionName,\n options,\n );\n return _privateEndpointConnectionsGetDeserialize(result);\n}\n\nexport function _privateEndpointConnectionsCreateSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n resource: PrivateEndpointConnectionResource,\n options: PrivateEndpointConnectionsCreateOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}\",\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n privateEndpointConnectionName,\n )\n .put({\n ...operationOptionsToRequestParameters(options),\n body: privateEndpointConnectionResourceSerializer(resource),\n });\n}\n\nexport async function _privateEndpointConnectionsCreateDeserialize(\n result: PathUncheckedResponse,\n): Promise<PrivateEndpointConnectionResource> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return privateEndpointConnectionResourceDeserializer(result.body);\n}\n\n/** Create a Private endpoint connection */\nexport function privateEndpointConnectionsCreate(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n resource: PrivateEndpointConnectionResource,\n options: PrivateEndpointConnectionsCreateOptionalParams = {\n requestOptions: {},\n },\n): PollerLike<\n OperationState<PrivateEndpointConnectionResource>,\n PrivateEndpointConnectionResource\n> {\n return getLongRunningPoller(\n context,\n _privateEndpointConnectionsCreateDeserialize,\n [\"200\", \"201\"],\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _privateEndpointConnectionsCreateSend(\n context,\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n privateEndpointConnectionName,\n resource,\n options,\n ),\n resourceLocationConfig: \"azure-async-operation\",\n },\n ) as PollerLike<\n OperationState<PrivateEndpointConnectionResource>,\n PrivateEndpointConnectionResource\n >;\n}\n\nexport function _privateEndpointConnectionsDeleteSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n options: PrivateEndpointConnectionsDeleteOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}\",\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n privateEndpointConnectionName,\n )\n .delete({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _privateEndpointConnectionsDeleteDeserialize(\n result: PathUncheckedResponse,\n): Promise<void> {\n const expectedStatuses = [\"202\", \"204\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return;\n}\n\n/** Delete the private endpoint connection */\nexport function privateEndpointConnectionsDelete(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n options: PrivateEndpointConnectionsDeleteOptionalParams = {\n requestOptions: {},\n },\n): PollerLike<OperationState<void>, void> {\n return getLongRunningPoller(\n context,\n _privateEndpointConnectionsDeleteDeserialize,\n [\"202\", \"204\", \"200\"],\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _privateEndpointConnectionsDeleteSend(\n context,\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n privateEndpointConnectionName,\n options,\n ),\n resourceLocationConfig: \"location\",\n },\n ) as PollerLike<OperationState<void>, void>;\n}\n\nexport function _privateEndpointConnectionsListByDeidServiceSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n options: PrivateEndpointConnectionsListByDeidServiceOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections\",\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n )\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _privateEndpointConnectionsListByDeidServiceDeserialize(\n result: PathUncheckedResponse,\n): Promise<_PrivateEndpointConnectionResourceListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return _privateEndpointConnectionResourceListResultDeserializer(result.body);\n}\n\n/** List private endpoint connections on the given resource */\nexport function privateEndpointConnectionsListByDeidService(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n options: PrivateEndpointConnectionsListByDeidServiceOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<PrivateEndpointConnectionResource> {\n return buildPagedAsyncIterator(\n context,\n () =>\n _privateEndpointConnectionsListByDeidServiceSend(\n context,\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n options,\n ),\n _privateEndpointConnectionsListByDeidServiceDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n"]}
|
|
@@ -6,7 +6,7 @@ import { createRestError, operationOptionsToRequestParameters, } from "@azure-re
|
|
|
6
6
|
export function _privateLinksListByDeidServiceSend(context, subscriptionId, resourceGroupName, deidServiceName, options = { requestOptions: {} }) {
|
|
7
7
|
return context
|
|
8
8
|
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateLinkResources", subscriptionId, resourceGroupName, deidServiceName)
|
|
9
|
-
.get(
|
|
9
|
+
.get({ ...operationOptionsToRequestParameters(options) });
|
|
10
10
|
}
|
|
11
11
|
export async function _privateLinksListByDeidServiceDeserialize(result) {
|
|
12
12
|
const expectedStatuses = ["200"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/privateLinks/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAEL,0CAA0C,GAE3C,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CAAC;AAEjC,MAAM,UAAU,kCAAkC,CAChD,OAAe,EACf,cAAsB,EACtB,iBAAyB,EACzB,eAAuB,EACvB,UAAuD,EAAE,cAAc,EAAE,EAAE,EAAE;IAE7E,OAAO,OAAO;SACX,IAAI,CACH,iKAAiK,EACjK,cAAc,EACd,iBAAiB,EACjB,eAAe,CAChB;SACA,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/privateLinks/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAEL,0CAA0C,GAE3C,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CAAC;AAEjC,MAAM,UAAU,kCAAkC,CAChD,OAAe,EACf,cAAsB,EACtB,iBAAyB,EACzB,eAAuB,EACvB,UAAuD,EAAE,cAAc,EAAE,EAAE,EAAE;IAE7E,OAAO,OAAO;SACX,IAAI,CACH,iKAAiK,EACjK,cAAc,EACd,iBAAiB,EACjB,eAAe,CAChB;SACA,GAAG,CAAC,EAAE,GAAG,mCAAmC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,yCAAyC,CAC7D,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,eAAe,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,0CAA0C,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACjE,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,6BAA6B,CAC3C,OAAe,EACf,cAAsB,EACtB,iBAAyB,EACzB,eAAuB,EACvB,UAAuD,EAAE,cAAc,EAAE,EAAE,EAAE;IAE7E,OAAO,uBAAuB,CAC5B,OAAO,EACP,GAAG,EAAE,CACH,kCAAkC,CAChC,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,OAAO,CACR,EACH,yCAAyC,EACzC,CAAC,KAAK,CAAC,EACP,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAChD,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n HealthDataAIServicesContext as Client,\n PrivateLinksListByDeidServiceOptionalParams,\n} from \"../index.js\";\nimport {\n _PrivateLinkResourceListResult,\n _privateLinkResourceListResultDeserializer,\n PrivateLinkResource,\n} from \"../../models/models.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\n\nexport function _privateLinksListByDeidServiceSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n options: PrivateLinksListByDeidServiceOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateLinkResources\",\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n )\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _privateLinksListByDeidServiceDeserialize(\n result: PathUncheckedResponse,\n): Promise<_PrivateLinkResourceListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return _privateLinkResourceListResultDeserializer(result.body);\n}\n\n/** List private links on the given resource */\nexport function privateLinksListByDeidService(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n deidServiceName: string,\n options: PrivateLinksListByDeidServiceOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<PrivateLinkResource> {\n return buildPagedAsyncIterator(\n context,\n () =>\n _privateLinksListByDeidServiceSend(\n context,\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n options,\n ),\n _privateLinksListByDeidServiceDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n"]}
|
|
@@ -12,6 +12,8 @@ export function getDeidServices(context, subscriptionId) {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
export function getDeidServicesOperations(context, subscriptionId) {
|
|
15
|
-
return
|
|
15
|
+
return {
|
|
16
|
+
...getDeidServices(context, subscriptionId),
|
|
17
|
+
};
|
|
16
18
|
}
|
|
17
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/deidServices/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,eAAe,EACf,+BAA+B,EAC/B,8BAA8B,EAC9B,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,iCAAiC,CAAC;AAoDzC,MAAM,UAAU,eAAe,CAAC,OAAoC,EAAE,cAAsB;IAC1F,OAAO;QACL,GAAG,EAAE,CACH,iBAAyB,EACzB,eAAuB,EACvB,OAAuC,EACvC,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,OAAO,CAAC;QAC1F,mBAAmB,EAAE,CACnB,iBAAyB,EACzB,OAAuD,EACvD,EAAE,CAAC,+BAA+B,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,OAAO,CAAC;QACzF,kBAAkB,EAAE,CAAC,OAAsD,EAAE,EAAE,CAC7E,8BAA8B,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC;QAClE,MAAM,EAAE,CACN,iBAAyB,EACzB,eAAuB,EACvB,QAAqB,EACrB,OAA0C,EAC1C,EAAE,CACF,kBAAkB,CAChB,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,QAAQ,EACR,OAAO,CACR;QACH,MAAM,EAAE,CACN,iBAAyB,EACzB,eAAuB,EACvB,UAAsB,EACtB,OAA0C,EAC1C,EAAE,CACF,kBAAkB,CAChB,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,OAAO,CACR;QACH,MAAM,EAAE,CACN,iBAAyB,EACzB,eAAuB,EACvB,OAA0C,EAC1C,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,OAAO,CAAC;KAC9F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,OAAoC,EACpC,cAAsB;IAEtB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/deidServices/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,eAAe,EACf,+BAA+B,EAC/B,8BAA8B,EAC9B,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,iCAAiC,CAAC;AAoDzC,MAAM,UAAU,eAAe,CAAC,OAAoC,EAAE,cAAsB;IAC1F,OAAO;QACL,GAAG,EAAE,CACH,iBAAyB,EACzB,eAAuB,EACvB,OAAuC,EACvC,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,OAAO,CAAC;QAC1F,mBAAmB,EAAE,CACnB,iBAAyB,EACzB,OAAuD,EACvD,EAAE,CAAC,+BAA+B,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,OAAO,CAAC;QACzF,kBAAkB,EAAE,CAAC,OAAsD,EAAE,EAAE,CAC7E,8BAA8B,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC;QAClE,MAAM,EAAE,CACN,iBAAyB,EACzB,eAAuB,EACvB,QAAqB,EACrB,OAA0C,EAC1C,EAAE,CACF,kBAAkB,CAChB,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,QAAQ,EACR,OAAO,CACR;QACH,MAAM,EAAE,CACN,iBAAyB,EACzB,eAAuB,EACvB,UAAsB,EACtB,OAA0C,EAC1C,EAAE,CACF,kBAAkB,CAChB,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,OAAO,CACR;QACH,MAAM,EAAE,CACN,iBAAyB,EACzB,eAAuB,EACvB,OAA0C,EAC1C,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,OAAO,CAAC;KAC9F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,OAAoC,EACpC,cAAsB;IAEtB,OAAO;QACL,GAAG,eAAe,CAAC,OAAO,EAAE,cAAc,CAAC;KAC5C,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { HealthDataAIServicesContext } from \"../../api/healthDataAIServicesContext.js\";\nimport {\n deidServicesGet,\n deidServicesListByResourceGroup,\n deidServicesListBySubscription,\n deidServicesCreate,\n deidServicesUpdate,\n deidServicesDelete,\n} from \"../../api/deidServices/index.js\";\nimport { DeidService, DeidUpdate } from \"../../models/models.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\nimport {\n DeidServicesGetOptionalParams,\n DeidServicesListByResourceGroupOptionalParams,\n DeidServicesListBySubscriptionOptionalParams,\n DeidServicesCreateOptionalParams,\n DeidServicesUpdateOptionalParams,\n DeidServicesDeleteOptionalParams,\n} from \"../../api/options.js\";\n\n/** Interface representing a DeidServices operations. */\nexport interface DeidServicesOperations {\n /** Get a DeidService */\n get: (\n resourceGroupName: string,\n deidServiceName: string,\n options?: DeidServicesGetOptionalParams,\n ) => Promise<DeidService>;\n /** List DeidService resources by resource group */\n listByResourceGroup: (\n resourceGroupName: string,\n options?: DeidServicesListByResourceGroupOptionalParams,\n ) => PagedAsyncIterableIterator<DeidService>;\n /** List DeidService resources by subscription ID */\n listBySubscription: (\n options?: DeidServicesListBySubscriptionOptionalParams,\n ) => PagedAsyncIterableIterator<DeidService>;\n /** Create a DeidService */\n create: (\n resourceGroupName: string,\n deidServiceName: string,\n resource: DeidService,\n options?: DeidServicesCreateOptionalParams,\n ) => PollerLike<OperationState<DeidService>, DeidService>;\n /** Update a DeidService */\n update: (\n resourceGroupName: string,\n deidServiceName: string,\n properties: DeidUpdate,\n options?: DeidServicesUpdateOptionalParams,\n ) => PollerLike<OperationState<DeidService>, DeidService>;\n /** Delete a DeidService */\n delete: (\n resourceGroupName: string,\n deidServiceName: string,\n options?: DeidServicesDeleteOptionalParams,\n ) => PollerLike<OperationState<void>, void>;\n}\n\nexport function getDeidServices(context: HealthDataAIServicesContext, subscriptionId: string) {\n return {\n get: (\n resourceGroupName: string,\n deidServiceName: string,\n options?: DeidServicesGetOptionalParams,\n ) => deidServicesGet(context, subscriptionId, resourceGroupName, deidServiceName, options),\n listByResourceGroup: (\n resourceGroupName: string,\n options?: DeidServicesListByResourceGroupOptionalParams,\n ) => deidServicesListByResourceGroup(context, subscriptionId, resourceGroupName, options),\n listBySubscription: (options?: DeidServicesListBySubscriptionOptionalParams) =>\n deidServicesListBySubscription(context, subscriptionId, options),\n create: (\n resourceGroupName: string,\n deidServiceName: string,\n resource: DeidService,\n options?: DeidServicesCreateOptionalParams,\n ) =>\n deidServicesCreate(\n context,\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n resource,\n options,\n ),\n update: (\n resourceGroupName: string,\n deidServiceName: string,\n properties: DeidUpdate,\n options?: DeidServicesUpdateOptionalParams,\n ) =>\n deidServicesUpdate(\n context,\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n properties,\n options,\n ),\n delete: (\n resourceGroupName: string,\n deidServiceName: string,\n options?: DeidServicesDeleteOptionalParams,\n ) => deidServicesDelete(context, subscriptionId, resourceGroupName, deidServiceName, options),\n };\n}\n\nexport function getDeidServicesOperations(\n context: HealthDataAIServicesContext,\n subscriptionId: string,\n): DeidServicesOperations {\n return {\n ...getDeidServices(context, subscriptionId),\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/operations/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAW/D,MAAM,UAAU,aAAa,CAAC,OAAoC;IAChE,OAAO;QACL,IAAI,EAAE,CAAC,OAAsC,EAAE,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC;KACnF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,OAAoC;IAEpC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/operations/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAW/D,MAAM,UAAU,aAAa,CAAC,OAAoC;IAChE,OAAO;QACL,IAAI,EAAE,CAAC,OAAsC,EAAE,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC;KACnF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,OAAoC;IAEpC,OAAO;QACL,GAAG,aAAa,CAAC,OAAO,CAAC;KAC1B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { HealthDataAIServicesContext } from \"../../api/healthDataAIServicesContext.js\";\nimport { operationsList } from \"../../api/operations/index.js\";\nimport { OperationsListOptionalParams } from \"../../api/options.js\";\nimport { Operation } from \"../../models/models.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\nexport function getOperations(context: HealthDataAIServicesContext) {\n return {\n list: (options?: OperationsListOptionalParams) => operationsList(context, options),\n };\n}\n\nexport function getOperationsOperations(\n context: HealthDataAIServicesContext,\n): OperationsOperations {\n return {\n ...getOperations(context),\n };\n}\n"]}
|
|
@@ -10,6 +10,8 @@ export function getPrivateEndpointConnections(context, subscriptionId) {
|
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
export function getPrivateEndpointConnectionsOperations(context, subscriptionId) {
|
|
13
|
-
return
|
|
13
|
+
return {
|
|
14
|
+
...getPrivateEndpointConnections(context, subscriptionId),
|
|
15
|
+
};
|
|
14
16
|
}
|
|
15
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/privateEndpointConnections/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,EACL,6BAA6B,EAC7B,gCAAgC,EAChC,gCAAgC,EAChC,2CAA2C,GAC5C,MAAM,+CAA+C,CAAC;AAwCvD,MAAM,UAAU,6BAA6B,CAC3C,OAAoC,EACpC,cAAsB;IAEtB,OAAO;QACL,GAAG,EAAE,CACH,iBAAyB,EACzB,eAAuB,EACvB,6BAAqC,EACrC,OAAqD,EACrD,EAAE,CACF,6BAA6B,CAC3B,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,6BAA6B,EAC7B,OAAO,CACR;QACH,MAAM,EAAE,CACN,iBAAyB,EACzB,eAAuB,EACvB,6BAAqC,EACrC,QAA2C,EAC3C,OAAwD,EACxD,EAAE,CACF,gCAAgC,CAC9B,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,6BAA6B,EAC7B,QAAQ,EACR,OAAO,CACR;QACH,MAAM,EAAE,CACN,iBAAyB,EACzB,eAAuB,EACvB,6BAAqC,EACrC,OAAwD,EACxD,EAAE,CACF,gCAAgC,CAC9B,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,6BAA6B,EAC7B,OAAO,CACR;QACH,iBAAiB,EAAE,CACjB,iBAAyB,EACzB,eAAuB,EACvB,OAAmE,EACnE,EAAE,CACF,2CAA2C,CACzC,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,OAAO,CACR;KACJ,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uCAAuC,CACrD,OAAoC,EACpC,cAAsB;IAEtB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/privateEndpointConnections/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,EACL,6BAA6B,EAC7B,gCAAgC,EAChC,gCAAgC,EAChC,2CAA2C,GAC5C,MAAM,+CAA+C,CAAC;AAwCvD,MAAM,UAAU,6BAA6B,CAC3C,OAAoC,EACpC,cAAsB;IAEtB,OAAO;QACL,GAAG,EAAE,CACH,iBAAyB,EACzB,eAAuB,EACvB,6BAAqC,EACrC,OAAqD,EACrD,EAAE,CACF,6BAA6B,CAC3B,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,6BAA6B,EAC7B,OAAO,CACR;QACH,MAAM,EAAE,CACN,iBAAyB,EACzB,eAAuB,EACvB,6BAAqC,EACrC,QAA2C,EAC3C,OAAwD,EACxD,EAAE,CACF,gCAAgC,CAC9B,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,6BAA6B,EAC7B,QAAQ,EACR,OAAO,CACR;QACH,MAAM,EAAE,CACN,iBAAyB,EACzB,eAAuB,EACvB,6BAAqC,EACrC,OAAwD,EACxD,EAAE,CACF,gCAAgC,CAC9B,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,6BAA6B,EAC7B,OAAO,CACR;QACH,iBAAiB,EAAE,CACjB,iBAAyB,EACzB,eAAuB,EACvB,OAAmE,EACnE,EAAE,CACF,2CAA2C,CACzC,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,OAAO,CACR;KACJ,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uCAAuC,CACrD,OAAoC,EACpC,cAAsB;IAEtB,OAAO;QACL,GAAG,6BAA6B,CAAC,OAAO,EAAE,cAAc,CAAC;KAC1D,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { HealthDataAIServicesContext } from \"../../api/healthDataAIServicesContext.js\";\nimport {\n PrivateEndpointConnectionsGetOptionalParams,\n PrivateEndpointConnectionsCreateOptionalParams,\n PrivateEndpointConnectionsDeleteOptionalParams,\n PrivateEndpointConnectionsListByDeidServiceOptionalParams,\n} from \"../../api/options.js\";\nimport {\n privateEndpointConnectionsGet,\n privateEndpointConnectionsCreate,\n privateEndpointConnectionsDelete,\n privateEndpointConnectionsListByDeidService,\n} from \"../../api/privateEndpointConnections/index.js\";\nimport { PrivateEndpointConnectionResource } from \"../../models/models.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\n\n/** Interface representing a PrivateEndpointConnections operations. */\nexport interface PrivateEndpointConnectionsOperations {\n /** Get a specific private connection */\n get: (\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n options?: PrivateEndpointConnectionsGetOptionalParams,\n ) => Promise<PrivateEndpointConnectionResource>;\n /** Create a Private endpoint connection */\n create: (\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n resource: PrivateEndpointConnectionResource,\n options?: PrivateEndpointConnectionsCreateOptionalParams,\n ) => PollerLike<\n OperationState<PrivateEndpointConnectionResource>,\n PrivateEndpointConnectionResource\n >;\n /** Delete the private endpoint connection */\n delete: (\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n options?: PrivateEndpointConnectionsDeleteOptionalParams,\n ) => PollerLike<OperationState<void>, void>;\n /** List private endpoint connections on the given resource */\n listByDeidService: (\n resourceGroupName: string,\n deidServiceName: string,\n options?: PrivateEndpointConnectionsListByDeidServiceOptionalParams,\n ) => PagedAsyncIterableIterator<PrivateEndpointConnectionResource>;\n}\n\nexport function getPrivateEndpointConnections(\n context: HealthDataAIServicesContext,\n subscriptionId: string,\n) {\n return {\n get: (\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n options?: PrivateEndpointConnectionsGetOptionalParams,\n ) =>\n privateEndpointConnectionsGet(\n context,\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n privateEndpointConnectionName,\n options,\n ),\n create: (\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n resource: PrivateEndpointConnectionResource,\n options?: PrivateEndpointConnectionsCreateOptionalParams,\n ) =>\n privateEndpointConnectionsCreate(\n context,\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n privateEndpointConnectionName,\n resource,\n options,\n ),\n delete: (\n resourceGroupName: string,\n deidServiceName: string,\n privateEndpointConnectionName: string,\n options?: PrivateEndpointConnectionsDeleteOptionalParams,\n ) =>\n privateEndpointConnectionsDelete(\n context,\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n privateEndpointConnectionName,\n options,\n ),\n listByDeidService: (\n resourceGroupName: string,\n deidServiceName: string,\n options?: PrivateEndpointConnectionsListByDeidServiceOptionalParams,\n ) =>\n privateEndpointConnectionsListByDeidService(\n context,\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n options,\n ),\n };\n}\n\nexport function getPrivateEndpointConnectionsOperations(\n context: HealthDataAIServicesContext,\n subscriptionId: string,\n): PrivateEndpointConnectionsOperations {\n return {\n ...getPrivateEndpointConnections(context, subscriptionId),\n };\n}\n"]}
|
|
@@ -7,6 +7,8 @@ export function getPrivateLinks(context, subscriptionId) {
|
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
9
|
export function getPrivateLinksOperations(context, subscriptionId) {
|
|
10
|
-
return
|
|
10
|
+
return {
|
|
11
|
+
...getPrivateLinks(context, subscriptionId),
|
|
12
|
+
};
|
|
11
13
|
}
|
|
12
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/privateLinks/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAchF,MAAM,UAAU,eAAe,CAAC,OAAoC,EAAE,cAAsB;IAC1F,OAAO;QACL,iBAAiB,EAAE,CACjB,iBAAyB,EACzB,eAAuB,EACvB,OAAqD,EACrD,EAAE,CACF,6BAA6B,CAC3B,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,OAAO,CACR;KACJ,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,OAAoC,EACpC,cAAsB;IAEtB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/privateLinks/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAchF,MAAM,UAAU,eAAe,CAAC,OAAoC,EAAE,cAAsB;IAC1F,OAAO;QACL,iBAAiB,EAAE,CACjB,iBAAyB,EACzB,eAAuB,EACvB,OAAqD,EACrD,EAAE,CACF,6BAA6B,CAC3B,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,OAAO,CACR;KACJ,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,OAAoC,EACpC,cAAsB;IAEtB,OAAO;QACL,GAAG,eAAe,CAAC,OAAO,EAAE,cAAc,CAAC;KAC5C,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { HealthDataAIServicesContext } from \"../../api/healthDataAIServicesContext.js\";\nimport { PrivateLinksListByDeidServiceOptionalParams } from \"../../api/options.js\";\nimport { privateLinksListByDeidService } from \"../../api/privateLinks/index.js\";\nimport { PrivateLinkResource } from \"../../models/models.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a PrivateLinks operations. */\nexport interface PrivateLinksOperations {\n /** List private links on the given resource */\n listByDeidService: (\n resourceGroupName: string,\n deidServiceName: string,\n options?: PrivateLinksListByDeidServiceOptionalParams,\n ) => PagedAsyncIterableIterator<PrivateLinkResource>;\n}\n\nexport function getPrivateLinks(context: HealthDataAIServicesContext, subscriptionId: string) {\n return {\n listByDeidService: (\n resourceGroupName: string,\n deidServiceName: string,\n options?: PrivateLinksListByDeidServiceOptionalParams,\n ) =>\n privateLinksListByDeidService(\n context,\n subscriptionId,\n resourceGroupName,\n deidServiceName,\n options,\n ),\n };\n}\n\nexport function getPrivateLinksOperations(\n context: HealthDataAIServicesContext,\n subscriptionId: string,\n): PrivateLinksOperations {\n return {\n ...getPrivateLinks(context, subscriptionId),\n };\n}\n"]}
|
|
@@ -6,18 +6,31 @@ import { getPrivateEndpointConnectionsOperations, } from "./classic/privateEndpo
|
|
|
6
6
|
import { getPrivateLinksOperations } from "./classic/privateLinks/index.js";
|
|
7
7
|
import { createHealthDataAIServices, } from "./api/index.js";
|
|
8
8
|
export class HealthDataAIServicesClient {
|
|
9
|
+
_client;
|
|
10
|
+
/** The pipeline used by this client to make requests */
|
|
11
|
+
pipeline;
|
|
9
12
|
constructor(credential, subscriptionId, options = {}) {
|
|
10
|
-
|
|
11
|
-
const prefixFromOptions = (_a = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _a === void 0 ? void 0 : _a.userAgentPrefix;
|
|
13
|
+
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
|
|
12
14
|
const userAgentPrefix = prefixFromOptions
|
|
13
15
|
? `${prefixFromOptions} azsdk-js-client`
|
|
14
16
|
: `azsdk-js-client`;
|
|
15
|
-
this._client = createHealthDataAIServices(credential,
|
|
17
|
+
this._client = createHealthDataAIServices(credential, {
|
|
18
|
+
...options,
|
|
19
|
+
userAgentOptions: { userAgentPrefix },
|
|
20
|
+
});
|
|
16
21
|
this.pipeline = this._client.pipeline;
|
|
17
22
|
this.operations = getOperationsOperations(this._client);
|
|
18
23
|
this.deidServices = getDeidServicesOperations(this._client, subscriptionId);
|
|
19
24
|
this.privateEndpointConnections = getPrivateEndpointConnectionsOperations(this._client, subscriptionId);
|
|
20
25
|
this.privateLinks = getPrivateLinksOperations(this._client, subscriptionId);
|
|
21
26
|
}
|
|
27
|
+
/** The operation groups for Operations */
|
|
28
|
+
operations;
|
|
29
|
+
/** The operation groups for DeidServices */
|
|
30
|
+
deidServices;
|
|
31
|
+
/** The operation groups for PrivateEndpointConnections */
|
|
32
|
+
privateEndpointConnections;
|
|
33
|
+
/** The operation groups for PrivateLinks */
|
|
34
|
+
privateLinks;
|
|
22
35
|
}
|
|
23
36
|
//# sourceMappingURL=healthDataAIServicesClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"healthDataAIServicesClient.js","sourceRoot":"","sources":["../../src/healthDataAIServicesClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,uBAAuB,EAAwB,MAAM,+BAA+B,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAA0B,MAAM,iCAAiC,CAAC;AACpG,OAAO,EACL,uCAAuC,GAExC,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAA0B,MAAM,iCAAiC,CAAC;AACpG,OAAO,EACL,0BAA0B,GAG3B,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,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAC9E,CAAC;IAED,0CAA0C;IAC1B,UAAU,CAAuB;IACjD,4CAA4C;IAC5B,YAAY,CAAyB;IACrD,0DAA0D;IAC1C,0BAA0B,CAAuC;IACjF,4CAA4C;IAC5B,YAAY,CAAyB;CACtD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { getOperationsOperations, OperationsOperations } from \"./classic/operations/index.js\";\nimport { getDeidServicesOperations, DeidServicesOperations } from \"./classic/deidServices/index.js\";\nimport {\n getPrivateEndpointConnectionsOperations,\n PrivateEndpointConnectionsOperations,\n} from \"./classic/privateEndpointConnections/index.js\";\nimport { getPrivateLinksOperations, PrivateLinksOperations } from \"./classic/privateLinks/index.js\";\nimport {\n createHealthDataAIServices,\n HealthDataAIServicesContext,\n HealthDataAIServicesClientOptionalParams,\n} from \"./api/index.js\";\nimport { Pipeline } from \"@azure/core-rest-pipeline\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport { HealthDataAIServicesClientOptionalParams } from \"./api/healthDataAIServicesContext.js\";\n\nexport class HealthDataAIServicesClient {\n private _client: HealthDataAIServicesContext;\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: HealthDataAIServicesClientOptionalParams = {},\n ) {\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createHealthDataAIServices(credential, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.operations = getOperationsOperations(this._client);\n this.deidServices = getDeidServicesOperations(this._client, subscriptionId);\n this.privateEndpointConnections = getPrivateEndpointConnectionsOperations(\n this._client,\n subscriptionId,\n );\n this.privateLinks = getPrivateLinksOperations(this._client, subscriptionId);\n }\n\n /** The operation groups for Operations */\n public readonly operations: OperationsOperations;\n /** The operation groups for DeidServices */\n public readonly deidServices: DeidServicesOperations;\n /** The operation groups for PrivateEndpointConnections */\n public readonly privateEndpointConnections: PrivateEndpointConnectionsOperations;\n /** The operation groups for PrivateLinks */\n public readonly privateLinks: PrivateLinksOperations;\n}\n"]}
|
|
@@ -10,21 +10,20 @@ import { deserializeState, } from "@azure/core-lro";
|
|
|
10
10
|
* needs to be constructed after the original one is not in scope.
|
|
11
11
|
*/
|
|
12
12
|
export function restorePoller(client, serializedState, sourceOperation, options) {
|
|
13
|
-
var _a, _b, _c;
|
|
14
13
|
const pollerConfig = deserializeState(serializedState).config;
|
|
15
14
|
const { initialRequestUrl, requestMethod, metadata } = pollerConfig;
|
|
16
15
|
if (!initialRequestUrl || !requestMethod) {
|
|
17
|
-
throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation
|
|
16
|
+
throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`);
|
|
18
17
|
}
|
|
19
|
-
const resourceLocationConfig = metadata
|
|
20
|
-
const { deserializer, expectedStatuses = [] } =
|
|
21
|
-
const deserializeHelper =
|
|
18
|
+
const resourceLocationConfig = metadata?.["resourceLocationConfig"];
|
|
19
|
+
const { deserializer, expectedStatuses = [] } = getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};
|
|
20
|
+
const deserializeHelper = options?.processResponseBody ?? deserializer;
|
|
22
21
|
if (!deserializeHelper) {
|
|
23
|
-
throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation
|
|
22
|
+
throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`);
|
|
24
23
|
}
|
|
25
|
-
return getLongRunningPoller(
|
|
26
|
-
updateIntervalInMs: options
|
|
27
|
-
abortSignal: options
|
|
24
|
+
return getLongRunningPoller(client["_client"] ?? client, deserializeHelper, expectedStatuses, {
|
|
25
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
26
|
+
abortSignal: options?.abortSignal,
|
|
28
27
|
resourceLocationConfig,
|
|
29
28
|
restoreFrom: serializedState,
|
|
30
29
|
initialRequestUrl,
|
|
@@ -53,7 +52,6 @@ const deserializeMap = {
|
|
|
53
52
|
},
|
|
54
53
|
};
|
|
55
54
|
function getDeserializationHelper(urlStr, method) {
|
|
56
|
-
var _a, _b, _c, _d;
|
|
57
55
|
const path = new URL(urlStr).pathname;
|
|
58
56
|
const pathParts = path.split("/");
|
|
59
57
|
// Traverse list to match the longest candidate
|
|
@@ -73,13 +71,13 @@ function getDeserializationHelper(urlStr, method) {
|
|
|
73
71
|
// track if we have found a match to return the values found.
|
|
74
72
|
let found = true;
|
|
75
73
|
for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
|
|
76
|
-
if (
|
|
77
|
-
const start = candidateParts[i].indexOf("}") + 1, end =
|
|
74
|
+
if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) {
|
|
75
|
+
const start = candidateParts[i].indexOf("}") + 1, end = candidateParts[i]?.length;
|
|
78
76
|
// If the current part of the candidate is a "template" part
|
|
79
77
|
// Try to use the suffix of pattern to match the path
|
|
80
78
|
// {guid} ==> $
|
|
81
79
|
// {guid}:export ==> :export$
|
|
82
|
-
const isMatched = new RegExp(`${
|
|
80
|
+
const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(pathParts[j] || "");
|
|
83
81
|
if (!isMatched) {
|
|
84
82
|
found = false;
|
|
85
83
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,4CAA4C,EAC5C,4CAA4C,GAC7C,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AAG,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 { HealthDataAIServicesClient } from \"./healthDataAIServicesClient.js\";\nimport {\n _deidServicesCreateDeserialize,\n _deidServicesUpdateDeserialize,\n _deidServicesDeleteDeserialize,\n} from \"./api/deidServices/index.js\";\nimport {\n _privateEndpointConnectionsCreateDeserialize,\n _privateEndpointConnectionsDeleteDeserialize,\n} from \"./api/privateEndpointConnections/index.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: HealthDataAIServicesClient,\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 \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}\":\n {\n deserializer: _deidServicesCreateDeserialize,\n expectedStatuses: [\"200\", \"201\"],\n },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}\":\n {\n deserializer: _deidServicesUpdateDeserialize,\n expectedStatuses: [\"200\", \"202\"],\n },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}\":\n {\n deserializer: _deidServicesDeleteDeserialize,\n expectedStatuses: [\"202\", \"204\", \"200\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}\":\n {\n deserializer: _privateEndpointConnectionsCreateDeserialize,\n expectedStatuses: [\"200\", \"201\"],\n },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}\":\n {\n deserializer: _privateEndpointConnectionsDeleteDeserialize,\n expectedStatuses: [\"202\", \"204\", \"200\"],\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"]}
|
|
1
|
+
{"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,4CAA4C,EAC5C,4CAA4C,GAC7C,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAG1E,OAAO,EAGL,gBAAgB,GAEjB,MAAM,iBAAiB,CAAC;AAgBzB;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,MAAkC,EAClC,eAAuB,EACvB,eAAiF,EACjF,OAAuC;IAEvC,MAAM,YAAY,GAAG,gBAAgB,CAAC,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,GAAG,EAAE,EAAE,GAC3C,wBA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AAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAC1E,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CACnB,CAAC;gBAEF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,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 { HealthDataAIServicesClient } from \"./healthDataAIServicesClient.js\";\nimport {\n _deidServicesCreateDeserialize,\n _deidServicesUpdateDeserialize,\n _deidServicesDeleteDeserialize,\n} from \"./api/deidServices/index.js\";\nimport {\n _privateEndpointConnectionsCreateDeserialize,\n _privateEndpointConnectionsDeleteDeserialize,\n} from \"./api/privateEndpointConnections/index.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: HealthDataAIServicesClient,\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 \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}\":\n {\n deserializer: _deidServicesCreateDeserialize,\n expectedStatuses: [\"200\", \"201\"],\n },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}\":\n {\n deserializer: _deidServicesUpdateDeserialize,\n expectedStatuses: [\"200\", \"202\"],\n },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}\":\n {\n deserializer: _deidServicesDeleteDeserialize,\n expectedStatuses: [\"202\", \"204\", \"200\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}\":\n {\n deserializer: _privateEndpointConnectionsCreateDeserialize,\n expectedStatuses: [\"200\", \"201\"],\n },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthDataAIServices/deidServices/{deidServiceName}/privateEndpointConnections/{privateEndpointConnectionName}\":\n {\n deserializer: _privateEndpointConnectionsDeleteDeserialize,\n expectedStatuses: [\"202\", \"204\", \"200\"],\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"]}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
4
3
|
import { createRestError } from "@azure-rest/core-client";
|
|
5
4
|
import { RestError } from "@azure/core-rest-pipeline";
|
|
6
5
|
/**
|
|
7
6
|
* Helper to paginate results in a generic way and return a PagedAsyncIterableIterator
|
|
8
7
|
*/
|
|
9
8
|
export function buildPagedAsyncIterator(client, getInitialResponse, processResponseBody, expectedStatuses, options = {}) {
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
const nextLinkName = (_b = options.nextLinkName) !== null && _b !== void 0 ? _b : "nextLink";
|
|
9
|
+
const itemName = options.itemName ?? "value";
|
|
10
|
+
const nextLinkName = options.nextLinkName ?? "nextLink";
|
|
13
11
|
const pagedResult = {
|
|
14
12
|
getPage: async (pageLink) => {
|
|
15
13
|
const result = pageLink === undefined
|
|
@@ -25,7 +23,7 @@ export function buildPagedAsyncIterator(client, getInitialResponse, processRespo
|
|
|
25
23
|
};
|
|
26
24
|
},
|
|
27
25
|
byPage: (settings) => {
|
|
28
|
-
const { continuationToken } = settings
|
|
26
|
+
const { continuationToken } = settings ?? {};
|
|
29
27
|
return getPageAsyncIterator(pagedResult, {
|
|
30
28
|
pageLink: continuationToken,
|
|
31
29
|
});
|
|
@@ -41,7 +39,6 @@ export function buildPagedAsyncIterator(client, getInitialResponse, processRespo
|
|
|
41
39
|
* @returns a paged async iterator that iterates over results.
|
|
42
40
|
*/
|
|
43
41
|
function getPagedAsyncIterator(pagedResult) {
|
|
44
|
-
var _a;
|
|
45
42
|
const iter = getItemAsyncIterator(pagedResult);
|
|
46
43
|
return {
|
|
47
44
|
next() {
|
|
@@ -50,55 +47,39 @@ function getPagedAsyncIterator(pagedResult) {
|
|
|
50
47
|
[Symbol.asyncIterator]() {
|
|
51
48
|
return this;
|
|
52
49
|
},
|
|
53
|
-
byPage:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
byPage: pagedResult?.byPage ??
|
|
51
|
+
((settings) => {
|
|
52
|
+
const { continuationToken } = settings ?? {};
|
|
53
|
+
return getPageAsyncIterator(pagedResult, {
|
|
54
|
+
pageLink: continuationToken,
|
|
55
|
+
});
|
|
56
|
+
}),
|
|
59
57
|
};
|
|
60
58
|
}
|
|
61
|
-
function getItemAsyncIterator(pagedResult) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
for (var _d = true, pages_1 = __asyncValues(pages), pages_1_1; pages_1_1 = yield __await(pages_1.next()), _a = pages_1_1.done, !_a; _d = true) {
|
|
67
|
-
_c = pages_1_1.value;
|
|
68
|
-
_d = false;
|
|
69
|
-
const page = _c;
|
|
70
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
74
|
-
finally {
|
|
75
|
-
try {
|
|
76
|
-
if (!_d && !_a && (_b = pages_1.return)) yield __await(_b.call(pages_1));
|
|
77
|
-
}
|
|
78
|
-
finally { if (e_1) throw e_1.error; }
|
|
79
|
-
}
|
|
80
|
-
});
|
|
59
|
+
async function* getItemAsyncIterator(pagedResult) {
|
|
60
|
+
const pages = getPageAsyncIterator(pagedResult);
|
|
61
|
+
for await (const page of pages) {
|
|
62
|
+
yield* page;
|
|
63
|
+
}
|
|
81
64
|
}
|
|
82
|
-
function getPageAsyncIterator(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
65
|
+
async function* getPageAsyncIterator(pagedResult, options = {}) {
|
|
66
|
+
const { pageLink } = options;
|
|
67
|
+
let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);
|
|
68
|
+
if (!response) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
let result = response.page;
|
|
72
|
+
result.continuationToken = response.nextPageLink;
|
|
73
|
+
yield result;
|
|
74
|
+
while (response.nextPageLink) {
|
|
75
|
+
response = await pagedResult.getPage(response.nextPageLink);
|
|
86
76
|
if (!response) {
|
|
87
|
-
return
|
|
77
|
+
return;
|
|
88
78
|
}
|
|
89
|
-
|
|
79
|
+
result = response.page;
|
|
90
80
|
result.continuationToken = response.nextPageLink;
|
|
91
|
-
yield
|
|
92
|
-
|
|
93
|
-
response = yield __await(pagedResult.getPage(response.nextPageLink));
|
|
94
|
-
if (!response) {
|
|
95
|
-
return yield __await(void 0);
|
|
96
|
-
}
|
|
97
|
-
result = response.page;
|
|
98
|
-
result.continuationToken = response.nextPageLink;
|
|
99
|
-
yield yield __await(result);
|
|
100
|
-
}
|
|
101
|
-
});
|
|
81
|
+
yield result;
|
|
82
|
+
}
|
|
102
83
|
}
|
|
103
84
|
/**
|
|
104
85
|
* Gets for the value of nextLink in the body
|
|
@@ -124,7 +105,7 @@ function getElements(body, itemName) {
|
|
|
124
105
|
if (!Array.isArray(value)) {
|
|
125
106
|
throw new RestError(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
|
|
126
107
|
}
|
|
127
|
-
return value
|
|
108
|
+
return value ?? [];
|
|
128
109
|
}
|
|
129
110
|
/**
|
|
130
111
|
* Checks if a request failed
|