@azure/synapse-artifacts 1.0.0-alpha.20240111.1 → 1.0.0-alpha.20240115.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 (59) hide show
  1. package/dist/index.js +6034 -3254
  2. package/dist/index.js.map +1 -1
  3. package/dist-esm/src/artifactsClient.js +10 -5
  4. package/dist-esm/src/artifactsClient.js.map +1 -1
  5. package/dist-esm/src/lroImpl.js +7 -3
  6. package/dist-esm/src/lroImpl.js.map +1 -1
  7. package/dist-esm/src/models/mappers.js +5135 -2329
  8. package/dist-esm/src/models/mappers.js.map +1 -1
  9. package/dist-esm/src/operations/bigDataPools.js +2 -2
  10. package/dist-esm/src/operations/bigDataPools.js.map +1 -1
  11. package/dist-esm/src/operations/dataFlowDebugSession.js +50 -58
  12. package/dist-esm/src/operations/dataFlowDebugSession.js.map +1 -1
  13. package/dist-esm/src/operations/dataFlowOperations.js +61 -64
  14. package/dist-esm/src/operations/dataFlowOperations.js.map +1 -1
  15. package/dist-esm/src/operations/datasetOperations.js +61 -64
  16. package/dist-esm/src/operations/datasetOperations.js.map +1 -1
  17. package/dist-esm/src/operations/integrationRuntimes.js +2 -2
  18. package/dist-esm/src/operations/integrationRuntimes.js.map +1 -1
  19. package/dist-esm/src/operations/kqlScriptOperations.js +37 -22
  20. package/dist-esm/src/operations/kqlScriptOperations.js.map +1 -1
  21. package/dist-esm/src/operations/kqlScripts.js +24 -42
  22. package/dist-esm/src/operations/kqlScripts.js.map +1 -1
  23. package/dist-esm/src/operations/library.js +63 -66
  24. package/dist-esm/src/operations/library.js.map +1 -1
  25. package/dist-esm/src/operations/linkConnectionOperations.js +36 -54
  26. package/dist-esm/src/operations/linkConnectionOperations.js.map +1 -1
  27. package/dist-esm/src/operations/linkedServiceOperations.js +61 -64
  28. package/dist-esm/src/operations/linkedServiceOperations.js.map +1 -1
  29. package/dist-esm/src/operations/metastore.js +4 -4
  30. package/dist-esm/src/operations/metastore.js.map +1 -1
  31. package/dist-esm/src/operations/notebookOperationResult.js +1 -1
  32. package/dist-esm/src/operations/notebookOperationResult.js.map +1 -1
  33. package/dist-esm/src/operations/notebookOperations.js +85 -105
  34. package/dist-esm/src/operations/notebookOperations.js.map +1 -1
  35. package/dist-esm/src/operations/pipelineOperations.js +62 -65
  36. package/dist-esm/src/operations/pipelineOperations.js.map +1 -1
  37. package/dist-esm/src/operations/pipelineRunOperations.js +4 -4
  38. package/dist-esm/src/operations/pipelineRunOperations.js.map +1 -1
  39. package/dist-esm/src/operations/runNotebook.js +15 -10
  40. package/dist-esm/src/operations/runNotebook.js.map +1 -1
  41. package/dist-esm/src/operations/sparkConfigurationOperations.js +61 -64
  42. package/dist-esm/src/operations/sparkConfigurationOperations.js.map +1 -1
  43. package/dist-esm/src/operations/sparkJobDefinitionOperations.js +85 -78
  44. package/dist-esm/src/operations/sparkJobDefinitionOperations.js.map +1 -1
  45. package/dist-esm/src/operations/sqlPools.js +2 -2
  46. package/dist-esm/src/operations/sqlPools.js.map +1 -1
  47. package/dist-esm/src/operations/sqlScriptOperations.js +61 -64
  48. package/dist-esm/src/operations/sqlScriptOperations.js.map +1 -1
  49. package/dist-esm/src/operations/triggerOperations.js +98 -86
  50. package/dist-esm/src/operations/triggerOperations.js.map +1 -1
  51. package/dist-esm/src/operations/triggerRunOperations.js +3 -3
  52. package/dist-esm/src/operations/triggerRunOperations.js.map +1 -1
  53. package/dist-esm/src/operations/workspaceGitRepoManagement.js +1 -1
  54. package/dist-esm/src/operations/workspaceGitRepoManagement.js.map +1 -1
  55. package/dist-esm/src/operations/workspaceOperations.js +1 -1
  56. package/dist-esm/src/operations/workspaceOperations.js.map +1 -1
  57. package/dist-esm/src/pagingHelper.js +2 -4
  58. package/dist-esm/src/pagingHelper.js.map +1 -1
  59. package/package.json +1 -1
