@azure/arm-onlineexperimentation 1.0.0-alpha.20250619.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.
Files changed (87) hide show
  1. package/dist/browser/api/onlineExperimentationContext.js +16 -10
  2. package/dist/browser/api/onlineExperimentationContext.js.map +1 -1
  3. package/dist/browser/api/onlineExperimentationWorkspaces/operations.js +58 -24
  4. package/dist/browser/api/onlineExperimentationWorkspaces/operations.js.map +1 -1
  5. package/dist/browser/api/operations/operations.js +8 -3
  6. package/dist/browser/api/operations/operations.js.map +1 -1
  7. package/dist/browser/classic/onlineExperimentationWorkspaces/index.js +3 -1
  8. package/dist/browser/classic/onlineExperimentationWorkspaces/index.js.map +1 -1
  9. package/dist/browser/classic/operations/index.js +3 -1
  10. package/dist/browser/classic/operations/index.js.map +1 -1
  11. package/dist/browser/onlineExperimentationClient.js +12 -3
  12. package/dist/browser/onlineExperimentationClient.js.map +1 -1
  13. package/dist/browser/restorePollerHelpers.js +11 -13
  14. package/dist/browser/restorePollerHelpers.js.map +1 -1
  15. package/dist/browser/static-helpers/pagingHelpers.js +31 -50
  16. package/dist/browser/static-helpers/pagingHelpers.js.map +1 -1
  17. package/dist/browser/static-helpers/pollingHelpers.js +14 -11
  18. package/dist/browser/static-helpers/pollingHelpers.js.map +1 -1
  19. package/dist/browser/static-helpers/urlTemplate.js +3 -3
  20. package/dist/browser/static-helpers/urlTemplate.js.map +1 -1
  21. package/dist/commonjs/api/onlineExperimentationContext.js +16 -10
  22. package/dist/commonjs/api/onlineExperimentationContext.js.map +1 -1
  23. package/dist/commonjs/api/onlineExperimentationWorkspaces/operations.js +58 -24
  24. package/dist/commonjs/api/onlineExperimentationWorkspaces/operations.js.map +1 -1
  25. package/dist/commonjs/api/operations/operations.js +8 -3
  26. package/dist/commonjs/api/operations/operations.js.map +1 -1
  27. package/dist/commonjs/classic/onlineExperimentationWorkspaces/index.js +3 -1
  28. package/dist/commonjs/classic/onlineExperimentationWorkspaces/index.js.map +1 -1
  29. package/dist/commonjs/classic/operations/index.js +3 -1
  30. package/dist/commonjs/classic/operations/index.js.map +1 -1
  31. package/dist/commonjs/onlineExperimentationClient.js +12 -3
  32. package/dist/commonjs/onlineExperimentationClient.js.map +1 -1
  33. package/dist/commonjs/restorePollerHelpers.js +11 -13
  34. package/dist/commonjs/restorePollerHelpers.js.map +1 -1
  35. package/dist/commonjs/static-helpers/pagingHelpers.js +31 -50
  36. package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -1
  37. package/dist/commonjs/static-helpers/pollingHelpers.js +14 -11
  38. package/dist/commonjs/static-helpers/pollingHelpers.js.map +1 -1
  39. package/dist/commonjs/static-helpers/urlTemplate.js +3 -3
  40. package/dist/commonjs/static-helpers/urlTemplate.js.map +1 -1
  41. package/dist/commonjs/tsdoc-metadata.json +11 -11
  42. package/dist/esm/api/onlineExperimentationContext.js +16 -10
  43. package/dist/esm/api/onlineExperimentationContext.js.map +1 -1
  44. package/dist/esm/api/onlineExperimentationWorkspaces/operations.js +58 -24
  45. package/dist/esm/api/onlineExperimentationWorkspaces/operations.js.map +1 -1
  46. package/dist/esm/api/operations/operations.js +8 -3
  47. package/dist/esm/api/operations/operations.js.map +1 -1
  48. package/dist/esm/classic/onlineExperimentationWorkspaces/index.js +3 -1
  49. package/dist/esm/classic/onlineExperimentationWorkspaces/index.js.map +1 -1
  50. package/dist/esm/classic/operations/index.js +3 -1
  51. package/dist/esm/classic/operations/index.js.map +1 -1
  52. package/dist/esm/onlineExperimentationClient.js +12 -3
  53. package/dist/esm/onlineExperimentationClient.js.map +1 -1
  54. package/dist/esm/restorePollerHelpers.js +11 -13
  55. package/dist/esm/restorePollerHelpers.js.map +1 -1
  56. package/dist/esm/static-helpers/pagingHelpers.js +31 -50
  57. package/dist/esm/static-helpers/pagingHelpers.js.map +1 -1
  58. package/dist/esm/static-helpers/pollingHelpers.js +14 -11
  59. package/dist/esm/static-helpers/pollingHelpers.js.map +1 -1
  60. package/dist/esm/static-helpers/urlTemplate.js +3 -3
  61. package/dist/esm/static-helpers/urlTemplate.js.map +1 -1
  62. package/dist/react-native/api/onlineExperimentationContext.js +16 -10
  63. package/dist/react-native/api/onlineExperimentationContext.js.map +1 -1
  64. package/dist/react-native/api/onlineExperimentationWorkspaces/operations.js +58 -24
  65. package/dist/react-native/api/onlineExperimentationWorkspaces/operations.js.map +1 -1
  66. package/dist/react-native/api/operations/operations.js +8 -3
  67. package/dist/react-native/api/operations/operations.js.map +1 -1
  68. package/dist/react-native/classic/onlineExperimentationWorkspaces/index.js +3 -1
  69. package/dist/react-native/classic/onlineExperimentationWorkspaces/index.js.map +1 -1
  70. package/dist/react-native/classic/operations/index.js +3 -1
  71. package/dist/react-native/classic/operations/index.js.map +1 -1
  72. package/dist/react-native/onlineExperimentationClient.js +12 -3
  73. package/dist/react-native/onlineExperimentationClient.js.map +1 -1
  74. package/dist/react-native/restorePollerHelpers.js +11 -13
  75. package/dist/react-native/restorePollerHelpers.js.map +1 -1
  76. package/dist/react-native/static-helpers/pagingHelpers.js +31 -50
  77. package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -1
  78. package/dist/react-native/static-helpers/pollingHelpers.js +14 -11
  79. package/dist/react-native/static-helpers/pollingHelpers.js.map +1 -1
  80. package/dist/react-native/static-helpers/urlTemplate.js +3 -3
  81. package/dist/react-native/static-helpers/urlTemplate.js.map +1 -1
  82. package/package.json +2 -2
  83. /package/review/{arm-onlineexperimentation-api.api.md → arm-onlineexperimentation-api-node.api.md} +0 -0
  84. /package/review/{arm-onlineexperimentation-api-onlineExperimentationWorkspaces.api.md → arm-onlineexperimentation-api-onlineExperimentationWorkspaces-node.api.md} +0 -0
  85. /package/review/{arm-onlineexperimentation-api-operations.api.md → arm-onlineexperimentation-api-operations-node.api.md} +0 -0
  86. /package/review/{arm-onlineexperimentation-models.api.md → arm-onlineexperimentation-models-node.api.md} +0 -0
  87. /package/review/{arm-onlineexperimentation.api.md → arm-onlineexperimentation-node.api.md} +0 -0
