@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
@@ -28,14 +28,19 @@ const core_client_1 = require("@azure-rest/core-client");
28
28
  function _listBySubscriptionSend(context, options = {
29
29
  requestOptions: {},
30
30
  }) {
31
- var _a, _b;
32
31
  const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/providers/Microsoft.OnlineExperimentation/workspaces{?api%2Dversion}", {
33
32
  subscriptionId: context.subscriptionId,
34
33
  "api%2Dversion": context.apiVersion,
35
34
  }, {
36
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
35
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
36
+ });
37
+ return context.path(path).get({
38
+ ...(0, core_client_1.operationOptionsToRequestParameters)(options),
39
+ headers: {
40
+ accept: "application/json",
41
+ ...options.requestOptions?.headers,
42
+ },
37
43
  });
38
- return context.path(path).get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
39
44
  }
40
45
  async function _listBySubscriptionDeserialize(result) {
41
46
  const expectedStatuses = ["200"];
@@ -55,15 +60,20 @@ function listBySubscription(context, options = {
55
60
  function _listByResourceGroupSend(context, resourceGroupName, options = {
56
61
  requestOptions: {},
57
62
  }) {
58
- var _a, _b;
59
63
  const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces{?api%2Dversion}", {
60
64
  subscriptionId: context.subscriptionId,
61
65
  resourceGroupName: resourceGroupName,
62
66
  "api%2Dversion": context.apiVersion,
63
67
  }, {
64
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
68
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
69
+ });
70
+ return context.path(path).get({
71
+ ...(0, core_client_1.operationOptionsToRequestParameters)(options),
72
+ headers: {
73
+ accept: "application/json",
74
+ ...options.requestOptions?.headers,
75
+ },
65
76
  });
66
- return context.path(path).get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
67
77
  }
68
78
  async function _listByResourceGroupDeserialize(result) {
69
79
  const expectedStatuses = ["200"];
@@ -83,16 +93,21 @@ function listByResourceGroup(context, resourceGroupName, options = {
83
93
  function _$deleteSend(context, resourceGroupName, workspaceName, options = {
84
94
  requestOptions: {},
85
95
  }) {
86
- var _a, _b;
87
96
  const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}", {
88
97
  subscriptionId: context.subscriptionId,
89
98
  resourceGroupName: resourceGroupName,
90
99
  workspaceName: workspaceName,
91
100
  "api%2Dversion": context.apiVersion,
92
101
  }, {
93
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
102
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
103
+ });
104
+ return context.path(path).delete({
105
+ ...(0, core_client_1.operationOptionsToRequestParameters)(options),
106
+ headers: {
107
+ accept: "application/json",
108
+ ...options.requestOptions?.headers,
109
+ },
94
110
  });
95
- return context.path(path).delete(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
96
111
  }
97
112
  async function _$deleteDeserialize(result) {
98
113
  const expectedStatuses = ["202", "204", "200"];
@@ -113,8 +128,8 @@ function $delete(context, resourceGroupName, workspaceName, options = {
113
128
  requestOptions: {},
114
129
  }) {
115
130
  return (0, pollingHelpers_js_1.getLongRunningPoller)(context, _$deleteDeserialize, ["202", "204", "200"], {
116
- updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
117
- abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
131
+ updateIntervalInMs: options?.updateIntervalInMs,
132
+ abortSignal: options?.abortSignal,
118
133
  getInitialResponse: () => _$deleteSend(context, resourceGroupName, workspaceName, options),
119
134
  resourceLocationConfig: "location",
120
135
  });
@@ -122,16 +137,23 @@ function $delete(context, resourceGroupName, workspaceName, options = {
122
137
  function _updateSend(context, resourceGroupName, workspaceName, properties, options = {
123
138
  requestOptions: {},
124
139
  }) {
125
- var _a, _b;
126
140
  const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}", {
127
141
  subscriptionId: context.subscriptionId,
128
142
  resourceGroupName: resourceGroupName,
129
143
  workspaceName: workspaceName,
130
144
  "api%2Dversion": context.apiVersion,
131
145
  }, {
132
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
146
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
147
+ });
148
+ return context.path(path).patch({
149
+ ...(0, core_client_1.operationOptionsToRequestParameters)(options),
150
+ contentType: "application/json",
151
+ headers: {
152
+ accept: "application/json",
153
+ ...options.requestOptions?.headers,
154
+ },
155
+ body: (0, models_js_1.onlineExperimentationWorkspacePatchSerializer)(properties),
133
156
  });
134
- return context.path(path).patch(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers), body: (0, models_js_1.onlineExperimentationWorkspacePatchSerializer)(properties) }));
135
157
  }
