@azure/arm-arizeaiobservabilityeval 1.0.0-alpha.20250619.1 → 1.0.0-alpha.20250722.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/browser/api/observabilityEvalContext.js +16 -10
  2. package/dist/browser/api/observabilityEvalContext.js.map +1 -1
  3. package/dist/browser/api/operations/operations.js +8 -3
  4. package/dist/browser/api/operations/operations.js.map +1 -1
  5. package/dist/browser/api/organizations/operations.js +56 -22
  6. package/dist/browser/api/organizations/operations.js.map +1 -1
  7. package/dist/browser/classic/operations/index.js +3 -1
  8. package/dist/browser/classic/operations/index.js.map +1 -1
  9. package/dist/browser/classic/organizations/index.js +3 -1
  10. package/dist/browser/classic/organizations/index.js.map +1 -1
  11. package/dist/browser/observabilityEvalClient.js +12 -3
  12. package/dist/browser/observabilityEvalClient.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/observabilityEvalContext.js +16 -10
  22. package/dist/commonjs/api/observabilityEvalContext.js.map +1 -1
  23. package/dist/commonjs/api/operations/operations.js +8 -3
  24. package/dist/commonjs/api/operations/operations.js.map +1 -1
  25. package/dist/commonjs/api/organizations/operations.js +56 -22
  26. package/dist/commonjs/api/organizations/operations.js.map +1 -1
  27. package/dist/commonjs/classic/operations/index.js +3 -1
  28. package/dist/commonjs/classic/operations/index.js.map +1 -1
  29. package/dist/commonjs/classic/organizations/index.js +3 -1
  30. package/dist/commonjs/classic/organizations/index.js.map +1 -1
  31. package/dist/commonjs/observabilityEvalClient.js +12 -3
  32. package/dist/commonjs/observabilityEvalClient.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/observabilityEvalContext.js +16 -10
  43. package/dist/esm/api/observabilityEvalContext.js.map +1 -1
  44. package/dist/esm/api/operations/operations.js +8 -3
  45. package/dist/esm/api/operations/operations.js.map +1 -1
  46. package/dist/esm/api/organizations/operations.js +56 -22
  47. package/dist/esm/api/organizations/operations.js.map +1 -1
  48. package/dist/esm/classic/operations/index.js +3 -1
  49. package/dist/esm/classic/operations/index.js.map +1 -1
  50. package/dist/esm/classic/organizations/index.js +3 -1
  51. package/dist/esm/classic/organizations/index.js.map +1 -1
  52. package/dist/esm/observabilityEvalClient.js +12 -3
  53. package/dist/esm/observabilityEvalClient.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/observabilityEvalContext.js +16 -10
  63. package/dist/react-native/api/observabilityEvalContext.js.map +1 -1
  64. package/dist/react-native/api/operations/operations.js +8 -3
  65. package/dist/react-native/api/operations/operations.js.map +1 -1
  66. package/dist/react-native/api/organizations/operations.js +56 -22
  67. package/dist/react-native/api/organizations/operations.js.map +1 -1
  68. package/dist/react-native/classic/operations/index.js +3 -1
  69. package/dist/react-native/classic/operations/index.js.map +1 -1
  70. package/dist/react-native/classic/organizations/index.js +3 -1
  71. package/dist/react-native/classic/organizations/index.js.map +1 -1
  72. package/dist/react-native/observabilityEvalClient.js +12 -3
  73. package/dist/react-native/observabilityEvalClient.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-arizeaiobservabilityeval-api.api.md → arm-arizeaiobservabilityeval-api-node.api.md} +0 -0
  84. /package/review/{arm-arizeaiobservabilityeval-api-operations.api.md → arm-arizeaiobservabilityeval-api-operations-node.api.md} +0 -0
  85. /package/review/{arm-arizeaiobservabilityeval-api-organizations.api.md → arm-arizeaiobservabilityeval-api-organizations-node.api.md} +0 -0
  86. /package/review/{arm-arizeaiobservabilityeval-models.api.md → arm-arizeaiobservabilityeval-models-node.api.md} +0 -0
  87. /package/review/{arm-arizeaiobservabilityeval.api.md → arm-arizeaiobservabilityeval-node.api.md} +0 -0
@@ -1,22 +1,25 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import { __rest } from "tslib";
4
3
  import { logger } from "../logger.js";
5
4
  import { getClient } from "@azure-rest/core-client";
6
5
  export function createObservabilityEval(credential, subscriptionId, options = {}) {
7
- var _a, _b, _c, _d, _e, _f, _g, _h;
8
- const endpointUrl = (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUrl) !== null && _b !== void 0 ? _b : "https://management.azure.com";
9
- const prefixFromOptions = (_c = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _c === void 0 ? void 0 : _c.userAgentPrefix;
6
+ const endpointUrl = options.endpoint ?? options.baseUrl ?? "https://management.azure.com";
7
+ const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
10
8
  const userAgentInfo = `azsdk-js-arm-arizeaiobservabilityeval/1.0.0`;
11
9
  const userAgentPrefix = prefixFromOptions
12
10
  ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
13
11
  : `azsdk-js-api ${userAgentInfo}`;
14
- const _j = Object.assign(Object.assign({}, options), { userAgentOptions: { userAgentPrefix }, loggingOptions: { logger: (_e = (_d = options.loggingOptions) === null || _d === void 0 ? void 0 : _d.logger) !== null && _e !== void 0 ? _e : logger.info }, credentials: {
15
- scopes: (_g = (_f = options.credentials) === null || _f === void 0 ? void 0 : _f.scopes) !== null && _g !== void 0 ? _g : [`${endpointUrl}/.default`],
16
- } }), { apiVersion: _ } = _j, updatedOptions = __rest(_j, ["apiVersion"]);
12
+ const { apiVersion: _, ...updatedOptions } = {
13
+ ...options,
14
+ userAgentOptions: { userAgentPrefix },
15
+ loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },
16
+ credentials: {
17
+ scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],
18
+ },
19
+ };
17
20
  const clientContext = getClient(endpointUrl, credential, updatedOptions);
18
21
  clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" });
19
- const apiVersion = (_h = options.apiVersion) !== null && _h !== void 0 ? _h : "2024-10-01";
22
+ const apiVersion = options.apiVersion ?? "2024-10-01";
20
23
  clientContext.pipeline.addPolicy({
21
24
  name: "ClientApiVersionPolicy",
22
25
  sendRequest: (req, next) => {
@@ -29,7 +32,10 @@ export function createObservabilityEval(credential, subscriptionId, options = {}
29
32
  return next(req);
30
33
  },
31
34
  });
32
- return Object.assign(Object.assign({}, clientContext), { apiVersion,
33
- subscriptionId });
35
+ return {
36
+ ...clientContext,
37
+ apiVersion,
38
+ subscriptionId,
39
+ };
34
40
  }