@@ -8,14 +8,19 @@ import { createRestError, operationOptionsToRequestParameters, } from "@azure-re
8
8
  export function _listBySubscriptionSend(context, options = {
9
9
  requestOptions: {},
10
10
  }) {
11
- var _a, _b;
12
11
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/providers/Microsoft.OnlineExperimentation/workspaces{?api%2Dversion}", {
13
12
  subscriptionId: context.subscriptionId,
14
13
  "api%2Dversion": context.apiVersion,
15
14
  }, {
16
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
15
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
16
+ });
17
+ return context.path(path).get({
18
+ ...operationOptionsToRequestParameters(options),
19
+ headers: {
20
+ accept: "application/json",
21
+ ...options.requestOptions?.headers,
22
+ },
17
23
  });
18
- return context.path(path).get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
19
24
  }
20
25
  export async function _listBySubscriptionDeserialize(result) {
21
26
  const expectedStatuses = ["200"];
@@ -35,15 +40,20 @@ export function listBySubscription(context, options = {
35
40
  export function _listByResourceGroupSend(context, resourceGroupName, options = {
36
41
  requestOptions: {},
37
42
  }) {
38
- var _a, _b;
39
43
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces{?api%2Dversion}", {
40
44
  subscriptionId: context.subscriptionId,
41
45
  resourceGroupName: resourceGroupName,
42
46
  "api%2Dversion": context.apiVersion,
43
47
  }, {
44
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
48
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
49
+ });
50
+ return context.path(path).get({
51
+ ...operationOptionsToRequestParameters(options),
52
+ headers: {
53
+ accept: "application/json",
54
+ ...options.requestOptions?.headers,
55
+ },
45
56
  });
46
- return context.path(path).get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
47
57
  }
48
58
  export async function _listByResourceGroupDeserialize(result) {
49
59
  const expectedStatuses = ["200"];
@@ -63,16 +73,21 @@ export function listByResourceGroup(context, resourceGroupName, options = {
63
73
  export function _$deleteSend(context, resourceGroupName, workspaceName, options = {
64
74
  requestOptions: {},
65
75
  }) {
66
- var _a, _b;
67
76
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}", {
68
77
  subscriptionId: context.subscriptionId,
69
78
  resourceGroupName: resourceGroupName,
70
79
  workspaceName: workspaceName,
71
80
  "api%2Dversion": context.apiVersion,
72
81
  }, {
73
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
82
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
83
+ });
84
+ return context.path(path).delete({
85
+ ...operationOptionsToRequestParameters(options),
86
+ headers: {
87
+ accept: "application/json",
88
+ ...options.requestOptions?.headers,
89
+ },
74
90
  });
75
- return context.path(path).delete(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
76
91
  }
77
92
  export async function _$deleteDeserialize(result) {
78
93
  const expectedStatuses = ["202", "204", "200"];
@@ -93,8 +108,8 @@ export function $delete(context, resourceGroupName, workspaceName, options = {
93
108
  requestOptions: {},
94
109
  }) {
95
110
  return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], {
96
- updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
97
- abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
111
+ updateIntervalInMs: options?.updateIntervalInMs,
112
+ abortSignal: options?.abortSignal,
98
113
  getInitialResponse: () => _$deleteSend(context, resourceGroupName, workspaceName, options),
99
114
  resourceLocationConfig: "location",
100
115
  });
@@ -102,16 +117,23 @@ export function $delete(context, resourceGroupName, workspaceName, options = {
102
117
  export function _updateSend(context, resourceGroupName, workspaceName, properties, options = {
103
118
  requestOptions: {},
104
119
  }) {
105
- var _a, _b;
106
120
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}", {
107
121
  subscriptionId: context.subscriptionId,
108
122
  resourceGroupName: resourceGroupName,
109
123
  workspaceName: workspaceName,
110
124
  "api%2Dversion": context.apiVersion,
111
125
  }, {
112
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
126
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
127
+ });
128
+ return context.path(path).patch({
129
+ ...operationOptionsToRequestParameters(options),
130
+ contentType: "application/json",
131
+ headers: {
132
+ accept: "application/json",
133
+ ...options.requestOptions?.headers,
134
+ },
135
+ body: onlineExperimentationWorkspacePatchSerializer(properties),
113
136
  });
114
- return context.path(path).patch(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers), body: onlineExperimentationWorkspacePatchSerializer(properties) }));
115
137
  }
116
138
  export async function _updateDeserialize(result) {
117
139
  const expectedStatuses = ["200", "202"];
@@ -127,8 +149,8 @@ export function update(context, resourceGroupName, workspaceName, properties, op
127
149
  requestOptions: {},
128
150
  }) {
129
151
  return getLongRunningPoller(context, _updateDeserialize, ["200", "202"], {
130
- updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
131
- abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
152
+ updateIntervalInMs: options?.updateIntervalInMs,
153
+ abortSignal: options?.abortSignal,
132
154
  getInitialResponse: () => _updateSend(context, resourceGroupName, workspaceName, properties, options),
133
155
  resourceLocationConfig: "location",
134
156
  });
@@ -136,16 +158,23 @@ export function update(context, resourceGroupName, workspaceName, properties, op
136
158
  export function _createOrUpdateSend(context, resourceGroupName, workspaceName, resource, options = {
137
159
  requestOptions: {},
138
160
  }) {
139
- var _a, _b;
140
161
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}", {
141
162
  subscriptionId: context.subscriptionId,
142
163
  resourceGroupName: resourceGroupName,
143
164
  workspaceName: workspaceName,
144
165
  "api%2Dversion": context.apiVersion,
145
166
  }, {
146
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
167
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
168
+ });
169
+ return context.path(path).put({
170
+ ...operationOptionsToRequestParameters(options),
171
+ contentType: "application/json",
172
+ headers: {
173
+ accept: "application/json",
174
+ ...options.requestOptions?.headers,
175
+ },
176
+ body: onlineExperimentationWorkspaceSerializer(resource),
147
177
  });
148
- return context.path(path).put(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers), body: onlineExperimentationWorkspaceSerializer(resource) }));
149
178
  }