136
158
  async function _updateDeserialize(result) {
137
159
  const expectedStatuses = ["200", "202"];
@@ -147,8 +169,8 @@ function update(context, resourceGroupName, workspaceName, properties, options =
147
169
  requestOptions: {},
148
170
  }) {
149
171
  return (0, pollingHelpers_js_1.getLongRunningPoller)(context, _updateDeserialize, ["200", "202"], {
150
- updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
151
- abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
172
+ updateIntervalInMs: options?.updateIntervalInMs,
173
+ abortSignal: options?.abortSignal,
152
174
  getInitialResponse: () => _updateSend(context, resourceGroupName, workspaceName, properties, options),
153
175
  resourceLocationConfig: "location",
154
176
  });
@@ -156,16 +178,23 @@ function update(context, resourceGroupName, workspaceName, properties, options =
156
178
  function _createOrUpdateSend(context, resourceGroupName, workspaceName, resource, options = {
157
179
  requestOptions: {},
158
180
  }) {
159
- var _a, _b;
160
181
  const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}", {
161
182
  subscriptionId: context.subscriptionId,
162
183
  resourceGroupName: resourceGroupName,
163
184
  workspaceName: workspaceName,
164
185
  "api%2Dversion": context.apiVersion,
165
186
  }, {
166
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
187
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
188
+ });
189
+ return context.path(path).put({
190
+ ...(0, core_client_1.operationOptionsToRequestParameters)(options),
191
+ contentType: "application/json",
192
+ headers: {
193
+ accept: "application/json",
194
+ ...options.requestOptions?.headers,
195
+ },
196
+ body: (0, models_js_1.onlineExperimentationWorkspaceSerializer)(resource),
167
197
  });
168
- return context.path(path).put(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers), body: (0, models_js_1.onlineExperimentationWorkspaceSerializer)(resource) }));
169
198
  }
