@azure/arm-resourcegraph 5.0.0-beta.5 → 5.0.0

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 (76) hide show
  1. package/README.md +1 -1
  2. package/dist/browser/api/graphQuery/operations.js.map +1 -1
  3. package/dist/browser/api/graphQuery/options.js.map +1 -1
  4. package/dist/browser/api/operations/operations.js.map +1 -1
  5. package/dist/browser/api/operations.js.map +1 -1
  6. package/dist/browser/api/options.js.map +1 -1
  7. package/dist/browser/api/resourceGraphContext.js +3 -3
  8. package/dist/browser/api/resourceGraphContext.js.map +1 -1
  9. package/dist/browser/classic/graphQuery/index.js.map +1 -1
  10. package/dist/browser/classic/operations/index.js.map +1 -1
  11. package/dist/browser/models/graphQueryApi/models.d.ts +0 -4
  12. package/dist/browser/models/graphQueryApi/models.js +6 -0
  13. package/dist/browser/models/graphQueryApi/models.js.map +1 -1
  14. package/dist/browser/models/models.d.ts +0 -4
  15. package/dist/browser/models/models.js.map +1 -1
  16. package/dist/browser/models/resourceChanges/models.d.ts +0 -4
  17. package/dist/browser/models/resourceChanges/models.js.map +1 -1
  18. package/dist/browser/models/resourceGraphApi/models.d.ts +0 -4
  19. package/dist/browser/models/resourceGraphApi/models.js.map +1 -1
  20. package/dist/browser/models/resourceGraphCommon/models.d.ts +0 -4
  21. package/dist/browser/models/resourceGraphCommon/models.js +6 -0
  22. package/dist/browser/models/resourceGraphCommon/models.js.map +1 -1
  23. package/dist/browser/models/resourceHistory/models.d.ts +0 -4
  24. package/dist/browser/models/resourceHistory/models.js.map +1 -1
  25. package/dist/browser/resourceGraphClient.js +1 -8
  26. package/dist/browser/resourceGraphClient.js.map +1 -1
  27. package/dist/commonjs/api/graphQuery/operations.js.map +2 -2
  28. package/dist/commonjs/api/graphQuery/options.js.map +1 -1
  29. package/dist/commonjs/api/operations/operations.js.map +2 -2
  30. package/dist/commonjs/api/operations.js.map +2 -2
  31. package/dist/commonjs/api/options.js.map +1 -1
  32. package/dist/commonjs/api/resourceGraphContext.js +2 -2
  33. package/dist/commonjs/api/resourceGraphContext.js.map +2 -2
  34. package/dist/commonjs/classic/graphQuery/index.js.map +2 -2
  35. package/dist/commonjs/classic/operations/index.js.map +2 -2
  36. package/dist/commonjs/models/graphQueryApi/models.d.ts +0 -4
  37. package/dist/commonjs/models/graphQueryApi/models.js.map +2 -2
  38. package/dist/commonjs/models/models.d.ts +0 -4
  39. package/dist/commonjs/models/models.js.map +1 -1
  40. package/dist/commonjs/models/resourceChanges/models.d.ts +0 -4
  41. package/dist/commonjs/models/resourceChanges/models.js.map +1 -1
  42. package/dist/commonjs/models/resourceGraphApi/models.d.ts +0 -4
  43. package/dist/commonjs/models/resourceGraphApi/models.js.map +2 -2
  44. package/dist/commonjs/models/resourceGraphCommon/models.d.ts +0 -4
  45. package/dist/commonjs/models/resourceGraphCommon/models.js.map +2 -2
  46. package/dist/commonjs/models/resourceHistory/models.d.ts +0 -4
  47. package/dist/commonjs/models/resourceHistory/models.js.map +2 -2
  48. package/dist/commonjs/resourceGraphClient.js +1 -6
  49. package/dist/commonjs/resourceGraphClient.js.map +2 -2
  50. package/dist/commonjs/tsdoc-metadata.json +1 -1
  51. package/dist/esm/api/graphQuery/operations.js.map +1 -1
  52. package/dist/esm/api/graphQuery/options.js.map +1 -1
  53. package/dist/esm/api/operations/operations.js.map +1 -1
  54. package/dist/esm/api/operations.js.map +1 -1
  55. package/dist/esm/api/options.js.map +1 -1
  56. package/dist/esm/api/resourceGraphContext.js +3 -3
  57. package/dist/esm/api/resourceGraphContext.js.map +1 -1
  58. package/dist/esm/classic/graphQuery/index.js.map +1 -1
  59. package/dist/esm/classic/operations/index.js.map +1 -1
  60. package/dist/esm/models/graphQueryApi/models.d.ts +0 -4
  61. package/dist/esm/models/graphQueryApi/models.js +6 -0
  62. package/dist/esm/models/graphQueryApi/models.js.map +1 -1
  63. package/dist/esm/models/models.d.ts +0 -4
  64. package/dist/esm/models/models.js.map +1 -1
  65. package/dist/esm/models/resourceChanges/models.d.ts +0 -4
  66. package/dist/esm/models/resourceChanges/models.js.map +1 -1
  67. package/dist/esm/models/resourceGraphApi/models.d.ts +0 -4
  68. package/dist/esm/models/resourceGraphApi/models.js.map +1 -1
  69. package/dist/esm/models/resourceGraphCommon/models.d.ts +0 -4
  70. package/dist/esm/models/resourceGraphCommon/models.js +6 -0
  71. package/dist/esm/models/resourceGraphCommon/models.js.map +1 -1
  72. package/dist/esm/models/resourceHistory/models.d.ts +0 -4
  73. package/dist/esm/models/resourceHistory/models.js.map +1 -1
  74. package/dist/esm/resourceGraphClient.js +1 -8
  75. package/dist/esm/resourceGraphClient.js.map +1 -1
  76. package/package.json +7 -7
@@ -1,5 +1,11 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
+ /*
4
+ * This file contains only generated model types and their (de)serializers.
5
+ * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input.
6
+ */
7
+ /* eslint-disable @typescript-eslint/naming-convention */
8
+ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
3
9
  import { serializeRecord } from "../../static-helpers/serialization/serialize-record.js";
4
10
  export function dateTimeIntervalSerializer(item) {
5
11
  return { start: item["start"].toISOString(), end: item["end"].toISOString() };
@@ -1 +1 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../src/models/resourceGraphCommon/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AAgBzF,MAAM,UAAU,0BAA0B,CAAC,IAAsB;IAC/D,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;AAChF,CAAC;AAQD,MAAM,UAAU,yBAAyB,CAAC,IAAS;IACjD,OAAO;QACL,KAAK,EAAE,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KACxC,CAAC;AACJ,CAAC;AAYD,MAAM,UAAU,iBAAiB,CAAC,IAAS;IACzC,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;QAClB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC;QACxB,OAAO,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,6BAA6B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KAC7F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,MAA2B;IACvE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACzB,OAAO,wBAAwB,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC;AAYD,MAAM,UAAU,wBAAwB,CAAC,IAAS;IAChD,OAAO;QACL,oBAAoB,EAAE,eAAe,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAChE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;QAClB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC;KACzB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { serializeRecord } from \"../../static-helpers/serialization/serialize-record.js\";\n\n/**\n * This file contains only generated model types and their (de)serializers.\n * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input.\n */\n/* eslint-disable @typescript-eslint/naming-convention */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/** An interval in time specifying the date and time for the inclusive start and exclusive end, i.e. `[start, end)`. */\nexport interface DateTimeInterval {\n /** A datetime indicating the inclusive/closed start of the time interval, i.e. `[`**`start`**`, end)`. Specifying a `start` that occurs chronologically after `end` will result in an error. */\n start: Date;\n /** A datetime indicating the exclusive/open end of the time interval, i.e. `[start, `**`end`**`)`. Specifying an `end` that occurs chronologically before `start` will result in an error. */\n end: Date;\n}\n\nexport function dateTimeIntervalSerializer(item: DateTimeInterval): any {\n return { start: item[\"start\"].toISOString(), end: item[\"end\"].toISOString() };\n}\n\n/** An error response from the API. */\nexport interface ErrorResponse {\n /** Error information. */\n error: ErrorModel;\n}\n\nexport function errorResponseDeserializer(item: any): ErrorResponse {\n return {\n error: errorDeserializer(item[\"error\"]),\n };\n}\n\n/** Error details. */\nexport interface ErrorModel {\n /** Error code identifying the specific error. */\n code: string;\n /** A human readable error message. */\n message: string;\n /** Error details */\n details?: ErrorDetails[];\n}\n\nexport function errorDeserializer(item: any): ErrorModel {\n return {\n code: item[\"code\"],\n message: item[\"message\"],\n details: !item[\"details\"] ? item[\"details\"] : errorDetailsArrayDeserializer(item[\"details\"]),\n };\n}\n\nexport function errorDetailsArrayDeserializer(result: Array<ErrorDetails>): any[] {\n return result.map((item) => {\n return errorDetailsDeserializer(item);\n });\n}\n\n/** Error details. */\nexport interface ErrorDetails {\n /** Error code identifying the specific error. */\n code: string;\n /** A human readable error message. */\n message: string;\n /** Additional properties */\n additionalProperties?: Record<string, any>;\n}\n\nexport function errorDetailsDeserializer(item: any): ErrorDetails {\n return {\n additionalProperties: serializeRecord(item, [\"code\", \"message\"]),\n code: item[\"code\"],\n message: item[\"message\"],\n };\n}\n\n/** Defines in which format query result returned. */\nexport type ResultFormat = \"table\" | \"objectArray\";\n"]}
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../src/models/resourceGraphCommon/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;GAGG;AACH,yDAAyD;AACzD,sEAAsE;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AAUzF,MAAM,UAAU,0BAA0B,CAAC,IAAsB;IAC/D,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;AAChF,CAAC;AAQD,MAAM,UAAU,yBAAyB,CAAC,IAAS;IACjD,OAAO;QACL,KAAK,EAAE,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KACxC,CAAC;AACJ,CAAC;AAYD,MAAM,UAAU,iBAAiB,CAAC,IAAS;IACzC,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;QAClB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC;QACxB,OAAO,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,6BAA6B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KAC7F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,MAA2B;IACvE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACzB,OAAO,wBAAwB,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC;AAYD,MAAM,UAAU,wBAAwB,CAAC,IAAS;IAChD,OAAO;QACL,oBAAoB,EAAE,eAAe,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAChE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;QAClB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC;KACzB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/*\n * This file contains only generated model types and their (de)serializers.\n * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input.\n */\n/* eslint-disable @typescript-eslint/naming-convention */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport { serializeRecord } from \"../../static-helpers/serialization/serialize-record.js\";\n\n/** An interval in time specifying the date and time for the inclusive start and exclusive end, i.e. `[start, end)`. */\nexport interface DateTimeInterval {\n /** A datetime indicating the inclusive/closed start of the time interval, i.e. `[`**`start`**`, end)`. Specifying a `start` that occurs chronologically after `end` will result in an error. */\n start: Date;\n /** A datetime indicating the exclusive/open end of the time interval, i.e. `[start, `**`end`**`)`. Specifying an `end` that occurs chronologically before `start` will result in an error. */\n end: Date;\n}\n\nexport function dateTimeIntervalSerializer(item: DateTimeInterval): any {\n return { start: item[\"start\"].toISOString(), end: item[\"end\"].toISOString() };\n}\n\n/** An error response from the API. */\nexport interface ErrorResponse {\n /** Error information. */\n error: ErrorModel;\n}\n\nexport function errorResponseDeserializer(item: any): ErrorResponse {\n return {\n error: errorDeserializer(item[\"error\"]),\n };\n}\n\n/** Error details. */\nexport interface ErrorModel {\n /** Error code identifying the specific error. */\n code: string;\n /** A human readable error message. */\n message: string;\n /** Error details */\n details?: ErrorDetails[];\n}\n\nexport function errorDeserializer(item: any): ErrorModel {\n return {\n code: item[\"code\"],\n message: item[\"message\"],\n details: !item[\"details\"] ? item[\"details\"] : errorDetailsArrayDeserializer(item[\"details\"]),\n };\n}\n\nexport function errorDetailsArrayDeserializer(result: Array<ErrorDetails>): any[] {\n return result.map((item) => {\n return errorDetailsDeserializer(item);\n });\n}\n\n/** Error details. */\nexport interface ErrorDetails {\n /** Error code identifying the specific error. */\n code: string;\n /** A human readable error message. */\n message: string;\n /** Additional properties */\n additionalProperties?: Record<string, any>;\n}\n\nexport function errorDetailsDeserializer(item: any): ErrorDetails {\n return {\n additionalProperties: serializeRecord(item, [\"code\", \"message\"]),\n code: item[\"code\"],\n message: item[\"message\"],\n };\n}\n\n/** Defines in which format query result returned. */\nexport type ResultFormat = \"table\" | \"objectArray\";\n"]}
@@ -1,8 +1,4 @@
1
1
  import type { DateTimeInterval, ResultFormat } from "../resourceGraphCommon/models.js";
2
- /**
3
- * This file contains only generated model types and their (de)serializers.
4
- * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input.
5
- */
6
2
  /** Describes a history request to be executed. */