150
179
  export async function _createOrUpdateDeserialize(result) {
151
180
  const expectedStatuses = ["200", "201"];
@@ -161,8 +190,8 @@ export function createOrUpdate(context, resourceGroupName, workspaceName, resour
161
190
  requestOptions: {},
162
191
  }) {
163
192
  return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201"], {
164
- updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
165
- abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
193
+ updateIntervalInMs: options?.updateIntervalInMs,
194
+ abortSignal: options?.abortSignal,
166
195
  getInitialResponse: () => _createOrUpdateSend(context, resourceGroupName, workspaceName, resource, options),
167
196
  resourceLocationConfig: "azure-async-operation",
168
197
  });
@@ -170,16 +199,21 @@ export function createOrUpdate(context, resourceGroupName, workspaceName, resour
170
199
  export function _getSend(context, resourceGroupName, workspaceName, options = {
171
200
  requestOptions: {},
172
201
  }) {
173
- var _a, _b;
174
202
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}", {
175
203
  subscriptionId: context.subscriptionId,
176
204
  resourceGroupName: resourceGroupName,
177
205
  workspaceName: workspaceName,
178
206
  "api%2Dversion": context.apiVersion,
179
207
  }, {
180
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
208
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
209
+ });
210
+ return context.path(path).get({
211
+ ...operationOptionsToRequestParameters(options),
212
+ headers: {
213
+ accept: "application/json",
214
+ ...options.requestOptions?.headers,
215
+ },
181
216
  });
182
- return context.path(path).get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
183
217
  }