35
41
  //# sourceMappingURL=observabilityEvalContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"observabilityEvalContext.js","sourceRoot":"","sources":["../../../src/api/observabilityEvalContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAyB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAkB3E,MAAM,UAAU,uBAAuB,CACrC,UAA2B,EAC3B,cAAsB,EACtB,UAAiD,EAAE;;IAEnD,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,8BAA8B,CAAC;IAC1F,MAAM,iBAAiB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,0CAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,6CAA6C,CAAC;IACpE,MAAM,eAAe,GAAG,iBAAiB;QACvC,CAAC,CAAC,GAAG,iBAAiB,iBAAiB,aAAa,EAAE;QACtD,CAAC,CAAC,gBAAgB,aAAa,EAAE,CAAC;IACpC,MAAM,qCACD,OAAO,KACV,gBAAgB,EAAE,EAAE,eAAe,EAAE,EACrC,cAAc,EAAE,EAAE,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI,EAAE,EACzE,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI,CAAC,GAAG,WAAW,WAAW,CAAC;SACnE,GACF,EAPK,EAAE,UAAU,EAAE,CAAC,OAOpB,EAPyB,cAAc,cAAlC,cAAoC,CAOzC,CAAC;IACF,MAAM,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IACzE,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAClE,MAAM,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,YAAY,CAAC;IACtD,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC/B,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,gCACF,aAAa,KAChB,UAAU;QACV,cAAc,GACa,CAAC;AAChC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport { Client, ClientOptions, getClient } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport interface ObservabilityEvalContext extends Client {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion: string;\n /** The ID of the target subscription. The value must be an UUID. */\n subscriptionId: string;\n}\n\n/** Optional parameters for the client. */\nexport interface ObservabilityEvalClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\nexport function createObservabilityEval(\n credential: TokenCredential,\n subscriptionId: string,\n options: ObservabilityEvalClientOptionalParams = {},\n): ObservabilityEvalContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? \"https://management.azure.com\";\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-arizeaiobservabilityeval/1.0.0`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2024-10-01\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return {\n ...clientContext,\n apiVersion,\n subscriptionId,\n } as ObservabilityEvalContext;\n}\n"]}
1
+ {"version":3,"file":"observabilityEvalContext.js","sourceRoot":"","sources":["../../../src/api/observabilityEvalContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,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AG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO;QACL,GAAG,aAAa;QAChB,UAAU;QACV,cAAc;KACa,CAAC;AAChC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport { Client, ClientOptions, getClient } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport interface ObservabilityEvalContext extends Client {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion: string;\n /** The ID of the target subscription. The value must be an UUID. */\n subscriptionId: string;\n}\n\n/** Optional parameters for the client. */\nexport interface ObservabilityEvalClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\nexport function createObservabilityEval(\n credential: TokenCredential,\n subscriptionId: string,\n options: ObservabilityEvalClientOptionalParams = {},\n): ObservabilityEvalContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? \"https://management.azure.com\";\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-arizeaiobservabilityeval/1.0.0`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2024-10-01\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return {\n ...clientContext,\n apiVersion,\n subscriptionId,\n } as ObservabilityEvalContext;\n}\n"]}
@@ -5,13 +5,18 @@ import { buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"
5
5
  import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
6
6
  import { createRestError, operationOptionsToRequestParameters, } from "@azure-rest/core-client";
7
7
  export function _listSend(context, options = { requestOptions: {} }) {
8
- var _a, _b;
9
8
  const path = expandUrlTemplate("/providers/ArizeAi.ObservabilityEval/operations{?api%2Dversion}", {
10
9
  "api%2Dversion": context.apiVersion,
11
10
  }, {
12
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
11
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
12
+ });
13
+ return context.path(path).get({
14
+ ...operationOptionsToRequestParameters(options),
15
+ headers: {
16
+ accept: "application/json",
17
+ ...options.requestOptions?.headers,
18
+ },
13
19
  });
14
- return context.path(path).get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
15
20
  }
16
21
  export async function _listDeserialize(result) {
17
22
  const expectedStatuses = ["200"];
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/operations/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAEL,gCAAgC,EAEhC,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CAAC;AAEjC,MAAM,UAAU,SAAS,CACvB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;;IAE9D,MAAM,IAAI,GAAG,iBAAiB,CAC5B,iEAAiE,EACjE;QACE,eAAe,EAAE,OAAO,CAAC,UAAU;KACpC,EACD;QACE,aAAa,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,eAAe;KACxD,CACF,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,iCACxB,mCAAmC,CAAC,OAAO,CAAC,KAC/C,OAAO,kBACL,MAAM,EAAE,kBAAkB,IACvB,MAAA,OAAO,CAAC,cAAc,0CAAE,OAAO,KAEpC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,gCAAgC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACvD,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,IAAI,CAClB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,OAAO,uBAAuB,CAC5B,OAAO,EACP,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,EACjC,gBAAgB,EAChB,CAAC,KAAK,CAAC,EACP,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAChD,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ObservabilityEvalContext 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/ArizeAi.ObservabilityEval/operations{?api%2Dversion}\",\n {\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OperationListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _operationListResultDeserializer(result.body);\n}\n\n/** List the operations for the provider */\nexport function list(\n context: Client,\n options: OperationsListOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<Operation> {\n return buildPagedAsyncIterator(\n context,\n () => _listSend(context, options),\n _listDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n"]}
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/operations/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAEL,gCAAgC,EAEhC,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CAAC;AAEjC,MAAM,UAAU,SAAS,CACvB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,MAAM,IAAI,GAAG,iBAAiB,CAC5B,iEAAiE,EACjE;QACE,eAAe,EAAE,OAAO,CAAC,UAAU;KACpC,EACD;QACE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe;KACxD,CACF,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;QAC5B,GAAG,mCAAmC,CAAC,OAAO,CAAC;QAC/C,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;YAC1B,GAAG,OAAO,CAAC,cAAc,EAAE,OAAO;SACnC;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,gCAAgC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACvD,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,IAAI,CAClB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,OAAO,uBAAuB,CAC5B,OAAO,EACP,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,EACjC,gBAAgB,EAChB,CAAC,KAAK,CAAC,EACP,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAChD,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ObservabilityEvalContext 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/ArizeAi.ObservabilityEval/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"]}
@@ -8,14 +8,19 @@ import { createRestError, operationOptionsToRequestParameters, } from "@azure-re
8
8
  export function _listBySubscriptionSend(context, options = {
9
9
  requestOptions: {},
10
10
  }) {
11
- var _a, _b;
12
11
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/providers/ArizeAi.ObservabilityEval/organizations{?api%2Dversion}", {
13
12
  subscriptionId: context.subscriptionId,
14
13
  "api%2Dversion": context.apiVersion,
15
14
  }, {
16
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
15
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
16
+ });
17
+ return context.path(path).get({
18
+ ...operationOptionsToRequestParameters(options),
19
+ headers: {
20
+ accept: "application/json",
21
+ ...options.requestOptions?.headers,
22
+ },
17
23
  });