7
3
  export interface ResourcesHistoryRequest {
8
4
  /** Azure subscriptions against which to execute the query. */
@@ -1 +1 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../src/models/resourceHistory/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAoB9E,MAAM,UAAU,iCAAiC,CAAC,IAA6B;IAC7E,OAAO;QACL,aAAa,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC;YACnC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC;YACvB,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE;gBACnC,OAAO,CAAC,CAAC;YACX,CAAC,CAAC;QACN,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC;QACpB,OAAO,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;YACvB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;YACjB,CAAC,CAAC,wCAAwC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7D,gBAAgB,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC;YACzC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;YAC1B,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE;gBACtC,OAAO,CAAC,CAAC;YACX,CAAC,CAAC;KACP,CAAC;AACJ,CAAC;AAgBD,MAAM,UAAU,wCAAwC,CACtD,IAAoC;IAEpC,OAAO;QACL,QAAQ,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC7F,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;QACjB,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC;QACnB,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC;QAC7B,YAAY,EAAE,IAAI,CAAC,cAAc,CAAC;KACnC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { DateTimeInterval, ResultFormat } from \"../resourceGraphCommon/models.js\";\nimport { dateTimeIntervalSerializer } from \"../resourceGraphCommon/models.js\";\n\n/**\n * This file contains only generated model types and their (de)serializers.\n * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input.\n */\n/* eslint-disable @typescript-eslint/naming-convention */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/** Describes a history request to be executed. */\nexport interface ResourcesHistoryRequest {\n /** Azure subscriptions against which to execute the query. */\n subscriptions?: string[];\n /** The resources query. */\n query?: string;\n /** The history request evaluation options */\n options?: ResourcesHistoryRequestOptions;\n /** Azure management groups against which to execute the query. Example: [ 'mg1', 'mg2' ] */\n managementGroups?: string[];\n}\n\nexport function resourcesHistoryRequestSerializer(item: ResourcesHistoryRequest): any {\n return {\n subscriptions: !item[\"subscriptions\"]\n ? item[\"subscriptions\"]\n : item[\"subscriptions\"].map((p: any) => {\n return p;\n }),\n query: item[\"query\"],\n options: !item[\"options\"]\n ? item[\"options\"]\n : resourcesHistoryRequestOptionsSerializer(item[\"options\"]),\n managementGroups: !item[\"managementGroups\"]\n ? item[\"managementGroups\"]\n : item[\"managementGroups\"].map((p: any) => {\n return p;\n }),\n };\n}\n\n/** The options for history request evaluation */\nexport interface ResourcesHistoryRequestOptions {\n /** The time interval used to fetch history. */\n interval?: DateTimeInterval;\n /** The maximum number of rows that the query should return. Overrides the page size when ```$skipToken``` property is present. */\n top?: number;\n /** The number of rows to skip from the beginning of the results. Overrides the next page offset when ```$skipToken``` property is present. */\n skip?: number;\n /** Continuation token for pagination, capturing the next page size and offset, as well as the context of the query. */\n skipToken?: string;\n /** Defines in which format query result returned. */\n resultFormat?: ResultFormat;\n}\n\nexport function resourcesHistoryRequestOptionsSerializer(\n item: ResourcesHistoryRequestOptions,\n): any {\n return {\n interval: !item[\"interval\"] ? item[\"interval\"] : dateTimeIntervalSerializer(item[\"interval\"]),\n $top: item[\"top\"],\n $skip: item[\"skip\"],\n $skipToken: item[\"skipToken\"],\n resultFormat: item[\"resultFormat\"],\n };\n}\n"]}
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../src/models/resourceHistory/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAc9E,MAAM,UAAU,iCAAiC,CAAC,IAA6B;IAC7E,OAAO;QACL,aAAa,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC;YACnC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC;YACvB,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE;gBACnC,OAAO,CAAC,CAAC;YACX,CAAC,CAAC;QACN,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC;QACpB,OAAO,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;YACvB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;YACjB,CAAC,CAAC,wCAAwC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7D,gBAAgB,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC;YACzC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;YAC1B,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE;gBACtC,OAAO,CAAC,CAAC;YACX,CAAC,CAAC;KACP,CAAC;AACJ,CAAC;AAgBD,MAAM,UAAU,wCAAwC,CACtD,IAAoC;IAEpC,OAAO;QACL,QAAQ,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC7F,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;QACjB,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC;QACnB,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC;QAC7B,YAAY,EAAE,IAAI,CAAC,cAAc,CAAC;KACnC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/*\n * This file contains only generated model types and their (de)serializers.\n * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input.\n */\n/* eslint-disable @typescript-eslint/naming-convention */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport type { DateTimeInterval, ResultFormat } from \"../resourceGraphCommon/models.js\";\nimport { dateTimeIntervalSerializer } from \"../resourceGraphCommon/models.js\";\n\n/** Describes a history request to be executed. */\nexport interface ResourcesHistoryRequest {\n /** Azure subscriptions against which to execute the query. */\n subscriptions?: string[];\n /** The resources query. */\n query?: string;\n /** The history request evaluation options */\n options?: ResourcesHistoryRequestOptions;\n /** Azure management groups against which to execute the query. Example: [ 'mg1', 'mg2' ] */\n managementGroups?: string[];\n}\n\nexport function resourcesHistoryRequestSerializer(item: ResourcesHistoryRequest): any {\n return {\n subscriptions: !item[\"subscriptions\"]\n ? item[\"subscriptions\"]\n : item[\"subscriptions\"].map((p: any) => {\n return p;\n }),\n query: item[\"query\"],\n options: !item[\"options\"]\n ? item[\"options\"]\n : resourcesHistoryRequestOptionsSerializer(item[\"options\"]),\n managementGroups: !item[\"managementGroups\"]\n ? item[\"managementGroups\"]\n : item[\"managementGroups\"].map((p: any) => {\n return p;\n }),\n };\n}\n\n/** The options for history request evaluation */\nexport interface ResourcesHistoryRequestOptions {\n /** The time interval used to fetch history. */\n interval?: DateTimeInterval;\n /** The maximum number of rows that the query should return. Overrides the page size when ```$skipToken``` property is present. */\n top?: number;\n /** The number of rows to skip from the beginning of the results. Overrides the next page offset when ```$skipToken``` property is present. */\n skip?: number;\n /** Continuation token for pagination, capturing the next page size and offset, as well as the context of the query. */\n skipToken?: string;\n /** Defines in which format query result returned. */\n resultFormat?: ResultFormat;\n}\n\nexport function resourcesHistoryRequestOptionsSerializer(\n item: ResourcesHistoryRequestOptions,\n): any {\n return {\n interval: !item[\"interval\"] ? item[\"interval\"] : dateTimeIntervalSerializer(item[\"interval\"]),\n $top: item[\"top\"],\n $skip: item[\"skip\"],\n $skipToken: item[\"skipToken\"],\n resultFormat: item[\"resultFormat\"],\n };\n}\n"]}
@@ -17,14 +17,7 @@ export class ResourceGraphClient {
17
17
  options = subscriptionIdOrOptions;
18
18
  }
19
19
  options = options ?? {};
20
- const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
21
- const userAgentPrefix = prefixFromOptions
22
- ? `${prefixFromOptions} azsdk-js-client`
23
- : `azsdk-js-client`;
24
- this._client = createResourceGraph(credential, subscriptionId ?? "", {
25
- ...options,
26
- userAgentOptions: { userAgentPrefix },
27
- });
20
+ this._client = createResourceGraph(credential, subscriptionId ?? "", options);
28
21
  this.pipeline = this._client.pipeline;
29
22
  this.graphQuery = _getGraphQueryOperations(this._client);
30
23
  this.operations = _getOperationsOperations(this._client);