184
218
  export async function _getDeserialize(result) {
185
219
  const expectedStatuses = ["200"];
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/onlineExperimentationWorkspaces/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,yBAAyB,EAEzB,wCAAwC,EACxC,0CAA0C,EAE1C,6CAA6C,EAE7C,qDAAqD,GACtD,MAAM,wBAAwB,CAAC;AAShC,OAAO,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ACvB,OAAe,EACf,iBAAyB,EACzB,aAAqB,EACrB,UAA4D;IAC1D,cAAc,EAAE,EAAE;CACnB;IAED,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;IAClF,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OnlineExperimentationContext as Client } from \"../index.js\";\nimport {\n errorResponseDeserializer,\n OnlineExperimentationWorkspace,\n onlineExperimentationWorkspaceSerializer,\n onlineExperimentationWorkspaceDeserializer,\n OnlineExperimentationWorkspacePatch,\n onlineExperimentationWorkspacePatchSerializer,\n _OnlineExperimentationWorkspaceListResult,\n _onlineExperimentationWorkspaceListResultDeserializer,\n} from \"../../models/models.js\";\nimport {\n OnlineExperimentationWorkspacesListBySubscriptionOptionalParams,\n OnlineExperimentationWorkspacesListByResourceGroupOptionalParams,\n OnlineExperimentationWorkspacesDeleteOptionalParams,\n OnlineExperimentationWorkspacesUpdateOptionalParams,\n OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams,\n OnlineExperimentationWorkspacesGetOptionalParams,\n} from \"./options.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.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 _listBySubscriptionSend(\n context: Client,\n options: OnlineExperimentationWorkspacesListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.OnlineExperimentation/workspaces{?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<_OnlineExperimentationWorkspaceListResult> {\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 _onlineExperimentationWorkspaceListResultDeserializer(result.body);\n}\n\n/** Gets all online experimentation workspaces in the specified subscription. */\nexport function listBySubscription(\n context: Client,\n options: OnlineExperimentationWorkspacesListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<OnlineExperimentationWorkspace> {\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: OnlineExperimentationWorkspacesListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces{?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<_OnlineExperimentationWorkspaceListResult> {\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 _onlineExperimentationWorkspaceListResultDeserializer(result.body);\n}\n\n/** Gets all online experimentation workspaces in a resource group. */\nexport function listByResourceGroup(\n context: Client,\n resourceGroupName: string,\n options: OnlineExperimentationWorkspacesListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<OnlineExperimentationWorkspace> {\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 workspaceName: string,\n options: OnlineExperimentationWorkspacesDeleteOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n workspaceName: workspaceName,\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/** Deletes an online experimentation workspace. */\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 workspaceName: string,\n options: OnlineExperimentationWorkspacesDeleteOptionalParams = {\n requestOptions: {},\n },\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, workspaceName, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<void>, void>;\n}\n\nexport function _updateSend(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n properties: OnlineExperimentationWorkspacePatch,\n options: OnlineExperimentationWorkspacesUpdateOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n workspaceName: workspaceName,\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: onlineExperimentationWorkspacePatchSerializer(properties),\n });\n}\n\nexport async function _updateDeserialize(\n result: PathUncheckedResponse,\n): Promise<OnlineExperimentationWorkspace> {\n const expectedStatuses = [\"200\", \"202\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return onlineExperimentationWorkspaceDeserializer(result.body);\n}\n\n/** Patch an online experimentation workspace. */\nexport function update(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n properties: OnlineExperimentationWorkspacePatch,\n options: OnlineExperimentationWorkspacesUpdateOptionalParams = {\n requestOptions: {},\n },\n): PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace> {\n return getLongRunningPoller(context, _updateDeserialize, [\"200\", \"202\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _updateSend(context, resourceGroupName, workspaceName, properties, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace>;\n}\n\nexport function _createOrUpdateSend(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n resource: OnlineExperimentationWorkspace,\n options: OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n workspaceName: workspaceName,\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: onlineExperimentationWorkspaceSerializer(resource),\n });\n}\n\nexport async function _createOrUpdateDeserialize(\n result: PathUncheckedResponse,\n): Promise<OnlineExperimentationWorkspace> {\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 onlineExperimentationWorkspaceDeserializer(result.body);\n}\n\n/** Create an online experimentation workspace, or update an existing workspace. */\nexport function createOrUpdate(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n resource: OnlineExperimentationWorkspace,\n options: OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams = {\n requestOptions: {},\n },\n): PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace> {\n return getLongRunningPoller(context, _createOrUpdateDeserialize, [\"200\", \"201\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _createOrUpdateSend(context, resourceGroupName, workspaceName, resource, options),\n resourceLocationConfig: \"azure-async-operation\",\n }) as PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace>;\n}\n\nexport function _getSend(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n options: OnlineExperimentationWorkspacesGetOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n workspaceName: workspaceName,\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<OnlineExperimentationWorkspace> {\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 onlineExperimentationWorkspaceDeserializer(result.body);\n}\n\n/** Gets an online experimentation workspace. */\nexport async function get(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n options: OnlineExperimentationWorkspacesGetOptionalParams = {\n requestOptions: {},\n },\n): Promise<OnlineExperimentationWorkspace> {\n const result = await _getSend(context, resourceGroupName, workspaceName, options);\n return _getDeserialize(result);\n}\n"]}
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/onlineExperimentationWorkspaces/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,yBAAyB,EAEzB,wCAAwC,EAC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,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;IAClF,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OnlineExperimentationContext as Client } from \"../index.js\";\nimport {\n errorResponseDeserializer,\n OnlineExperimentationWorkspace,\n onlineExperimentationWorkspaceSerializer,\n onlineExperimentationWorkspaceDeserializer,\n OnlineExperimentationWorkspacePatch,\n onlineExperimentationWorkspacePatchSerializer,\n _OnlineExperimentationWorkspaceListResult,\n _onlineExperimentationWorkspaceListResultDeserializer,\n} from \"../../models/models.js\";\nimport {\n OnlineExperimentationWorkspacesListBySubscriptionOptionalParams,\n OnlineExperimentationWorkspacesListByResourceGroupOptionalParams,\n OnlineExperimentationWorkspacesDeleteOptionalParams,\n OnlineExperimentationWorkspacesUpdateOptionalParams,\n OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams,\n OnlineExperimentationWorkspacesGetOptionalParams,\n} from \"./options.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.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 _listBySubscriptionSend(\n context: Client,\n options: OnlineExperimentationWorkspacesListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.OnlineExperimentation/workspaces{?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<_OnlineExperimentationWorkspaceListResult> {\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 _onlineExperimentationWorkspaceListResultDeserializer(result.body);\n}\n\n/** Gets all online experimentation workspaces in the specified subscription. */\nexport function listBySubscription(\n context: Client,\n options: OnlineExperimentationWorkspacesListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<OnlineExperimentationWorkspace> {\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: OnlineExperimentationWorkspacesListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces{?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<_OnlineExperimentationWorkspaceListResult> {\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 _onlineExperimentationWorkspaceListResultDeserializer(result.body);\n}\n\n/** Gets all online experimentation workspaces in a resource group. */\nexport function listByResourceGroup(\n context: Client,\n resourceGroupName: string,\n options: OnlineExperimentationWorkspacesListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<OnlineExperimentationWorkspace> {\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 workspaceName: string,\n options: OnlineExperimentationWorkspacesDeleteOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n workspaceName: workspaceName,\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/** Deletes an online experimentation workspace. */\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 workspaceName: string,\n options: OnlineExperimentationWorkspacesDeleteOptionalParams = {\n requestOptions: {},\n },\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, workspaceName, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<void>, void>;\n}\n\nexport function _updateSend(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n properties: OnlineExperimentationWorkspacePatch,\n options: OnlineExperimentationWorkspacesUpdateOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n workspaceName: workspaceName,\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: onlineExperimentationWorkspacePatchSerializer(properties),\n });\n}\n\nexport async function _updateDeserialize(\n result: PathUncheckedResponse,\n): Promise<OnlineExperimentationWorkspace> {\n const expectedStatuses = [\"200\", \"202\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return onlineExperimentationWorkspaceDeserializer(result.body);\n}\n\n/** Patch an online experimentation workspace. */\nexport function update(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n properties: OnlineExperimentationWorkspacePatch,\n options: OnlineExperimentationWorkspacesUpdateOptionalParams = {\n requestOptions: {},\n },\n): PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace> {\n return getLongRunningPoller(context, _updateDeserialize, [\"200\", \"202\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _updateSend(context, resourceGroupName, workspaceName, properties, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace>;\n}\n\nexport function _createOrUpdateSend(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n resource: OnlineExperimentationWorkspace,\n options: OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n workspaceName: workspaceName,\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: onlineExperimentationWorkspaceSerializer(resource),\n });\n}\n\nexport async function _createOrUpdateDeserialize(\n result: PathUncheckedResponse,\n): Promise<OnlineExperimentationWorkspace> {\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 onlineExperimentationWorkspaceDeserializer(result.body);\n}\n\n/** Create an online experimentation workspace, or update an existing workspace. */\nexport function createOrUpdate(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n resource: OnlineExperimentationWorkspace,\n options: OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams = {\n requestOptions: {},\n },\n): PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace> {\n return getLongRunningPoller(context, _createOrUpdateDeserialize, [\"200\", \"201\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _createOrUpdateSend(context, resourceGroupName, workspaceName, resource, options),\n resourceLocationConfig: \"azure-async-operation\",\n }) as PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace>;\n}\n\nexport function _getSend(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n options: OnlineExperimentationWorkspacesGetOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n workspaceName: workspaceName,\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<OnlineExperimentationWorkspace> {\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 onlineExperimentationWorkspaceDeserializer(result.body);\n}\n\n/** Gets an online experimentation workspace. */\nexport async function get(\n context: Client,\n resourceGroupName: string,\n workspaceName: string,\n options: OnlineExperimentationWorkspacesGetOptionalParams = {\n requestOptions: {},\n },\n): Promise<OnlineExperimentationWorkspace> {\n const result = await _getSend(context, resourceGroupName, workspaceName, options);\n return _getDeserialize(result);\n}\n"]}
@@ -5,13 +5,18 @@ import { buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"
5
5
  import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
6
6
  import { createRestError, operationOptionsToRequestParameters, } from "@azure-rest/core-client";
7
7
  export function _listSend(context, options = { requestOptions: {} }) {
8
- var _a, _b;
9
8
  const path = expandUrlTemplate("/providers/Microsoft.OnlineExperimentation/operations{?api%2Dversion}", {
10
9
  "api%2Dversion": context.apiVersion,
11
10
  }, {
12
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
11
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
12
+ });
13
+ return context.path(path).get({
14
+ ...operationOptionsToRequestParameters(options),
15
+ headers: {
16
+ accept: "application/json",
17
+ ...options.requestOptions?.headers,
18
+ },
13
19
  });
14
- return context.path(path).get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
15
20
  }
16
21
  export async function _listDeserialize(result) {
17
22
  const expectedStatuses = ["200"];
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/operations/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAEL,gCAAgC,EAEhC,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CAAC;AAEjC,MAAM,UAAU,SAAS,CACvB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;;IAE9D,MAAM,IAAI,GAAG,iBAAiB,CAC5B,uEAAuE,EACvE;QACE,eAAe,EAAE,OAAO,CAAC,UAAU;KACpC,EACD;QACE,aAAa,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,eAAe;KACxD,CACF,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,iCACxB,mCAAmC,CAAC,OAAO,CAAC,KAC/C,OAAO,kBACL,MAAM,EAAE,kBAAkB,IACvB,MAAA,OAAO,CAAC,cAAc,0CAAE,OAAO,KAEpC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,gCAAgC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACvD,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,IAAI,CAClB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,OAAO,uBAAuB,CAC5B,OAAO,EACP,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,EACjC,gBAAgB,EAChB,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 { OnlineExperimentationContext as Client } from \"../index.js\";\nimport {\n _OperationListResult,\n _operationListResultDeserializer,\n Operation,\n errorResponseDeserializer,\n} from \"../../models/models.js\";\nimport { OperationsListOptionalParams } from \"./options.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\n\nexport function _listSend(\n context: Client,\n options: OperationsListOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/providers/Microsoft.OnlineExperimentation/operations{?api%2Dversion}\",\n {\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 _listDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OperationListResult> {\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 _operationListResultDeserializer(result.body);\n}\n\n/** List the operations for the provider */\nexport function list(\n context: Client,\n options: OperationsListOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<Operation> {\n return buildPagedAsyncIterator(\n context,\n () => _listSend(context, options),\n _listDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n"]}
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/operations/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAEL,gCAAgC,EAEhC,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CAAC;AAEjC,MAAM,UAAU,SAAS,CACvB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,MAAM,IAAI,GAAG,iBAAiB,CAC5B,uEAAuE,EACvE;QACE,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,mCAAmC,CAAC,OAAO,CAAC;QAC/C,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;YAC1B,GAAG,OAAO,CAAC,cAAc,EAAE,OAAO;SACnC;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,gCAAgC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACvD,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,IAAI,CAClB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,OAAO,uBAAuB,CAC5B,OAAO,EACP,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,EACjC,gBAAgB,EAChB,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 { OnlineExperimentationContext as Client } from \"../index.js\";\nimport {\n _OperationListResult,\n _operationListResultDeserializer,\n Operation,\n errorResponseDeserializer,\n} from \"../../models/models.js\";\nimport { OperationsListOptionalParams } from \"./options.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\n\nexport function _listSend(\n context: Client,\n options: OperationsListOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/providers/Microsoft.OnlineExperimentation/operations{?api%2Dversion}\",\n {\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 _listDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OperationListResult> {\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 _operationListResultDeserializer(result.body);\n}\n\n/** List the operations for the provider */\nexport function list(\n context: Client,\n options: OperationsListOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<Operation> {\n return buildPagedAsyncIterator(\n context,\n () => _listSend(context, options),\n _listDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n"]}
@@ -12,6 +12,8 @@ function _getOnlineExperimentationWorkspaces(context) {
12
12
  };
