@azure-rest/defender-easm 1.0.0-alpha.20250121.1 → 1.0.0-alpha.20250123.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +4 -8
  3. package/dist/browser/clientDefinitions.d.ts +7 -7
  4. package/dist/browser/clientDefinitions.d.ts.map +1 -1
  5. package/dist/browser/clientDefinitions.js.map +1 -1
  6. package/dist/browser/easmClient.d.ts +16 -0
  7. package/dist/browser/easmClient.d.ts.map +1 -0
  8. package/dist/browser/easmClient.js +43 -0
  9. package/dist/browser/easmClient.js.map +1 -0
  10. package/dist/browser/index.d.ts +3 -3
  11. package/dist/browser/index.d.ts.map +1 -1
  12. package/dist/browser/index.js +3 -4
  13. package/dist/browser/index.js.map +1 -1
  14. package/dist/browser/models.d.ts +52 -38
  15. package/dist/browser/models.d.ts.map +1 -1
  16. package/dist/browser/models.js.map +1 -1
  17. package/dist/browser/outputModels.d.ts +188 -117
  18. package/dist/browser/outputModels.d.ts.map +1 -1
  19. package/dist/browser/outputModels.js.map +1 -1
  20. package/dist/browser/paginateHelper.d.ts +27 -2
  21. package/dist/browser/paginateHelper.d.ts.map +1 -1
  22. package/dist/browser/paginateHelper.js +98 -1
  23. package/dist/browser/paginateHelper.js.map +1 -1
  24. package/dist/browser/parameters.d.ts +8 -8
  25. package/dist/browser/parameters.d.ts.map +1 -1
  26. package/dist/browser/parameters.js.map +1 -1
  27. package/dist/commonjs/clientDefinitions.d.ts +7 -7
  28. package/dist/commonjs/clientDefinitions.d.ts.map +1 -1
  29. package/dist/commonjs/clientDefinitions.js.map +1 -1
  30. package/dist/commonjs/easmClient.d.ts +16 -0
  31. package/dist/commonjs/easmClient.d.ts.map +1 -0
  32. package/dist/commonjs/easmClient.js +46 -0
  33. package/dist/commonjs/easmClient.js.map +1 -0
  34. package/dist/commonjs/index.d.ts +3 -3
  35. package/dist/commonjs/index.d.ts.map +1 -1
  36. package/dist/commonjs/index.js +3 -4
  37. package/dist/commonjs/index.js.map +1 -1
  38. package/dist/commonjs/models.d.ts +52 -38
  39. package/dist/commonjs/models.d.ts.map +1 -1
  40. package/dist/commonjs/models.js.map +1 -1
  41. package/dist/commonjs/outputModels.d.ts +188 -117
  42. package/dist/commonjs/outputModels.d.ts.map +1 -1
  43. package/dist/commonjs/outputModels.js.map +1 -1
  44. package/dist/commonjs/paginateHelper.d.ts +27 -2
  45. package/dist/commonjs/paginateHelper.d.ts.map +1 -1
  46. package/dist/commonjs/paginateHelper.js +99 -2
  47. package/dist/commonjs/paginateHelper.js.map +1 -1
  48. package/dist/commonjs/parameters.d.ts +8 -8
  49. package/dist/commonjs/parameters.d.ts.map +1 -1
  50. package/dist/commonjs/parameters.js.map +1 -1
  51. package/dist/esm/clientDefinitions.d.ts +7 -7
  52. package/dist/esm/clientDefinitions.d.ts.map +1 -1
  53. package/dist/esm/clientDefinitions.js.map +1 -1
  54. package/dist/esm/easmClient.d.ts +16 -0
  55. package/dist/esm/easmClient.d.ts.map +1 -0
  56. package/dist/esm/easmClient.js +43 -0
  57. package/dist/esm/easmClient.js.map +1 -0
  58. package/dist/esm/index.d.ts +3 -3
  59. package/dist/esm/index.d.ts.map +1 -1
  60. package/dist/esm/index.js +3 -4
  61. package/dist/esm/index.js.map +1 -1
  62. package/dist/esm/models.d.ts +52 -38
  63. package/dist/esm/models.d.ts.map +1 -1
  64. package/dist/esm/models.js.map +1 -1
  65. package/dist/esm/outputModels.d.ts +188 -117
  66. package/dist/esm/outputModels.d.ts.map +1 -1
  67. package/dist/esm/outputModels.js.map +1 -1
  68. package/dist/esm/paginateHelper.d.ts +27 -2
  69. package/dist/esm/paginateHelper.d.ts.map +1 -1
  70. package/dist/esm/paginateHelper.js +98 -1
  71. package/dist/esm/paginateHelper.js.map +1 -1
  72. package/dist/esm/parameters.d.ts +8 -8
  73. package/dist/esm/parameters.d.ts.map +1 -1
  74. package/dist/esm/parameters.js.map +1 -1
  75. package/dist/react-native/clientDefinitions.d.ts +7 -7
  76. package/dist/react-native/clientDefinitions.d.ts.map +1 -1
  77. package/dist/react-native/clientDefinitions.js.map +1 -1
  78. package/dist/react-native/easmClient.d.ts +16 -0
  79. package/dist/react-native/easmClient.d.ts.map +1 -0
  80. package/dist/react-native/easmClient.js +43 -0
  81. package/dist/react-native/easmClient.js.map +1 -0
  82. package/dist/react-native/index.d.ts +3 -3
  83. package/dist/react-native/index.d.ts.map +1 -1
  84. package/dist/react-native/index.js +3 -4
  85. package/dist/react-native/index.js.map +1 -1
  86. package/dist/react-native/models.d.ts +52 -38
  87. package/dist/react-native/models.d.ts.map +1 -1
  88. package/dist/react-native/models.js.map +1 -1
  89. package/dist/react-native/outputModels.d.ts +188 -117
  90. package/dist/react-native/outputModels.d.ts.map +1 -1
  91. package/dist/react-native/outputModels.js.map +1 -1
  92. package/dist/react-native/paginateHelper.d.ts +27 -2
  93. package/dist/react-native/paginateHelper.d.ts.map +1 -1
  94. package/dist/react-native/paginateHelper.js +98 -1
  95. package/dist/react-native/paginateHelper.js.map +1 -1
  96. package/dist/react-native/parameters.d.ts +8 -8
  97. package/dist/react-native/parameters.d.ts.map +1 -1
  98. package/dist/react-native/parameters.js.map +1 -1
  99. package/package.json +75 -74
  100. package/dist/browser/easm.d.ts +0 -14
  101. package/dist/browser/easm.d.ts.map +0 -1
  102. package/dist/browser/easm.js +0 -33
  103. package/dist/browser/easm.js.map +0 -1
  104. package/dist/commonjs/easm.d.ts +0 -14
  105. package/dist/commonjs/easm.d.ts.map +0 -1
  106. package/dist/commonjs/easm.js +0 -36
  107. package/dist/commonjs/easm.js.map +0 -1
  108. package/dist/esm/easm.d.ts +0 -14
  109. package/dist/esm/easm.d.ts.map +0 -1
  110. package/dist/esm/easm.js +0 -33
  111. package/dist/esm/easm.js.map +0 -1
  112. package/dist/react-native/easm.d.ts +0 -14
  113. package/dist/react-native/easm.d.ts.map +0 -1
  114. package/dist/react-native/easm.js +0 -33
  115. package/dist/react-native/easm.js.map +0 -1