@@ -1 +1 @@
1
- {"version":3,"file":"resourceGraphClient.js","sourceRoot":"","sources":["../../src/resourceGraphClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,qBAAqB,EACrB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAQ7B,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAezE,MAAM,OAAO,mBAAmB;IACtB,OAAO,CAAuB;IACtC,wDAAwD;IACxC,QAAQ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mC;IACnC,qBAAqB,CACnB,UAAkD,EAClD,UAA+C,EAAE,cAAc,EAAE,EAAE,EAAE;QAErE,OAAO,qBAAqB,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED,4DAA4D;IAC5D,eAAe,CACb,UAA4C,EAC5C,UAAyC,EAAE,cAAc,EAAE,EAAE,EAAE;QAE/D,OAAO,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED,0CAA0C;IAC1B,UAAU,CAAuB;IACjD,0CAA0C;IAC1B,UAAU,CAAuB;CAClD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ResourceGraphContext, ResourceGraphClientOptionalParams } from \"./api/index.js\";\nimport { createResourceGraph } from \"./api/index.js\";\nimport {\n resourcesHistory,\n resources,\n resourceChangeDetails,\n resourceChanges,\n} from \"./api/operations.js\";\nimport type {\n ResourcesHistoryOptionalParams,\n ResourcesOptionalParams,\n ResourceChangeDetailsOptionalParams,\n ResourceChangesOptionalParams,\n} from \"./api/options.js\";\nimport type { GraphQueryOperations } from \"./classic/graphQuery/index.js\";\nimport { _getGraphQueryOperations } from \"./classic/graphQuery/index.js\";\nimport type { OperationsOperations } from \"./classic/operations/index.js\";\nimport { _getOperationsOperations } from \"./classic/operations/index.js\";\nimport type { ResourcesHistoryResponse } from \"./models/models.js\";\nimport type {\n ResourceChangesRequestParameters,\n ResourceChangeList,\n ResourceChangeData,\n ResourceChangeDetailsRequestParameters,\n} from \"./models/resourceChanges/models.js\";\nimport type { QueryRequest, QueryResponse } from \"./models/resourceGraphApi/models.js\";\nimport type { ResourcesHistoryRequest } from \"./models/resourceHistory/models.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { Pipeline } from \"@azure/core-rest-pipeline\";\n\nexport type { ResourceGraphClientOptionalParams } from \"./api/resourceGraphContext.js\";\n\nexport class ResourceGraphClient {\n private _client: ResourceGraphContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n constructor(credential: TokenCredential, options?: ResourceGraphClientOptionalParams);\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options?: ResourceGraphClientOptionalParams,\n );\n constructor(\n credential: TokenCredential,\n subscriptionIdOrOptions?: string | ResourceGraphClientOptionalParams,\n options?: ResourceGraphClientOptionalParams,\n ) {\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n options = options ?? {};\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createResourceGraph(credential, subscriptionId ?? \"\", {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.graphQuery = _getGraphQueryOperations(this._client);\n this.operations = _getOperationsOperations(this._client);\n }\n\n /** List all snapshots of a resource for a given time interval. */\n resourcesHistory(\n request: ResourcesHistoryRequest,\n options: ResourcesHistoryOptionalParams = { requestOptions: {} },\n ): Promise<ResourcesHistoryResponse> {\n return resourcesHistory(this._client, request, options);\n }\n\n /** Queries the resources managed by Azure Resource Manager for scopes specified in the request. */\n resources(\n query: QueryRequest,\n options: ResourcesOptionalParams = { requestOptions: {} },\n ): Promise<QueryResponse> {\n return resources(this._client, query, options);\n }\n\n /** Get resource change details. */\n resourceChangeDetails(\n parameters: ResourceChangeDetailsRequestParameters,\n options: ResourceChangeDetailsOptionalParams = { requestOptions: {} },\n ): Promise<ResourceChangeData[]> {\n return resourceChangeDetails(this._client, parameters, options);\n }\n\n /** List changes to a resource for a given time interval. */\n resourceChanges(\n parameters: ResourceChangesRequestParameters,\n options: ResourceChangesOptionalParams = { requestOptions: {} },\n ): Promise<ResourceChangeList> {\n return resourceChanges(this._client, parameters, options);\n }\n\n /** The operation groups for graphQuery */\n public readonly graphQuery: GraphQueryOperations;\n /** The operation groups for operations */\n public readonly operations: OperationsOperations;\n}\n"]}
1
+ {"version":3,"file":"resourceGraphClient.js","sourceRoot":"","sources":["../../src/resourceGraphClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,qBAAqB,EACrB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAQ7B,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAezE,MAAM,OAAO,mBAAmB;IACtB,OAAO,CAAuB;IACtC,wDAAwD;IACxC,QAAQ,CAAW;IAQnC,YACE,UAA2B,EAC3B,uBAAoE,EACpE,OAA2C;QAE3C,IAAI,cAAkC,CAAC;QAEvC,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;YAChD,cAAc,GAAG,uBAAuB,CAAC;QAC3C,CAAC;aAAM,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;YACvD,OAAO,GAAG,uBAAuB,CAAC;QACpC,CAAC;QAED,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,mBAAmB,CAAC,UAAU,EAAE,cAAc,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;QAC9E,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;QACtC,IAAI,CAAC,UAAU,GAAG,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,IAAI,CAAC,UAAU,GAAG,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,kEAAkE;IAClE,gBAAgB,CACd,OAAgC,EAChC,UAA0C,EAAE,cAAc,EAAE,EAAE,EAAE;QAEhE,OAAO,gBAAgB,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED,mGAAmG;IACnG,SAAS,CACP,KAAmB,EACnB,UAAmC,EAAE,cAAc,EAAE,EAAE,EAAE;QAEzD,OAAO,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;IAED,mCAAmC;IACnC,qBAAqB,CACnB,UAAkD,EAClD,UAA+C,EAAE,cAAc,EAAE,EAAE,EAAE;QAErE,OAAO,qBAAqB,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED,4DAA4D;IAC5D,eAAe,CACb,UAA4C,EAC5C,UAAyC,EAAE,cAAc,EAAE,EAAE,EAAE;QAE/D,OAAO,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED,0CAA0C;IAC1B,UAAU,CAAuB;IACjD,0CAA0C;IAC1B,UAAU,CAAuB;CAClD","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ResourceGraphContext, ResourceGraphClientOptionalParams } from \"./api/index.js\";\nimport { createResourceGraph } from \"./api/index.js\";\nimport {\n resourcesHistory,\n resources,\n resourceChangeDetails,\n resourceChanges,\n} from \"./api/operations.js\";\nimport type {\n ResourcesHistoryOptionalParams,\n ResourcesOptionalParams,\n ResourceChangeDetailsOptionalParams,\n ResourceChangesOptionalParams,\n} from \"./api/options.js\";\nimport type { GraphQueryOperations } from \"./classic/graphQuery/index.js\";\nimport { _getGraphQueryOperations } from \"./classic/graphQuery/index.js\";\nimport type { OperationsOperations } from \"./classic/operations/index.js\";\nimport { _getOperationsOperations } from \"./classic/operations/index.js\";\nimport type { ResourcesHistoryResponse } from \"./models/models.js\";\nimport type {\n ResourceChangesRequestParameters,\n ResourceChangeList,\n ResourceChangeData,\n ResourceChangeDetailsRequestParameters,\n} from \"./models/resourceChanges/models.js\";\nimport type { QueryRequest, QueryResponse } from \"./models/resourceGraphApi/models.js\";\nimport type { ResourcesHistoryRequest } from \"./models/resourceHistory/models.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { Pipeline } from \"@azure/core-rest-pipeline\";\n\nexport type { ResourceGraphClientOptionalParams } from \"./api/resourceGraphContext.js\";\n\nexport class ResourceGraphClient {\n private _client: ResourceGraphContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n constructor(credential: TokenCredential, options?: ResourceGraphClientOptionalParams);\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options?: ResourceGraphClientOptionalParams,\n );\n constructor(\n credential: TokenCredential,\n subscriptionIdOrOptions?: string | ResourceGraphClientOptionalParams,\n options?: ResourceGraphClientOptionalParams,\n ) {\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n options = options ?? {};\n this._client = createResourceGraph(credential, subscriptionId ?? \"\", options);\n this.pipeline = this._client.pipeline;\n this.graphQuery = _getGraphQueryOperations(this._client);\n this.operations = _getOperationsOperations(this._client);\n }\n\n /** List all snapshots of a resource for a given time interval. */\n resourcesHistory(\n request: ResourcesHistoryRequest,\n options: ResourcesHistoryOptionalParams = { requestOptions: {} },\n ): Promise<ResourcesHistoryResponse> {\n return resourcesHistory(this._client, request, options);\n }\n\n /** Queries the resources managed by Azure Resource Manager for scopes specified in the request. */\n resources(\n query: QueryRequest,\n options: ResourcesOptionalParams = { requestOptions: {} },\n ): Promise<QueryResponse> {\n return resources(this._client, query, options);\n }\n\n /** Get resource change details. */\n resourceChangeDetails(\n parameters: ResourceChangeDetailsRequestParameters,\n options: ResourceChangeDetailsOptionalParams = { requestOptions: {} },\n ): Promise<ResourceChangeData[]> {\n return resourceChangeDetails(this._client, parameters, options);\n }\n\n /** List changes to a resource for a given time interval. */\n resourceChanges(\n parameters: ResourceChangesRequestParameters,\n options: ResourceChangesOptionalParams = { requestOptions: {} },\n ): Promise<ResourceChangeList> {\n return resourceChanges(this._client, parameters, options);\n }\n\n /** The operation groups for graphQuery */\n public readonly graphQuery: GraphQueryOperations;\n /** The operation groups for operations */\n public readonly operations: OperationsOperations;\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/api/graphQuery/operations.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ResourceGraphContext as Client } from \"../index.js\";\nimport type {\n GraphQueryResource,\n GraphQueryUpdateParameters,\n _GraphQueryListResult,\n} from \"../../models/graphQueryApi/models.js\";\nimport {\n graphQueryResourceSerializer,\n graphQueryResourceDeserializer,\n graphQueryErrorDeserializer,\n graphQueryUpdateParametersSerializer,\n _graphQueryListResultDeserializer,\n} from \"../../models/graphQueryApi/models.js\";\nimport type { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { buildPagedAsyncIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport type {\n GraphQueryListBySubscriptionOptionalParams,\n GraphQueryListOptionalParams,\n GraphQueryDeleteOptionalParams,\n GraphQueryUpdateOptionalParams,\n GraphQueryCreateOrUpdateOptionalParams,\n GraphQueryGetOptionalParams,\n} from \"./options.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\n\nexport function _listBySubscriptionSend(\n context: Client,\n options: GraphQueryListBySubscriptionOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.ResourceGraph/queries{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n \"api%2Dversion\": \"2024-04-01\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n });\n}\n\nexport async function _listBySubscriptionDeserialize(\n result: PathUncheckedResponse,\n): Promise<_GraphQueryListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = graphQueryErrorDeserializer(result.body);\n }\n\n throw error;\n }\n\n return _graphQueryListResultDeserializer(result.body);\n}\n\n/** Get all graph queries defined within a specified subscription. */\nexport function listBySubscription(\n context: Client,\n options: GraphQueryListBySubscriptionOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<GraphQueryResource> {\n return buildPagedAsyncIterator(\n context,\n () => _listBySubscriptionSend(context, options),\n _listBySubscriptionDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\", apiVersion: \"2024-04-01\" },\n );\n}\n\nexport function _listSend(\n context: Client,\n resourceGroupName: string,\n options: GraphQueryListOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n \"api%2Dversion\": \"2024-04-01\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n });\n}\n\nexport async function _listDeserialize(\n result: PathUncheckedResponse,\n): Promise<_GraphQueryListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = graphQueryErrorDeserializer(result.body);\n }\n\n throw error;\n }\n\n return _graphQueryListResultDeserializer(result.body);\n}\n\n/** Get all graph queries defined within a specified subscription and resource group. */\nexport function list(\n context: Client,\n resourceGroupName: string,\n options: GraphQueryListOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<GraphQueryResource> {\n return buildPagedAsyncIterator(\n context,\n () => _listSend(context, resourceGroupName, options),\n _listDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\", apiVersion: \"2024-04-01\" },\n );\n}\n\nexport function _$deleteSend(\n context: Client,\n resourceGroupName: string,\n resourceName: string,\n options: GraphQueryDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n resourceName: resourceName,\n \"api%2Dversion\": \"2024-04-01\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"200\", \"204\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = graphQueryErrorDeserializer(result.body);\n }\n\n throw error;\n }\n\n return;\n}\n\n/** Delete a graph query. */\nexport async function $delete(\n context: Client,\n resourceGroupName: string,\n resourceName: string,\n options: GraphQueryDeleteOptionalParams = { requestOptions: {} },\n): Promise<void> {\n const result = await _$deleteSend(context, resourceGroupName, resourceName, options);\n return _$deleteDeserialize(result);\n}\n\nexport function _updateSend(\n context: Client,\n resourceGroupName: string,\n resourceName: string,\n body: GraphQueryUpdateParameters,\n options: GraphQueryUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n resourceName: resourceName,\n \"api%2Dversion\": \"2024-04-01\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).patch({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n body: graphQueryUpdateParametersSerializer(body),\n });\n}\n\nexport async function _updateDeserialize(\n result: PathUncheckedResponse,\n): Promise<GraphQueryResource> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = graphQueryErrorDeserializer(result.body);\n }\n\n throw error;\n }\n\n return graphQueryResourceDeserializer(result.body);\n}\n\n/** Updates a graph query that has already been added. */\nexport async function update(\n context: Client,\n resourceGroupName: string,\n resourceName: string,\n body: GraphQueryUpdateParameters,\n options: GraphQueryUpdateOptionalParams = { requestOptions: {} },\n): Promise<GraphQueryResource> {\n const result = await _updateSend(context, resourceGroupName, resourceName, body, options);\n return _updateDeserialize(result);\n}\n\nexport function _createOrUpdateSend(\n context: Client,\n resourceGroupName: string,\n resourceName: string,\n properties: GraphQueryResource,\n options: GraphQueryCreateOrUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n resourceName: resourceName,\n \"api%2Dversion\": \"2024-04-01\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n body: graphQueryResourceSerializer(properties),\n });\n}\n\nexport async function _createOrUpdateDeserialize(\n result: PathUncheckedResponse,\n): Promise<GraphQueryResource> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = graphQueryErrorDeserializer(result.body);\n }\n\n throw error;\n }\n\n return graphQueryResourceDeserializer(result.body);\n}\n\n/** Create a new graph query. */\nexport async function createOrUpdate(\n context: Client,\n resourceGroupName: string,\n resourceName: string,\n properties: GraphQueryResource,\n options: GraphQueryCreateOrUpdateOptionalParams = { requestOptions: {} },\n): Promise<GraphQueryResource> {\n const result = await _createOrUpdateSend(\n context,\n resourceGroupName,\n resourceName,\n properties,\n options,\n );\n return _createOrUpdateDeserialize(result);\n}\n\nexport function _getSend(\n context: Client,\n resourceGroupName: string,\n resourceName: string,\n options: GraphQueryGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n resourceName: resourceName,\n \"api%2Dversion\": \"2024-04-01\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n });\n}\n\nexport async function _getDeserialize(result: PathUncheckedResponse): Promise<GraphQueryResource> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = graphQueryErrorDeserializer(result.body);\n }\n\n throw error;\n }\n\n return graphQueryResourceDeserializer(result.body);\n}\n\n/** Get a single graph query by its resourceName. */\nexport async function get(\n context: Client,\n resourceGroupName: string,\n resourceName: string,\n options: GraphQueryGetOptionalParams = { requestOptions: {} },\n): Promise<GraphQueryResource> {\n const result = await _getSend(context, resourceGroupName, resourceName, options);\n return _getDeserialize(result);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,oBAMO;AAEP,2BAAwC;AACxC,yBAAkC;AAUlC,yBAAqE;AAE9D,SAAS,wBACd,SACA,UAAsD,EAAE,gBAAgB,CAAC,EAAE,GACzD;AAClB,QAAM,WAAO;AAAA,IACX;AAAA,IACA;AAAA,MACE,gBAAgB,QAAQ;AAAA,MACxB,iBAAiB;AAAA,IACnB;AAAA,IACA;AAAA,MACE,eAAe,SAAS,gBAAgB;AAAA,IAC1C;AAAA,EACF;AACA,SAAO,QAAQ,KAAK,IAAI,EAAE,IAAI;AAAA,IAC5B,OAAG,wDAAoC,OAAO;AAAA,IAC9C,SAAS,EAAE,QAAQ,oBAAoB,GAAG,QAAQ,gBAAgB,QAAQ;AAAA,EAC5E,CAAC;AACH;AAEA,eAAsB,+BACpB,QACgC;AAChC,QAAM,mBAAmB,CAAC,KAAK;AAC/B,MAAI,CAAC,iBAAiB,SAAS,OAAO,MAAM,GAAG;AAC7C,UAAM,YAAQ,oCAAgB,MAAM;AACpC,QAAI,OAAO,MAAM;AACf,YAAM,cAAU,2CAA4B,OAAO,IAAI;AAAA,IACzD;AAEA,UAAM;AAAA,EACR;AAEA,aAAO,iDAAkC,OAAO,IAAI;AACtD;AAGO,SAAS,mBACd,SACA,UAAsD,EAAE,gBAAgB,CAAC,EAAE,GAC3B;AAChD,aAAO;AAAA,IACL;AAAA,IACA,MAAM,wBAAwB,SAAS,OAAO;AAAA,IAC9C;AAAA,IACA,CAAC,KAAK;AAAA,IACN,EAAE,UAAU,SAAS,cAAc,YAAY,YAAY,aAAa;AAAA,EAC1E;AACF;AAEO,SAAS,UACd,SACA,mBACA,UA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A,IACA;AAAA,MACE,gBAAgB,QAAQ;AAAA,MACxB;AAAA,MACA;AAAA,MACA,iBAAiB;AAAA,IACnB;AAAA,IACA;AAAA,MACE,eAAe,SAAS,gBAAgB;AAAA,IAC1C;AAAA,EACF;AACA,SAAO,QAAQ,KAAK,IAAI,EAAE,IAAI;AAAA,IAC5B,OAAG,wDAAoC,OAAO;AAAA,IAC9C,SAAS,EAAE,QAAQ,oBAAoB,GAAG,QAAQ,gBAAgB,QAAQ;AAAA,EAC5E,CAAC;AACH;AAEA,eAAsB,gBAAgB,QAA4D;AAChG,QAAM,mBAAmB,CAAC,KAAK;AAC/B,MAAI,CAAC,iBAAiB,SAAS,OAAO,MAAM,GAAG;AAC7C,UAAM,YAAQ,oCAAgB,MAAM;AACpC,QAAI,OAAO,MAAM;AACf,YAAM,cAAU,2CAA4B,OAAO,IAAI;AAAA,IACzD;AAEA,UAAM;AAAA,EACR;AAEA,aAAO,8CAA+B,OAAO,IAAI;AACnD;AAGA,eAAsB,IACpB,SACA,mBACA,cACA,UAAuC,EAAE,gBAAgB,CAAC,EAAE,GAC/B;AAC7B,QAAM,SAAS,MAAM,SAAS,SAAS,mBAAmB,cAAc,OAAO;AAC/E,SAAO,gBAAgB,MAAM;AAC/B;",
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ResourceGraphContext as Client } from \"../index.js\";\nimport type {\n GraphQueryResource,\n GraphQueryUpdateParameters,\n _GraphQueryListResult,\n} from \"../../models/graphQueryApi/models.js\";\nimport {\n graphQueryResourceSerializer,\n graphQueryResourceDeserializer,\n graphQueryErrorDeserializer,\n graphQueryUpdateParametersSerializer,\n _graphQueryListResultDeserializer,\n} from \"../../models/graphQueryApi/models.js\";\nimport type { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { buildPagedAsyncIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport type {\n GraphQueryListBySubscriptionOptionalParams,\n GraphQueryListOptionalParams,\n GraphQueryDeleteOptionalParams,\n GraphQueryUpdateOptionalParams,\n GraphQueryCreateOrUpdateOptionalParams,\n GraphQueryGetOptionalParams,\n} from \"./options.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\n\nexport function _listBySubscriptionSend(\n context: Client,\n options: GraphQueryListBySubscriptionOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.ResourceGraph/queries{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n \"api%2Dversion\": \"2024-04-01\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n });\n}\n\nexport async function _listBySubscriptionDeserialize(\n result: PathUncheckedResponse,\n): Promise<_GraphQueryListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = graphQueryErrorDeserializer(result.body);\n }\n\n throw error;\n }\n\n return _graphQueryListResultDeserializer(result.body);\n}\n/** Get all graph queries defined within a specified subscription. */\nexport function listBySubscription(\n context: Client,\n options: GraphQueryListBySubscriptionOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<GraphQueryResource> {\n return buildPagedAsyncIterator(\n context,\n () => _listBySubscriptionSend(context, options),\n _listBySubscriptionDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\", apiVersion: \"2024-04-01\" },\n );\n}\n\nexport function _listSend(\n context: Client,\n resourceGroupName: string,\n options: GraphQueryListOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n \"api%2Dversion\": \"2024-04-01\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n });\n}\n\nexport async function _listDeserialize(\n result: PathUncheckedResponse,\n): Promise<_GraphQueryListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = graphQueryErrorDeserializer(result.body);\n }\n\n throw error;\n }\n\n return _graphQueryListResultDeserializer(result.body);\n}\n/** Get all graph queries defined within a specified subscription and resource group. */\nexport function list(\n context: Client,\n resourceGroupName: string,\n options: GraphQueryListOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<GraphQueryResource> {\n return buildPagedAsyncIterator(\n context,\n () => _listSend(context, resourceGroupName, options),\n _listDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\", apiVersion: \"2024-04-01\" },\n );\n}\n\nexport function _$deleteSend(\n context: Client,\n resourceGroupName: string,\n resourceName: string,\n options: GraphQueryDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n resourceName: resourceName,\n \"api%2Dversion\": \"2024-04-01\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"200\", \"204\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = graphQueryErrorDeserializer(result.body);\n }\n\n throw error;\n }\n\n return;\n}\n/** Delete a graph query. */\nexport async function $delete(\n context: Client,\n resourceGroupName: string,\n resourceName: string,\n options: GraphQueryDeleteOptionalParams = { requestOptions: {} },\n): Promise<void> {\n const result = await _$deleteSend(context, resourceGroupName, resourceName, options);\n return _$deleteDeserialize(result);\n}\n\nexport function _updateSend(\n context: Client,\n resourceGroupName: string,\n resourceName: string,\n body: GraphQueryUpdateParameters,\n options: GraphQueryUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n resourceName: resourceName,\n \"api%2Dversion\": \"2024-04-01\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).patch({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n body: graphQueryUpdateParametersSerializer(body),\n });\n}\n\nexport async function _updateDeserialize(\n result: PathUncheckedResponse,\n): Promise<GraphQueryResource> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = graphQueryErrorDeserializer(result.body);\n }\n\n throw error;\n }\n\n return graphQueryResourceDeserializer(result.body);\n}\n/** Updates a graph query that has already been added. */\nexport async function update(\n context: Client,\n resourceGroupName: string,\n resourceName: string,\n body: GraphQueryUpdateParameters,\n options: GraphQueryUpdateOptionalParams = { requestOptions: {} },\n): Promise<GraphQueryResource> {\n const result = await _updateSend(context, resourceGroupName, resourceName, body, options);\n return _updateDeserialize(result);\n}\n\nexport function _createOrUpdateSend(\n context: Client,\n resourceGroupName: string,\n resourceName: string,\n properties: GraphQueryResource,\n options: GraphQueryCreateOrUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n resourceName: resourceName,\n \"api%2Dversion\": \"2024-04-01\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n body: graphQueryResourceSerializer(properties),\n });\n}\n\nexport async function _createOrUpdateDeserialize(\n result: PathUncheckedResponse,\n): Promise<GraphQueryResource> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = graphQueryErrorDeserializer(result.body);\n }\n\n throw error;\n }\n\n return graphQueryResourceDeserializer(result.body);\n}\n/** Create a new graph query. */\nexport async function createOrUpdate(\n context: Client,\n resourceGroupName: string,\n resourceName: string,\n properties: GraphQueryResource,\n options: GraphQueryCreateOrUpdateOptionalParams = { requestOptions: {} },\n): Promise<GraphQueryResource> {\n const result = await _createOrUpdateSend(\n context,\n resourceGroupName,\n resourceName,\n properties,\n options,\n );\n return _createOrUpdateDeserialize(result);\n}\n\nexport function _getSend(\n context: Client,\n resourceGroupName: string,\n resourceName: string,\n options: GraphQueryGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n resourceGroupName: resourceGroupName,\n resourceName: resourceName,\n \"api%2Dversion\": \"2024-04-01\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n });\n}\n\nexport async function _getDeserialize(result: PathUncheckedResponse): Promise<GraphQueryResource> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = graphQueryErrorDeserializer(result.body);\n }\n\n throw error;\n }\n\n return graphQueryResourceDeserializer(result.body);\n}\n/** Get a single graph query by its resourceName. */\nexport async function get(\n context: Client,\n resourceGroupName: string,\n resourceName: string,\n options: GraphQueryGetOptionalParams = { requestOptions: {} },\n): Promise<GraphQueryResource> {\n const result = await _getSend(context, resourceGroupName, resourceName, options);\n return _getDeserialize(result);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,oBAMO;AAEP,2BAAwC;AACxC,yBAAkC;AAUlC,yBAAqE;AAE9D,SAAS,wBACd,SACA,UAAsD,EAAE,gBAAgB,CAAC,EAAE,GACzD;AAClB,QAAM,WAAO;AAAA,IACX;AAAA,IACA;AAAA,MACE,gBAAgB,QAAQ;AAAA,MACxB,iBAAiB;AAAA,IACnB;AAAA,IACA;AAAA,MACE,eAAe,SAAS,gBAAgB;AAAA,IAC1C;AAAA,EACF;AACA,SAAO,QAAQ,KAAK,IAAI,EAAE,IAAI;AAAA,IAC5B,OAAG,wDAAoC,OAAO;AAAA,IAC9C,SAAS,EAAE,QAAQ,oBAAoB,GAAG,QAAQ,gBAAgB,QAAQ;AAAA,EAC5E,CAAC;AACH;AAEA,eAAsB,+BACpB,QACgC;AAChC,QAAM,mBAAmB,CAAC,KAAK;AAC/B,MAAI,CAAC,iBAAiB,SAAS,OAAO,MAAM,GAAG;AAC7C,UAAM,YAAQ,oCAAgB,MAAM;AACpC,QAAI,OAAO,MAAM;AACf,YAAM,cAAU,2CAA4B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ourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationOptions } from \"@azure-rest/core-client\";\n\n/** Optional parameters. */\nexport interface GraphQueryListBySubscriptionOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface GraphQueryListOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface GraphQueryDeleteOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface GraphQueryUpdateOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface GraphQueryCreateOrUpdateOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface GraphQueryGetOptionalParams extends OperationOptions {}\n"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationOptions } from \"@azure-rest/core-client\";\n\n/** Optional parameters. */\nexport interface GraphQueryListBySubscriptionOptionalParams extends OperationOptions {}\n/** Optional parameters. */\nexport interface GraphQueryListOptionalParams extends OperationOptions {}\n/** Optional parameters. */\nexport interface GraphQueryDeleteOptionalParams extends OperationOptions {}\n/** Optional parameters. */\nexport interface GraphQueryUpdateOptionalParams extends OperationOptions {}\n/** Optional parameters. */\nexport interface GraphQueryCreateOrUpdateOptionalParams extends OperationOptions {}\n/** Optional parameters. */\nexport interface GraphQueryGetOptionalParams extends OperationOptions {}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/api/operations/operations.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ResourceGraphContext as Client } from \"../index.js\";\nimport type { _OperationListResult, Operation } from \"../../models/resourceGraphApi/models.js\";\nimport { _operationListResultDeserializer } from \"../../models/resourceGraphApi/models.js\";\nimport { errorResponseDeserializer } from \"../../models/resourceGraphCommon/models.js\";\nimport type { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { buildPagedAsyncIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport type { OperationsListOptionalParams } from \"./options.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\n\nexport function _listSend(\n context: Client,\n options: OperationsListOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/providers/Microsoft.ResourceGraph/operations{?api%2Dversion}\",\n {\n \"api%2Dversion\": \"2024-04-01\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\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 if (result.body) {\n error.details = errorResponseDeserializer(result.body);\n }\n\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\", apiVersion: \"2024-04-01\" },\n );\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,oBAAiD;AACjD,IAAAA,iBAA0C;AAE1C,2BAAwC;AACxC,yBAAkC;AAGlC,yBAAqE;AAE9D,SAAS,UACd,SACA,UAAwC,EAAE,gBAAgB,CAAC,EAAE,GAC3C;AAClB,QAAM,WAAO;AAAA,IACX;AAAA,IACA;AAAA,MACE,iBAAiB;AAAA,IACnB;AAAA,IACA;AAAA,MACE,eAAe,SAAS,gBAAgB;AAAA,IAC1C;AAAA,EACF;AACA,SAAO,QAAQ,KAAK,IAAI,EAAE,IAAI;AAAA,IAC5B,OAAG,wDAAoC,OAAO;AAAA,IAC9C,SAAS,EAAE,QAAQ,oBAAoB,GAAG,QAAQ,gBAAgB,QAAQ;AAAA,EAC5E,CAAC;AACH;AAEA,eAAsB,iBACpB,QAC+B;AAC/B,QAAM,mBAAmB,CAAC,KAAK;AAC/B,MAAI,CAAC,iBAAiB,SAAS,OAAO,MAAM,GAAG;AAC7C,UAAM,YAAQ,oCAAgB,MAAM;AACpC,QAAI,OAAO,MAAM;AACf,YAAM,cAAU,0CAA0B,OAAO,IAAI;AAAA,IACvD;AAEA,UAAM;AAAA,EACR;AAEA,aAAO,gDAAiC,OAAO,IAAI;AACrD;AAGO,SAAS,KACd,SACA,UAAwC,EAAE,gBAAgB,CAAC,EAAE,GACtB;AACvC,aAAO;AAAA,IACL;AAAA,IACA,MAAM,UAAU,SAAS,OAAO;AAAA,IAChC;AAAA,IACA,CAAC,KAAK;AAAA,IACN,EAAE,UAAU,SAAS,cAAc,YAAY,YAAY,aAAa;AAAA,EAC1E;AACF;",
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ResourceGraphContext as Client } from \"../index.js\";\nimport type { _OperationListResult, Operation } from \"../../models/resourceGraphApi/models.js\";\nimport { _operationListResultDeserializer } from \"../../models/resourceGraphApi/models.js\";\nimport { errorResponseDeserializer } from \"../../models/resourceGraphCommon/models.js\";\nimport type { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { buildPagedAsyncIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport type { OperationsListOptionalParams } from \"./options.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\n\nexport function _listSend(\n context: Client,\n options: OperationsListOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/providers/Microsoft.ResourceGraph/operations{?api%2Dversion}\",\n {\n \"api%2Dversion\": \"2024-04-01\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\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 if (result.body) {\n error.details = errorResponseDeserializer(result.body);\n }\n\n throw error;\n }\n\n return _operationListResultDeserializer(result.body);\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\", apiVersion: \"2024-04-01\" },\n );\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,oBAAiD;AACjD,IAAAA,iBAA0C;AAE1C,2BAAwC;AACxC,yBAAkC;AAGlC,yBAAqE;AAE9D,SAAS,UACd,SACA,UAAwC,EAAE,gBAAgB,CAAC,EAAE,GAC3C;AAClB,QAAM,WAAO;AAAA,IACX;AAAA,IACA;AAAA,MACE,iBAAiB;AAAA,IACnB;AAAA,IACA;AAAA,MACE,eAAe,SAAS,gBAAgB;AAAA,IAC1C;AAAA,EACF;AACA,SAAO,QAAQ,KAAK,IAAI,EAAE,IAAI;AAAA,IAC5B,OAAG,wDAAoC,OAAO;AAAA,IAC9C,SAAS,EAAE,QAAQ,oBAAoB,GAAG,QAAQ,gBAAgB,QAAQ;AAAA,EAC5E,CAAC;AACH;AAEA,eAAsB,iBACpB,QAC+B;AAC/B,QAAM,mBAAmB,CAAC,KAAK;AAC/B,MAAI,CAAC,iBAAiB,SAAS,OAAO,MAAM,GAAG;AAC7C,UAAM,YAAQ,oCAAgB,MAAM;AACpC,QAAI,OAAO,MAAM;AACf,YAAM,cAAU,0CAA0B,OAAO,IAAI;AAAA,IACvD;AAEA,UAAM;AAAA,EACR;AAEA,aAAO,gDAAiC,OAAO,IAAI;AACrD;AAEO,SAAS,KACd,SACA,UAAwC,EAAE,gBAAgB,CAAC,EAAE,GACtB;AACvC,aAAO;AAAA,IACL;AAAA,IACA,MAAM,UAAU,SAAS,OAAO;AAAA,IAChC;AAAA,IACA,CAAC,KAAK;AAAA,IACN,EAAE,UAAU,SAAS,cAAc,YAAY,YAAY,aAAa;AAAA,EAC1E;AACF;",
6
6
  "names": ["import_models"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/api/operations.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ResourceGraphContext as Client } from \"./index.js\";\nimport type { ResourcesHistoryResponse } from \"../models/models.js\";\nimport type {\n ResourceChangesRequestParameters,\n ResourceChangeList,\n ResourceChangeData,\n ResourceChangeDetailsRequestParameters,\n} from \"../models/resourceChanges/models.js\";\nimport {\n resourceChangesRequestParametersSerializer,\n resourceChangeListDeserializer,\n resourceChangeDataArrayDeserializer,\n resourceChangeDetailsRequestParametersSerializer,\n} from \"../models/resourceChanges/models.js\";\nimport type { QueryRequest, QueryResponse } from \"../models/resourceGraphApi/models.js\";\nimport {\n queryRequestSerializer,\n queryResponseDeserializer,\n} from \"../models/resourceGraphApi/models.js\";\nimport { errorResponseDeserializer } from \"../models/resourceGraphCommon/models.js\";\nimport type { ResourcesHistoryRequest } from \"../models/resourceHistory/models.js\";\nimport { resourcesHistoryRequestSerializer } from \"../models/resourceHistory/models.js\";\nimport { expandUrlTemplate } from \"../static-helpers/urlTemplate.js\";\nimport type {\n ResourcesHistoryOptionalParams,\n ResourcesOptionalParams,\n ResourceChangeDetailsOptionalParams,\n ResourceChangesOptionalParams,\n} from \"./options.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\n\nexport function _resourcesHistorySend(\n context: Client,\n request: ResourcesHistoryRequest,\n options: ResourcesHistoryOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/providers/Microsoft.ResourceGraph/resourcesHistory{?api%2Dversion}\",\n {\n \"api%2Dversion\": \"2021-06-01-preview\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n body: resourcesHistoryRequestSerializer(request),\n });\n}\n\nexport async function _resourcesHistoryDeserialize(\n result: PathUncheckedResponse,\n): Promise<ResourcesHistoryResponse> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = errorResponseDeserializer(result.body);\n }\n\n throw error;\n }\n\n return { body: result.body };\n}\n\n/** List all snapshots of a resource for a given time interval. */\nexport async function resourcesHistory(\n context: Client,\n request: ResourcesHistoryRequest,\n options: ResourcesHistoryOptionalParams = { requestOptions: {} },\n): Promise<ResourcesHistoryResponse> {\n const result = await _resourcesHistorySend(context, request, options);\n return _resourcesHistoryDeserialize(result);\n}\n\nexport function _resourcesSend(\n context: Client,\n query: QueryRequest,\n options: ResourcesOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/providers/Microsoft.ResourceGraph/resources{?api%2Dversion}\",\n {\n \"api%2Dversion\": \"2024-04-01\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n body: queryRequestSerializer(query),\n });\n}\n\nexport async function _resourcesDeserialize(result: PathUncheckedResponse): Promise<QueryResponse> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = errorResponseDeserializer(result.body);\n }\n\n throw error;\n }\n\n return queryResponseDeserializer(result.body);\n}\n\n/** Queries the resources managed by Azure Resource Manager for scopes specified in the request. */\nexport async function resources(\n context: Client,\n query: QueryRequest,\n options: ResourcesOptionalParams = { requestOptions: {} },\n): Promise<QueryResponse> {\n const result = await _resourcesSend(context, query, options);\n return _resourcesDeserialize(result);\n}\n\nexport function _resourceChangeDetailsSend(\n context: Client,\n parameters: ResourceChangeDetailsRequestParameters,\n options: ResourceChangeDetailsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/providers/Microsoft.ResourceGraph/resourceChangeDetails{?api%2Dversion}\",\n {\n \"api%2Dversion\": \"2020-09-01-preview\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n body: resourceChangeDetailsRequestParametersSerializer(parameters),\n });\n}\n\nexport async function _resourceChangeDetailsDeserialize(\n result: PathUncheckedResponse,\n): Promise<ResourceChangeData[]> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = errorResponseDeserializer(result.body);\n }\n\n throw error;\n }\n\n return resourceChangeDataArrayDeserializer(result.body);\n}\n\n/** Get resource change details. */\nexport async function resourceChangeDetails(\n context: Client,\n parameters: ResourceChangeDetailsRequestParameters,\n options: ResourceChangeDetailsOptionalParams = { requestOptions: {} },\n): Promise<ResourceChangeData[]> {\n const result = await _resourceChangeDetailsSend(context, parameters, options);\n return _resourceChangeDetailsDeserialize(result);\n}\n\nexport function _resourceChangesSend(\n context: Client,\n parameters: ResourceChangesRequestParameters,\n options: ResourceChangesOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/providers/Microsoft.ResourceGraph/resourceChanges{?api%2Dversion}\",\n {\n \"api%2Dversion\": \"2020-09-01-preview\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n body: resourceChangesRequestParametersSerializer(parameters),\n });\n}\n\nexport async function _resourceChangesDeserialize(\n result: PathUncheckedResponse,\n): Promise<ResourceChangeList> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = errorResponseDeserializer(result.body);\n }\n\n throw error;\n }\n\n return resourceChangeListDeserializer(result.body);\n}\n\n/** List changes to a resource for a given time interval. */\nexport async function resourceChanges(\n context: Client,\n parameters: ResourceChangesRequestParameters,\n options: ResourceChangesOptionalParams = { requestOptions: {} },\n): Promise<ResourceChangeList> {\n const result = await _resourceChangesSend(context, parameters, options);\n return _resourceChangesDeserialize(result);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,oBAKO;AAEP,IAAAA,iBAGO;AACP,IAAAA,iBAA0C;AAE1C,IAAAA,iBAAkD;AAClD,yBAAkC;AAQlC,yBAAqE;AAE9D,SAAS,sBACd,SACA,SACA,UAA0C,EAAE,gBAAgB,CAAC,EAAE,GAC7C;AAClB,QAAM,WAAO;AAAA,IACX;AAAA,IACA;AAAA,MACE,iBAAiB;AAA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qBACd,SACA,YACA,UAAyC,EAAE,gBAAgB,CAAC,EAAE,GAC5C;AAClB,QAAM,WAAO;AAAA,IACX;AAAA,IACA;AAAA,MACE,iBAAiB;AAAA,IACnB;AAAA,IACA;AAAA,MACE,eAAe,SAAS,gBAAgB;AAAA,IAC1C;AAAA,EACF;AACA,SAAO,QAAQ,KAAK,IAAI,EAAE,KAAK;AAAA,IAC7B,OAAG,wDAAoC,OAAO;AAAA,IAC9C,aAAa;AAAA,IACb,SAAS,EAAE,QAAQ,oBAAoB,GAAG,QAAQ,gBAAgB,QAAQ;AAAA,IAC1E,UAAM,0DAA2C,UAAU;AAAA,EAC7D,CAAC;AACH;AAEA,eAAsB,4BACpB,QAC6B;AAC7B,QAAM,mBAAmB,CAAC,KAAK;AAC/B,MAAI,CAAC,iBAAiB,SAAS,OAAO,MAAM,GAAG;AAC7C,UAAM,YAAQ,oCAAgB,MAAM;AACpC,QAAI,OAAO,MAAM;AACf,YAAM,cAAU,0CAA0B,OAAO,IAAI;AAAA,IACvD;AAEA,UAAM;AAAA,EACR;AAEA,aAAO,8CAA+B,OAAO,IAAI;AACnD;AAGA,eAAsB,gBACpB,SACA,YACA,UAAyC,EAAE,gBAAgB,CAAC,EAAE,GACjC;AAC7B,QAAM,SAAS,MAAM,qBAAqB,SAAS,YAAY,OAAO;AACtE,SAAO,4BAA4B,MAAM;AAC3C;",
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ResourceGraphContext as Client } from \"./index.js\";\nimport type { ResourcesHistoryResponse } from \"../models/models.js\";\nimport type {\n ResourceChangesRequestParameters,\n ResourceChangeList,\n ResourceChangeData,\n ResourceChangeDetailsRequestParameters,\n} from \"../models/resourceChanges/models.js\";\nimport {\n resourceChangesRequestParametersSerializer,\n resourceChangeListDeserializer,\n resourceChangeDataArrayDeserializer,\n resourceChangeDetailsRequestParametersSerializer,\n} from \"../models/resourceChanges/models.js\";\nimport type { QueryRequest, QueryResponse } from \"../models/resourceGraphApi/models.js\";\nimport {\n queryRequestSerializer,\n queryResponseDeserializer,\n} from \"../models/resourceGraphApi/models.js\";\nimport { errorResponseDeserializer } from \"../models/resourceGraphCommon/models.js\";\nimport type { ResourcesHistoryRequest } from \"../models/resourceHistory/models.js\";\nimport { resourcesHistoryRequestSerializer } from \"../models/resourceHistory/models.js\";\nimport { expandUrlTemplate } from \"../static-helpers/urlTemplate.js\";\nimport type {\n ResourcesHistoryOptionalParams,\n ResourcesOptionalParams,\n ResourceChangeDetailsOptionalParams,\n ResourceChangesOptionalParams,\n} from \"./options.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\n\nexport function _resourcesHistorySend(\n context: Client,\n request: ResourcesHistoryRequest,\n options: ResourcesHistoryOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/providers/Microsoft.ResourceGraph/resourcesHistory{?api%2Dversion}\",\n {\n \"api%2Dversion\": \"2021-06-01-preview\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n body: resourcesHistoryRequestSerializer(request),\n });\n}\n\nexport async function _resourcesHistoryDeserialize(\n result: PathUncheckedResponse,\n): Promise<ResourcesHistoryResponse> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = errorResponseDeserializer(result.body);\n }\n\n throw error;\n }\n\n return { body: result.body };\n}\n/** List all snapshots of a resource for a given time interval. */\nexport async function resourcesHistory(\n context: Client,\n request: ResourcesHistoryRequest,\n options: ResourcesHistoryOptionalParams = { requestOptions: {} },\n): Promise<ResourcesHistoryResponse> {\n const result = await _resourcesHistorySend(context, request, options);\n return _resourcesHistoryDeserialize(result);\n}\n\nexport function _resourcesSend(\n context: Client,\n query: QueryRequest,\n options: ResourcesOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/providers/Microsoft.ResourceGraph/resources{?api%2Dversion}\",\n {\n \"api%2Dversion\": \"2024-04-01\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n body: queryRequestSerializer(query),\n });\n}\n\nexport async function _resourcesDeserialize(result: PathUncheckedResponse): Promise<QueryResponse> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = errorResponseDeserializer(result.body);\n }\n\n throw error;\n }\n\n return queryResponseDeserializer(result.body);\n}\n/** Queries the resources managed by Azure Resource Manager for scopes specified in the request. */\nexport async function resources(\n context: Client,\n query: QueryRequest,\n options: ResourcesOptionalParams = { requestOptions: {} },\n): Promise<QueryResponse> {\n const result = await _resourcesSend(context, query, options);\n return _resourcesDeserialize(result);\n}\n\nexport function _resourceChangeDetailsSend(\n context: Client,\n parameters: ResourceChangeDetailsRequestParameters,\n options: ResourceChangeDetailsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/providers/Microsoft.ResourceGraph/resourceChangeDetails{?api%2Dversion}\",\n {\n \"api%2Dversion\": \"2020-09-01-preview\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n body: resourceChangeDetailsRequestParametersSerializer(parameters),\n });\n}\n\nexport async function _resourceChangeDetailsDeserialize(\n result: PathUncheckedResponse,\n): Promise<ResourceChangeData[]> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = errorResponseDeserializer(result.body);\n }\n\n throw error;\n }\n\n return resourceChangeDataArrayDeserializer(result.body);\n}\n/** Get resource change details. */\nexport async function resourceChangeDetails(\n context: Client,\n parameters: ResourceChangeDetailsRequestParameters,\n options: ResourceChangeDetailsOptionalParams = { requestOptions: {} },\n): Promise<ResourceChangeData[]> {\n const result = await _resourceChangeDetailsSend(context, parameters, options);\n return _resourceChangeDetailsDeserialize(result);\n}\n\nexport function _resourceChangesSend(\n context: Client,\n parameters: ResourceChangesRequestParameters,\n options: ResourceChangesOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/providers/Microsoft.ResourceGraph/resourceChanges{?api%2Dversion}\",\n {\n \"api%2Dversion\": \"2020-09-01-preview\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n body: resourceChangesRequestParametersSerializer(parameters),\n });\n}\n\nexport async function _resourceChangesDeserialize(\n result: PathUncheckedResponse,\n): Promise<ResourceChangeList> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n if (result.body) {\n error.details = errorResponseDeserializer(result.body);\n }\n\n throw error;\n }\n\n return resourceChangeListDeserializer(result.body);\n}\n/** List changes to a resource for a given time interval. */\nexport async function resourceChanges(\n context: Client,\n parameters: ResourceChangesRequestParameters,\n options: ResourceChangesOptionalParams = { requestOptions: {} },\n): Promise<ResourceChangeList> {\n const result = await _resourceChangesSend(context, parameters, options);\n return _resourceChangesDeserialize(result);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,oBAKO;AAEP,IAAAA,iBAGO;AACP,IAAAA,i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DAAoC,OAAO,IAAI;AACxD;AAEA,eAAsB,sBACpB,SACA,YACA,UAA+C,EAAE,gBAAgB,CAAC,EAAE,GACrC;AAC/B,QAAM,SAAS,MAAM,2BAA2B,SAAS,YAAY,OAAO;AAC5E,SAAO,kCAAkC,MAAM;AACjD;AAEO,SAAS,qBACd,SACA,YACA,UAAyC,EAAE,gBAAgB,CAAC,EAAE,GAC5C;AAClB,QAAM,WAAO;AAAA,IACX;AAAA,IACA;AAAA,MACE,iBAAiB;AAAA,IACnB;AAAA,IACA;AAAA,MACE,eAAe,SAAS,gBAAgB;AAAA,IAC1C;AAAA,EACF;AACA,SAAO,QAAQ,KAAK,IAAI,EAAE,KAAK;AAAA,IAC7B,OAAG,wDAAoC,OAAO;AAAA,IAC9C,aAAa;AAAA,IACb,SAAS,EAAE,QAAQ,oBAAoB,GAAG,QAAQ,gBAAgB,QAAQ;AAAA,IAC1E,UAAM,0DAA2C,UAAU;AAAA,EAC7D,CAAC;AACH;AAEA,eAAsB,4BACpB,QAC6B;AAC7B,QAAM,mBAAmB,CAAC,KAAK;AAC/B,MAAI,CAAC,iBAAiB,SAAS,OAAO,MAAM,GAAG;AAC7C,UAAM,YAAQ,oCAAgB,MAAM;AACpC,QAAI,OAAO,MAAM;AACf,YAAM,cAAU,0CAA0B,OAAO,IAAI;AAAA,IACvD;AAEA,UAAM;AAAA,EACR;AAEA,aAAO,8CAA+B,OAAO,IAAI;AACnD;AAEA,eAAsB,gBACpB,SACA,YACA,UAAyC,EAAE,gBAAgB,CAAC,EAAE,GACjC;AAC7B,QAAM,SAAS,MAAM,qBAAqB,SAAS,YAAY,OAAO;AACtE,SAAO,4BAA4B,MAAM;AAC3C;",
6
6
  "names": ["import_models"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/api/options.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationOptions } from \"@azure-rest/core-client\";\n\n/** Optional parameters. */\nexport interface ResourcesHistoryOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface ResourcesOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface ResourceChangeDetailsOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface ResourceChangesOptionalParams extends OperationOptions {}\n"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationOptions } from \"@azure-rest/core-client\";\n\n/** Optional parameters. */\nexport interface ResourcesHistoryOptionalParams extends OperationOptions {}\n/** Optional parameters. */\nexport interface ResourcesOptionalParams extends OperationOptions {}\n/** Optional parameters. */\nexport interface ResourceChangeDetailsOptionalParams extends OperationOptions {}\n/** Optional parameters. */\nexport interface ResourceChangesOptionalParams extends OperationOptions {}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -26,8 +26,8 @@ var import_core_client = require("@azure-rest/core-client");