13
13
  }
14
14
  export function _getOnlineExperimentationWorkspacesOperations(context) {
15
- return Object.assign({}, _getOnlineExperimentationWorkspaces(context));
15
+ return {
16
+ ..._getOnlineExperimentationWorkspaces(context),
17
+ };
16
18
  }
17
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/onlineExperimentationWorkspaces/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAelC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,cAAc,EACd,GAAG,GACJ,MAAM,yDAAyD,CAAC;AAgDjE,SAAS,mCAAmC,CAAC,OAAqC;IAChF,OAAO;QACL,kBAAkB,EAAE,CAClB,OAAyE,EACzE,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC;QACzC,mBAAmB,EAAE,CACnB,iBAAyB,EACzB,OAA0E,EAC1E,EAAE,CAAC,mBAAmB,CAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,CAAC;QAC7D,MAAM,EAAE,CACN,iBAAyB,EACzB,aAAqB,EACrB,OAA6D,EAC7D,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC;QAChE,MAAM,EAAE,CACN,iBAAyB,EACzB,aAAqB,EACrB,UAA+C,EAC/C,OAA6D,EAC7D,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,CAAC;QAC3E,cAAc,EAAE,CACd,iBAAyB,EACzB,aAAqB,EACrB,QAAwC,EACxC,OAAqE,EACrE,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,CAAC;QACjF,GAAG,EAAE,CACH,iBAAyB,EACzB,aAAqB,EACrB,OAA0D,EAC1D,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC;KAC7D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6CAA6C,CAC3D,OAAqC;IAErC,yBACK,mCAAmC,CAAC,OAAO,CAAC,EAC/C;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OnlineExperimentationContext } from \"../../api/onlineExperimentationContext.js\";\nimport {\n OnlineExperimentationWorkspace,\n OnlineExperimentationWorkspacePatch,\n} from \"../../models/models.js\";\nimport {\n OnlineExperimentationWorkspacesListBySubscriptionOptionalParams,\n OnlineExperimentationWorkspacesListByResourceGroupOptionalParams,\n OnlineExperimentationWorkspacesDeleteOptionalParams,\n OnlineExperimentationWorkspacesUpdateOptionalParams,\n OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams,\n OnlineExperimentationWorkspacesGetOptionalParams,\n} from \"../../api/onlineExperimentationWorkspaces/options.js\";\nimport {\n listBySubscription,\n listByResourceGroup,\n $delete,\n update,\n createOrUpdate,\n get,\n} from \"../../api/onlineExperimentationWorkspaces/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\n\n/** Interface representing a OnlineExperimentationWorkspaces operations. */\nexport interface OnlineExperimentationWorkspacesOperations {\n /** Gets all online experimentation workspaces in the specified subscription. */\n listBySubscription: (\n options?: OnlineExperimentationWorkspacesListBySubscriptionOptionalParams,\n ) => PagedAsyncIterableIterator<OnlineExperimentationWorkspace>;\n /** Gets all online experimentation workspaces in a resource group. */\n listByResourceGroup: (\n resourceGroupName: string,\n options?: OnlineExperimentationWorkspacesListByResourceGroupOptionalParams,\n ) => PagedAsyncIterableIterator<OnlineExperimentationWorkspace>;\n /** Deletes an online experimentation workspace. */\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 workspaceName: string,\n options?: OnlineExperimentationWorkspacesDeleteOptionalParams,\n ) => PollerLike<OperationState<void>, void>;\n /** Patch an online experimentation workspace. */\n update: (\n resourceGroupName: string,\n workspaceName: string,\n properties: OnlineExperimentationWorkspacePatch,\n options?: OnlineExperimentationWorkspacesUpdateOptionalParams,\n ) => PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace>;\n /** Create an online experimentation workspace, or update an existing workspace. */\n createOrUpdate: (\n resourceGroupName: string,\n workspaceName: string,\n resource: OnlineExperimentationWorkspace,\n options?: OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams,\n ) => PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace>;\n /** Gets an online experimentation workspace. */\n get: (\n resourceGroupName: string,\n workspaceName: string,\n options?: OnlineExperimentationWorkspacesGetOptionalParams,\n ) => Promise<OnlineExperimentationWorkspace>;\n}\n\nfunction _getOnlineExperimentationWorkspaces(context: OnlineExperimentationContext) {\n return {\n listBySubscription: (\n options?: OnlineExperimentationWorkspacesListBySubscriptionOptionalParams,\n ) => listBySubscription(context, options),\n listByResourceGroup: (\n resourceGroupName: string,\n options?: OnlineExperimentationWorkspacesListByResourceGroupOptionalParams,\n ) => listByResourceGroup(context, resourceGroupName, options),\n delete: (\n resourceGroupName: string,\n workspaceName: string,\n options?: OnlineExperimentationWorkspacesDeleteOptionalParams,\n ) => $delete(context, resourceGroupName, workspaceName, options),\n update: (\n resourceGroupName: string,\n workspaceName: string,\n properties: OnlineExperimentationWorkspacePatch,\n options?: OnlineExperimentationWorkspacesUpdateOptionalParams,\n ) => update(context, resourceGroupName, workspaceName, properties, options),\n createOrUpdate: (\n resourceGroupName: string,\n workspaceName: string,\n resource: OnlineExperimentationWorkspace,\n options?: OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams,\n ) => createOrUpdate(context, resourceGroupName, workspaceName, resource, options),\n get: (\n resourceGroupName: string,\n workspaceName: string,\n options?: OnlineExperimentationWorkspacesGetOptionalParams,\n ) => get(context, resourceGroupName, workspaceName, options),\n };\n}\n\nexport function _getOnlineExperimentationWorkspacesOperations(\n context: OnlineExperimentationContext,\n): OnlineExperimentationWorkspacesOperations {\n return {\n ..._getOnlineExperimentationWorkspaces(context),\n };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/onlineExperimentationWorkspaces/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAelC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,cAAc,EACd,GAAG,GACJ,MAAM,yDAAyD,CAAC;AAgDjE,SAAS,mCAAmC,CAAC,OAAqC;IAChF,OAAO;QACL,kBAAkB,EAAE,CAClB,OAAyE,EACzE,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC;QACzC,mBAAmB,EAAE,CACnB,iBAAyB,EACzB,OAA0E,EAC1E,EAAE,CAAC,mBAAmB,CAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,CAAC;QAC7D,MAAM,EAAE,CACN,iBAAyB,EACzB,aAAqB,EACrB,OAA6D,EAC7D,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC;QAChE,MAAM,EAAE,CACN,iBAAyB,EACzB,aAAqB,EACrB,UAA+C,EAC/C,OAA6D,EAC7D,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,CAAC;QAC3E,cAAc,EAAE,CACd,iBAAyB,EACzB,aAAqB,EACrB,QAAwC,EACxC,OAAqE,EACrE,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,CAAC;QACjF,GAAG,EAAE,CACH,iBAAyB,EACzB,aAAqB,EACrB,OAA0D,EAC1D,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC;KAC7D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6CAA6C,CAC3D,OAAqC;IAErC,OAAO;QACL,GAAG,mCAAmC,CAAC,OAAO,CAAC;KAChD,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OnlineExperimentationContext } from \"../../api/onlineExperimentationContext.js\";\nimport {\n OnlineExperimentationWorkspace,\n OnlineExperimentationWorkspacePatch,\n} from \"../../models/models.js\";\nimport {\n OnlineExperimentationWorkspacesListBySubscriptionOptionalParams,\n OnlineExperimentationWorkspacesListByResourceGroupOptionalParams,\n OnlineExperimentationWorkspacesDeleteOptionalParams,\n OnlineExperimentationWorkspacesUpdateOptionalParams,\n OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams,\n OnlineExperimentationWorkspacesGetOptionalParams,\n} from \"../../api/onlineExperimentationWorkspaces/options.js\";\nimport {\n listBySubscription,\n listByResourceGroup,\n $delete,\n update,\n createOrUpdate,\n get,\n} from \"../../api/onlineExperimentationWorkspaces/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\n\n/** Interface representing a OnlineExperimentationWorkspaces operations. */\nexport interface OnlineExperimentationWorkspacesOperations {\n /** Gets all online experimentation workspaces in the specified subscription. */\n listBySubscription: (\n options?: OnlineExperimentationWorkspacesListBySubscriptionOptionalParams,\n ) => PagedAsyncIterableIterator<OnlineExperimentationWorkspace>;\n /** Gets all online experimentation workspaces in a resource group. */\n listByResourceGroup: (\n resourceGroupName: string,\n options?: OnlineExperimentationWorkspacesListByResourceGroupOptionalParams,\n ) => PagedAsyncIterableIterator<OnlineExperimentationWorkspace>;\n /** Deletes an online experimentation workspace. */\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 workspaceName: string,\n options?: OnlineExperimentationWorkspacesDeleteOptionalParams,\n ) => PollerLike<OperationState<void>, void>;\n /** Patch an online experimentation workspace. */\n update: (\n resourceGroupName: string,\n workspaceName: string,\n properties: OnlineExperimentationWorkspacePatch,\n options?: OnlineExperimentationWorkspacesUpdateOptionalParams,\n ) => PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace>;\n /** Create an online experimentation workspace, or update an existing workspace. */\n createOrUpdate: (\n resourceGroupName: string,\n workspaceName: string,\n resource: OnlineExperimentationWorkspace,\n options?: OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams,\n ) => PollerLike<OperationState<OnlineExperimentationWorkspace>, OnlineExperimentationWorkspace>;\n /** Gets an online experimentation workspace. */\n get: (\n resourceGroupName: string,\n workspaceName: string,\n options?: OnlineExperimentationWorkspacesGetOptionalParams,\n ) => Promise<OnlineExperimentationWorkspace>;\n}\n\nfunction _getOnlineExperimentationWorkspaces(context: OnlineExperimentationContext) {\n return {\n listBySubscription: (\n options?: OnlineExperimentationWorkspacesListBySubscriptionOptionalParams,\n ) => listBySubscription(context, options),\n listByResourceGroup: (\n resourceGroupName: string,\n options?: OnlineExperimentationWorkspacesListByResourceGroupOptionalParams,\n ) => listByResourceGroup(context, resourceGroupName, options),\n delete: (\n resourceGroupName: string,\n workspaceName: string,\n options?: OnlineExperimentationWorkspacesDeleteOptionalParams,\n ) => $delete(context, resourceGroupName, workspaceName, options),\n update: (\n resourceGroupName: string,\n workspaceName: string,\n properties: OnlineExperimentationWorkspacePatch,\n options?: OnlineExperimentationWorkspacesUpdateOptionalParams,\n ) => update(context, resourceGroupName, workspaceName, properties, options),\n createOrUpdate: (\n resourceGroupName: string,\n workspaceName: string,\n resource: OnlineExperimentationWorkspace,\n options?: OnlineExperimentationWorkspacesCreateOrUpdateOptionalParams,\n ) => createOrUpdate(context, resourceGroupName, workspaceName, resource, options),\n get: (\n resourceGroupName: string,\n workspaceName: string,\n options?: OnlineExperimentationWorkspacesGetOptionalParams,\n ) => get(context, resourceGroupName, workspaceName, options),\n };\n}\n\nexport function _getOnlineExperimentationWorkspacesOperations(\n context: OnlineExperimentationContext,\n): OnlineExperimentationWorkspacesOperations {\n return {\n ..._getOnlineExperimentationWorkspaces(context),\n };\n}\n"]}
@@ -7,6 +7,8 @@ function _getOperations(context) {
7
7
  };