18
- return context.path(path).get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
19
24
  }
20
25
  export async function _listBySubscriptionDeserialize(result) {
21
26
  const expectedStatuses = ["200"];
@@ -35,15 +40,20 @@ export function listBySubscription(context, options = {
35
40
  export function _listByResourceGroupSend(context, resourceGroupName, options = {
36
41
  requestOptions: {},
37
42
  }) {
38
- var _a, _b;
39
43
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations{?api%2Dversion}", {
40
44
  subscriptionId: context.subscriptionId,
41
45
  resourceGroupName: resourceGroupName,
42
46
  "api%2Dversion": context.apiVersion,
43
47
  }, {
44
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
48
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
49
+ });
50
+ return context.path(path).get({
51
+ ...operationOptionsToRequestParameters(options),
52
+ headers: {
53
+ accept: "application/json",
54
+ ...options.requestOptions?.headers,
55
+ },
45
56
  });
46
- return context.path(path).get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
47
57
  }
48
58
  export async function _listByResourceGroupDeserialize(result) {
49
59
  const expectedStatuses = ["200"];
@@ -61,16 +71,21 @@ export function listByResourceGroup(context, resourceGroupName, options = {
61
71
  return buildPagedAsyncIterator(context, () => _listByResourceGroupSend(context, resourceGroupName, options), _listByResourceGroupDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink" });
62
72
  }
63
73
  export function _$deleteSend(context, resourceGroupName, organizationname, options = { requestOptions: {} }) {
64
- var _a, _b;
65
74
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}", {
66
75
  subscriptionId: context.subscriptionId,
67
76
  resourceGroupName: resourceGroupName,
68
77
  organizationname: organizationname,
69
78
  "api%2Dversion": context.apiVersion,
70
79
  }, {
71
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
80
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
81
+ });
82
+ return context.path(path).delete({
83
+ ...operationOptionsToRequestParameters(options),
84
+ headers: {
85
+ accept: "application/json",
86
+ ...options.requestOptions?.headers,
87
+ },
72
88
  });
73
- return context.path(path).delete(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
74
89
  }
75
90
  export async function _$deleteDeserialize(result) {
76
91
  const expectedStatuses = ["202", "204", "200"];
@@ -89,23 +104,30 @@ export async function _$deleteDeserialize(result) {
89
104
  */
90
105
  export function $delete(context, resourceGroupName, organizationname, options = { requestOptions: {} }) {
91
106
  return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], {
92
- updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
93
- abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
107
+ updateIntervalInMs: options?.updateIntervalInMs,
108
+ abortSignal: options?.abortSignal,
94
109
  getInitialResponse: () => _$deleteSend(context, resourceGroupName, organizationname, options),
95
110
  resourceLocationConfig: "location",
96
111
  });
97
112
  }
98
113
  export function _updateSend(context, resourceGroupName, organizationname, properties, options = { requestOptions: {} }) {
99
- var _a, _b;
100
114
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}", {
101
115
  subscriptionId: context.subscriptionId,
102
116
  resourceGroupName: resourceGroupName,
103
117
  organizationname: organizationname,
104
118
  "api%2Dversion": context.apiVersion,
105
119
  }, {
106
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
120
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
121
+ });
122
+ return context.path(path).patch({
123
+ ...operationOptionsToRequestParameters(options),
124
+ contentType: "application/json",
125
+ headers: {
126
+ accept: "application/json",
127
+ ...options.requestOptions?.headers,
128
+ },
129
+ body: organizationResourceUpdateSerializer(properties),
107
130
  });
108
- return context.path(path).patch(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers), body: organizationResourceUpdateSerializer(properties) }));
109
131
  }
110
132
  export async function _updateDeserialize(result) {
111
133
  const expectedStatuses = ["200"];
@@ -122,16 +144,23 @@ export async function update(context, resourceGroupName, organizationname, prope
122
144
  return _updateDeserialize(result);
123
145
  }
124
146
  export function _createOrUpdateSend(context, resourceGroupName, organizationname, resource, options = { requestOptions: {} }) {
125
- var _a, _b;
126
147
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}", {
127
148
  subscriptionId: context.subscriptionId,
128
149
  resourceGroupName: resourceGroupName,
129
150
  organizationname: organizationname,
130
151
  "api%2Dversion": context.apiVersion,
131
152
  }, {
132
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
153
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
154
+ });
155
+ return context.path(path).put({
156
+ ...operationOptionsToRequestParameters(options),
157
+ contentType: "application/json",
158
+ headers: {
159
+ accept: "application/json",
160
+ ...options.requestOptions?.headers,
161
+ },
162
+ body: organizationResourceSerializer(resource),
133
163
  });
134
- return context.path(path).put(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { contentType: "application/json", headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers), body: organizationResourceSerializer(resource) }));
135
164
  }
136
165
  export async function _createOrUpdateDeserialize(result) {
137
166
  const expectedStatuses = ["200", "201"];
@@ -145,23 +174,28 @@ export async function _createOrUpdateDeserialize(result) {
145
174
  /** Create a OrganizationResource */
146
175
  export function createOrUpdate(context, resourceGroupName, organizationname, resource, options = { requestOptions: {} }) {
147
176
  return getLongRunningPoller(context, _createOrUpdateDeserialize, ["200", "201"], {
148
- updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
149
- abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
177
+ updateIntervalInMs: options?.updateIntervalInMs,
178
+ abortSignal: options?.abortSignal,
150
179
  getInitialResponse: () => _createOrUpdateSend(context, resourceGroupName, organizationname, resource, options),
151
180
  resourceLocationConfig: "azure-async-operation",
152
181
  });
153
182
  }
154
183
  export function _getSend(context, resourceGroupName, organizationname, options = { requestOptions: {} }) {
155
- var _a, _b;
156
184
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}", {
157
185
  subscriptionId: context.subscriptionId,
158
186
  resourceGroupName: resourceGroupName,
159
187
  organizationname: organizationname,
160
188
  "api%2Dversion": context.apiVersion,
161
189
  }, {
162
- allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
190
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
191
+ });
192
+ return context.path(path).get({
193
+ ...operationOptionsToRequestParameters(options),
194
+ headers: {
195
+ accept: "application/json",
196
+ ...options.requestOptions?.headers,
197
+ },
163
198
  });
164
- return context.path(path).get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
165
199
  }