26
26
  function createResourceGraph(credential, subscriptionId, options = {}) {
27
27
  const endpointUrl = options.endpoint ?? (0, import_cloudSettingHelpers.getArmEndpoint)(options.cloudSetting) ?? "https://management.azure.com";
28
28
  const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
29
- const userAgentInfo = `azsdk-js-arm-resourcegraph/5.0.0-beta.5`;
30
- const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` : `azsdk-js-api ${userAgentInfo}`;
29
+ const userAgentInfo = `azsdk-js-arm-resourcegraph/5.0.0`;
30
+ const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} ${userAgentInfo}` : `${userAgentInfo}`;
31
31
  const { apiVersion: _, ...updatedOptions } = {
32
32
  ...options,
33
33
  userAgentOptions: { userAgentPrefix },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/api/resourceGraphContext.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport type { AzureSupportedClouds } from \"../static-helpers/cloudSettingHelpers.js\";\nimport { getArmEndpoint } from \"../static-helpers/cloudSettingHelpers.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\n\nexport interface ResourceGraphContext extends Client {\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 ResourceGraphClientOptionalParams extends ClientOptions {\n /** Specifies the Azure cloud environment for the client. */\n cloudSetting?: AzureSupportedClouds;\n}\n\nexport function createResourceGraph(\n credential: TokenCredential,\n subscriptionId: string,\n options: ResourceGraphClientOptionalParams = {},\n): ResourceGraphContext {\n const endpointUrl =\n options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? \"https://management.azure.com\";\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-resourcegraph/5.0.0-beta.5`;\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 ?? [\"https://management.azure.com/.default\"],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n\n if (options.apiVersion) {\n logger.warning(\n \"This client does not support client api-version, please change it at the operation level\",\n );\n }\n return { ...clientContext, subscriptionId } as ResourceGraphContext;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAuB;AAEvB,iCAA+B;AAE/B,yBAA0B;AAcnB,SAAS,oBACd,YACA,gBACA,UAA6C,CAAC,GACxB;AACtB,QAAM,cACJ,QAAQ,gBAAY,2CAAe,QAAQ,YAAY,KAAK;AAC9D,QAAM,oBAAoB,SAAS,kBAAkB;AACrD,QAAM,gBAAgB;AACtB,QAAM,kBAAkB,oBACpB,GAAG,iBAAiB,iBAAiB,aAAa,KAClD,gBAAgB,aAAa;AACjC,QAAM,EAAE,YAAY,GAAG,GAAG,eAAe,IAAI;AAAA,IAC3C,GAAG;AAAA,IACH,kBAAkB,EAAE,gBAAgB;AAAA,IACpC,gBAAgB,EAAE,QAAQ,QAAQ,gBAAgB,UAAU,qBAAO,KAAK;AAAA,IACxE,aAAa;AAAA,MACX,QAAQ,QAAQ,aAAa,UAAU,CAAC,uCAAuC;AAAA,IACjF;AAAA,EACF;AACA,QAAM,oBAAgB,8BAAU,aAAa,YAAY,cAAc;AAEvE,MAAI,QAAQ,YAAY;AACtB,yBAAO;AAAA,MACL;AAAA,IACF;AAAA,EACF;AACA,SAAO,EAAE,GAAG,eAAe,eAAe;AAC5C;",
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport type { AzureSupportedClouds } from \"../static-helpers/cloudSettingHelpers.js\";\nimport { getArmEndpoint } from \"../static-helpers/cloudSettingHelpers.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\n\nexport interface ResourceGraphContext extends Client {\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 ResourceGraphClientOptionalParams extends ClientOptions {\n /** Specifies the Azure cloud environment for the client. */\n cloudSetting?: AzureSupportedClouds;\n}\n\nexport function createResourceGraph(\n credential: TokenCredential,\n subscriptionId: string,\n options: ResourceGraphClientOptionalParams = {},\n): ResourceGraphContext {\n const endpointUrl =\n options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? \"https://management.azure.com\";\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-resourcegraph/5.0.0`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} ${userAgentInfo}`\n : `${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 ?? [\"https://management.azure.com/.default\"],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n\n if (options.apiVersion) {\n logger.warning(\n \"This client does not support client api-version, please change it at the operation level\",\n );\n }\n return { ...clientContext, subscriptionId } as ResourceGraphContext;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAuB;AAEvB,iCAA+B;AAE/B,yBAA0B;AAcnB,SAAS,oBACd,YACA,gBACA,UAA6C,CAAC,GACxB;AACtB,QAAM,cACJ,QAAQ,gBAAY,2CAAe,QAAQ,YAAY,KAAK;AAC9D,QAAM,oBAAoB,SAAS,kBAAkB;AACrD,QAAM,gBAAgB;AACtB,QAAM,kBAAkB,oBACpB,GAAG,iBAAiB,IAAI,aAAa,KACrC,GAAG,aAAa;AACpB,QAAM,EAAE,YAAY,GAAG,GAAG,eAAe,IAAI;AAAA,IAC3C,GAAG;AAAA,IACH,kBAAkB,EAAE,gBAAgB;AAAA,IACpC,gBAAgB,EAAE,QAAQ,QAAQ,gBAAgB,UAAU,qBAAO,KAAK;AAAA,IACxE,aAAa;AAAA,MACX,QAAQ,QAAQ,aAAa,UAAU,CAAC,uCAAuC;AAAA,IACjF;AAAA,EACF;AACA,QAAM,oBAAgB,8BAAU,aAAa,YAAY,cAAc;AAEvE,MAAI,QAAQ,YAAY;AACtB,yBAAO;AAAA,MACL;AAAA,IACF;AAAA,EACF;AACA,SAAO,EAAE,GAAG,eAAe,eAAe;AAC5C;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/classic/graphQuery/index.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ResourceGraphContext } from \"../../api/resourceGraphContext.js\";\nimport {\n listBySubscription,\n list,\n $delete,\n update,\n createOrUpdate,\n get,\n} from \"../../api/graphQuery/operations.js\";\nimport type {\n GraphQueryListBySubscriptionOptionalParams,\n GraphQueryListOptionalParams,\n GraphQueryDeleteOptionalParams,\n GraphQueryUpdateOptionalParams,\n GraphQueryCreateOrUpdateOptionalParams,\n GraphQueryGetOptionalParams,\n} from \"../../api/graphQuery/options.js\";\nimport type {\n GraphQueryResource,\n GraphQueryUpdateParameters,\n} from \"../../models/graphQueryApi/models.js\";\nimport type { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a GraphQuery operations. */\nexport interface GraphQueryOperations {\n /** Get all graph queries defined within a specified subscription. */\n listBySubscription: (\n options?: GraphQueryListBySubscriptionOptionalParams,\n ) => PagedAsyncIterableIterator<GraphQueryResource>;\n /** Get all graph queries defined within a specified subscription and resource group. */\n list: (\n resourceGroupName: string,\n options?: GraphQueryListOptionalParams,\n ) => PagedAsyncIterableIterator<GraphQueryResource>;\n /** Delete a graph query. */\n delete: (\n resourceGroupName: string,\n resourceName: string,\n options?: GraphQueryDeleteOptionalParams,\n ) => Promise<void>;\n /** Updates a graph query that has already been added. */\n update: (\n resourceGroupName: string,\n resourceName: string,\n body: GraphQueryUpdateParameters,\n options?: GraphQueryUpdateOptionalParams,\n ) => Promise<GraphQueryResource>;\n /** Create a new graph query. */\n createOrUpdate: (\n resourceGroupName: string,\n resourceName: string,\n properties: GraphQueryResource,\n options?: GraphQueryCreateOrUpdateOptionalParams,\n ) => Promise<GraphQueryResource>;\n /** Get a single graph query by its resourceName. */\n get: (\n resourceGroupName: string,\n resourceName: string,\n options?: GraphQueryGetOptionalParams,\n ) => Promise<GraphQueryResource>;\n}\n\nfunction _getGraphQuery(context: ResourceGraphContext) {\n return {\n listBySubscription: (options?: GraphQueryListBySubscriptionOptionalParams) =>\n listBySubscription(context, options),\n list: (resourceGroupName: string, options?: GraphQueryListOptionalParams) =>\n list(context, resourceGroupName, options),\n delete: (\n resourceGroupName: string,\n resourceName: string,\n options?: GraphQueryDeleteOptionalParams,\n ) => $delete(context, resourceGroupName, resourceName, options),\n update: (\n resourceGroupName: string,\n resourceName: string,\n body: GraphQueryUpdateParameters,\n options?: GraphQueryUpdateOptionalParams,\n ) => update(context, resourceGroupName, resourceName, body, options),\n createOrUpdate: (\n resourceGroupName: string,\n resourceName: string,\n properties: GraphQueryResource,\n options?: GraphQueryCreateOrUpdateOptionalParams,\n ) => createOrUpdate(context, resourceGroupName, resourceName, properties, options),\n get: (resourceGroupName: string, resourceName: string, options?: GraphQueryGetOptionalParams) =>\n get(context, resourceGroupName, resourceName, options),\n };\n}\n\nexport function _getGraphQueryOperations(context: ResourceGraphContext): GraphQueryOperations {\n return {\n ..._getGraphQuery(context),\n };\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,wBAOO;AAsDP,SAAS,eAAe,SAA+B;AACrD,SAAO;AAAA,IACL,oBAAoB,CAAC,gBACnB,sCAAmB,SAAS,OAAO;AAAA,IACrC,MAAM,CAAC,mBAA2B,gBAChC,wBAAK,SAAS,mBAAmB,OAAO;AAAA,IAC1C,QAAQ,CACN,mBACA,cACA,gBACG,2BAAQ,SAAS,mBAAmB,cAAc,OAAO;AAAA,IAC9D,QAAQ,CACN,mBACA,cACA,MACA,gBACG,0BAAO,SAAS,mBAAmB,cAAc,MAAM,OAAO;AAAA,IACnE,gBAAgB,CACd,mBACA,cACA,YACA,gBACG,kCAAe,SAAS,mBAAmB,cAAc,YAAY,OAAO;AAAA,IACjF,KAAK,CAAC,mBAA2B,cAAsB,gBACrD,uBAAI,SAAS,mBAAmB,cAAc,OAAO;AAAA,EACzD;AACF;AAEO,SAAS,yBAAyB,SAAqD;AAC5F,SAAO;AAAA,IACL,GAAG,eAAe,OAAO;AAAA,EAC3B;AACF;",
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ResourceGraphContext } from \"../../api/resourceGraphContext.js\";\nimport {\n listBySubscription,\n list,\n $delete,\n update,\n createOrUpdate,\n get,\n} from \"../../api/graphQuery/operations.js\";\nimport type {\n GraphQueryListBySubscriptionOptionalParams,\n GraphQueryListOptionalParams,\n GraphQueryDeleteOptionalParams,\n GraphQueryUpdateOptionalParams,\n GraphQueryCreateOrUpdateOptionalParams,\n GraphQueryGetOptionalParams,\n} from \"../../api/graphQuery/options.js\";\nimport type {\n GraphQueryResource,\n GraphQueryUpdateParameters,\n} from \"../../models/graphQueryApi/models.js\";\nimport type { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a GraphQuery operations. */\nexport interface GraphQueryOperations {\n /** Get all graph queries defined within a specified subscription. */\n listBySubscription: (\n options?: GraphQueryListBySubscriptionOptionalParams,\n ) => PagedAsyncIterableIterator<GraphQueryResource>;\n /** Get all graph queries defined within a specified subscription and resource group. */\n list: (\n resourceGroupName: string,\n options?: GraphQueryListOptionalParams,\n ) => PagedAsyncIterableIterator<GraphQueryResource>;\n /** Delete a graph query. */\n delete: (\n resourceGroupName: string,\n resourceName: string,\n options?: GraphQueryDeleteOptionalParams,\n ) => Promise<void>;\n /** Updates a graph query that has already been added. */\n update: (\n resourceGroupName: string,\n resourceName: string,\n body: GraphQueryUpdateParameters,\n options?: GraphQueryUpdateOptionalParams,\n ) => Promise<GraphQueryResource>;\n /** Create a new graph query. */\n createOrUpdate: (\n resourceGroupName: string,\n resourceName: string,\n properties: GraphQueryResource,\n options?: GraphQueryCreateOrUpdateOptionalParams,\n ) => Promise<GraphQueryResource>;\n /** Get a single graph query by its resourceName. */\n get: (\n resourceGroupName: string,\n resourceName: string,\n options?: GraphQueryGetOptionalParams,\n ) => Promise<GraphQueryResource>;\n}\nfunction _getGraphQuery(context: ResourceGraphContext) {\n return {\n listBySubscription: (options?: GraphQueryListBySubscriptionOptionalParams) =>\n listBySubscription(context, options),\n list: (resourceGroupName: string, options?: GraphQueryListOptionalParams) =>\n list(context, resourceGroupName, options),\n delete: (\n resourceGroupName: string,\n resourceName: string,\n options?: GraphQueryDeleteOptionalParams,\n ) => $delete(context, resourceGroupName, resourceName, options),\n update: (\n resourceGroupName: string,\n resourceName: string,\n body: GraphQueryUpdateParameters,\n options?: GraphQueryUpdateOptionalParams,\n ) => update(context, resourceGroupName, resourceName, body, options),\n createOrUpdate: (\n resourceGroupName: string,\n resourceName: string,\n properties: GraphQueryResource,\n options?: GraphQueryCreateOrUpdateOptionalParams,\n ) => createOrUpdate(context, resourceGroupName, resourceName, properties, options),\n get: (resourceGroupName: string, resourceName: string, options?: GraphQueryGetOptionalParams) =>\n get(context, resourceGroupName, resourceName, options),\n };\n}\nexport function _getGraphQueryOperations(context: ResourceGraphContext): GraphQueryOperations {\n return {\n ..._getGraphQuery(context),\n };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,wBAOO;AAqDP,SAAS,eAAe,SAA+B;AACrD,SAAO;AAAA,IACL,oBAAoB,CAAC,gBACnB,sCAAmB,SAAS,OAAO;AAAA,IACrC,MAAM,CAAC,mBAA2B,gBAChC,wBAAK,SAAS,mBAAmB,OAAO;AAAA,IAC1C,QAAQ,CACN,mBACA,cACA,gBACG,2BAAQ,SAAS,mBAAmB,cAAc,OAAO;AAAA,IAC9D,QAAQ,CACN,mBACA,cACA,MACA,gBACG,0BAAO,SAAS,mBAAmB,cAAc,MAAM,OAAO;AAAA,IACnE,gBAAgB,CACd,mBACA,cACA,YACA,gBACG,kCAAe,SAAS,mBAAmB,cAAc,YAAY,OAAO;AAAA,IACjF,KAAK,CAAC,mBAA2B,cAAsB,gBACrD,uBAAI,SAAS,mBAAmB,cAAc,OAAO;AAAA,EACzD;AACF;AACO,SAAS,yBAAyB,SAAqD;AAC5F,SAAO;AAAA,IACL,GAAG,eAAe,OAAO;AAAA,EAC3B;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/classic/operations/index.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ResourceGraphContext } from \"../../api/resourceGraphContext.js\";\nimport { list } from \"../../api/operations/operations.js\";\nimport type { OperationsListOptionalParams } from \"../../api/operations/options.js\";\nimport type { Operation } from \"../../models/resourceGraphApi/models.js\";\nimport type { 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: ResourceGraphContext) {\n return {\n list: (options?: OperationsListOptionalParams) => list(context, options),\n };\n}\n\nexport function _getOperationsOperations(context: ResourceGraphContext): OperationsOperations {\n return {\n ..._getOperations(context),\n };\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,wBAAqB;AAWrB,SAAS,eAAe,SAA+B;AACrD,SAAO;AAAA,IACL,MAAM,CAAC,gBAA2C,wBAAK,SAAS,OAAO;AAAA,EACzE;AACF;AAEO,SAAS,yBAAyB,SAAqD;AAC5F,SAAO;AAAA,IACL,GAAG,eAAe,OAAO;AAAA,EAC3B;AACF;",
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ResourceGraphContext } from \"../../api/resourceGraphContext.js\";\nimport { list } from \"../../api/operations/operations.js\";\nimport type { OperationsListOptionalParams } from \"../../api/operations/options.js\";\nimport type { Operation } from \"../../models/resourceGraphApi/models.js\";\nimport type { 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}\nfunction _getOperations(context: ResourceGraphContext) {\n return {\n list: (options?: OperationsListOptionalParams) => list(context, options),\n };\n}\nexport function _getOperationsOperations(context: ResourceGraphContext): OperationsOperations {\n return {\n ..._getOperations(context),\n };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,wBAAqB;AAUrB,SAAS,eAAe,SAA+B;AACrD,SAAO;AAAA,IACL,MAAM,CAAC,gBAA2C,wBAAK,SAAS,OAAO;AAAA,EACzE;AACF;AACO,SAAS,yBAAyB,SAAqD;AAC5F,SAAO;AAAA,IACL,GAAG,eAAe,OAAO;AAAA,EAC3B;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,4 @@
1
1
  import type { ProxyResource } from "../models.js";