8
8
  }
9
9
  export function _getOperationsOperations(context) {
10
- return Object.assign({}, _getOperations(context));
10
+ return {
11
+ ..._getOperations(context),
12
+ };
11
13
  }
12
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/operations/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAS1D,SAAS,cAAc,CAAC,OAAqC;IAC3D,OAAO;QACL,IAAI,EAAE,CAAC,OAAsC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;KACzE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAAqC;IAErC,yBACK,cAAc,CAAC,OAAO,CAAC,EAC1B;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OnlineExperimentationContext } from \"../../api/onlineExperimentationContext.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: OnlineExperimentationContext) {\n return {\n list: (options?: OperationsListOptionalParams) => list(context, options),\n };\n}\n\nexport function _getOperationsOperations(\n context: OnlineExperimentationContext,\n): OperationsOperations {\n return {\n ..._getOperations(context),\n };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/operations/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAS1D,SAAS,cAAc,CAAC,OAAqC;IAC3D,OAAO;QACL,IAAI,EAAE,CAAC,OAAsC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;KACzE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAAqC;IAErC,OAAO;QACL,GAAG,cAAc,CAAC,OAAO,CAAC;KAC3B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OnlineExperimentationContext } from \"../../api/onlineExperimentationContext.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: OnlineExperimentationContext) {\n return {\n list: (options?: OperationsListOptionalParams) => list(context, options),\n };\n}\n\nexport function _getOperationsOperations(\n context: OnlineExperimentationContext,\n): OperationsOperations {\n return {\n ..._getOperations(context),\n };\n}\n"]}
@@ -4,17 +4,26 @@ import { createOnlineExperimentation, } from "./api/index.js";
4
4
  import { _getOnlineExperimentationWorkspacesOperations, } from "./classic/onlineExperimentationWorkspaces/index.js";