166
200
  export async function _getDeserialize(result) {
167
201
  const expectedStatuses = ["200"];
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/organizations/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,yBAAyB,EAEzB,8BAA8B,EAC9B,gCAAgC,EAEhC,oCAAoC,EAEpC,2CAA2C,GAC5C,MAAM,wBAAwB,CAAC;AA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AC,CAAC;IACrF,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ObservabilityEvalContext as Client } from \"../index.js\";\nimport {\n errorResponseDeserializer,\n OrganizationResource,\n organizationResourceSerializer,\n organizationResourceDeserializer,\n OrganizationResourceUpdate,\n organizationResourceUpdateSerializer,\n _OrganizationResourceListResult,\n _organizationResourceListResultDeserializer,\n} from \"../../models/models.js\";\nimport {\n OrganizationsListBySubscriptionOptionalParams,\n OrganizationsListByResourceGroupOptionalParams,\n OrganizationsDeleteOptionalParams,\n OrganizationsUpdateOptionalParams,\n OrganizationsCreateOrUpdateOptionalParams,\n OrganizationsGetOptionalParams,\n} from \"./options.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { getLongRunningPoller } from \"../../static-helpers/pollingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\n\nexport function _listBySubscriptionSend(\n context: Client,\n options: OrganizationsListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/ArizeAi.ObservabilityEval/organizations{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listBySubscriptionDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OrganizationResourceListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _organizationResourceListResultDeserializer(result.body);\n}\n\n/** List OrganizationResource resources by subscription ID */\nexport function listBySubscription(\n context: Client,\n options: OrganizationsListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<OrganizationResource> {\n return buildPagedAsyncIterator(\n context,\n () => _listBySubscriptionSend(context, options),\n _listBySubscriptionDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _listByResourceGroupSend(\n context: Client,\n resourceGroupName: string,\n options: OrganizationsListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listByResourceGroupDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OrganizationResourceListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _organizationResourceListResultDeserializer(result.body);\n}\n\n/** List OrganizationResource resources by resource group */\nexport function listByResourceGroup(\n context: Client,\n resourceGroupName: string,\n options: OrganizationsListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<OrganizationResource> {\n return buildPagedAsyncIterator(\n context,\n () => _listByResourceGroupSend(context, resourceGroupName, options),\n _listByResourceGroupDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _$deleteSend(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n options: OrganizationsDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n organizationname: organizationname,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"202\", \"204\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return;\n}\n\n/** Delete a OrganizationResource */\n/**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\nexport function $delete(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n options: OrganizationsDeleteOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<void>, void> {\n return getLongRunningPoller(context, _$deleteDeserialize, [\"202\", \"204\", \"200\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () => _$deleteSend(context, resourceGroupName, organizationname, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<void>, void>;\n}\n\nexport function _updateSend(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n properties: OrganizationResourceUpdate,\n options: OrganizationsUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n organizationname: organizationname,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).patch({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: organizationResourceUpdateSerializer(properties),\n });\n}\n\nexport async function _updateDeserialize(\n result: PathUncheckedResponse,\n): Promise<OrganizationResource> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return organizationResourceDeserializer(result.body);\n}\n\n/** Update a OrganizationResource */\nexport async function update(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n properties: OrganizationResourceUpdate,\n options: OrganizationsUpdateOptionalParams = { requestOptions: {} },\n): Promise<OrganizationResource> {\n const result = await _updateSend(\n context,\n resourceGroupName,\n organizationname,\n properties,\n options,\n );\n return _updateDeserialize(result);\n}\n\nexport function _createOrUpdateSend(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n resource: OrganizationResource,\n options: OrganizationsCreateOrUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n organizationname: organizationname,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: organizationResourceSerializer(resource),\n });\n}\n\nexport async function _createOrUpdateDeserialize(\n result: PathUncheckedResponse,\n): Promise<OrganizationResource> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return organizationResourceDeserializer(result.body);\n}\n\n/** Create a OrganizationResource */\nexport function createOrUpdate(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n resource: OrganizationResource,\n options: OrganizationsCreateOrUpdateOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<OrganizationResource>, OrganizationResource> {\n return getLongRunningPoller(context, _createOrUpdateDeserialize, [\"200\", \"201\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _createOrUpdateSend(context, resourceGroupName, organizationname, resource, options),\n resourceLocationConfig: \"azure-async-operation\",\n }) as PollerLike<OperationState<OrganizationResource>, OrganizationResource>;\n}\n\nexport function _getSend(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n options: OrganizationsGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n organizationname: organizationname,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeserialize(\n result: PathUncheckedResponse,\n): Promise<OrganizationResource> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return organizationResourceDeserializer(result.body);\n}\n\n/** Get a OrganizationResource */\nexport async function get(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n options: OrganizationsGetOptionalParams = { requestOptions: {} },\n): Promise<OrganizationResource> {\n const result = await _getSend(context, resourceGroupName, organizationname, options);\n return _getDeserialize(result);\n}\n"]}
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/organizations/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,yBAAyB,EAEzB,8BAA8B,EAC9B,gCAAgC,EAEhC,oCAAoC,EAEpC,2CAA2C,GAC5C,MAAM,wBAAwB,CAAC;AAShC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CAAC;AAGjC,MAAM,UAAU,uBAAuB,CACrC,OAAe,EACf,UAAyD;IACvD,cAAc,EAAE,EAAE;CACnB;IAED,MAAM,IAAI,GAAG,iBAAiB,CAC5B,mGAAmG,EACnG;QACE,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,eAAe,EAAE,OAAO,CAAC,UAAU;KACpC,EACD;QACE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe;KACxD,CACF,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;QAC5B,GAAG,mCAAmC,CAAC,OAAO,CAAC;QAC/C,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;YAC1B,GAAG,OAAO,CAAC,cAAc,EAAE,OAAO;SACnC;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAClD,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAA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ED,iCAAiC;AACjC,MAAM,CAAC,KAAK,UAAU,GAAG,CACvB,OAAe,EACf,iBAAyB,EACzB,gBAAwB,EACxB,UAA0C,EAAE,cAAc,EAAE,EAAE,EAAE;IAEhE,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACrF,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ObservabilityEvalContext as Client } from \"../index.js\";\nimport {\n errorResponseDeserializer,\n OrganizationResource,\n organizationResourceSerializer,\n organizationResourceDeserializer,\n OrganizationResourceUpdate,\n organizationResourceUpdateSerializer,\n _OrganizationResourceListResult,\n _organizationResourceListResultDeserializer,\n} from \"../../models/models.js\";\nimport {\n OrganizationsListBySubscriptionOptionalParams,\n OrganizationsListByResourceGroupOptionalParams,\n OrganizationsDeleteOptionalParams,\n OrganizationsUpdateOptionalParams,\n OrganizationsCreateOrUpdateOptionalParams,\n OrganizationsGetOptionalParams,\n} from \"./options.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { getLongRunningPoller } from \"../../static-helpers/pollingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\n\nexport function _listBySubscriptionSend(\n context: Client,\n options: OrganizationsListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/ArizeAi.ObservabilityEval/organizations{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listBySubscriptionDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OrganizationResourceListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _organizationResourceListResultDeserializer(result.body);\n}\n\n/** List OrganizationResource resources by subscription ID */\nexport function listBySubscription(\n context: Client,\n options: OrganizationsListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<OrganizationResource> {\n return buildPagedAsyncIterator(\n context,\n () => _listBySubscriptionSend(context, options),\n _listBySubscriptionDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _listByResourceGroupSend(\n context: Client,\n resourceGroupName: string,\n options: OrganizationsListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listByResourceGroupDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OrganizationResourceListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _organizationResourceListResultDeserializer(result.body);\n}\n\n/** List OrganizationResource resources by resource group */\nexport function listByResourceGroup(\n context: Client,\n resourceGroupName: string,\n options: OrganizationsListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<OrganizationResource> {\n return buildPagedAsyncIterator(\n context,\n () => _listByResourceGroupSend(context, resourceGroupName, options),\n _listByResourceGroupDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _$deleteSend(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n options: OrganizationsDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n organizationname: organizationname,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"202\", \"204\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return;\n}\n\n/** Delete a OrganizationResource */\n/**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\nexport function $delete(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n options: OrganizationsDeleteOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<void>, void> {\n return getLongRunningPoller(context, _$deleteDeserialize, [\"202\", \"204\", \"200\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () => _$deleteSend(context, resourceGroupName, organizationname, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<void>, void>;\n}\n\nexport function _updateSend(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n properties: OrganizationResourceUpdate,\n options: OrganizationsUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n organizationname: organizationname,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).patch({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: organizationResourceUpdateSerializer(properties),\n });\n}\n\nexport async function _updateDeserialize(\n result: PathUncheckedResponse,\n): Promise<OrganizationResource> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return organizationResourceDeserializer(result.body);\n}\n\n/** Update a OrganizationResource */\nexport async function update(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n properties: OrganizationResourceUpdate,\n options: OrganizationsUpdateOptionalParams = { requestOptions: {} },\n): Promise<OrganizationResource> {\n const result = await _updateSend(\n context,\n resourceGroupName,\n organizationname,\n properties,\n options,\n );\n return _updateDeserialize(result);\n}\n\nexport function _createOrUpdateSend(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n resource: OrganizationResource,\n options: OrganizationsCreateOrUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n organizationname: organizationname,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: organizationResourceSerializer(resource),\n });\n}\n\nexport async function _createOrUpdateDeserialize(\n result: PathUncheckedResponse,\n): Promise<OrganizationResource> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return organizationResourceDeserializer(result.body);\n}\n\n/** Create a OrganizationResource */\nexport function createOrUpdate(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n resource: OrganizationResource,\n options: OrganizationsCreateOrUpdateOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<OrganizationResource>, OrganizationResource> {\n return getLongRunningPoller(context, _createOrUpdateDeserialize, [\"200\", \"201\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _createOrUpdateSend(context, resourceGroupName, organizationname, resource, options),\n resourceLocationConfig: \"azure-async-operation\",\n }) as PollerLike<OperationState<OrganizationResource>, OrganizationResource>;\n}\n\nexport function _getSend(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n options: OrganizationsGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n organizationname: organizationname,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeserialize(\n result: PathUncheckedResponse,\n): Promise<OrganizationResource> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return organizationResourceDeserializer(result.body);\n}\n\n/** Get a OrganizationResource */\nexport async function get(\n context: Client,\n resourceGroupName: string,\n organizationname: string,\n options: OrganizationsGetOptionalParams = { requestOptions: {} },\n): Promise<OrganizationResource> {\n const result = await _getSend(context, resourceGroupName, organizationname, options);\n return _getDeserialize(result);\n}\n"]}
@@ -7,6 +7,8 @@ function _getOperations(context) {
7
7
  };