2
- /**
3
- * This file contains only generated model types and their (de)serializers.
4
- * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input.
5
- */
6
2
  /** Graph Query entity definition. */
7
3
  export interface GraphQueryResource extends ProxyResource {
8
4
  /** Resource tags. */
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/models/graphQueryApi/models.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { areAllPropsUndefined } from \"../../static-helpers/serialization/check-prop-undefined.js\";\nimport type { ProxyResource } from \"../models.js\";\nimport { systemDataDeserializer } from \"../models.js\";\n\n/**\n * This file contains only generated model types and their (de)serializers.\n * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input.\n */\n/* eslint-disable @typescript-eslint/naming-convention */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/** Graph Query entity definition. */\nexport interface GraphQueryResource extends ProxyResource {\n /** Resource tags. */\n tags?: Record<string, string>;\n /** The location of the resource */\n location?: string;\n /** This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict. */\n etag?: string;\n /** Date and time in UTC of the last modification that was made to this graph query definition. */\n readonly timeModified?: Date;\n /** The description of a graph query. */\n description?: string;\n /** KQL query that will be graph. */\n query?: string;\n /** Enum indicating a type of graph query. */\n readonly resultKind?: ResultKind;\n}\n\nexport function graphQueryResourceSerializer(item: GraphQueryResource): any {\n return {\n properties: areAllPropsUndefined(item, [\"description\", \"query\"])\n ? undefined\n : _graphQueryResourcePropertiesSerializer(item),\n tags: item[\"tags\"],\n location: item[\"location\"],\n etag: item[\"etag\"],\n };\n}\n\nexport function graphQueryResourceDeserializer(item: any): GraphQueryResource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n ...(!item[\"properties\"]\n ? item[\"properties\"]\n : _graphQueryResourcePropertiesDeserializer(item[\"properties\"])),\n tags: !item[\"tags\"]\n ? item[\"tags\"]\n : Object.fromEntries(Object.entries(item[\"tags\"]).map(([k, p]: [string, any]) => [k, p])),\n location: item[\"location\"],\n etag: item[\"etag\"],\n };\n}\n\n/** Properties that contain a graph query. */\nexport interface GraphQueryProperties {\n /** Date and time in UTC of the last modification that was made to this graph query definition. */\n readonly timeModified?: Date;\n /** The description of a graph query. */\n description?: string;\n /** KQL query that will be graph. */\n query: string;\n /** Enum indicating a type of graph query. */\n readonly resultKind?: ResultKind;\n}\n\nexport function graphQueryPropertiesSerializer(item: GraphQueryProperties): any {\n return { description: item[\"description\"], query: item[\"query\"] };\n}\n\nexport function graphQueryPropertiesDeserializer(item: any): GraphQueryProperties {\n return {\n timeModified: !item[\"timeModified\"] ? item[\"timeModified\"] : new Date(item[\"timeModified\"]),\n description: item[\"description\"],\n query: item[\"query\"],\n resultKind: item[\"resultKind\"],\n };\n}\n\n/** Enum indicating a type of graph query. */\nexport enum KnownResultKind {\n /** basic */\n Basic = \"basic\",\n}\n\n/**\n * Enum indicating a type of graph query. \\\n * {@link KnownResultKind} can be used interchangeably with ResultKind,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **basic**: basic\n */\nexport type ResultKind = string;\n\n/** Error message body that will indicate why the operation failed. */\nexport interface GraphQueryError {\n /** The error object. */\n error?: GraphQueryErrorError;\n}\n\nexport function graphQueryErrorDeserializer(item: any): GraphQueryError {\n return {\n error: !item[\"error\"] ? item[\"error\"] : graphQueryErrorErrorDeserializer(item[\"error\"]),\n };\n}\n\n/** The error object. */\nexport interface GraphQueryErrorError {\n /** Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. */\n code?: string;\n /** Human-readable representation of the error. */\n message?: string;\n /** The list of invalid fields send in request, in case of validation error. */\n details?: ErrorFieldContract[];\n}\n\nexport function graphQueryErrorErrorDeserializer(item: any): GraphQueryErrorError {\n return {\n code: item[\"code\"],\n message: item[\"message\"],\n details: !item[\"details\"]\n ? item[\"details\"]\n : errorFieldContractArrayDeserializer(item[\"details\"]),\n };\n}\n\nexport function errorFieldContractArrayDeserializer(result: Array<ErrorFieldContract>): any[] {\n return result.map((item) => {\n return errorFieldContractDeserializer(item);\n });\n}\n\n/** Error Field contract. */\nexport interface ErrorFieldContract {\n /** Property level error code. */\n code?: string;\n /** Human-readable representation of property-level error. */\n message?: string;\n /** Property name. */\n target?: string;\n}\n\nexport function errorFieldContractDeserializer(item: any): ErrorFieldContract {\n return {\n code: item[\"code\"],\n message: item[\"message\"],\n target: item[\"target\"],\n };\n}\n\n/** The parameters that can be provided when updating workbook properties properties. */\nexport interface GraphQueryUpdateParameters {\n /** Resource tags */\n tags?: Record<string, string>;\n /** This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict. */\n etag?: string;\n /** The description of a graph query. */\n description?: string;\n /** KQL query that will be graph. */\n query?: string;\n}\n\nexport function graphQueryUpdateParametersSerializer(item: GraphQueryUpdateParameters): any {\n return {\n tags: item[\"tags\"],\n etag: item[\"etag\"],\n properties: areAllPropsUndefined(item, [\"description\", \"query\"])\n ? undefined\n : _graphQueryUpdateParametersPropertiesSerializer(item),\n };\n}\n\n/** Properties that contain a workbook for PATCH operation. */\nexport interface GraphQueryPropertiesUpdateParameters {\n /** The description of a graph query. */\n description?: string;\n /** KQL query that will be graph. */\n query?: string;\n}\n\nexport function graphQueryPropertiesUpdateParametersSerializer(\n item: GraphQueryPropertiesUpdateParameters,\n): any {\n return { description: item[\"description\"], query: item[\"query\"] };\n}\n\n/** Graph query list result. */\nexport interface _GraphQueryListResult {\n /** The GraphQueryResource items on this page */\n value: GraphQueryResource[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _graphQueryListResultDeserializer(item: any): _GraphQueryListResult {\n return {\n value: graphQueryResourceArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function graphQueryResourceArraySerializer(result: Array<GraphQueryResource>): any[] {\n return result.map((item) => {\n return graphQueryResourceSerializer(item);\n });\n}\n\nexport function graphQueryResourceArrayDeserializer(result: Array<GraphQueryResource>): any[] {\n return result.map((item) => {\n return graphQueryResourceDeserializer(item);\n });\n}\n\nexport function _graphQueryResourcePropertiesSerializer(item: GraphQueryResource): any {\n return { description: item[\"description\"], query: item[\"query\"] };\n}\n\nexport function _graphQueryResourcePropertiesDeserializer(item: any) {\n return {\n timeModified: !item[\"timeModified\"] ? item[\"timeModified\"] : new Date(item[\"timeModified\"]),\n description: item[\"description\"],\n query: item[\"query\"],\n resultKind: item[\"resultKind\"],\n };\n}\n\nexport function _graphQueryUpdateParametersPropertiesSerializer(\n item: GraphQueryUpdateParameters,\n): any {\n return { description: item[\"description\"], query: item[\"query\"] };\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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1C,CAAC;AACH;AAEO,SAAS,oCAAoC,QAA0C;AAC5F,SAAO,OAAO,IAAI,CAAC,SAAS;AAC1B,WAAO,+BAA+B,IAAI;AAAA,EAC5C,CAAC;AACH;AAEO,SAAS,wCAAwC,MAA+B;AACrF,SAAO,EAAE,aAAa,KAAK,aAAa,GAAG,OAAO,KAAK,OAAO,EAAE;AAClE;AAEO,SAAS,0CAA0C,MAAW;AACnE,SAAO;AAAA,IACL,cAAc,CAAC,KAAK,cAAc,IAAI,KAAK,cAAc,IAAI,IAAI,KAAK,KAAK,cAAc,CAAC;AAAA,IAC1F,aAAa,KAAK,aAAa;AAAA,IAC/B,OAAO,KAAK,OAAO;AAAA,IACnB,YAAY,KAAK,YAAY;AAAA,EAC/B;AACF;AAEO,SAAS,gDACd,MACK;AACL,SAAO,EAAE,aAAa,KAAK,aAAa,GAAG,OAAO,KAAK,OAAO,EAAE;AAClE;",
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/*\n * This file contains only generated model types and their (de)serializers.\n * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input.\n */\n/* eslint-disable @typescript-eslint/naming-convention */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport { areAllPropsUndefined } from \"../../static-helpers/serialization/check-prop-undefined.js\";\nimport type { ProxyResource } from \"../models.js\";\nimport { systemDataDeserializer } from \"../models.js\";\n\n/** Graph Query entity definition. */\nexport interface GraphQueryResource extends ProxyResource {\n /** Resource tags. */\n tags?: Record<string, string>;\n /** The location of the resource */\n location?: string;\n /** This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict. */\n etag?: string;\n /** Date and time in UTC of the last modification that was made to this graph query definition. */\n readonly timeModified?: Date;\n /** The description of a graph query. */\n description?: string;\n /** KQL query that will be graph. */\n query?: string;\n /** Enum indicating a type of graph query. */\n readonly resultKind?: ResultKind;\n}\n\nexport function graphQueryResourceSerializer(item: GraphQueryResource): any {\n return {\n properties: areAllPropsUndefined(item, [\"description\", \"query\"])\n ? undefined\n : _graphQueryResourcePropertiesSerializer(item),\n tags: item[\"tags\"],\n location: item[\"location\"],\n etag: item[\"etag\"],\n };\n}\n\nexport function graphQueryResourceDeserializer(item: any): GraphQueryResource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n ...(!item[\"properties\"]\n ? item[\"properties\"]\n : _graphQueryResourcePropertiesDeserializer(item[\"properties\"])),\n tags: !item[\"tags\"]\n ? item[\"tags\"]\n : Object.fromEntries(Object.entries(item[\"tags\"]).map(([k, p]: [string, any]) => [k, p])),\n location: item[\"location\"],\n etag: item[\"etag\"],\n };\n}\n\n/** Properties that contain a graph query. */\nexport interface GraphQueryProperties {\n /** Date and time in UTC of the last modification that was made to this graph query definition. */\n readonly timeModified?: Date;\n /** The description of a graph query. */\n description?: string;\n /** KQL query that will be graph. */\n query: string;\n /** Enum indicating a type of graph query. */\n readonly resultKind?: ResultKind;\n}\n\nexport function graphQueryPropertiesSerializer(item: GraphQueryProperties): any {\n return { description: item[\"description\"], query: item[\"query\"] };\n}\n\nexport function graphQueryPropertiesDeserializer(item: any): GraphQueryProperties {\n return {\n timeModified: !item[\"timeModified\"] ? item[\"timeModified\"] : new Date(item[\"timeModified\"]),\n description: item[\"description\"],\n query: item[\"query\"],\n resultKind: item[\"resultKind\"],\n };\n}\n\n/** Enum indicating a type of graph query. */\nexport enum KnownResultKind {\n /** basic */\n Basic = \"basic\",\n}\n\n/**\n * Enum indicating a type of graph query. \\\n * {@link KnownResultKind} can be used interchangeably with ResultKind,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **basic**: basic\n */\nexport type ResultKind = string;\n\n/** Error message body that will indicate why the operation failed. */\nexport interface GraphQueryError {\n /** The error object. */\n error?: GraphQueryErrorError;\n}\n\nexport function graphQueryErrorDeserializer(item: any): GraphQueryError {\n return {\n error: !item[\"error\"] ? item[\"error\"] : graphQueryErrorErrorDeserializer(item[\"error\"]),\n };\n}\n\n/** The error object. */\nexport interface GraphQueryErrorError {\n /** Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. */\n code?: string;\n /** Human-readable representation of the error. */\n message?: string;\n /** The list of invalid fields send in request, in case of validation error. */\n details?: ErrorFieldContract[];\n}\n\nexport function graphQueryErrorErrorDeserializer(item: any): GraphQueryErrorError {\n return {\n code: item[\"code\"],\n message: item[\"message\"],\n details: !item[\"details\"]\n ? item[\"details\"]\n : errorFieldContractArrayDeserializer(item[\"details\"]),\n };\n}\n\nexport function errorFieldContractArrayDeserializer(result: Array<ErrorFieldContract>): any[] {\n return result.map((item) => {\n return errorFieldContractDeserializer(item);\n });\n}\n\n/** Error Field contract. */\nexport interface ErrorFieldContract {\n /** Property level error code. */\n code?: string;\n /** Human-readable representation of property-level error. */\n message?: string;\n /** Property name. */\n target?: string;\n}\n\nexport function errorFieldContractDeserializer(item: any): ErrorFieldContract {\n return {\n code: item[\"code\"],\n message: item[\"message\"],\n target: item[\"target\"],\n };\n}\n\n/** The parameters that can be provided when updating workbook properties properties. */\nexport interface GraphQueryUpdateParameters {\n /** Resource tags */\n tags?: Record<string, string>;\n /** This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict. */\n etag?: string;\n /** The description of a graph query. */\n description?: string;\n /** KQL query that will be graph. */\n query?: string;\n}\n\nexport function graphQueryUpdateParametersSerializer(item: GraphQueryUpdateParameters): any {\n return {\n tags: item[\"tags\"],\n etag: item[\"etag\"],\n properties: areAllPropsUndefined(item, [\"description\", \"query\"])\n ? undefined\n : _graphQueryUpdateParametersPropertiesSerializer(item),\n };\n}\n\n/** Properties that contain a workbook for PATCH operation. */\nexport interface GraphQueryPropertiesUpdateParameters {\n /** The description of a graph query. */\n description?: string;\n /** KQL query that will be graph. */\n query?: string;\n}\n\nexport function graphQueryPropertiesUpdateParametersSerializer(\n item: GraphQueryPropertiesUpdateParameters,\n): any {\n return { description: item[\"description\"], query: item[\"query\"] };\n}\n\n/** Graph query list result. */\nexport interface _GraphQueryListResult {\n /** The GraphQueryResource items on this page */\n value: GraphQueryResource[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _graphQueryListResultDeserializer(item: any): _GraphQueryListResult {\n return {\n value: graphQueryResourceArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function graphQueryResourceArraySerializer(result: Array<GraphQueryResource>): any[] {\n return result.map((item) => {\n return graphQueryResourceSerializer(item);\n });\n}\n\nexport function graphQueryResourceArrayDeserializer(result: Array<GraphQueryResource>): any[] {\n return result.map((item) => {\n return graphQueryResourceDeserializer(item);\n });\n}\n\nexport function _graphQueryResourcePropertiesSerializer(item: GraphQueryResource): any {\n return { description: item[\"description\"], query: item[\"query\"] };\n}\n\nexport function _graphQueryResourcePropertiesDeserializer(item: any) {\n return {\n timeModified: !item[\"timeModified\"] ? item[\"timeModified\"] : new Date(item[\"timeModified\"]),\n description: item[\"description\"],\n query: item[\"query\"],\n resultKind: item[\"resultKind\"],\n };\n}\n\nexport function _graphQueryUpdateParametersPropertiesSerializer(\n item: GraphQueryUpdateParameters,\n): any {\n return { description: item[\"description\"], query: item[\"query\"] };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,kCAAqC;AAErC,oBAAuC;AAoBhC,SAAS,6BAA6B,MAA+B;AAC1E,SAAO;AAAA,IACL,gBAAY,kDAAqB,MAAM,CAAC,eAAe,OAAO,CAAC,IAC3D,SACA,wCAAwC,IAAI;AAAA,IAChD,MAAM,KAAK,MAAM;AAAA,IACjB,UAAU,KAAK,UAAU;AAAA,IACzB,MAAM,KAAK,MAAM;AAAA,EACnB;AAC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AK,KAAK,cAAc,CAAC;AAAA,IAC1F,aAAa,KAAK,aAAa;AAAA,IAC/B,OAAO,KAAK,OAAO;AAAA,IACnB,YAAY,KAAK,YAAY;AAAA,EAC/B;AACF;AAEO,SAAS,gDACd,MACK;AACL,SAAO,EAAE,aAAa,KAAK,aAAa,GAAG,OAAO,KAAK,OAAO,EAAE;AAClE;",
6
6
  "names": ["KnownResultKind"]
7
7
  }