5
5
  import { _getOperationsOperations } from "./classic/operations/index.js";
6
6
  export class OnlineExperimentationClient {
7
+ _client;
8
+ /** The pipeline used by this client to make requests */
9
+ pipeline;
7
10
  /** Microsoft.OnlineExperimentation Resource Provider management API. */
8
11
  constructor(credential, subscriptionId, options = {}) {
9
- var _a;
10
- const prefixFromOptions = (_a = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _a === void 0 ? void 0 : _a.userAgentPrefix;
12
+ const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
11
13
  const userAgentPrefix = prefixFromOptions
12
14
  ? `${prefixFromOptions} azsdk-js-client`
13
15
  : `azsdk-js-client`;
14
- this._client = createOnlineExperimentation(credential, subscriptionId, Object.assign(Object.assign({}, options), { userAgentOptions: { userAgentPrefix } }));
16
+ this._client = createOnlineExperimentation(credential, subscriptionId, {
17
+ ...options,
18
+ userAgentOptions: { userAgentPrefix },
19
+ });
15
20
  this.pipeline = this._client.pipeline;
16
21
  this.onlineExperimentationWorkspaces = _getOnlineExperimentationWorkspacesOperations(this._client);
17
22
  this.operations = _getOperationsOperations(this._client);
18
23
  }
24
+ /** The operation groups for onlineExperimentationWorkspaces */
25
+ onlineExperimentationWorkspaces;
26
+ /** The operation groups for operations */
27
+ operations;
19
28
  }
20
29
  //# sourceMappingURL=onlineExperimentationClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"onlineExperimentationClient.js","sourceRoot":"","sources":["../../src/onlineExperimentationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,2BAA2B,GAG5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,6CAA6C,GAC9C,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAwB,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAM/F,MAAM,OAAO,2BAA2B;IAKtC,wEAAwE;IACxE,YACE,UAA2B,EAC3B,cAAsB,EACtB,UAAqD,EAAE;;QAEvD,MAAM,iBAAiB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,0CAAE,eAAe,CAAC;QACrE,MAAM,eAAe,GAAG,iBAAiB;YACvC,CAAC,CAAC,GAAG,iBAAiB,kBAAkB;YACxC,CAAC,CAAC,iBAAiB,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,2BAA2B,CAAC,UAAU,EAAE,cAAc,kCAChE,OAAO,KACV,gBAAgB,EAAE,EAAE,eAAe,EAAE,IACrC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;QACtC,IAAI,CAAC,+BAA+B,GAAG,6CAA6C,CAClF,IAAI,CAAC,OAAO,CACb,CAAC;QACF,IAAI,CAAC,UAAU,GAAG,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;CAMF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n createOnlineExperimentation,\n OnlineExperimentationContext,\n OnlineExperimentationClientOptionalParams,\n} from \"./api/index.js\";\nimport {\n OnlineExperimentationWorkspacesOperations,\n _getOnlineExperimentationWorkspacesOperations,\n} from \"./classic/onlineExperimentationWorkspaces/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 { OnlineExperimentationClientOptionalParams } from \"./api/onlineExperimentationContext.js\";\n\nexport class OnlineExperimentationClient {\n private _client: OnlineExperimentationContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n /** Microsoft.OnlineExperimentation Resource Provider management API. */\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options: OnlineExperimentationClientOptionalParams = {},\n ) {\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createOnlineExperimentation(credential, subscriptionId, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.onlineExperimentationWorkspaces = _getOnlineExperimentationWorkspacesOperations(\n this._client,\n );\n this.operations = _getOperationsOperations(this._client);\n }\n\n /** The operation groups for onlineExperimentationWorkspaces */\n public readonly onlineExperimentationWorkspaces: OnlineExperimentationWorkspacesOperations;\n /** The operation groups for operations */\n public readonly operations: OperationsOperations;\n}\n"]}
1
+ {"version":3,"file":"onlineExperimentationClient.js","sourceRoot":"","sources":["../../src/onlineExperimentationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,2BAA2B,GAG5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,6CAA6C,GAC9C,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAwB,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAM/F,MAAM,OAAO,2BAA2B;IAC9B,OAAO,CAA+B;IAC9C,wDAAwD;IACxC,QAAQ,CAAW;IAEnC,wEAAwE;IACxE,YACE,UAA2B,EAC3B,cAAsB,EACtB,UAAqD,EAAE;QAEvD,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,2BAA2B,CAAC,UAAU,EAAE,cAAc,EAAE;YACrE,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,+BAA+B,GAAG,6CAA6C,CAClF,IAAI,CAAC,OAAO,CACb,CAAC;QACF,IAAI,CAAC,UAAU,GAAG,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,+DAA+D;IAC/C,+BAA+B,CAA4C;IAC3F,0CAA0C;IAC1B,UAAU,CAAuB;CAClD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n createOnlineExperimentation,\n OnlineExperimentationContext,\n OnlineExperimentationClientOptionalParams,\n} from \"./api/index.js\";\nimport {\n OnlineExperimentationWorkspacesOperations,\n _getOnlineExperimentationWorkspacesOperations,\n} from \"./classic/onlineExperimentationWorkspaces/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 { OnlineExperimentationClientOptionalParams } from \"./api/onlineExperimentationContext.js\";\n\nexport class OnlineExperimentationClient {\n private _client: OnlineExperimentationContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n /** Microsoft.OnlineExperimentation Resource Provider management API. */\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options: OnlineExperimentationClientOptionalParams = {},\n ) {\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createOnlineExperimentation(credential, subscriptionId, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.onlineExperimentationWorkspaces = _getOnlineExperimentationWorkspacesOperations(\n this._client,\n );\n this.operations = _getOperationsOperations(this._client);\n }\n\n /** The operation groups for onlineExperimentationWorkspaces */\n public readonly onlineExperimentationWorkspaces: OnlineExperimentationWorkspacesOperations;\n /** The operation groups for operations */\n public readonly operations: OperationsOperations;\n}\n"]}
@@ -9,21 +9,20 @@ import { deserializeState, } from "@azure/core-lro";
9
9
  * needs to be constructed after the original one is not in scope.
10
10
  */
11
11
  export function restorePoller(client, serializedState, sourceOperation, options) {
12
- var _a, _b, _c;
13
12
  const pollerConfig = deserializeState(serializedState).config;
14
13
  const { initialRequestUrl, requestMethod, metadata } = pollerConfig;
15
14
  if (!initialRequestUrl || !requestMethod) {
16
- throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation === null || sourceOperation === void 0 ? void 0 : sourceOperation.name}`);
15
+ throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`);
17
16
  }