8
8
  }
9
9
  export function _getOperationsOperations(context) {
10
- return Object.assign({}, _getOperations(context));
10
+ return {
11
+ ..._getOperations(context),
12
+ };
11
13
  }
12
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/operations/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAS1D,SAAS,cAAc,CAAC,OAAiC;IACvD,OAAO;QACL,IAAI,EAAE,CAAC,OAAsC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;KACzE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,OAAiC;IACxE,yBACK,cAAc,CAAC,OAAO,CAAC,EAC1B;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ObservabilityEvalContext } from \"../../api/observabilityEvalContext.js\";\nimport { Operation } from \"../../models/models.js\";\nimport { OperationsListOptionalParams } from \"../../api/operations/options.js\";\nimport { list } from \"../../api/operations/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a Operations operations. */\nexport interface OperationsOperations {\n /** List the operations for the provider */\n list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator<Operation>;\n}\n\nfunction _getOperations(context: ObservabilityEvalContext) {\n return {\n list: (options?: OperationsListOptionalParams) => list(context, options),\n };\n}\n\nexport function _getOperationsOperations(context: ObservabilityEvalContext): OperationsOperations {\n return {\n ..._getOperations(context),\n };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/operations/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAS1D,SAAS,cAAc,CAAC,OAAiC;IACvD,OAAO;QACL,IAAI,EAAE,CAAC,OAAsC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;KACzE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,OAAiC;IACxE,OAAO;QACL,GAAG,cAAc,CAAC,OAAO,CAAC;KAC3B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ObservabilityEvalContext } from \"../../api/observabilityEvalContext.js\";\nimport { Operation } from \"../../models/models.js\";\nimport { OperationsListOptionalParams } from \"../../api/operations/options.js\";\nimport { list } from \"../../api/operations/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a Operations operations. */\nexport interface OperationsOperations {\n /** List the operations for the provider */\n list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator<Operation>;\n}\n\nfunction _getOperations(context: ObservabilityEvalContext) {\n return {\n list: (options?: OperationsListOptionalParams) => list(context, options),\n };\n}\n\nexport function _getOperationsOperations(context: ObservabilityEvalContext): OperationsOperations {\n return {\n ..._getOperations(context),\n };\n}\n"]}
@@ -12,6 +12,8 @@ function _getOrganizations(context) {
12
12
  };
13
13
  }
14
14
  export function _getOrganizationsOperations(context) {
15
- return Object.assign({}, _getOrganizations(context));
15
+ return {
16
+ ..._getOrganizations(context),
17
+ };
16
18
  }