@@ -1,7 +1,3 @@
1
- /**
2
- * This file contains only generated model types and their (de)serializers.
3
- * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input.
4
- */
5
1
  /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */
6
2
  export interface ProxyResource extends Resource {
7
3
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/models/models.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * This file contains only generated model types and their (de)serializers.\n * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input.\n */\n/* eslint-disable @typescript-eslint/naming-convention */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */\nexport interface ProxyResource extends Resource {}\n\nexport function proxyResourceSerializer(_item: ProxyResource): any {\n return {};\n}\n\nexport function proxyResourceDeserializer(item: any): ProxyResource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n };\n}\n\n/** Common fields that are returned in the response for all Azure Resource Manager resources */\nexport interface Resource {\n /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */\n readonly id?: string;\n /** The name of the resource */\n readonly name?: string;\n /** The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\" */\n readonly type?: string;\n /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */\n readonly systemData?: SystemData;\n}\n\nexport function resourceSerializer(_item: Resource): any {\n return {};\n}\n\nexport function resourceDeserializer(item: any): Resource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n };\n}\n\n/** Metadata pertaining to creation and last modification of the resource. */\nexport interface SystemData {\n /** The identity that created the resource. */\n createdBy?: string;\n /** The type of identity that created the resource. */\n createdByType?: CreatedByType;\n /** The timestamp of resource creation (UTC). */\n createdAt?: Date;\n /** The identity that last modified the resource. */\n lastModifiedBy?: string;\n /** The type of identity that last modified the resource. */\n lastModifiedByType?: CreatedByType;\n /** The timestamp of resource last modification (UTC) */\n lastModifiedAt?: Date;\n}\n\nexport function systemDataDeserializer(item: any): SystemData {\n return {\n createdBy: item[\"createdBy\"],\n createdByType: item[\"createdByType\"],\n createdAt: !item[\"createdAt\"] ? item[\"createdAt\"] : new Date(item[\"createdAt\"]),\n lastModifiedBy: item[\"lastModifiedBy\"],\n lastModifiedByType: item[\"lastModifiedByType\"],\n lastModifiedAt: !item[\"lastModifiedAt\"]\n ? item[\"lastModifiedAt\"]\n : new Date(item[\"lastModifiedAt\"]),\n };\n}\n\n/** The kind of entity that created the resource. */\nexport enum KnownCreatedByType {\n /** The entity was created by a user. */\n User = \"User\",\n /** The entity was created by an application. */\n Application = \"Application\",\n /** The entity was created by a managed identity. */\n ManagedIdentity = \"ManagedIdentity\",\n /** The entity was created by a key. */\n Key = \"Key\",\n}\n\n/**\n * The kind of entity that created the resource. \\\n * {@link KnownCreatedByType} can be used interchangeably with CreatedByType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **User**: The entity was created by a user. \\\n * **Application**: The entity was created by an application. \\\n * **ManagedIdentity**: The entity was created by a managed identity. \\\n * **Key**: The entity was created by a key.\n */\nexport type CreatedByType = string;\n\nexport type ResourcesHistoryResponse = { body: any };\n"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/*\n * This file contains only generated model types and their (de)serializers.\n * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input.\n */\n/* eslint-disable @typescript-eslint/naming-convention */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */\nexport interface ProxyResource extends Resource {}\n\nexport function proxyResourceSerializer(_item: ProxyResource): any {\n return {};\n}\n\nexport function proxyResourceDeserializer(item: any): ProxyResource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n };\n}\n\n/** Common fields that are returned in the response for all Azure Resource Manager resources */\nexport interface Resource {\n /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */\n readonly id?: string;\n /** The name of the resource */\n readonly name?: string;\n /** The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\" */\n readonly type?: string;\n /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */\n readonly systemData?: SystemData;\n}\n\nexport function resourceSerializer(_item: Resource): any {\n return {};\n}\n\nexport function resourceDeserializer(item: any): Resource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n };\n}\n\n/** Metadata pertaining to creation and last modification of the resource. */\nexport interface SystemData {\n /** The identity that created the resource. */\n createdBy?: string;\n /** The type of identity that created the resource. */\n createdByType?: CreatedByType;\n /** The timestamp of resource creation (UTC). */\n createdAt?: Date;\n /** The identity that last modified the resource. */\n lastModifiedBy?: string;\n /** The type of identity that last modified the resource. */\n lastModifiedByType?: CreatedByType;\n /** The timestamp of resource last modification (UTC) */\n lastModifiedAt?: Date;\n}\n\nexport function systemDataDeserializer(item: any): SystemData {\n return {\n createdBy: item[\"createdBy\"],\n createdByType: item[\"createdByType\"],\n createdAt: !item[\"createdAt\"] ? item[\"createdAt\"] : new Date(item[\"createdAt\"]),\n lastModifiedBy: item[\"lastModifiedBy\"],\n lastModifiedByType: item[\"lastModifiedByType\"],\n lastModifiedAt: !item[\"lastModifiedAt\"]\n ? item[\"lastModifiedAt\"]\n : new Date(item[\"lastModifiedAt\"]),\n };\n}\n\n/** The kind of entity that created the resource. */\nexport enum KnownCreatedByType {\n /** The entity was created by a user. */\n User = \"User\",\n /** The entity was created by an application. */\n Application = \"Application\",\n /** The entity was created by a managed identity. */\n ManagedIdentity = \"ManagedIdentity\",\n /** The entity was created by a key. */\n Key = \"Key\",\n}\n\n/**\n * The kind of entity that created the resource. \\\n * {@link KnownCreatedByType} can be used interchangeably with CreatedByType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **User**: The entity was created by a user. \\\n * **Application**: The entity was created by an application. \\\n * **ManagedIdentity**: The entity was created by a managed identity. \\\n * **Key**: The entity was created by a key.\n */\nexport type CreatedByType = string;\n\nexport type ResourcesHistoryResponse = { body: any };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYO,SAAS,wBAAwB,OAA2B;AACjE,SAAO,CAAC;AACV;AAEO,SAAS,0BAA0B,MAA0B;AAClE,SAAO;AAAA,IACL,IAAI,KAAK,IAAI;AAAA,IACb,MAAM,KAAK,MAAM;AAAA,IACjB,MAAM,KAAK,MAAM;AAAA,IACjB,YAAY,CAAC,KAAK,YAAY,IAC1B,KAAK,YAAY,IACjB,uBAAuB,KAAK,YAAY,CAAC;AAAA,EAC/C;AACF;AAcO,SAAS,mBAAmB,OAAsB;AACvD,SAAO,CAAC;AACV;AAEO,SAAS,qBAAqB,MAAqB;AACxD,SAAO;AAAA,IACL,IAAI,KAAK,IAAI;AAAA,IACb,MAAM,KAAK,MAAM;AAAA,IACjB,MAAM,KAAK,MAAM;AAAA,IACjB,YAAY,CAAC,KAAK,YAAY,IAC1B,KAAK,YAAY,IACjB,uBAAuB,KAAK,YAAY,CAAC;AAAA,EAC/C;AACF;AAkBO,SAAS,uBAAuB,MAAuB;AAC5D,SAAO;AAAA,IACL,WAAW,KAAK,WAAW;AAAA,IAC3B,eAAe,KAAK,eAAe;AAAA,IACnC,WAAW,CAAC,KAAK,WAAW,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,KAAK,WAAW,CAAC;AAAA,IAC9E,gBAAgB,KAAK,gBAAgB;AAAA,IACrC,oBAAoB,KAAK,oBAAoB;AAAA,IAC7C,gBAAgB,CAAC,KAAK,gBAAgB,IAClC,KAAK,gBAAgB,IACrB,IAAI,KAAK,KAAK,gBAAgB,CAAC;AAAA,EACrC;AACF;AAGO,IAAK,qBAAL,kBAAKA,wBAAL;AAEL,EAAAA,oBAAA,UAAO;AAEP,EAAAA,oBAAA,iBAAc;AAEd,EAAAA,oBAAA,qBAAkB;AAElB,EAAAA,oBAAA,SAAM;AARI,SAAAA;AAAA,GAAA;",
6
6
  "names": ["KnownCreatedByType"]
7
7
  }
@@ -1,8 +1,4 @@
1
1
  import type { DateTimeInterval } from "../resourceGraphCommon/models.js";
2
- /**
3
- * This file contains only generated model types and their (de)serializers.
4
- * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input.
5
- */
6
2
  /** The parameters for a specific changes request. */
7
3
  export interface ResourceChangesRequestParameters {
8
4
  /** Specifies the list of resources for a changes request. */