package/package.json CHANGED
@@ -1,9 +1,29 @@
1
1
  {
2
2
  "name": "@azure-rest/defender-easm",
3
- "sdk-type": "client",
4
- "author": "Microsoft Corporation",
5
- "version": "1.0.0-alpha.20250121.1",
6
- "description": "Defender EASM Client",
3
+ "version": "1.0.0-alpha.20250123.1",
4
+ "description": "A generated SDK for EasmClient.",
5
+ "engines": {
6
+ "node": ">=18.0.0"
7
+ },
8
+ "sideEffects": false,
9
+ "autoPublish": false,
10
+ "tshy": {
11
+ "project": "./tsconfig.src.json",
12
+ "exports": {
13
+ "./package.json": "./package.json",
14
+ ".": "./src/index.ts"
15
+ },
16
+ "dialects": [
17
+ "esm",
18
+ "commonjs"
19
+ ],
20
+ "esmDialects": [
21
+ "browser",
22
+ "react-native"
23
+ ],
24
+ "selfLink": false
25
+ },
26
+ "type": "module",
7
27
  "keywords": [
8
28
  "node",
9
29
  "azure",
@@ -12,54 +32,32 @@
12
32
  "browser",
13
33
  "isomorphic"
14
34
  ],
35
+ "author": "Microsoft Corporation",
15
36
  "license": "MIT",
16
- "main": "./dist/commonjs/index.js",
17
- "module": "./dist/esm/index.js",
18
- "types": "./dist/commonjs/index.d.ts",
19
- "repository": "github:Azure/azure-sdk-for-js",
20
- "bugs": {
21
- "url": "https://github.com/Azure/azure-sdk-for-js/issues"
22
- },
23
37
  "files": [
24
38
  "dist/",
25
39
  "README.md",
26
40
  "LICENSE"
27
41
  ],
28
- "engines": {
29
- "node": ">=18.0.0"
42
+ "sdk-type": "client",
43
+ "repository": "github:Azure/azure-sdk-for-js",
44
+ "bugs": {
45
+ "url": "https://github.com/Azure/azure-sdk-for-js/issues"
30
46
  },
31
- "scripts": {
32
- "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
33
- "build:samples": "echo skipped.",
34
- "build:test": "echo skipped.",
35
- "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"",
36
- "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
37
- "execute:samples": "echo skipped",
38
- "extract-api": "dev-tool run vendored rimraf review && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
39
- "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"",
40
- "generate:client": "echo skipped",
41
- "integration-test": "npm run integration-test:node && npm run integration-test:browser",
42
- "integration-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
43
- "integration-test:node": "dev-tool run test:vitest --esm",
44
- "lint": "eslint package.json api-extractor.json src test",
45
- "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
46
- "pack": "npm pack 2>&1",
47
- "test": "npm run clean && npm run build:test && npm run unit-test",
48
- "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser",
49
- "test:node": "npm run clean && npm run build:test && npm run unit-test:node",
50
- "unit-test": "npm run unit-test:node && npm run unit-test:browser",
51
- "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
52
- "unit-test:node": "dev-tool run test:vitest",
53
- "update-snippets": "echo skipped"
47
+ "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/easm/defender-easm-rest/README.md",
48
+ "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json",
49
+ "//metadata": {
50
+ "constantPaths": [
51
+ {
52
+ "path": "src/easmClient.ts",
53
+ "prefix": "userAgentInfo"
54
+ }
55
+ ]
54
56
  },
55
- "sideEffects": false,
56
- "autoPublish": false,
57
57
  "dependencies": {
58
58
  "@azure-rest/core-client": "^2.3.1",
59
59
  "@azure/core-auth": "^1.9.0",
60
- "@azure/core-lro": "^2.7.2",
61
- "@azure/core-paging": "^1.6.2",
62
- "@azure/core-rest-pipeline": "^1.18.0",
60
+ "@azure/core-rest-pipeline": "^1.18.2",
63
61
  "@azure/logger": "^1.1.4",
64
62
  "tslib": "^2.8.1"
65
63
  },
@@ -67,29 +65,44 @@
67
65
  "@azure-tools/test-credential": "^2.0.0",
68
66
  "@azure-tools/test-recorder": ">=4.1.0-alpha <4.1.0-alphb",
69
67
  "@azure-tools/test-utils-vitest": ">=1.0.0-alpha <1.0.0-alphb",
70
- "@azure/core-util": "^1.0.0",
71
68
  "@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
72
69
  "@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
73
- "@azure/identity": "^4.0.1",
70
+ "@azure/identity": "^4.6.0",
71
+ "@microsoft/api-extractor": "^7.40.3",
74
72
  "@types/node": "^18.0.0",
75
- "@vitest/browser": "^2.1.6",
76
- "@vitest/coverage-istanbul": "^2.1.6",
73
+ "@vitest/browser": "^3.0.3",
74
+ "@vitest/coverage-istanbul": "^3.0.3",
77
75
  "dotenv": "^16.0.0",
78
76
  "eslint": "^9.9.0",
79
- "playwright": "^1.49.0",
77
+ "playwright": "^1.49.1",
80
78
  "typescript": "~5.7.2",
81
- "vitest": "^2.1.6"
79
+ "vitest": "^3.0.3"
82
80
  },
83
- "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/easm/defender-easm-rest/README.md",
84
- "//metadata": {
85
- "constantPaths": [
86
- {
87
- "path": "src/easm.ts",
88
- "prefix": "userAgentInfo"
89
- }
90
- ]
81
+ "scripts": {
82
+ "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
83
+ "build:samples": "echo skipped",
84
+ "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test",
85
+ "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ",
86
+ "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
87
+ "execute:samples": "echo skipped",
88
+ "extract-api": "dev-tool run vendored rimraf review && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
89
+ "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ",
90
+ "generate:client": "echo skipped",
91
+ "integration-test": "npm run integration-test:node && npm run integration-test:browser",
92
+ "integration-test:browser": "echo skipped",
93
+ "integration-test:node": "echo skipped",
94
+ "lint": "eslint package.json api-extractor.json src test",
95
+ "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
96
+ "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
97
+ "pack": "npm pack 2>&1",
98
+ "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test",
99
+ "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
100
+ "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node",
101
+ "unit-test": "npm run unit-test:node && npm run unit-test:browser",
102
+ "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
103
+ "unit-test:node": "dev-tool run test:vitest",
104
+ "update-snippets": "echo skipped"
91
105
  },
92
- "browser": "./dist/browser/index.js",
93
106
  "//sampleConfiguration": {
94
107
  "productName": "Defender EASM Client",
95
108
  "productSlugs": [
@@ -98,23 +111,6 @@
98
111
  "disableDocsMs": true,
99
112
  "apiRefLink": "https://learn.microsoft.com/azure/external-attack-surface-management/"
100
113
  },
101
- "type": "module",
102
- "tshy": {
103
- "exports": {
104
- "./package.json": "./package.json",
105
- ".": "./src/index.ts"
106
- },
107
- "dialects": [
108
- "esm",
109
- "commonjs"
110
- ],
111
- "esmDialects": [
112
- "browser",
113
- "react-native"
114
- ],
115
- "selfLink": false,
116
- "project": "./tsconfig.src.json"
117
- },
118
114
  "exports": {
119
115
  "./package.json": "./package.json",
120
116
  ".": {
@@ -135,5 +131,10 @@
135
131
  "default": "./dist/commonjs/index.js"
136
132
  }
137
133
  }
138
- }
134
+ },
135
+ "main": "./dist/commonjs/index.js",
136
+ "types": "./dist/commonjs/index.d.ts",
137
+ "module": "./dist/esm/index.js",
138
+ "browser": "./dist/browser/index.js",
139
+ "react-native": "./dist/react-native/index.js"
139
140
  }
@@ -1,14 +0,0 @@
1
- import type { ClientOptions } from "@azure-rest/core-client";
2
- import type { TokenCredential } from "@azure/core-auth";
3
- import type { EasmClient } from "./clientDefinitions.js";
4
- /**
5
- * Initialize a new instance of `EasmClient`
6
- * @param endpoint - The endpoint hosting the requested resource. For example, https://{region}.easm.defender.microsoft.com
7
- * @param subscriptionId - The ID of the target subscription.
8
- * @param resourceGroupName - The name of the Resource Group.
9
- * @param workspaceName - The name of the Workspace.
10
- * @param credentials - uniquely identify client credential
11
- * @param options - the parameter for all optional parameters
12
- */
13
- export default function createClient(endpoint: string, subscriptionId: string, resourceGroupName: string, workspaceName: string, credentials: TokenCredential, options?: ClientOptions): EasmClient;
14
- //# sourceMappingURL=easm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"easm.d.ts","sourceRoot":"","sources":["../../src/easm.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EACtB,iBAAiB,EAAE,MAAM,EACzB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,eAAe,EAC5B,OAAO,GAAE,aAAkB,GAC1B,UAAU,CA8BZ"}
@@ -1,33 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { getClient } from "@azure-rest/core-client";
4
- import { logger } from "./logger.js";
5
- /**
6
- * Initialize a new instance of `EasmClient`
7
- * @param endpoint - The endpoint hosting the requested resource. For example, https://{region}.easm.defender.microsoft.com
8
- * @param subscriptionId - The ID of the target subscription.
9
- * @param resourceGroupName - The name of the Resource Group.
10
- * @param workspaceName - The name of the Workspace.
11
- * @param credentials - uniquely identify client credential
12
- * @param options - the parameter for all optional parameters
13
- */
14
- export default function createClient(endpoint, subscriptionId, resourceGroupName, workspaceName, credentials, options = {}) {
15
- var _a, _b, _c, _d, _e, _f;
16
- const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${endpoint}/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/workspaces/${workspaceName}`;
17
- options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2023-03-01-preview";
18
- options = Object.assign(Object.assign({}, options), { credentials: {
19
- scopes: (_d = (_c = options.credentials) === null || _c === void 0 ? void 0 : _c.scopes) !== null && _d !== void 0 ? _d : ["https://easm.defender.microsoft.com/.default"],
20
- } });
21
- const userAgentInfo = `azsdk-js-defender-easm-rest/1.0.0-beta.2`;
22
- const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
23
- ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
24
- : `${userAgentInfo}`;
25
- options = Object.assign(Object.assign({}, options), { userAgentOptions: {
26
- userAgentPrefix,
27
- }, loggingOptions: {
28
- logger: (_f = (_e = options.loggingOptions) === null || _e === void 0 ? void 0 : _e.logger) !== null && _f !== void 0 ? _f : logger.info,
29
- } });
30
- const client = getClient(baseUrl, credentials, options);
31
- return client;
32
- }
33
- //# sourceMappingURL=easm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"easm.js","sourceRoot":"","sources":["../../src/easm.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAgB,EAChB,cAAsB,EACtB,iBAAyB,EACzB,aAAqB,EACrB,WAA4B,EAC5B,UAAyB,EAAE;;IAE3B,MAAM,OAAO,GACX,MAAA,OAAO,CAAC,OAAO,mCACf,GAAG,QAAQ,kBAAkB,cAAc,mBAAmB,iBAAiB,eAAe,aAAa,EAAE,CAAC;IAChH,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,OAAO,mCACF,OAAO,KACV,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI,CAAC,8CAA8C,CAAC;SACxF,GACF,CAAC;IAEF,MAAM,aAAa,GAAG,0CAA0C,CAAC;IACjE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI;SACtD,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAe,CAAC;IAEtE,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { EasmClient } from \"./clientDefinitions.js\";\n\n/**\n * Initialize a new instance of `EasmClient`\n * @param endpoint - The endpoint hosting the requested resource. For example, https://{region}.easm.defender.microsoft.com\n * @param subscriptionId - The ID of the target subscription.\n * @param resourceGroupName - The name of the Resource Group.\n * @param workspaceName - The name of the Workspace.\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n subscriptionId: string,\n resourceGroupName: string,\n workspaceName: string,\n credentials: TokenCredential,\n options: ClientOptions = {},\n): EasmClient {\n const baseUrl =\n options.baseUrl ??\n `${endpoint}/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/workspaces/${workspaceName}`;\n options.apiVersion = options.apiVersion ?? \"2023-03-01-preview\";\n options = {\n ...options,\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://easm.defender.microsoft.com/.default\"],\n },\n };\n\n const userAgentInfo = `azsdk-js-defender-easm-rest/1.0.0-beta.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n };\n\n const client = getClient(baseUrl, credentials, options) as EasmClient;\n\n return client;\n}\n"]}
@@ -1,14 +0,0 @@
1
- import type { ClientOptions } from "@azure-rest/core-client";
2
- import type { TokenCredential } from "@azure/core-auth";
3
- import type { EasmClient } from "./clientDefinitions.js";
4
- /**
5
- * Initialize a new instance of `EasmClient`
6
- * @param endpoint - The endpoint hosting the requested resource. For example, https://{region}.easm.defender.microsoft.com
7
- * @param subscriptionId - The ID of the target subscription.
8
- * @param resourceGroupName - The name of the Resource Group.
9
- * @param workspaceName - The name of the Workspace.
10
- * @param credentials - uniquely identify client credential
11
- * @param options - the parameter for all optional parameters
12
- */
13
- export default function createClient(endpoint: string, subscriptionId: string, resourceGroupName: string, workspaceName: string, credentials: TokenCredential, options?: ClientOptions): EasmClient;
14
- //# sourceMappingURL=easm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"easm.d.ts","sourceRoot":"","sources":["../../src/easm.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EACtB,iBAAiB,EAAE,MAAM,EACzB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,eAAe,EAC5B,OAAO,GAAE,aAAkB,GAC1B,UAAU,CA8BZ"}
@@ -1,36 +0,0 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.default = createClient;
6
- const core_client_1 = require("@azure-rest/core-client");
7
- const logger_js_1 = require("./logger.js");
8
- /**
9
- * Initialize a new instance of `EasmClient`
10
- * @param endpoint - The endpoint hosting the requested resource. For example, https://{region}.easm.defender.microsoft.com
11
- * @param subscriptionId - The ID of the target subscription.
12
- * @param resourceGroupName - The name of the Resource Group.
13
- * @param workspaceName - The name of the Workspace.
14
- * @param credentials - uniquely identify client credential
15
- * @param options - the parameter for all optional parameters
16
- */
17
- function createClient(endpoint, subscriptionId, resourceGroupName, workspaceName, credentials, options = {}) {
18
- var _a, _b, _c, _d, _e, _f;
19
- const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${endpoint}/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/workspaces/${workspaceName}`;
20
- options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2023-03-01-preview";
21
- options = Object.assign(Object.assign({}, options), { credentials: {
22
- scopes: (_d = (_c = options.credentials) === null || _c === void 0 ? void 0 : _c.scopes) !== null && _d !== void 0 ? _d : ["https://easm.defender.microsoft.com/.default"],
23
- } });
24
- const userAgentInfo = `azsdk-js-defender-easm-rest/1.0.0-beta.2`;
25
- const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
26
- ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
27
- : `${userAgentInfo}`;
28
- options = Object.assign(Object.assign({}, options), { userAgentOptions: {
29
- userAgentPrefix,
30
- }, loggingOptions: {
31
- logger: (_f = (_e = options.loggingOptions) === null || _e === void 0 ? void 0 : _e.logger) !== null && _f !== void 0 ? _f : logger_js_1.logger.info,
32
- } });
33
- const client = (0, core_client_1.getClient)(baseUrl, credentials, options);
34
- return client;
35
- }
36
- //# sourceMappingURL=easm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"easm.js","sourceRoot":"","sources":["../../src/easm.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAiBlC,+BAqCC;AAnDD,yDAAoD;AACpD,2CAAqC;AAIrC;;;;;;;;GAQG;AACH,SAAwB,YAAY,CAClC,QAAgB,EAChB,cAAsB,EACtB,iBAAyB,EACzB,aAAqB,EACrB,WAA4B,EAC5B,UAAyB,EAAE;;IAE3B,MAAM,OAAO,GACX,MAAA,OAAO,CAAC,OAAO,mCACf,GAAG,QAAQ,kBAAkB,cAAc,mBAAmB,iBAAiB,eAAe,aAAa,EAAE,CAAC;IAChH,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,OAAO,mCACF,OAAO,KACV,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI,CAAC,8CAA8C,CAAC;SACxF,GACF,CAAC;IAEF,MAAM,aAAa,GAAG,0CAA0C,CAAC;IACjE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,kBAAM,CAAC,IAAI;SACtD,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,IAAA,uBAAS,EAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAe,CAAC;IAEtE,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { EasmClient } from \"./clientDefinitions.js\";\n\n/**\n * Initialize a new instance of `EasmClient`\n * @param endpoint - The endpoint hosting the requested resource. For example, https://{region}.easm.defender.microsoft.com\n * @param subscriptionId - The ID of the target subscription.\n * @param resourceGroupName - The name of the Resource Group.\n * @param workspaceName - The name of the Workspace.\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n subscriptionId: string,\n resourceGroupName: string,\n workspaceName: string,\n credentials: TokenCredential,\n options: ClientOptions = {},\n): EasmClient {\n const baseUrl =\n options.baseUrl ??\n `${endpoint}/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/workspaces/${workspaceName}`;\n options.apiVersion = options.apiVersion ?? \"2023-03-01-preview\";\n options = {\n ...options,\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://easm.defender.microsoft.com/.default\"],\n },\n };\n\n const userAgentInfo = `azsdk-js-defender-easm-rest/1.0.0-beta.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n };\n\n const client = getClient(baseUrl, credentials, options) as EasmClient;\n\n return client;\n}\n"]}
@@ -1,14 +0,0 @@
1
- import type { ClientOptions } from "@azure-rest/core-client";
2
- import type { TokenCredential } from "@azure/core-auth";
3
- import type { EasmClient } from "./clientDefinitions.js";
4
- /**
5
- * Initialize a new instance of `EasmClient`
6
- * @param endpoint - The endpoint hosting the requested resource. For example, https://{region}.easm.defender.microsoft.com
7
- * @param subscriptionId - The ID of the target subscription.
8
- * @param resourceGroupName - The name of the Resource Group.
9
- * @param workspaceName - The name of the Workspace.
10
- * @param credentials - uniquely identify client credential
11
- * @param options - the parameter for all optional parameters
12
- */
13
- export default function createClient(endpoint: string, subscriptionId: string, resourceGroupName: string, workspaceName: string, credentials: TokenCredential, options?: ClientOptions): EasmClient;
14
- //# sourceMappingURL=easm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"easm.d.ts","sourceRoot":"","sources":["../../src/easm.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EACtB,iBAAiB,EAAE,MAAM,EACzB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,eAAe,EAC5B,OAAO,GAAE,aAAkB,GAC1B,UAAU,CA8BZ"}
package/dist/esm/easm.js DELETED
@@ -1,33 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { getClient } from "@azure-rest/core-client";
4
- import { logger } from "./logger.js";
5
- /**
6
- * Initialize a new instance of `EasmClient`
7
- * @param endpoint - The endpoint hosting the requested resource. For example, https://{region}.easm.defender.microsoft.com
8
- * @param subscriptionId - The ID of the target subscription.
9
- * @param resourceGroupName - The name of the Resource Group.
10
- * @param workspaceName - The name of the Workspace.
11
- * @param credentials - uniquely identify client credential
12
- * @param options - the parameter for all optional parameters
13
- */
14
- export default function createClient(endpoint, subscriptionId, resourceGroupName, workspaceName, credentials, options = {}) {
15
- var _a, _b, _c, _d, _e, _f;
16
- const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${endpoint}/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/workspaces/${workspaceName}`;
17
- options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2023-03-01-preview";
18
- options = Object.assign(Object.assign({}, options), { credentials: {
19
- scopes: (_d = (_c = options.credentials) === null || _c === void 0 ? void 0 : _c.scopes) !== null && _d !== void 0 ? _d : ["https://easm.defender.microsoft.com/.default"],
20
- } });
21
- const userAgentInfo = `azsdk-js-defender-easm-rest/1.0.0-beta.2`;
22
- const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
23
- ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
24
- : `${userAgentInfo}`;
25
- options = Object.assign(Object.assign({}, options), { userAgentOptions: {
26
- userAgentPrefix,
27
- }, loggingOptions: {
28
- logger: (_f = (_e = options.loggingOptions) === null || _e === void 0 ? void 0 : _e.logger) !== null && _f !== void 0 ? _f : logger.info,
29
- } });
30
- const client = getClient(baseUrl, credentials, options);
31
- return client;
32
- }
33
- //# sourceMappingURL=easm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"easm.js","sourceRoot":"","sources":["../../src/easm.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAgB,EAChB,cAAsB,EACtB,iBAAyB,EACzB,aAAqB,EACrB,WAA4B,EAC5B,UAAyB,EAAE;;IAE3B,MAAM,OAAO,GACX,MAAA,OAAO,CAAC,OAAO,mCACf,GAAG,QAAQ,kBAAkB,cAAc,mBAAmB,iBAAiB,eAAe,aAAa,EAAE,CAAC;IAChH,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,OAAO,mCACF,OAAO,KACV,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI,CAAC,8CAA8C,CAAC;SACxF,GACF,CAAC;IAEF,MAAM,aAAa,GAAG,0CAA0C,CAAC;IACjE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI;SACtD,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAe,CAAC;IAEtE,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { EasmClient } from \"./clientDefinitions.js\";\n\n/**\n * Initialize a new instance of `EasmClient`\n * @param endpoint - The endpoint hosting the requested resource. For example, https://{region}.easm.defender.microsoft.com\n * @param subscriptionId - The ID of the target subscription.\n * @param resourceGroupName - The name of the Resource Group.\n * @param workspaceName - The name of the Workspace.\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n subscriptionId: string,\n resourceGroupName: string,\n workspaceName: string,\n credentials: TokenCredential,\n options: ClientOptions = {},\n): EasmClient {\n const baseUrl =\n options.baseUrl ??\n `${endpoint}/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/workspaces/${workspaceName}`;\n options.apiVersion = options.apiVersion ?? \"2023-03-01-preview\";\n options = {\n ...options,\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://easm.defender.microsoft.com/.default\"],\n },\n };\n\n const userAgentInfo = `azsdk-js-defender-easm-rest/1.0.0-beta.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n };\n\n const client = getClient(baseUrl, credentials, options) as EasmClient;\n\n return client;\n}\n"]}
@@ -1,14 +0,0 @@
1
- import type { ClientOptions } from "@azure-rest/core-client";
2
- import type { TokenCredential } from "@azure/core-auth";
3
- import type { EasmClient } from "./clientDefinitions.js";
4
- /**
5
- * Initialize a new instance of `EasmClient`
6
- * @param endpoint - The endpoint hosting the requested resource. For example, https://{region}.easm.defender.microsoft.com
7
- * @param subscriptionId - The ID of the target subscription.
8
- * @param resourceGroupName - The name of the Resource Group.
9
- * @param workspaceName - The name of the Workspace.
10
- * @param credentials - uniquely identify client credential
11
- * @param options - the parameter for all optional parameters
12
- */
13
- export default function createClient(endpoint: string, subscriptionId: string, resourceGroupName: string, workspaceName: string, credentials: TokenCredential, options?: ClientOptions): EasmClient;
14
- //# sourceMappingURL=easm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"easm.d.ts","sourceRoot":"","sources":["../../src/easm.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EACtB,iBAAiB,EAAE,MAAM,EACzB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,eAAe,EAC5B,OAAO,GAAE,aAAkB,GAC1B,UAAU,CA8BZ"}
@@ -1,33 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { getClient } from "@azure-rest/core-client";
4
- import { logger } from "./logger.js";
5
- /**
6
- * Initialize a new instance of `EasmClient`
7
- * @param endpoint - The endpoint hosting the requested resource. For example, https://{region}.easm.defender.microsoft.com
8
- * @param subscriptionId - The ID of the target subscription.
9
- * @param resourceGroupName - The name of the Resource Group.
10
- * @param workspaceName - The name of the Workspace.
11
- * @param credentials - uniquely identify client credential
12
- * @param options - the parameter for all optional parameters
13
- */
14
- export default function createClient(endpoint, subscriptionId, resourceGroupName, workspaceName, credentials, options = {}) {
15
- var _a, _b, _c, _d, _e, _f;
16
- const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${endpoint}/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/workspaces/${workspaceName}`;
17
- options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2023-03-01-preview";
18
- options = Object.assign(Object.assign({}, options), { credentials: {
19
- scopes: (_d = (_c = options.credentials) === null || _c === void 0 ? void 0 : _c.scopes) !== null && _d !== void 0 ? _d : ["https://easm.defender.microsoft.com/.default"],
20
- } });
21
- const userAgentInfo = `azsdk-js-defender-easm-rest/1.0.0-beta.2`;
22
- const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
23
- ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
24
- : `${userAgentInfo}`;
25
- options = Object.assign(Object.assign({}, options), { userAgentOptions: {
26
- userAgentPrefix,
27
- }, loggingOptions: {
28
- logger: (_f = (_e = options.loggingOptions) === null || _e === void 0 ? void 0 : _e.logger) !== null && _f !== void 0 ? _f : logger.info,
29
- } });
30
- const client = getClient(baseUrl, credentials, options);
31
- return client;
32
- }
33
- //# sourceMappingURL=easm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"easm.js","sourceRoot":"","sources":["../../src/easm.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAgB,EAChB,cAAsB,EACtB,iBAAyB,EACzB,aAAqB,EACrB,WAA4B,EAC5B,UAAyB,EAAE;;IAE3B,MAAM,OAAO,GACX,MAAA,OAAO,CAAC,OAAO,mCACf,GAAG,QAAQ,kBAAkB,cAAc,mBAAmB,iBAAiB,eAAe,aAAa,EAAE,CAAC;IAChH,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,OAAO,mCACF,OAAO,KACV,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI,CAAC,8CAA8C,CAAC;SACxF,GACF,CAAC;IAEF,MAAM,aAAa,GAAG,0CAA0C,CAAC;IACjE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI;SACtD,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAe,CAAC;IAEtE,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { EasmClient } from \"./clientDefinitions.js\";\n\n/**\n * Initialize a new instance of `EasmClient`\n * @param endpoint - The endpoint hosting the requested resource. For example, https://{region}.easm.defender.microsoft.com\n * @param subscriptionId - The ID of the target subscription.\n * @param resourceGroupName - The name of the Resource Group.\n * @param workspaceName - The name of the Workspace.\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n subscriptionId: string,\n resourceGroupName: string,\n workspaceName: string,\n credentials: TokenCredential,\n options: ClientOptions = {},\n): EasmClient {\n const baseUrl =\n options.baseUrl ??\n `${endpoint}/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/workspaces/${workspaceName}`;\n options.apiVersion = options.apiVersion ?? \"2023-03-01-preview\";\n options = {\n ...options,\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://easm.defender.microsoft.com/.default\"],\n },\n };\n\n const userAgentInfo = `azsdk-js-defender-easm-rest/1.0.0-beta.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n };\n\n const client = getClient(baseUrl, credentials, options) as EasmClient;\n\n return client;\n}\n"]}