17
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/organizations/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAYlC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,cAAc,EACd,GAAG,GACJ,MAAM,uCAAuC,CAAC;AAgD/C,SAAS,iBAAiB,CAAC,OAAiC;IAC1D,OAAO;QACL,kBAAkB,EAAE,CAAC,OAAuD,EAAE,EAAE,CAC9E,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC;QACtC,mBAAmB,EAAE,CACnB,iBAAyB,EACzB,OAAwD,EACxD,EAAE,CAAC,mBAAmB,CAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,CAAC;QAC7D,MAAM,EAAE,CACN,iBAAyB,EACzB,gBAAwB,EACxB,OAA2C,EAC3C,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,OAAO,CAAC;QACnE,MAAM,EAAE,CACN,iBAAyB,EACzB,gBAAwB,EACxB,UAAsC,EACtC,OAA2C,EAC3C,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,UAAU,EAAE,OAAO,CAAC;QAC9E,cAAc,EAAE,CACd,iBAAyB,EACzB,gBAAwB,EACxB,QAA8B,EAC9B,OAAmD,EACnD,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,CAAC;QACpF,GAAG,EAAE,CACH,iBAAyB,EACzB,gBAAwB,EACxB,OAAwC,EACxC,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,OAAO,CAAC;KAChE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,OAAiC;IAEjC,yBACK,iBAAiB,CAAC,OAAO,CAAC,EAC7B;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ObservabilityEvalContext } from \"../../api/observabilityEvalContext.js\";\nimport { OrganizationResource, OrganizationResourceUpdate } from \"../../models/models.js\";\nimport {\n OrganizationsListBySubscriptionOptionalParams,\n OrganizationsListByResourceGroupOptionalParams,\n OrganizationsDeleteOptionalParams,\n OrganizationsUpdateOptionalParams,\n OrganizationsCreateOrUpdateOptionalParams,\n OrganizationsGetOptionalParams,\n} from \"../../api/organizations/options.js\";\nimport {\n listBySubscription,\n listByResourceGroup,\n $delete,\n update,\n createOrUpdate,\n get,\n} from \"../../api/organizations/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\n\n/** Interface representing a Organizations operations. */\nexport interface OrganizationsOperations {\n /** List OrganizationResource resources by subscription ID */\n listBySubscription: (\n options?: OrganizationsListBySubscriptionOptionalParams,\n ) => PagedAsyncIterableIterator<OrganizationResource>;\n /** List OrganizationResource resources by resource group */\n listByResourceGroup: (\n resourceGroupName: string,\n options?: OrganizationsListByResourceGroupOptionalParams,\n ) => PagedAsyncIterableIterator<OrganizationResource>;\n /** Delete a OrganizationResource */\n /**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\n delete: (\n resourceGroupName: string,\n organizationname: string,\n options?: OrganizationsDeleteOptionalParams,\n ) => PollerLike<OperationState<void>, void>;\n /** Update a OrganizationResource */\n update: (\n resourceGroupName: string,\n organizationname: string,\n properties: OrganizationResourceUpdate,\n options?: OrganizationsUpdateOptionalParams,\n ) => Promise<OrganizationResource>;\n /** Create a OrganizationResource */\n createOrUpdate: (\n resourceGroupName: string,\n organizationname: string,\n resource: OrganizationResource,\n options?: OrganizationsCreateOrUpdateOptionalParams,\n ) => PollerLike<OperationState<OrganizationResource>, OrganizationResource>;\n /** Get a OrganizationResource */\n get: (\n resourceGroupName: string,\n organizationname: string,\n options?: OrganizationsGetOptionalParams,\n ) => Promise<OrganizationResource>;\n}\n\nfunction _getOrganizations(context: ObservabilityEvalContext) {\n return {\n listBySubscription: (options?: OrganizationsListBySubscriptionOptionalParams) =>\n listBySubscription(context, options),\n listByResourceGroup: (\n resourceGroupName: string,\n options?: OrganizationsListByResourceGroupOptionalParams,\n ) => listByResourceGroup(context, resourceGroupName, options),\n delete: (\n resourceGroupName: string,\n organizationname: string,\n options?: OrganizationsDeleteOptionalParams,\n ) => $delete(context, resourceGroupName, organizationname, options),\n update: (\n resourceGroupName: string,\n organizationname: string,\n properties: OrganizationResourceUpdate,\n options?: OrganizationsUpdateOptionalParams,\n ) => update(context, resourceGroupName, organizationname, properties, options),\n createOrUpdate: (\n resourceGroupName: string,\n organizationname: string,\n resource: OrganizationResource,\n options?: OrganizationsCreateOrUpdateOptionalParams,\n ) => createOrUpdate(context, resourceGroupName, organizationname, resource, options),\n get: (\n resourceGroupName: string,\n organizationname: string,\n options?: OrganizationsGetOptionalParams,\n ) => get(context, resourceGroupName, organizationname, options),\n };\n}\n\nexport function _getOrganizationsOperations(\n context: ObservabilityEvalContext,\n): OrganizationsOperations {\n return {\n ..._getOrganizations(context),\n };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/organizations/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAYlC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,cAAc,EACd,GAAG,GACJ,MAAM,uCAAuC,CAAC;AAgD/C,SAAS,iBAAiB,CAAC,OAAiC;IAC1D,OAAO;QACL,kBAAkB,EAAE,CAAC,OAAuD,EAAE,EAAE,CAC9E,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC;QACtC,mBAAmB,EAAE,CACnB,iBAAyB,EACzB,OAAwD,EACxD,EAAE,CAAC,mBAAmB,CAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,CAAC;QAC7D,MAAM,EAAE,CACN,iBAAyB,EACzB,gBAAwB,EACxB,OAA2C,EAC3C,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,OAAO,CAAC;QACnE,MAAM,EAAE,CACN,iBAAyB,EACzB,gBAAwB,EACxB,UAAsC,EACtC,OAA2C,EAC3C,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,UAAU,EAAE,OAAO,CAAC;QAC9E,cAAc,EAAE,CACd,iBAAyB,EACzB,gBAAwB,EACxB,QAA8B,EAC9B,OAAmD,EACnD,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,CAAC;QACpF,GAAG,EAAE,CACH,iBAAyB,EACzB,gBAAwB,EACxB,OAAwC,EACxC,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,OAAO,CAAC;KAChE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,OAAiC;IAEjC,OAAO;QACL,GAAG,iBAAiB,CAAC,OAAO,CAAC;KAC9B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ObservabilityEvalContext } from \"../../api/observabilityEvalContext.js\";\nimport { OrganizationResource, OrganizationResourceUpdate } from \"../../models/models.js\";\nimport {\n OrganizationsListBySubscriptionOptionalParams,\n OrganizationsListByResourceGroupOptionalParams,\n OrganizationsDeleteOptionalParams,\n OrganizationsUpdateOptionalParams,\n OrganizationsCreateOrUpdateOptionalParams,\n OrganizationsGetOptionalParams,\n} from \"../../api/organizations/options.js\";\nimport {\n listBySubscription,\n listByResourceGroup,\n $delete,\n update,\n createOrUpdate,\n get,\n} from \"../../api/organizations/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\n\n/** Interface representing a Organizations operations. */\nexport interface OrganizationsOperations {\n /** List OrganizationResource resources by subscription ID */\n listBySubscription: (\n options?: OrganizationsListBySubscriptionOptionalParams,\n ) => PagedAsyncIterableIterator<OrganizationResource>;\n /** List OrganizationResource resources by resource group */\n listByResourceGroup: (\n resourceGroupName: string,\n options?: OrganizationsListByResourceGroupOptionalParams,\n ) => PagedAsyncIterableIterator<OrganizationResource>;\n /** Delete a OrganizationResource */\n /**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\n delete: (\n resourceGroupName: string,\n organizationname: string,\n options?: OrganizationsDeleteOptionalParams,\n ) => PollerLike<OperationState<void>, void>;\n /** Update a OrganizationResource */\n update: (\n resourceGroupName: string,\n organizationname: string,\n properties: OrganizationResourceUpdate,\n options?: OrganizationsUpdateOptionalParams,\n ) => Promise<OrganizationResource>;\n /** Create a OrganizationResource */\n createOrUpdate: (\n resourceGroupName: string,\n organizationname: string,\n resource: OrganizationResource,\n options?: OrganizationsCreateOrUpdateOptionalParams,\n ) => PollerLike<OperationState<OrganizationResource>, OrganizationResource>;\n /** Get a OrganizationResource */\n get: (\n resourceGroupName: string,\n organizationname: string,\n options?: OrganizationsGetOptionalParams,\n ) => Promise<OrganizationResource>;\n}\n\nfunction _getOrganizations(context: ObservabilityEvalContext) {\n return {\n listBySubscription: (options?: OrganizationsListBySubscriptionOptionalParams) =>\n listBySubscription(context, options),\n listByResourceGroup: (\n resourceGroupName: string,\n options?: OrganizationsListByResourceGroupOptionalParams,\n ) => listByResourceGroup(context, resourceGroupName, options),\n delete: (\n resourceGroupName: string,\n organizationname: string,\n options?: OrganizationsDeleteOptionalParams,\n ) => $delete(context, resourceGroupName, organizationname, options),\n update: (\n resourceGroupName: string,\n organizationname: string,\n properties: OrganizationResourceUpdate,\n options?: OrganizationsUpdateOptionalParams,\n ) => update(context, resourceGroupName, organizationname, properties, options),\n createOrUpdate: (\n resourceGroupName: string,\n organizationname: string,\n resource: OrganizationResource,\n options?: OrganizationsCreateOrUpdateOptionalParams,\n ) => createOrUpdate(context, resourceGroupName, organizationname, resource, options),\n get: (\n resourceGroupName: string,\n organizationname: string,\n options?: OrganizationsGetOptionalParams,\n ) => get(context, resourceGroupName, organizationname, options),\n };\n}\n\nexport function _getOrganizationsOperations(\n context: ObservabilityEvalContext,\n): OrganizationsOperations {\n return {\n ..._getOrganizations(context),\n };\n}\n"]}
@@ -4,16 +4,25 @@ import { createObservabilityEval, } from "./api/index.js";
4
4
  import { _getOrganizationsOperations, } from "./classic/organizations/index.js";