@@ -28,19 +28,24 @@ export class KqlScriptOperationsImpl {
28
28
  */
29
29
  async beginCreateOrUpdate(kqlScriptName, kqlScript, options) {
30
30
  const directSendOperation = async (args, spec) => {
31
- return tracingClient.withSpan("ArtifactsClient.beginCreateOrUpdate", options !== null && options !== void 0 ? options : {}, async () => {
31
+ return tracingClient.withSpan("ArtifactsClient.beginCreateOrUpdate", options ?? {}, async () => {
32
32
  return this.client.sendOperationRequest(args, spec);
33
33
  });
34
34
  };
35
35
  const sendOperationFn = async (args, spec) => {
36
- var _a;
37
36
  let currentRawResponse = undefined;
38
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
37
+ const providedCallback = args.options?.onResponse;
39
38
  const callback = (rawResponse, flatResponse) => {
40
39
  currentRawResponse = rawResponse;
41
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
40
+ providedCallback?.(rawResponse, flatResponse);
41
+ };
42
+ const updatedArgs = {
43
+ ...args,
44
+ options: {
45
+ ...args.options,
46
+ onResponse: callback
47
+ }
42
48
  };
43
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
44
49
  const flatResponse = await directSendOperation(updatedArgs, spec);
45
50
  return {
46
51
  flatResponse,
@@ -57,8 +62,8 @@ export class KqlScriptOperationsImpl {
57
62
  spec: createOrUpdateOperationSpec
58
63
  });
59
64
  const poller = await createHttpPoller(lro, {
60
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
61
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
65
+ restoreFrom: options?.resumeFrom,
66
+ intervalInMs: options?.updateIntervalInMs
62
67
  });
63
68
  await poller.poll();
64
69
  return poller;
@@ -79,7 +84,7 @@ export class KqlScriptOperationsImpl {
79
84
  * @param options The options parameters.
80
85
  */
81
86
  async getByName(kqlScriptName, options) {
82
- return tracingClient.withSpan("ArtifactsClient.getByName", options !== null && options !== void 0 ? options : {}, async (options) => {
87
+ return tracingClient.withSpan("ArtifactsClient.getByName", options ?? {}, async (options) => {
83
88
  return this.client.sendOperationRequest({ kqlScriptName, options }, getByNameOperationSpec);
84
89
  });
85
90
  }
@@ -90,19 +95,24 @@ export class KqlScriptOperationsImpl {
90
95
  */
91
96
  async beginDeleteByName(kqlScriptName, options) {
92
97
  const directSendOperation = async (args, spec) => {
93
- return tracingClient.withSpan("ArtifactsClient.beginDeleteByName", options !== null && options !== void 0 ? options : {}, async () => {
98
+ return tracingClient.withSpan("ArtifactsClient.beginDeleteByName", options ?? {}, async () => {
94
99
  return this.client.sendOperationRequest(args, spec);
95
100
  });
96
101
  };
97
102
  const sendOperationFn = async (args, spec) => {
98
- var _a;
99
103
  let currentRawResponse = undefined;
100
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
104
+ const providedCallback = args.options?.onResponse;
101
105
  const callback = (rawResponse, flatResponse) => {
102
106
  currentRawResponse = rawResponse;
103
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
107
+ providedCallback?.(rawResponse, flatResponse);
108
+ };
109
+ const updatedArgs = {
110
+ ...args,
111
+ options: {
112
+ ...args.options,
113
+ onResponse: callback
114
+ }
104
115
  };
105
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
106
116
  const flatResponse = await directSendOperation(updatedArgs, spec);
107
117
  return {
108
118
  flatResponse,
@@ -119,8 +129,8 @@ export class KqlScriptOperationsImpl {
119
129
  spec: deleteByNameOperationSpec
120
130
  });
121
131
  const poller = await createHttpPoller(lro, {
122
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
123
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
132
+ restoreFrom: options?.resumeFrom,
133
+ intervalInMs: options?.updateIntervalInMs
124
134
  });
125
135
  await poller.poll();
126
136
  return poller;
@@ -142,19 +152,24 @@ export class KqlScriptOperationsImpl {
142
152
  */
143
153
  async beginRename(kqlScriptName, renameRequest, options) {
144
154
  const directSendOperation = async (args, spec) => {
145
- return tracingClient.withSpan("ArtifactsClient.beginRename", options !== null && options !== void 0 ? options : {}, async () => {
155
+ return tracingClient.withSpan("ArtifactsClient.beginRename", options ?? {}, async () => {
146
156
  return this.client.sendOperationRequest(args, spec);
147
157
  });
148
158
  };
149
159
  const sendOperationFn = async (args, spec) => {
150
- var _a;
151
160
  let currentRawResponse = undefined;
152
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
161
+ const providedCallback = args.options?.onResponse;
153
162
  const callback = (rawResponse, flatResponse) => {
154
163
  currentRawResponse = rawResponse;
155
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
164
+ providedCallback?.(rawResponse, flatResponse);
165
+ };
166
+ const updatedArgs = {
167
+ ...args,
168
+ options: {
169
+ ...args.options,
170
+ onResponse: callback
171
+ }
156
172
  };
157
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
158
173
  const flatResponse = await directSendOperation(updatedArgs, spec);
159
174
  return {
160
175
  flatResponse,
@@ -171,8 +186,8 @@ export class KqlScriptOperationsImpl {
171
186
  spec: renameOperationSpec
172
187
  });
173
188
  const poller = await createHttpPoller(lro, {
174
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
175
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
189
+ restoreFrom: options?.resumeFrom,
190
+ intervalInMs: options?.updateIntervalInMs
176
191
  });
177
192
  await poller.poll();
178
193
  return poller;
@@ -1 +1 @@
1
- {"version":3,"file":"kqlScriptOperations.js","sourceRoot":"","sources":["../../../src/operations/kqlScriptOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAEnD,OAAO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ACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,aAAa,CAAC;IAC9D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,oCAAoC;IAC1C,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,aAAa;IACrC,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,aAAa,CAAC;IAC9D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing\";\nimport { KqlScriptOperations } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { ArtifactsClient } from \"../artifactsClient\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl\";\nimport {\n KqlScriptResource,\n KqlScriptCreateOrUpdateOptionalParams,\n KqlScriptCreateOrUpdateResponse,\n KqlScriptGetByNameOptionalParams,\n KqlScriptGetByNameResponse,\n KqlScriptDeleteByNameOptionalParams,\n ArtifactRenameRequest,\n KqlScriptRenameOptionalParams\n} from \"../models\";\n\n/** Class containing KqlScriptOperations operations. */\nexport class KqlScriptOperationsImpl implements KqlScriptOperations {\n private readonly client: ArtifactsClient;\n\n /**\n * Initialize a new instance of the class KqlScriptOperations class.\n * @param client Reference to the service client\n */\n constructor(client: ArtifactsClient) {\n this.client = client;\n }\n\n /**\n * Creates or updates a KQL Script\n * @param kqlScriptName KQL script name\n * @param kqlScript KQL script\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n kqlScriptName: string,\n kqlScript: KqlScriptResource,\n options?: KqlScriptCreateOrUpdateOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<KqlScriptCreateOrUpdateResponse>,\n KqlScriptCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<KqlScriptCreateOrUpdateResponse> => {\n return tracingClient.withSpan(\n \"ArtifactsClient.beginCreateOrUpdate\",\n options ?? {},\n async () => {\n return this.client.sendOperationRequest(args, spec) as Promise<\n KqlScriptCreateOrUpdateResponse\n >;\n }\n );\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { kqlScriptName, kqlScript, options },\n spec: createOrUpdateOperationSpec\n });\n const poller = await createHttpPoller<\n KqlScriptCreateOrUpdateResponse,\n OperationState<KqlScriptCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates or updates a KQL Script\n * @param kqlScriptName KQL script name\n * @param kqlScript KQL script\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n kqlScriptName: string,\n kqlScript: KqlScriptResource,\n options?: KqlScriptCreateOrUpdateOptionalParams\n ): Promise<KqlScriptCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n kqlScriptName,\n kqlScript,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get KQL script by name\n * @param kqlScriptName KQL script name\n * @param options The options parameters.\n */\n async getByName(\n kqlScriptName: string,\n options?: KqlScriptGetByNameOptionalParams\n ): Promise<KqlScriptGetByNameResponse> {\n return tracingClient.withSpan(\n \"ArtifactsClient.getByName\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { kqlScriptName, options },\n getByNameOperationSpec\n ) as Promise<KqlScriptGetByNameResponse>;\n }\n );\n }\n\n /**\n * Delete KQL script by name\n * @param kqlScriptName KQL script name\n * @param options The options parameters.\n */\n async beginDeleteByName(\n kqlScriptName: string,\n options?: KqlScriptDeleteByNameOptionalParams\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return tracingClient.withSpan(\n \"ArtifactsClient.beginDeleteByName\",\n options ?? {},\n async () => {\n return this.client.sendOperationRequest(args, spec) as Promise<void>;\n }\n );\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { kqlScriptName, options },\n spec: deleteByNameOperationSpec\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Delete KQL script by name\n * @param kqlScriptName KQL script name\n * @param options The options parameters.\n */\n async beginDeleteByNameAndWait(\n kqlScriptName: string,\n options?: KqlScriptDeleteByNameOptionalParams\n ): Promise<void> {\n const poller = await this.beginDeleteByName(kqlScriptName, options);\n return poller.pollUntilDone();\n }\n\n /**\n * Rename KQL script\n * @param kqlScriptName KQL script name\n * @param renameRequest Rename request\n * @param options The options parameters.\n */\n async beginRename(\n kqlScriptName: string,\n renameRequest: ArtifactRenameRequest,\n options?: KqlScriptRenameOptionalParams\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return tracingClient.withSpan(\n \"ArtifactsClient.beginRename\",\n options ?? {},\n async () => {\n return this.client.sendOperationRequest(args, spec) as Promise<void>;\n }\n );\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { kqlScriptName, renameRequest, options },\n spec: renameOperationSpec\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Rename KQL script\n * @param kqlScriptName KQL script name\n * @param renameRequest Rename request\n * @param options The options parameters.\n */\n async beginRenameAndWait(\n kqlScriptName: string,\n renameRequest: ArtifactRenameRequest,\n options?: KqlScriptRenameOptionalParams\n ): Promise<void> {\n const poller = await this.beginRename(\n kqlScriptName,\n renameRequest,\n options\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts/{kqlScriptName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.KqlScriptResource\n },\n 201: {\n bodyMapper: Mappers.KqlScriptResource\n },\n 202: {\n bodyMapper: Mappers.KqlScriptResource\n },\n 204: {\n bodyMapper: Mappers.KqlScriptResource\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n requestBody: Parameters.kqlScript,\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.endpoint, Parameters.kqlScriptName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getByNameOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts/{kqlScriptName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KqlScriptResource\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.endpoint, Parameters.kqlScriptName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteByNameOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts/{kqlScriptName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.endpoint, Parameters.kqlScriptName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst renameOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts/{kqlScriptName}/rename\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n requestBody: Parameters.renameRequest,\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.endpoint, Parameters.kqlScriptName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\n"]}
1
+ {"version":3,"file":"kqlScriptOperations.js","sourceRoot":"","sources":["../../../src/operations/kqlScriptOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAGL,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAY3C,uDAAuD;AACvD,MAAM,OAAO,uBAAuB;IAGlC;;;OAGG;IACH,YAAY,MAAuB;QACjC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G,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,aAAa;IACrC,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,aAAa,CAAC;IAC9D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing\";\nimport { KqlScriptOperations } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { ArtifactsClient } from \"../artifactsClient\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl\";\nimport {\n KqlScriptResource,\n KqlScriptCreateOrUpdateOptionalParams,\n KqlScriptCreateOrUpdateResponse,\n KqlScriptGetByNameOptionalParams,\n KqlScriptGetByNameResponse,\n KqlScriptDeleteByNameOptionalParams,\n ArtifactRenameRequest,\n KqlScriptRenameOptionalParams\n} from \"../models\";\n\n/** Class containing KqlScriptOperations operations. */\nexport class KqlScriptOperationsImpl implements KqlScriptOperations {\n private readonly client: ArtifactsClient;\n\n /**\n * Initialize a new instance of the class KqlScriptOperations class.\n * @param client Reference to the service client\n */\n constructor(client: ArtifactsClient) {\n this.client = client;\n }\n\n /**\n * Creates or updates a KQL Script\n * @param kqlScriptName KQL script name\n * @param kqlScript KQL script\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n kqlScriptName: string,\n kqlScript: KqlScriptResource,\n options?: KqlScriptCreateOrUpdateOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<KqlScriptCreateOrUpdateResponse>,\n KqlScriptCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<KqlScriptCreateOrUpdateResponse> => {\n return tracingClient.withSpan(\n \"ArtifactsClient.beginCreateOrUpdate\",\n options ?? {},\n async () => {\n return this.client.sendOperationRequest(args, spec) as Promise<\n KqlScriptCreateOrUpdateResponse\n >;\n }\n );\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { kqlScriptName, kqlScript, options },\n spec: createOrUpdateOperationSpec\n });\n const poller = await createHttpPoller<\n KqlScriptCreateOrUpdateResponse,\n OperationState<KqlScriptCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates or updates a KQL Script\n * @param kqlScriptName KQL script name\n * @param kqlScript KQL script\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n kqlScriptName: string,\n kqlScript: KqlScriptResource,\n options?: KqlScriptCreateOrUpdateOptionalParams\n ): Promise<KqlScriptCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n kqlScriptName,\n kqlScript,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Get KQL script by name\n * @param kqlScriptName KQL script name\n * @param options The options parameters.\n */\n async getByName(\n kqlScriptName: string,\n options?: KqlScriptGetByNameOptionalParams\n ): Promise<KqlScriptGetByNameResponse> {\n return tracingClient.withSpan(\n \"ArtifactsClient.getByName\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { kqlScriptName, options },\n getByNameOperationSpec\n ) as Promise<KqlScriptGetByNameResponse>;\n }\n );\n }\n\n /**\n * Delete KQL script by name\n * @param kqlScriptName KQL script name\n * @param options The options parameters.\n */\n async beginDeleteByName(\n kqlScriptName: string,\n options?: KqlScriptDeleteByNameOptionalParams\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return tracingClient.withSpan(\n \"ArtifactsClient.beginDeleteByName\",\n options ?? {},\n async () => {\n return this.client.sendOperationRequest(args, spec) as Promise<void>;\n }\n );\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { kqlScriptName, options },\n spec: deleteByNameOperationSpec\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Delete KQL script by name\n * @param kqlScriptName KQL script name\n * @param options The options parameters.\n */\n async beginDeleteByNameAndWait(\n kqlScriptName: string,\n options?: KqlScriptDeleteByNameOptionalParams\n ): Promise<void> {\n const poller = await this.beginDeleteByName(kqlScriptName, options);\n return poller.pollUntilDone();\n }\n\n /**\n * Rename KQL script\n * @param kqlScriptName KQL script name\n * @param renameRequest Rename request\n * @param options The options parameters.\n */\n async beginRename(\n kqlScriptName: string,\n renameRequest: ArtifactRenameRequest,\n options?: KqlScriptRenameOptionalParams\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return tracingClient.withSpan(\n \"ArtifactsClient.beginRename\",\n options ?? {},\n async () => {\n return this.client.sendOperationRequest(args, spec) as Promise<void>;\n }\n );\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { kqlScriptName, renameRequest, options },\n spec: renameOperationSpec\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Rename KQL script\n * @param kqlScriptName KQL script name\n * @param renameRequest Rename request\n * @param options The options parameters.\n */\n async beginRenameAndWait(\n kqlScriptName: string,\n renameRequest: ArtifactRenameRequest,\n options?: KqlScriptRenameOptionalParams\n ): Promise<void> {\n const poller = await this.beginRename(\n kqlScriptName,\n renameRequest,\n options\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts/{kqlScriptName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.KqlScriptResource\n },\n 201: {\n bodyMapper: Mappers.KqlScriptResource\n },\n 202: {\n bodyMapper: Mappers.KqlScriptResource\n },\n 204: {\n bodyMapper: Mappers.KqlScriptResource\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n requestBody: Parameters.kqlScript,\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.endpoint, Parameters.kqlScriptName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getByNameOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts/{kqlScriptName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KqlScriptResource\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.endpoint, Parameters.kqlScriptName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteByNameOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts/{kqlScriptName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.endpoint, Parameters.kqlScriptName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst renameOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts/{kqlScriptName}/rename\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n requestBody: Parameters.renameRequest,\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.endpoint, Parameters.kqlScriptName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\n"]}
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import { tracingClient } from "../tracing";
10
9
  import { setContinuationToken } from "../pagingHelper";
11
10
  import * as coreClient from "@azure/core-client";
@@ -35,59 +34,42 @@ export class KqlScriptsImpl {
35
34
  return this;
36
35
  },
37
36
  byPage: (settings) => {
38
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
37
+ if (settings?.maxPageSize) {
39
38
  throw new Error("maxPageSize is not supported by this operation.");
40
39
  }
41
40
  return this.getAllPagingPage(options, settings);
42
41
  }
43
42
  };
44
43
  }
45
- getAllPagingPage(options, settings) {
46
- return __asyncGenerator(this, arguments, function* getAllPagingPage_1() {
47
- let result;
48
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
49
- if (!continuationToken) {
50
- result = yield __await(this._getAll(options));
51
- let page = result.value || [];
52
- continuationToken = result.nextLink;
53
- setContinuationToken(page, continuationToken);
54
- yield yield __await(page);
55
- }
56
- while (continuationToken) {
57
- result = yield __await(this._getAllNext(continuationToken, options));
58
- continuationToken = result.nextLink;
59
- let page = result.value || [];
60
- setContinuationToken(page, continuationToken);
61
- yield yield __await(page);
62
- }
63
- });
44
+ async *getAllPagingPage(options, settings) {
45
+ let result;
46
+ let continuationToken = settings?.continuationToken;
47
+ if (!continuationToken) {
48
+ result = await this._getAll(options);
49
+ let page = result.value || [];
50
+ continuationToken = result.nextLink;
51
+ setContinuationToken(page, continuationToken);
52
+ yield page;
53
+ }
54
+ while (continuationToken) {
55
+ result = await this._getAllNext(continuationToken, options);
56
+ continuationToken = result.nextLink;
57
+ let page = result.value || [];
58
+ setContinuationToken(page, continuationToken);
59
+ yield page;
60
+ }
64
61
  }
65
- getAllPagingAll(options) {
66
- return __asyncGenerator(this, arguments, function* getAllPagingAll_1() {
67
- var _a, e_1, _b, _c;
68
- try {
69
- for (var _d = true, _e = __asyncValues(this.getAllPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
70
- _c = _f.value;
71
- _d = false;
72
- const page = _c;
73
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
74
- }
75
- }
76
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
77
- finally {
78
- try {
79
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
80
- }
81
- finally { if (e_1) throw e_1.error; }
82
- }
83
- });
62
+ async *getAllPagingAll(options) {
63
+ for await (const page of this.getAllPagingPage(options)) {
64
+ yield* page;
65
+ }
84
66
  }
85
67
  /**
86
68
  * Get all KQL scripts
87
69
  * @param options The options parameters.
88
70
  */
89
71
  async _getAll(options) {
90
- return tracingClient.withSpan("ArtifactsClient._getAll", options !== null && options !== void 0 ? options : {}, async (options) => {
72
+ return tracingClient.withSpan("ArtifactsClient._getAll", options ?? {}, async (options) => {
91
73
  return this.client.sendOperationRequest({ options }, getAllOperationSpec);
92
74
  });
93
75
  }
@@ -97,7 +79,7 @@ export class KqlScriptsImpl {
97
79
  * @param options The options parameters.
98
80
  */
99
81
  async _getAllNext(nextLink, options) {
100
- return tracingClient.withSpan("ArtifactsClient._getAllNext", options !== null && options !== void 0 ? options : {}, async (options) => {
82
+ return tracingClient.withSpan("ArtifactsClient._getAllNext", options ?? {}, async (options) => {
101
83
  return this.client.sendOperationRequest({ nextLink, options }, getAllNextOperationSpec);
102
84
  });
103
85
  }
@@ -1 +1 @@
1
- {"version":3,"file":"kqlScripts.js","sourceRoot":"","sources":["../../../src/operations/kqlScripts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAUnD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,OAAO,CACZ,OAAwC;QAExC,MAAM,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE;oBACzB,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;iBACpE;gBACD,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAClD,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,gBAAgB,CAC7B,OAAwC,EACxC,QAAuB;;YAEvB,IAAI,MAAgC,CAAC;YACrC,IAAI,iBAAiB,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,iBAAiB,CAAC;YACpD,IAAI,CA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ation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing\";\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper\";\nimport { KqlScripts } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { ArtifactsClient } from \"../artifactsClient\";\nimport {\n KqlScriptResource,\n KqlScriptsGetAllNextOptionalParams,\n KqlScriptsGetAllOptionalParams,\n KqlScriptsGetAllResponse,\n KqlScriptsGetAllNextResponse\n} from \"../models\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing KqlScripts operations. */\nexport class KqlScriptsImpl implements KqlScripts {\n private readonly client: ArtifactsClient;\n\n /**\n * Initialize a new instance of the class KqlScripts class.\n * @param client Reference to the service client\n */\n constructor(client: ArtifactsClient) {\n this.client = client;\n }\n\n /**\n * Get all KQL scripts\n * @param options The options parameters.\n */\n public listAll(\n options?: KqlScriptsGetAllOptionalParams\n ): PagedAsyncIterableIterator<KqlScriptResource> {\n const iter = this.getAllPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.getAllPagingPage(options, settings);\n }\n };\n }\n\n private async *getAllPagingPage(\n options?: KqlScriptsGetAllOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<KqlScriptResource[]> {\n let result: KqlScriptsGetAllResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._getAll(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._getAllNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *getAllPagingAll(\n options?: KqlScriptsGetAllOptionalParams\n ): AsyncIterableIterator<KqlScriptResource> {\n for await (const page of this.getAllPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Get all KQL scripts\n * @param options The options parameters.\n */\n private async _getAll(\n options?: KqlScriptsGetAllOptionalParams\n ): Promise<KqlScriptsGetAllResponse> {\n return tracingClient.withSpan(\n \"ArtifactsClient._getAll\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n getAllOperationSpec\n ) as Promise<KqlScriptsGetAllResponse>;\n }\n );\n }\n\n /**\n * GetAllNext\n * @param nextLink The nextLink from the previous successful call to the GetAll method.\n * @param options The options parameters.\n */\n private async _getAllNext(\n nextLink: string,\n options?: KqlScriptsGetAllNextOptionalParams\n ): Promise<KqlScriptsGetAllNextResponse> {\n return tracingClient.withSpan(\n \"ArtifactsClient._getAllNext\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { nextLink, options },\n getAllNextOperationSpec\n ) as Promise<KqlScriptsGetAllNextResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getAllOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KqlScriptsResourceCollectionResponse\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getAllNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KqlScriptsResourceCollectionResponse\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n urlParameters: [Parameters.endpoint, Parameters.nextLink],\n headerParameters: [Parameters.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uBAAuB,CACiB,CAAC;QAC7C,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,aAAa;IACnB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,uBAAuB,GAA6B;IACxD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing\";\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper\";\nimport { KqlScripts } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { ArtifactsClient } from \"../artifactsClient\";\nimport {\n KqlScriptResource,\n KqlScriptsGetAllNextOptionalParams,\n KqlScriptsGetAllOptionalParams,\n KqlScriptsGetAllResponse,\n KqlScriptsGetAllNextResponse\n} from \"../models\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing KqlScripts operations. */\nexport class KqlScriptsImpl implements KqlScripts {\n private readonly client: ArtifactsClient;\n\n /**\n * Initialize a new instance of the class KqlScripts class.\n * @param client Reference to the service client\n */\n constructor(client: ArtifactsClient) {\n this.client = client;\n }\n\n /**\n * Get all KQL scripts\n * @param options The options parameters.\n */\n public listAll(\n options?: KqlScriptsGetAllOptionalParams\n ): PagedAsyncIterableIterator<KqlScriptResource> {\n const iter = this.getAllPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.getAllPagingPage(options, settings);\n }\n };\n }\n\n private async *getAllPagingPage(\n options?: KqlScriptsGetAllOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<KqlScriptResource[]> {\n let result: KqlScriptsGetAllResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._getAll(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._getAllNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *getAllPagingAll(\n options?: KqlScriptsGetAllOptionalParams\n ): AsyncIterableIterator<KqlScriptResource> {\n for await (const page of this.getAllPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Get all KQL scripts\n * @param options The options parameters.\n */\n private async _getAll(\n options?: KqlScriptsGetAllOptionalParams\n ): Promise<KqlScriptsGetAllResponse> {\n return tracingClient.withSpan(\n \"ArtifactsClient._getAll\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n getAllOperationSpec\n ) as Promise<KqlScriptsGetAllResponse>;\n }\n );\n }\n\n /**\n * GetAllNext\n * @param nextLink The nextLink from the previous successful call to the GetAll method.\n * @param options The options parameters.\n */\n private async _getAllNext(\n nextLink: string,\n options?: KqlScriptsGetAllNextOptionalParams\n ): Promise<KqlScriptsGetAllNextResponse> {\n return tracingClient.withSpan(\n \"ArtifactsClient._getAllNext\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { nextLink, options },\n getAllNextOperationSpec\n ) as Promise<KqlScriptsGetAllNextResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getAllOperationSpec: coreClient.OperationSpec = {\n path: \"/kqlScripts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KqlScriptsResourceCollectionResponse\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getAllNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KqlScriptsResourceCollectionResponse\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n urlParameters: [Parameters.endpoint, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import { tracingClient } from "../tracing";
10
9
  import { setContinuationToken } from "../pagingHelper";
11
10
  import * as coreClient from "@azure/core-client";
@@ -37,59 +36,42 @@ export class LibraryImpl {
37
36
  return this;
38
37
  },
39
38
  byPage: (settings) => {
40
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
39
+ if (settings?.maxPageSize) {
41
40
  throw new Error("maxPageSize is not supported by this operation.");
42
41
  }
43
42
  return this.listPagingPage(options, settings);
44
43
  }
45
44
  };
46
45
  }
47
- listPagingPage(options, settings) {
48
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
49
- let result;
50
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
51
- if (!continuationToken) {
52
- result = yield __await(this._list(options));
53
- let page = result.value || [];
54
- continuationToken = result.nextLink;
55
- setContinuationToken(page, continuationToken);
56
- yield yield __await(page);
57
- }
58
- while (continuationToken) {
59
- result = yield __await(this._listNext(continuationToken, options));
60
- continuationToken = result.nextLink;
61
- let page = result.value || [];
62
- setContinuationToken(page, continuationToken);
63
- yield yield __await(page);
64
- }
65
- });
46
+ async *listPagingPage(options, settings) {
47
+ let result;
48
+ let continuationToken = settings?.continuationToken;
49
+ if (!continuationToken) {
50
+ result = await this._list(options);
51
+ let page = result.value || [];
52
+ continuationToken = result.nextLink;
53
+ setContinuationToken(page, continuationToken);
54
+ yield page;
55
+ }
56
+ while (continuationToken) {
57
+ result = await this._listNext(continuationToken, options);
58
+ continuationToken = result.nextLink;
59
+ let page = result.value || [];
60
+ setContinuationToken(page, continuationToken);
61
+ yield page;
62
+ }
66
63
  }
67
- listPagingAll(options) {
68
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
69
- var _a, e_1, _b, _c;
70
- try {
71
- for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
72
- _c = _f.value;
73
- _d = false;
74
- const page = _c;
75
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
76
- }
77
- }
78
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
79
- finally {
80
- try {
81
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
82
- }
83
- finally { if (e_1) throw e_1.error; }
84
- }
85
- });
64
+ async *listPagingAll(options) {
65
+ for await (const page of this.listPagingPage(options)) {
66
+ yield* page;
67
+ }
86
68
  }
87
69
  /**
88
70
  * Lists Library.
89
71
  * @param options The options parameters.
90
72
  */
91
73
  async _list(options) {
92
- return tracingClient.withSpan("ArtifactsClient._list", options !== null && options !== void 0 ? options : {}, async (options) => {
74
+ return tracingClient.withSpan("ArtifactsClient._list", options ?? {}, async (options) => {
93
75
  return this.client.sendOperationRequest({ options }, listOperationSpec);
94
76
  });
95
77
  }
@@ -101,19 +83,24 @@ export class LibraryImpl {
101
83
  */
102
84
  async beginFlush(libraryName, options) {
103
85
  const directSendOperation = async (args, spec) => {
104
- return tracingClient.withSpan("ArtifactsClient.beginFlush", options !== null && options !== void 0 ? options : {}, async () => {
86
+ return tracingClient.withSpan("ArtifactsClient.beginFlush", options ?? {}, async () => {
105
87
  return this.client.sendOperationRequest(args, spec);
106
88
  });
107
89
  };
108
90
  const sendOperationFn = async (args, spec) => {
109
- var _a;
110
91
  let currentRawResponse = undefined;
111
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
92
+ const providedCallback = args.options?.onResponse;
112
93
  const callback = (rawResponse, flatResponse) => {
113
94
  currentRawResponse = rawResponse;
114
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
95
+ providedCallback?.(rawResponse, flatResponse);
96
+ };
97
+ const updatedArgs = {
98
+ ...args,
99
+ options: {
100
+ ...args.options,
101
+ onResponse: callback
102
+ }
115
103
  };
116
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
117
104
  const flatResponse = await directSendOperation(updatedArgs, spec);
118
105
  return {
119
106
  flatResponse,
@@ -130,8 +117,8 @@ export class LibraryImpl {
130
117
  spec: flushOperationSpec
131
118
  });
132
119
  const poller = await createHttpPoller(lro, {
133
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
134
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
120
+ restoreFrom: options?.resumeFrom,
121
+ intervalInMs: options?.updateIntervalInMs
135
122
  });
136
123
  await poller.poll();
137
124
  return poller;
@@ -152,7 +139,7 @@ export class LibraryImpl {
152
139
  * @param options The options parameters.
153
140
  */
154
141
  async getOperationResult(operationId, options) {
155
- return tracingClient.withSpan("ArtifactsClient.getOperationResult", options !== null && options !== void 0 ? options : {}, async (options) => {
142
+ return tracingClient.withSpan("ArtifactsClient.getOperationResult", options ?? {}, async (options) => {
156
143
  return this.client.sendOperationRequest({ operationId, options }, getOperationResultOperationSpec);
157
144
  });
158
145
  }
@@ -164,19 +151,24 @@ export class LibraryImpl {
164
151
  */
165
152
  async beginDelete(libraryName, options) {
166
153
  const directSendOperation = async (args, spec) => {
167
- return tracingClient.withSpan("ArtifactsClient.beginDelete", options !== null && options !== void 0 ? options : {}, async () => {
154
+ return tracingClient.withSpan("ArtifactsClient.beginDelete", options ?? {}, async () => {
168
155
  return this.client.sendOperationRequest(args, spec);
169
156
  });
170
157
  };
171
158
  const sendOperationFn = async (args, spec) => {
172
- var _a;
173
159
  let currentRawResponse = undefined;
174
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
160
+ const providedCallback = args.options?.onResponse;
175
161
  const callback = (rawResponse, flatResponse) => {
176
162
  currentRawResponse = rawResponse;
177
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
163
+ providedCallback?.(rawResponse, flatResponse);
164
+ };
165
+ const updatedArgs = {
166
+ ...args,
167
+ options: {
168
+ ...args.options,
169
+ onResponse: callback
170
+ }
178
171
  };
179
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
180
172
  const flatResponse = await directSendOperation(updatedArgs, spec);
181
173
  return {
182
174
  flatResponse,
@@ -193,8 +185,8 @@ export class LibraryImpl {
193
185
  spec: deleteOperationSpec
194
186
  });
195
187
  const poller = await createHttpPoller(lro, {
196
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
197
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
188
+ restoreFrom: options?.resumeFrom,
189
+ intervalInMs: options?.updateIntervalInMs
198
190
  });
199
191
  await poller.poll();
200
192
  return poller;
@@ -216,7 +208,7 @@ export class LibraryImpl {
216
208
  * @param options The options parameters.
217
209
  */
218
210
  async get(libraryName, options) {
219
- return tracingClient.withSpan("ArtifactsClient.get", options !== null && options !== void 0 ? options : {}, async (options) => {
211
+ return tracingClient.withSpan("ArtifactsClient.get", options ?? {}, async (options) => {
220
212
  return this.client.sendOperationRequest({ libraryName, options }, getOperationSpec);
221
213
  });
222
214
  }
@@ -228,19 +220,24 @@ export class LibraryImpl {
228
220
  */
229
221
  async beginCreate(libraryName, options) {
230
222
  const directSendOperation = async (args, spec) => {
231
- return tracingClient.withSpan("ArtifactsClient.beginCreate", options !== null && options !== void 0 ? options : {}, async () => {
223
+ return tracingClient.withSpan("ArtifactsClient.beginCreate", options ?? {}, async () => {
232
224
  return this.client.sendOperationRequest(args, spec);
233
225
  });
234
226
  };
235
227
  const sendOperationFn = async (args, spec) => {
236
- var _a;
237
228
  let currentRawResponse = undefined;
238
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
229
+ const providedCallback = args.options?.onResponse;
239
230
  const callback = (rawResponse, flatResponse) => {
240
231
  currentRawResponse = rawResponse;
241
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
232
+ providedCallback?.(rawResponse, flatResponse);
233
+ };
234
+ const updatedArgs = {
235
+ ...args,
236
+ options: {
237
+ ...args.options,
238
+ onResponse: callback
239
+ }
242
240
  };
243
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
244
241
  const flatResponse = await directSendOperation(updatedArgs, spec);
245
242
  return {
246
243
  flatResponse,
@@ -257,8 +254,8 @@ export class LibraryImpl {
257
254
  spec: createOperationSpec
258
255
  });
259
256
  const poller = await createHttpPoller(lro, {
260
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
261
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
257
+ restoreFrom: options?.resumeFrom,
258
+ intervalInMs: options?.updateIntervalInMs
262
259
  });
263
260
  await poller.poll();
264
261
  return poller;
@@ -282,7 +279,7 @@ export class LibraryImpl {
282
279
  * @param options The options parameters.
283
280
  */
284
281
  async append(libraryName, content, options) {
285
- return tracingClient.withSpan("ArtifactsClient.append", options !== null && options !== void 0 ? options : {}, async (options) => {
282
+ return tracingClient.withSpan("ArtifactsClient.append", options ?? {}, async (options) => {
286
283
  return this.client.sendOperationRequest({ libraryName, content, options }, appendOperationSpec);
287
284
  });
288
285
  }
@@ -292,7 +289,7 @@ export class LibraryImpl {
292
289
  * @param options The options parameters.
293
290
  */
294
291
  async _listNext(nextLink, options) {
295
- return tracingClient.withSpan("ArtifactsClient._listNext", options !== null && options !== void 0 ? options : {}, async (options) => {
292
+ return tracingClient.withSpan("ArtifactsClient._listNext", options ?? {}, async (options) => {
296
293
  return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
297
294
  });
298
295
  }