18
- const resourceLocationConfig = metadata === null || metadata === void 0 ? void 0 : metadata["resourceLocationConfig"];
19
- const { deserializer, expectedStatuses = [] } = (_a = getDeserializationHelper(initialRequestUrl, requestMethod)) !== null && _a !== void 0 ? _a : {};
20
- const deserializeHelper = (_b = options === null || options === void 0 ? void 0 : options.processResponseBody) !== null && _b !== void 0 ? _b : deserializer;
17
+ const resourceLocationConfig = metadata?.["resourceLocationConfig"];
18
+ const { deserializer, expectedStatuses = [] } = getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};
19
+ const deserializeHelper = options?.processResponseBody ?? deserializer;
21
20
  if (!deserializeHelper) {
22
- throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation === null || sourceOperation === void 0 ? void 0 : sourceOperation.name}.`);
21
+ throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`);
23
22
  }
24
- return getLongRunningPoller((_c = client["_client"]) !== null && _c !== void 0 ? _c : client, deserializeHelper, expectedStatuses, {
25
- updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
26
- abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
23
+ return getLongRunningPoller(client["_client"] ?? client, deserializeHelper, expectedStatuses, {
24
+ updateIntervalInMs: options?.updateIntervalInMs,
25
+ abortSignal: options?.abortSignal,
27
26
  resourceLocationConfig,
28
27
  restoreFrom: serializedState,
29
28
  initialRequestUrl,
@@ -41,7 +40,6 @@ const deserializeMap = {
41
40
  },
42
41
  };
43
42
  function getDeserializationHelper(urlStr, method) {
44
- var _a, _b, _c, _d;
45
43
  const path = new URL(urlStr).pathname;
46
44
  const pathParts = path.split("/");
47
45
  // Traverse list to match the longest candidate
@@ -61,13 +59,13 @@ function getDeserializationHelper(urlStr, method) {
61
59
  // track if we have found a match to return the values found.
62
60
  let found = true;
63
61
  for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
64
- if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
65
- const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
62
+ if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) {
63
+ const start = candidateParts[i].indexOf("}") + 1, end = candidateParts[i]?.length;
66
64
  // If the current part of the candidate is a "template" part
67
65
  // Try to use the suffix of pattern to match the path
68
66
  // {guid} ==> $
69
67
  // {guid}:export ==> :export$
70
- const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
68
+ const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(pathParts[j] || "");
71
69
  if (!isMatched) {
72
70
  found = false;
73
71
  break;
@@ -1 +1 @@
1
- {"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAG1E,OAAO,EAGL,gBAAgB,GAEjB,MAAM,iBAAiB,CAAC;AAgBzB;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,MAAmC,EACnC,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,aAAf,eAAe,uBAAf,eAAe,CAAE,IAAI,EAAE,CAC5F,CAAC;IACJ,CAAC;IACD,MAAM,sBAAsB,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,wBAAwB,CAErD,CAAC;IACd,MAAM,EAAE,YAA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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 { OnlineExperimentationClient } from \"./onlineExperimentationClient.js\";\nimport {\n _$deleteDeserialize,\n _updateDeserialize,\n _createOrUpdateDeserialize,\n} from \"./api/onlineExperimentationWorkspaces/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: OnlineExperimentationClient,\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/Microsoft.OnlineExperimentation/workspaces/{workspaceName}\":\n {\n deserializer: _$deleteDeserialize,\n expectedStatuses: [\"202\", \"204\", \"200\"],\n },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}\":\n { deserializer: _updateDeserialize, expectedStatuses: [\"200\", \"202\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}\":\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"]}
1
+ {"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAG1E,OAAO,EAGL,gBAAgB,GAEjB,MAAM,iBAAiB,CAAC;AAgBzB;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,MAAmC,EACnC,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,wBAAwB,CAAC,iBAAiB,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC;IACnE,MAAM,iBAAiB,GAAG,OAAO,EAAE,mBAAmB,IAAI,YAAY,CAAC;IACvE,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACb,0FAA0F,eAAe,EAAE,IAAI,GAAG,CACnH,CAAC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AK,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 { OnlineExperimentationClient } from \"./onlineExperimentationClient.js\";\nimport {\n _$deleteDeserialize,\n _updateDeserialize,\n _createOrUpdateDeserialize,\n} from \"./api/onlineExperimentationWorkspaces/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: OnlineExperimentationClient,\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/Microsoft.OnlineExperimentation/workspaces/{workspaceName}\":\n {\n deserializer: _$deleteDeserialize,\n expectedStatuses: [\"202\", \"204\", \"200\"],\n },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}\":\n { deserializer: _updateDeserialize, expectedStatuses: [\"200\", \"202\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}\":\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"]}