5
5
  import { _getOperationsOperations } from "./classic/operations/index.js";
6
6
  export class ObservabilityEvalClient {
7
+ _client;
8
+ /** The pipeline used by this client to make requests */
9
+ pipeline;
7
10
  constructor(credential, subscriptionId, options = {}) {
8
- var _a;
9
- const prefixFromOptions = (_a = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _a === void 0 ? void 0 : _a.userAgentPrefix;
11
+ const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
10
12
  const userAgentPrefix = prefixFromOptions
11
13
  ? `${prefixFromOptions} azsdk-js-client`
12
14
  : `azsdk-js-client`;
13
- this._client = createObservabilityEval(credential, subscriptionId, Object.assign(Object.assign({}, options), { userAgentOptions: { userAgentPrefix } }));
15
+ this._client = createObservabilityEval(credential, subscriptionId, {
16
+ ...options,
17
+ userAgentOptions: { userAgentPrefix },
18
+ });
14
19
  this.pipeline = this._client.pipeline;
15
20
  this.organizations = _getOrganizationsOperations(this._client);
16
21
  this.operations = _getOperationsOperations(this._client);
17
22
  }
23
+ /** The operation groups for organizations */
24
+ organizations;
25
+ /** The operation groups for operations */
26
+ operations;
18
27
  }
19
28
  //# sourceMappingURL=observabilityEvalClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"observabilityEvalClient.js","sourceRoot":"","sources":["../../src/observabilityEvalClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,uBAAuB,GAGxB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,2BAA2B,GAC5B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAwB,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAM/F,MAAM,OAAO,uBAAuB;IAKlC,YACE,UAA2B,EAC3B,cAAsB,EACtB,UAAiD,EAAE;;QAEnD,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,uBAAuB,CAAC,UAAU,EAAE,cAAc,kCAC5D,OAAO,KACV,gBAAgB,EAAE,EAAE,eAAe,EAAE,IACrC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;QACtC,IAAI,CAAC,aAAa,GAAG,2BAA2B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/D,IAAI,CAAC,UAAU,GAAG,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;CAMF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n createObservabilityEval,\n ObservabilityEvalContext,\n ObservabilityEvalClientOptionalParams,\n} from \"./api/index.js\";\nimport {\n OrganizationsOperations,\n _getOrganizationsOperations,\n} from \"./classic/organizations/index.js\";\nimport { OperationsOperations, _getOperationsOperations } from \"./classic/operations/index.js\";\nimport { Pipeline } from \"@azure/core-rest-pipeline\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport { ObservabilityEvalClientOptionalParams } from \"./api/observabilityEvalContext.js\";\n\nexport class ObservabilityEvalClient {\n private _client: ObservabilityEvalContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options: ObservabilityEvalClientOptionalParams = {},\n ) {\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createObservabilityEval(credential, subscriptionId, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.organizations = _getOrganizationsOperations(this._client);\n this.operations = _getOperationsOperations(this._client);\n }\n\n /** The operation groups for organizations */\n public readonly organizations: OrganizationsOperations;\n /** The operation groups for operations */\n public readonly operations: OperationsOperations;\n}\n"]}
1
+ {"version":3,"file":"observabilityEvalClient.js","sourceRoot":"","sources":["../../src/observabilityEvalClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,uBAAuB,GAGxB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,2BAA2B,GAC5B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAwB,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAM/F,MAAM,OAAO,uBAAuB;IAC1B,OAAO,CAA2B;IAC1C,wDAAwD;IACxC,QAAQ,CAAW;IAEnC,YACE,UAA2B,EAC3B,cAAsB,EACtB,UAAiD,EAAE;QAEnD,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;QACrE,MAAM,eAAe,GAAG,iBAAiB;YACvC,CAAC,CAAC,GAAG,iBAAiB,kBAAkB;YACxC,CAAC,CAAC,iBAAiB,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,uBAAuB,CAAC,UAAU,EAAE,cAAc,EAAE;YACjE,GAAG,OAAO;YACV,gBAAgB,EAAE,EAAE,eAAe,EAAE;SACtC,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;QACtC,IAAI,CAAC,aAAa,GAAG,2BAA2B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/D,IAAI,CAAC,UAAU,GAAG,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,6CAA6C;IAC7B,aAAa,CAA0B;IACvD,0CAA0C;IAC1B,UAAU,CAAuB;CAClD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n createObservabilityEval,\n ObservabilityEvalContext,\n ObservabilityEvalClientOptionalParams,\n} from \"./api/index.js\";\nimport {\n OrganizationsOperations,\n _getOrganizationsOperations,\n} from \"./classic/organizations/index.js\";\nimport { OperationsOperations, _getOperationsOperations } from \"./classic/operations/index.js\";\nimport { Pipeline } from \"@azure/core-rest-pipeline\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport { ObservabilityEvalClientOptionalParams } from \"./api/observabilityEvalContext.js\";\n\nexport class ObservabilityEvalClient {\n private _client: ObservabilityEvalContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options: ObservabilityEvalClientOptionalParams = {},\n ) {\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createObservabilityEval(credential, subscriptionId, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.organizations = _getOrganizationsOperations(this._client);\n this.operations = _getOperationsOperations(this._client);\n }\n\n /** The operation groups for organizations */\n public readonly organizations: OrganizationsOperations;\n /** The operation groups for operations */\n public readonly operations: OperationsOperations;\n}\n"]}
@@ -9,21 +9,20 @@ import { deserializeState, } from "@azure/core-lro";
9
9
  * needs to be constructed after the original one is not in scope.
10
10
  */
11
11
  export function restorePoller(client, serializedState, sourceOperation, options) {
12
- var _a, _b, _c;
13
12
  const pollerConfig = deserializeState(serializedState).config;
14
13
  const { initialRequestUrl, requestMethod, metadata } = pollerConfig;
15
14
  if (!initialRequestUrl || !requestMethod) {
16
- throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation === null || sourceOperation === void 0 ? void 0 : sourceOperation.name}`);
15
+ throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`);
17
16
  }