170
199
  async function _createOrUpdateDeserialize(result) {
171
200
  const expectedStatuses = ["200", "201"];
@@ -181,8 +210,8 @@ function createOrUpdate(context, resourceGroupName, workspaceName, resource, opt
181
210
  requestOptions: {},
182
211
  }) {
183
212
  return (0, pollingHelpers_js_1.getLongRunningPoller)(context, _createOrUpdateDeserialize, ["200", "201"], {
184
- updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
185
- abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
213
+ updateIntervalInMs: options?.updateIntervalInMs,
214
+ abortSignal: options?.abortSignal,
186
215
  getInitialResponse: () => _createOrUpdateSend(context, resourceGroupName, workspaceName, resource, options),
187
216
  resourceLocationConfig: "azure-async-operation",
188
217
  });
@@ -190,16 +219,21 @@ function createOrUpdate(context, resourceGroupName, workspaceName, resource, opt
190
219
  function _getSend(context, resourceGroupName, workspaceName, options = {
191
220
  requestOptions: {},
192
221
  }) {
193
- var _a, _b;
194
222
  const path = (0, urlTemplate_js_1.expandUrlTemplate)("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OnlineExperimentation/workspaces/{workspaceName}{?api%2Dversion}", {
195
223
  subscriptionId: context.subscriptionId,
196
224
  resourceGroupName: resourceGroupName,
197
225
  workspaceName: workspaceName,
198
226
  "api%2Dversion": context.apiVersion,
199
227
  }, {
200
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
228
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
229
+ });
230
+ return context.path(path).get({
231
+ ...(0, core_client_1.operationOptionsToRequestParameters)(options),
232
+ headers: {
233
+ accept: "application/json",
234
+ ...options.requestOptions?.headers,
235
+ },
201
236
  });
202
- return context.path(path).get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
203
237
  }
204
238
  async function _getDeserialize(result) {
205
239
  const expectedStatuses = ["200"];
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/onlineExperimentationWorkspaces/operations.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAmClC,0DAuBC;AAED,wEAWC;AAGD,gDAaC;AAED,4DAyBC;AAED,0EAWC;AAGD,kDAcC;AAED,oCA2BC;AAED,kDASC;AAQD,0BAcC;AAED,kCA8BC;AAED,gDAWC;AAGD,wBAgBC;AAED,kDA8BC;AAED,gEAWC;AAGD,wCAgBC;AAED,4BA2BC;AAED,0CAWC;AAGD,kBAUC;AAlYD,sDASgC;AAShC,4EAG+C;AAC/C,wEAAwE;AACxE,8EAA8E;AAC9E,yDAKiC;AAGjC,SAAgB,uBAAuB,CACrC,OAAe,EACf,UAA2E;IACzE,cAAc,EAAE,EAAE;CACnB;;IAED,MAAM,IAAI,GAAG,IAAA,kCAAiB,EAC5B,sGAAsG,EACtG;QACE,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,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,IAAA,iDAAmC,EAAC,OAAO,CAAC,KAC/C,OAAO,kBACL,MAAM,EAAE,kBAAkB,IACvB,MAAA,OAAO,CAAC,cAAc,0CAAE,OAAO,KAEpC,CAAC;AACL,CAAC;AAEM,KAAK,UAAU,8BAA8B,CAClD,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,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AG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,IAAA,6BAAe,EAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,IAAA,qCAAyB,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,IAAA,sDAA0C,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACjE,CAAC;AAED,gDAAgD;AACzC,KAAK,UAAU,GAAG,CACvB,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;;AAmClC,0DAuBC;AAED,wEAWC;AAGD,gDAaC;AAED,4DAyBC;AAED,0EAWC;AAGD,kDAcC;AAED,oCA2BC;AAED,kDASC;AAQD,0BAcC;AAED,kCA8BC;AAED,gDAWC;AAGD,wBAgBC;AAED,kDA8BC;AAED,gEAWC;AAGD,wCAgBC;AAED,4BA2BC;AAED,0CAWC;AAGD,kBAUC;AAlYD,sDASgC;AAShC,4EAG+C;AAC/C,wEAAwE;AACxE,8EAA8E;AAC9E,yDAKiC;AAGjC,SAAgB,uBAAuB,CACrC,OAAe,EACf,UAA2E;IACzE,cAAc,EAAE,EAAE;CACnB;IAED,MAAM,IAAI,GAAG,IAAA,kCAAiB,EAC5B,sGAAsG,EACtG;QACE,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,eAAe,EAAE,OAAO,CAAC,UAAU;KACpC,EACD;QACE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe;KACxD,CACF,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;QAC5B,GAAG,IAAA,iDAAmC,EAAC,OAAO,CAAC;QAC/C,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;YAC1B,GAAG,OAAO,CAAC,cAAc,EAAE,OAAO;SACnC;KACF,CAAC,CAAC;AACL,CAAC;AAEM,KAAK,UAAU,8BAA8B,CAClD,MAA6B;IAE7B,MAAM,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B,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,IAAA,6BAAe,EAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,IAAA,qCAAyB,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,IAAA,sDAA0C,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACjE,CAAC;AAED,gDAAgD;AACzC,KAAK,UAAU,GAAG,CACvB,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"]}
@@ -10,13 +10,18 @@ const pagingHelpers_js_1 = require("../../static-helpers/pagingHelpers.js");
10
10
  const urlTemplate_js_1 = require("../../static-helpers/urlTemplate.js");
11
11
  const core_client_1 = require("@azure-rest/core-client");
12
12
  function _listSend(context, options = { requestOptions: {} }) {
13
- var _a, _b;
14
13
  const path = (0, urlTemplate_js_1.expandUrlTemplate)("/providers/Microsoft.OnlineExperimentation/operations{?api%2Dversion}", {
15
14
  "api%2Dversion": context.apiVersion,
16
15
  }, {
17
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
16
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
17
+ });
18
+ return context.path(path).get({
19
+ ...(0, core_client_1.operationOptionsToRequestParameters)(options),
20
+ headers: {
21
+ accept: "application/json",
22
+ ...options.requestOptions?.headers,
23
+ },
18
24
  });
19
- return context.path(path).get(Object.assign(Object.assign({}, (0, core_client_1.operationOptionsToRequestParameters)(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
20
25
  }
21
26
  async function _listDeserialize(result) {
22
27
  const expectedStatuses = ["200"];
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/operations/operations.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAsBlC,8BAoBC;AAED,4CAWC;AAGD,oBAWC;AAlED,sDAKgC;AAEhC,4EAG+C;AAC/C,wEAAwE;AACxE,yDAKiC;AAEjC,SAAgB,SAAS,CACvB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;;IAE9D,MAAM,IAAI,GAAG,IAAA,kCAAiB,EAC5B,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,IAAA,iDAAmC,EAAC,OAAO,CAAC,KAC/C,OAAO,kBACL,MAAM,EAAE,kBAAkB,IACvB,MAAA,OAAO,CAAC,cAAc,0CAAE,OAAO,KAEpC,CAAC;AACL,CAAC;AAEM,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,IAAA,6BAAe,EAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,IAAA,qCAAyB,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,IAAA,4CAAgC,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACvD,CAAC;AAED,2CAA2C;AAC3C,SAAgB,IAAI,CAClB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,OAAO,IAAA,0CAAuB,EAC5B,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;;AAsBlC,8BAoBC;AAED,4CAWC;AAGD,oBAWC;AAlED,sDAKgC;AAEhC,4EAG+C;AAC/C,wEAAwE;AACxE,yDAKiC;AAEjC,SAAgB,SAAS,CACvB,OAAe,EACf,UAAw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ExperimentationContext 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"]}
@@ -15,6 +15,8 @@ function _getOnlineExperimentationWorkspaces(context) {
15
15
  };
16
16
  }
17
17
  function _getOnlineExperimentationWorkspacesOperations(context) {
18
- return Object.assign({}, _getOnlineExperimentationWorkspaces(context));
18
+ return {
19
+ ..._getOnlineExperimentationWorkspaces(context),
20
+ };
19
21
  }
20
22
  //# 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;;AAwGlC,sGAMC;AA/FD,2FAOiE;AAgDjE,SAAS,mCAAmC,CAAC,OAAqC;IAChF,OAAO;QACL,kBAAkB,EAAE,CAClB,OAAyE,EACzE,EAAE,CAAC,IAAA,kCAAkB,EAAC,OAAO,EAAE,OAAO,CAAC;QACzC,mBAAmB,EAAE,CACnB,iBAAyB,EACzB,OAA0E,EAC1E,EAAE,CAAC,IAAA,mCAAmB,EAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,CAAC;QAC7D,MAAM,EAAE,CACN,iBAAyB,EACzB,aAAqB,EACrB,OAA6D,EAC7D,EAAE,CAAC,IAAA,uBAAO,EAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC;QAChE,MAAM,EAAE,CACN,iBAAyB,EACzB,aAAqB,EACrB,UAA+C,EAC/C,OAA6D,EAC7D,EAAE,CAAC,IAAA,sBAAM,EAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,CAAC;QAC3E,cAAc,EAAE,CACd,iBAAyB,EACzB,aAAqB,EACrB,QAAwC,EACxC,OAAqE,EACrE,EAAE,CAAC,IAAA,8BAAc,EAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,CAAC;QACjF,GAAG,EAAE,CACH,iBAAyB,EACzB,aAAqB,EACrB,OAA0D,EAC1D,EAAE,CAAC,IAAA,mBAAG,EAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC;KAC7D,CAAC;AACJ,CAAC;AAED,SAAgB,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;;AAwGlC,sGAMC;AA/FD,2FAOiE;AAgDjE,SAAS,mCAAmC,CAAC,OAAqC;IAChF,OAAO;QACL,kBAAkB,EAAE,CAClB,OAAyE,EACzE,EAAE,CAAC,IAAA,kCAAkB,EAAC,OAAO,EAAE,OAAO,CAAC;QACzC,mBAAmB,EAAE,CACnB,iBAAyB,EACzB,OAA0E,EAC1E,EAAE,CAAC,IAAA,mCAAmB,EAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,CAAC;QAC7D,MAAM,EAAE,CACN,iBAAyB,EACzB,aAAqB,EACrB,OAA6D,EAC7D,EAAE,CAAC,IAAA,uBAAO,EAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC;QAChE,MAAM,EAAE,CACN,iBAAyB,EACzB,aAAqB,EACrB,UAA+C,EAC/C,OAA6D,EAC7D,EAAE,CAAC,IAAA,sBAAM,EAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,CAAC;QAC3E,cAAc,EAAE,CACd,iBAAyB,EACzB,aAAqB,EACrB,QAAwC,EACxC,OAAqE,EACrE,EAAE,CAAC,IAAA,8BAAc,EAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,CAAC;QACjF,GAAG,EAAE,CACH,iBAAyB,EACzB,aAAqB,EACrB,OAA0D,EAC1D,EAAE,CAAC,IAAA,mBAAG,EAAC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,CAAC;KAC7D,CAAC;AACJ,CAAC;AAED,SAAgB,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"]}
@@ -10,6 +10,8 @@ function _getOperations(context) {
10
10
  };
11
11
  }
12
12
  function _getOperationsOperations(context) {
13
- return Object.assign({}, _getOperations(context));
13
+ return {
14
+ ..._getOperations(context),
15
+ };
14
16
  }
15
17
  //# 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;;AAoBlC,4DAMC;AArBD,sEAA0D;AAS1D,SAAS,cAAc,CAAC,OAAqC;IAC3D,OAAO;QACL,IAAI,EAAE,CAAC,OAAsC,EAAE,EAAE,CAAC,IAAA,oBAAI,EAAC,OAAO,EAAE,OAAO,CAAC;KACzE,CAAC;AACJ,CAAC;AAED,SAAgB,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;;AAoBlC,4DAMC;AArBD,sEAA0D;AAS1D,SAAS,cAAc,CAAC,OAAqC;IAC3D,OAAO;QACL,IAAI,EAAE,CAAC,OAAsC,EAAE,EAAE,CAAC,IAAA,oBAAI,EAAC,OAAO,EAAE,OAAO,CAAC;KACzE,CAAC;AACJ,CAAC;AAED,SAAgB,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"]}
@@ -7,18 +7,27 @@ const index_js_1 = require("./api/index.js");
7
7
  const index_js_2 = require("./classic/onlineExperimentationWorkspaces/index.js");
8
8
  const index_js_3 = require("./classic/operations/index.js");
9
9
  class OnlineExperimentationClient {
10
+ _client;
11
+ /** The pipeline used by this client to make requests */
12
+ pipeline;
10
13
  /** Microsoft.OnlineExperimentation Resource Provider management API. */
11
14
  constructor(credential, subscriptionId, options = {}) {
12
- var _a;
13
- const prefixFromOptions = (_a = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _a === void 0 ? void 0 : _a.userAgentPrefix;
15
+ const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
14
16
  const userAgentPrefix = prefixFromOptions
15
17
  ? `${prefixFromOptions} azsdk-js-client`
16
18
  : `azsdk-js-client`;
17
- this._client = (0, index_js_1.createOnlineExperimentation)(credential, subscriptionId, Object.assign(Object.assign({}, options), { userAgentOptions: { userAgentPrefix } }));
19
+ this._client = (0, index_js_1.createOnlineExperimentation)(credential, subscriptionId, {
20
+ ...options,
21
+ userAgentOptions: { userAgentPrefix },
22
+ });
18
23
  this.pipeline = this._client.pipeline;
19
24
  this.onlineExperimentationWorkspaces = (0, index_js_2._getOnlineExperimentationWorkspacesOperations)(this._client);
20
25
  this.operations = (0, index_js_3._getOperationsOperations)(this._client);
21
26
  }
27
+ /** The operation groups for onlineExperimentationWorkspaces */
28
+ onlineExperimentationWorkspaces;
29
+ /** The operation groups for operations */
30
+ operations;
22
31
  }
23
32
  exports.OnlineExperimentationClient = OnlineExperimentationClient;
24
33
  //# sourceMappingURL=onlineExperimentationClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"onlineExperimentationClient.js","sourceRoot":"","sources":["../../src/onlineExperimentationClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,6CAIwB;AACxB,iFAG4D;AAC5D,4DAA+F;AAM/F,MAAa,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,IAAA,sCAA2B,EAAC,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,IAAA,wDAA6C,EAClF,IAAI,CAAC,OAAO,CACb,CAAC;QACF,IAAI,CAAC,UAAU,GAAG,IAAA,mCAAwB,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;CAMF;AA9BD,kEA8BC","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,6CAIwB;AACxB,iFAG4D;AAC5D,4DAA+F;AAM/F,MAAa,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,IAAA,sCAA2B,EAAC,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,IAAA,wDAA6C,EAClF,IAAI,CAAC,OAAO,CACb,CAAC;QACF,IAAI,CAAC,UAAU,GAAG,IAAA,mCAAwB,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,+DAA+D;IAC/C,+BAA+B,CAA4C;IAC3F,0CAA0C;IAC1B,UAAU,CAAuB;CAClD;AA9BD,kEA8BC","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"]}
@@ -12,21 +12,20 @@ const core_lro_1 = require("@azure/core-lro");
12
12
  * needs to be constructed after the original one is not in scope.
13
13
  */
14
14
  function restorePoller(client, serializedState, sourceOperation, options) {
15
- var _a, _b, _c;
16
15
  const pollerConfig = (0, core_lro_1.deserializeState)(serializedState).config;
17
16
  const { initialRequestUrl, requestMethod, metadata } = pollerConfig;
18
17
  if (!initialRequestUrl || !requestMethod) {
19
- throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation === null || sourceOperation === void 0 ? void 0 : sourceOperation.name}`);
18
+ throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`);
20
19
  }
21
- const resourceLocationConfig = metadata === null || metadata === void 0 ? void 0 : metadata["resourceLocationConfig"];
22
- const { deserializer, expectedStatuses = [] } = (_a = getDeserializationHelper(initialRequestUrl, requestMethod)) !== null && _a !== void 0 ? _a : {};
23
- const deserializeHelper = (_b = options === null || options === void 0 ? void 0 : options.processResponseBody) !== null && _b !== void 0 ? _b : deserializer;
20
+ const resourceLocationConfig = metadata?.["resourceLocationConfig"];
21
+ const { deserializer, expectedStatuses = [] } = getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};
22
+ const deserializeHelper = options?.processResponseBody ?? deserializer;
24
23
  if (!deserializeHelper) {
25
- throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation === null || sourceOperation === void 0 ? void 0 : sourceOperation.name}.`);
24
+ throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`);
26
25
  }
27
- return (0, pollingHelpers_js_1.getLongRunningPoller)((_c = client["_client"]) !== null && _c !== void 0 ? _c : client, deserializeHelper, expectedStatuses, {
28
- updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
29
- abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
26
+ return (0, pollingHelpers_js_1.getLongRunningPoller)(client["_client"] ?? client, deserializeHelper, expectedStatuses, {
27
+ updateIntervalInMs: options?.updateIntervalInMs,
28
+ abortSignal: options?.abortSignal,
30
29
  resourceLocationConfig,
31
30
  restoreFrom: serializedState,
32
31
  initialRequestUrl,
@@ -44,7 +43,6 @@ const deserializeMap = {
44
43
  },
45
44
  };
46
45
  function getDeserializationHelper(urlStr, method) {
47
- var _a, _b, _c, _d;
48
46
  const path = new URL(urlStr).pathname;
49
47
  const pathParts = path.split("/");
50
48
  // Traverse list to match the longest candidate
@@ -64,13 +62,13 @@ function getDeserializationHelper(urlStr, method) {
64
62
  // track if we have found a match to return the values found.
65
63
  let found = true;
66
64
  for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
67
- if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
68
- const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
65
+ if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) {
66
+ const start = candidateParts[i].indexOf("}") + 1, end = candidateParts[i]?.length;
69
67
  // If the current part of the candidate is a "template" part
70
68
  // Try to use the suffix of pattern to match the path
71
69
  // {guid} ==> $
72
70
  // {guid}:export ==> :export$
73
- const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
71
+ const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(pathParts[j] || "");
74
72
  if (!isMatched) {
75
73
  found = false;
76
74
  break;
@@ -1 +1 @@
1
- {"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAqClC,sCAoCC;AAtED,uFAI6D;AAC7D,0EAA0E;AAG1E,8CAKyB;AAgBzB;;;;GAIG;AACH,SAAgB,aAAa,CAC3B,MAAmC,EACnC,eAAuB,EACvB,eAAiF,EACjF,OAAuC;;IAEvC,MAAM,YAAY,GAAG,IAAA,2BAAgB,EAAC,eAAe,CAAC,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC;IACpE,IAAI,CAAC,iBAAiB,IAAI,CAAC,aAAa,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CACb,6BAA6B,eAAe,wBAAwB,eAAe,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,YAAY,EAAE,gBAAgB,GAAG,EAAE,EAAE,GAC3C,MAAA,wBAAwB,CAAC,iBAAiB,EAAE,aAAa,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I,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;;AAqClC,sCAoCC;AAtED,uFAI6D;AAC7D,0EAA0E;AAG1E,8CAKyB;AAgBzB;;;;GAIG;AACH,SAAgB,aAAa,CAC3B,MAAmC,EACnC,eAAuB,EACvB,eAAiF,EACjF,OAAuC;IAEvC,MAAM,YAAY,GAAG,IAAA,2BAAgB,EAAC,eAAe,CAAC,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC;IACpE,IAAI,CAAC,iBAAiB,IAAI,CAAC,aAAa,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CACb,6BAA6B,eAAe,wBAAwB,eAAe,EAAE,IAAI,EAAE,CAC5F,CAAC;IACJ,CAAC;IACD,MAAM,sBAAsB,GAAG,QAAQ,EAAE,CAAC,wBAAwB,CAErD,CAAC;IACd,MAAM,EAAE,YAAY,EAAE,gBAAgB,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;IACJ,CAAC;IACD,OAAO,IAAA,wCAAoB,EACxB,MAAc,CAAC,SAAS,CAAC,IAAI,MAAM,EACpC,iBAA4D,EAC5D,gBAAgB,EAChB;QACE,kBAAkB,EAAE,OAAO,EAAE,kBAAkB;QAC/C,WAAW,EAAE,OAAO,EAAE,WAAW;QACjC,sBAAs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B,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"]}