18
- const resourceLocationConfig = metadata === null || metadata === void 0 ? void 0 : metadata["resourceLocationConfig"];
19
- const { deserializer, expectedStatuses = [] } = (_a = getDeserializationHelper(initialRequestUrl, requestMethod)) !== null && _a !== void 0 ? _a : {};
20
- const deserializeHelper = (_b = options === null || options === void 0 ? void 0 : options.processResponseBody) !== null && _b !== void 0 ? _b : deserializer;
17
+ const resourceLocationConfig = metadata?.["resourceLocationConfig"];
18
+ const { deserializer, expectedStatuses = [] } = getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};
19
+ const deserializeHelper = options?.processResponseBody ?? deserializer;
21
20
  if (!deserializeHelper) {
22
- throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation === null || sourceOperation === void 0 ? void 0 : sourceOperation.name}.`);
21
+ throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`);
23
22
  }
24
- return getLongRunningPoller((_c = client["_client"]) !== null && _c !== void 0 ? _c : client, deserializeHelper, expectedStatuses, {
25
- updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
26
- abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
23
+ return getLongRunningPoller(client["_client"] ?? client, deserializeHelper, expectedStatuses, {
24
+ updateIntervalInMs: options?.updateIntervalInMs,
25
+ abortSignal: options?.abortSignal,
27
26
  resourceLocationConfig,
28
27
  restoreFrom: serializedState,
29
28
  initialRequestUrl,
@@ -40,7 +39,6 @@ const deserializeMap = {
40
39
  },
41
40
  };
42
41
  function getDeserializationHelper(urlStr, method) {
43
- var _a, _b, _c, _d;
44
42
  const path = new URL(urlStr).pathname;
45
43
  const pathParts = path.split("/");
46
44
  // Traverse list to match the longest candidate
@@ -60,13 +58,13 @@ function getDeserializationHelper(urlStr, method) {
60
58
  // track if we have found a match to return the values found.
61
59
  let found = true;
62
60
  for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
63
- if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
64
- const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
61
+ if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) {
62
+ const start = candidateParts[i].indexOf("}") + 1, end = candidateParts[i]?.length;
65
63
  // If the current part of the candidate is a "template" part
66
64
  // Try to use the suffix of pattern to match the path
67
65
  // {guid} ==> $
68
66
  // {guid}:export ==> :export$
69
- const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
67
+ const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(pathParts[j] || "");
70
68
  if (!isMatched) {
71
69
  found = false;
72
70
  break;
@@ -1 +1 @@
1
- {"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC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KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ObservabilityEvalClient } from \"./observabilityEvalClient.js\";\nimport { _$deleteDeserialize, _createOrUpdateDeserialize } from \"./api/organizations/operations.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n PollerLike,\n OperationState,\n deserializeState,\n ResourceLocationConfig,\n} from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: ObservabilityEvalClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n | ResourceLocationConfig\n | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: Function;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}\":\n {\n deserializer: _$deleteDeserialize,\n expectedStatuses: [\"202\", \"204\", \"200\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}\":\n {\n deserializer: _createOrUpdateDeserialize,\n expectedStatuses: [\"200\", \"201\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
1
+ {"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAG1E,OAAO,EAGL,gBAAgB,GAEjB,MAAM,iBAAiB,CAAC;AAgBzB;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,MAA+B,EAC/B,eAAuB,EACvB,eAAiF,EACjF,OAAuC;IAEvC,MAAM,YAAY,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC;IACpE,IAAI,CAAC,iBAAiB,IAAI,CAAC,aAAa,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CACb,6BAA6B,eAAe,wBAAwB,eAAe,EAAE,IAAI,EAAE,CAC5F,CAAC;IACJ,CAAC;IACD,MAAM,sBAAsB,GAAG,QAAQ,EAAE,CAAC,wBAAwB,CAErD,CAAC;I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A2C;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 { ObservabilityEvalClient } from \"./observabilityEvalClient.js\";\nimport { _$deleteDeserialize, _createOrUpdateDeserialize } from \"./api/organizations/operations.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n PollerLike,\n OperationState,\n deserializeState,\n ResourceLocationConfig,\n} from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: ObservabilityEvalClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n | ResourceLocationConfig\n | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: Function;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}\":\n {\n deserializer: _$deleteDeserialize,\n expectedStatuses: [\"202\", \"204\", \"200\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}\":\n {\n deserializer: _createOrUpdateDeserialize,\n expectedStatuses: [\"200\", \"201\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}