@azure/synapse-artifacts 1.0.0-alpha.20240115.1 → 1.0.0-alpha.20240129.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 +3254 -6034
  2. package/dist/index.js.map +1 -1
  3. package/dist-esm/src/artifactsClient.js +5 -10
  4. package/dist-esm/src/artifactsClient.js.map +1 -1
  5. package/dist-esm/src/lroImpl.js +3 -7
  6. package/dist-esm/src/lroImpl.js.map +1 -1
  7. package/dist-esm/src/models/mappers.js +2329 -5135
  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 +58 -50
  12. package/dist-esm/src/operations/dataFlowDebugSession.js.map +1 -1
  13. package/dist-esm/src/operations/dataFlowOperations.js +64 -61
  14. package/dist-esm/src/operations/dataFlowOperations.js.map +1 -1
  15. package/dist-esm/src/operations/datasetOperations.js +64 -61
  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 +22 -37
  20. package/dist-esm/src/operations/kqlScriptOperations.js.map +1 -1
  21. package/dist-esm/src/operations/kqlScripts.js +42 -24
  22. package/dist-esm/src/operations/kqlScripts.js.map +1 -1
  23. package/dist-esm/src/operations/library.js +66 -63
  24. package/dist-esm/src/operations/library.js.map +1 -1
  25. package/dist-esm/src/operations/linkConnectionOperations.js +54 -36
  26. package/dist-esm/src/operations/linkConnectionOperations.js.map +1 -1
  27. package/dist-esm/src/operations/linkedServiceOperations.js +64 -61
  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 +105 -85
  34. package/dist-esm/src/operations/notebookOperations.js.map +1 -1
  35. package/dist-esm/src/operations/pipelineOperations.js +65 -62
  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 +10 -15
  40. package/dist-esm/src/operations/runNotebook.js.map +1 -1
  41. package/dist-esm/src/operations/sparkConfigurationOperations.js +64 -61
  42. package/dist-esm/src/operations/sparkConfigurationOperations.js.map +1 -1
  43. package/dist-esm/src/operations/sparkJobDefinitionOperations.js +78 -85
  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 +64 -61
  48. package/dist-esm/src/operations/sqlScriptOperations.js.map +1 -1
  49. package/dist-esm/src/operations/triggerOperations.js +86 -98
  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 +4 -2
  58. package/dist-esm/src/pagingHelper.js.map +1 -1
  59. package/package.json +2 -2
@@ -28,24 +28,19 @@ 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 ?? {}, async () => {
31
+ return tracingClient.withSpan("ArtifactsClient.beginCreateOrUpdate", options !== null && options !== void 0 ? options : {}, async () => {
32
32
  return this.client.sendOperationRequest(args, spec);
33
33
  });
34
34
  };
35
35
  const sendOperationFn = async (args, spec) => {
36
+ var _a;
36
37
  let currentRawResponse = undefined;
37
- const providedCallback = args.options?.onResponse;
38
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
38
39
  const callback = (rawResponse, flatResponse) => {
39
40
  currentRawResponse = rawResponse;
40
- providedCallback?.(rawResponse, flatResponse);
41
- };
42
- const updatedArgs = {
43
- ...args,
44
- options: {
45
- ...args.options,
46
- onResponse: callback
47
- }
41
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
48
42
  };
43
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
49
44
  const flatResponse = await directSendOperation(updatedArgs, spec);
50
45
  return {
51
46
  flatResponse,
@@ -62,8 +57,8 @@ export class KqlScriptOperationsImpl {
62
57
  spec: createOrUpdateOperationSpec
63
58
  });
64
59
  const poller = await createHttpPoller(lro, {
65
- restoreFrom: options?.resumeFrom,
66
- intervalInMs: options?.updateIntervalInMs
60
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
61
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
67
62
  });
68
63
  await poller.poll();
69
64
  return poller;
@@ -84,7 +79,7 @@ export class KqlScriptOperationsImpl {
84
79
  * @param options The options parameters.
85
80
  */
86
81
  async getByName(kqlScriptName, options) {
87
- return tracingClient.withSpan("ArtifactsClient.getByName", options ?? {}, async (options) => {
82
+ return tracingClient.withSpan("ArtifactsClient.getByName", options !== null && options !== void 0 ? options : {}, async (options) => {
88
83
  return this.client.sendOperationRequest({ kqlScriptName, options }, getByNameOperationSpec);
89
84
  });
90
85
  }
@@ -95,24 +90,19 @@ export class KqlScriptOperationsImpl {
95
90
  */
96
91
  async beginDeleteByName(kqlScriptName, options) {
97
92
  const directSendOperation = async (args, spec) => {
98
- return tracingClient.withSpan("ArtifactsClient.beginDeleteByName", options ?? {}, async () => {
93
+ return tracingClient.withSpan("ArtifactsClient.beginDeleteByName", options !== null && options !== void 0 ? options : {}, async () => {
99
94
  return this.client.sendOperationRequest(args, spec);
100
95
  });
101
96
  };
102
97
  const sendOperationFn = async (args, spec) => {
98
+ var _a;
103
99
  let currentRawResponse = undefined;
104
- const providedCallback = args.options?.onResponse;
100
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
105
101
  const callback = (rawResponse, flatResponse) => {
106
102
  currentRawResponse = rawResponse;
107
- providedCallback?.(rawResponse, flatResponse);
108
- };
109
- const updatedArgs = {
110
- ...args,
111
- options: {
112
- ...args.options,
113
- onResponse: callback
114
- }
103
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
115
104
  };
105
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
116
106
  const flatResponse = await directSendOperation(updatedArgs, spec);
117
107
  return {
118
108
  flatResponse,
@@ -129,8 +119,8 @@ export class KqlScriptOperationsImpl {
129
119
  spec: deleteByNameOperationSpec
130
120
  });
131
121
  const poller = await createHttpPoller(lro, {
132
- restoreFrom: options?.resumeFrom,
133
- intervalInMs: options?.updateIntervalInMs
122
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
123
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
134
124
  });
135
125
  await poller.poll();
136
126
  return poller;
@@ -152,24 +142,19 @@ export class KqlScriptOperationsImpl {
152
142
  */
153
143
  async beginRename(kqlScriptName, renameRequest, options) {
154
144
  const directSendOperation = async (args, spec) => {
155
- return tracingClient.withSpan("ArtifactsClient.beginRename", options ?? {}, async () => {
145
+ return tracingClient.withSpan("ArtifactsClient.beginRename", options !== null && options !== void 0 ? options : {}, async () => {
156
146
  return this.client.sendOperationRequest(args, spec);
157
147
  });
158
148
  };
159
149
  const sendOperationFn = async (args, spec) => {
150
+ var _a;
160
151
  let currentRawResponse = undefined;
161
- const providedCallback = args.options?.onResponse;
152
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
162
153
  const callback = (rawResponse, flatResponse) => {
163
154
  currentRawResponse = rawResponse;
164
- providedCallback?.(rawResponse, flatResponse);
165
- };
166
- const updatedArgs = {
167
- ...args,
168
- options: {
169
- ...args.options,
170
- onResponse: callback
171
- }
155
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
172
156
  };
157
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
173
158
  const flatResponse = await directSendOperation(updatedArgs, spec);
174
159
  return {
175
160
  flatResponse,
@@ -186,8 +171,8 @@ export class KqlScriptOperationsImpl {
186
171
  spec: renameOperationSpec
187
172
  });
188
173
  const poller = await createHttpPoller(lro, {
189
- restoreFrom: options?.resumeFrom,
190
- intervalInMs: options?.updateIntervalInMs
174
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
175
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
191
176
  });
192
177
  await poller.poll();
193
178
  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,EAGL,gBAAgB,EAC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AA6B;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,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,mBAAmB,CACvB,aAAqB,EACrB,SAA4B,EAC5B,OAA+C;QAO/C,MAAM,mBAAmB,GAAG,KAAK,EAC/B,IAAmC,EACnC,IAA8B,EACY,EAAE;YAC5C,OAAO,aAAa,CAAC,QAAQ,CAC3B,qCAAqC,EACrC,OAAO,aAAP,OAAO,c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,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,6 +5,7 @@
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";
8
9
  import { tracingClient } from "../tracing";
9
10
  import { setContinuationToken } from "../pagingHelper";
10
11
  import * as coreClient from "@azure/core-client";
@@ -34,42 +35,59 @@ export class KqlScriptsImpl {
34
35
  return this;
35
36
  },
36
37
  byPage: (settings) => {
37
- if (settings?.maxPageSize) {
38
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
38
39
  throw new Error("maxPageSize is not supported by this operation.");
39
40
  }
40
41
  return this.getAllPagingPage(options, settings);
41
42
  }
42
43
  };
43
44
  }
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
- }
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
+ });
61
64
  }
62
- async *getAllPagingAll(options) {
63
- for await (const page of this.getAllPagingPage(options)) {
64
- yield* page;
65
- }
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
+ });
66
84
  }
67
85
  /**
68
86
  * Get all KQL scripts
69
87
  * @param options The options parameters.
70
88
  */
71
89
  async _getAll(options) {
72
- return tracingClient.withSpan("ArtifactsClient._getAll", options ?? {}, async (options) => {
90
+ return tracingClient.withSpan("ArtifactsClient._getAll", options !== null && options !== void 0 ? options : {}, async (options) => {
73
91
  return this.client.sendOperationRequest({ options }, getAllOperationSpec);
74
92
  });
75
93
  }
@@ -79,7 +97,7 @@ export class KqlScriptsImpl {
79
97
  * @param options The options parameters.
80
98
  */
81
99
  async _getAllNext(nextLink, options) {
82
- return tracingClient.withSpan("ArtifactsClient._getAllNext", options ?? {}, async (options) => {
100
+ return tracingClient.withSpan("ArtifactsClient._getAllNext", options !== null && options !== void 0 ? options : {}, async (options) => {
83
101
  return this.client.sendOperationRequest({ nextLink, options }, getAllNextOperationSpec);
84
102
  });
85
103
  }
@@ -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,EAAE,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;IAEO,KAAK,CAAC,CAAC,gBAAgB,CAC7B,OAAwC,EACxC,QAAuB;QAEvB,IAAI,MAAgC,CAAC;QACrC,IAAI,iBAAiB,GAAG,QAAQ,EAAE,iBAAiB,CAAC;QACpD,IAAI,CAAC,iBAAiB,EAAE;YACtB,MAAM,GAAG,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CACrC,EAAE,QAAQ,EAAE,OAAO,EAAE,EACrB,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"]}
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,KA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BAAoB,CACrC,EAAE,QAAQ,EAAE,OAAO,EAAE,EACrB,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,6 +5,7 @@
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";
8
9
  import { tracingClient } from "../tracing";
9
10
  import { setContinuationToken } from "../pagingHelper";
10
11
  import * as coreClient from "@azure/core-client";
@@ -36,42 +37,59 @@ export class LibraryImpl {
36
37
  return this;
37
38
  },
38
39
  byPage: (settings) => {
39
- if (settings?.maxPageSize) {
40
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
40
41
  throw new Error("maxPageSize is not supported by this operation.");
41
42
  }
42
43
  return this.listPagingPage(options, settings);
43
44
  }
44
45
  };
45
46
  }
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
- }
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
+ });
63
66
  }
64
- async *listPagingAll(options) {
65
- for await (const page of this.listPagingPage(options)) {
66
- yield* page;
67
- }
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
+ });
68
86
  }
69
87
  /**
70
88
  * Lists Library.
71
89
  * @param options The options parameters.
72
90
  */
73
91
  async _list(options) {
74
- return tracingClient.withSpan("ArtifactsClient._list", options ?? {}, async (options) => {
92
+ return tracingClient.withSpan("ArtifactsClient._list", options !== null && options !== void 0 ? options : {}, async (options) => {
75
93
  return this.client.sendOperationRequest({ options }, listOperationSpec);
76
94
  });
77
95
  }
@@ -83,24 +101,19 @@ export class LibraryImpl {
83
101
  */
84
102
  async beginFlush(libraryName, options) {
85
103
  const directSendOperation = async (args, spec) => {
86
- return tracingClient.withSpan("ArtifactsClient.beginFlush", options ?? {}, async () => {
104
+ return tracingClient.withSpan("ArtifactsClient.beginFlush", options !== null && options !== void 0 ? options : {}, async () => {
87
105
  return this.client.sendOperationRequest(args, spec);
88
106
  });
89
107
  };
90
108
  const sendOperationFn = async (args, spec) => {
109
+ var _a;
91
110
  let currentRawResponse = undefined;
92
- const providedCallback = args.options?.onResponse;
111
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
93
112
  const callback = (rawResponse, flatResponse) => {
94
113
  currentRawResponse = rawResponse;
95
- providedCallback?.(rawResponse, flatResponse);
96
- };
97
- const updatedArgs = {
98
- ...args,
99
- options: {
100
- ...args.options,
101
- onResponse: callback
102
- }
114
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
103
115
  };
116
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
104
117
  const flatResponse = await directSendOperation(updatedArgs, spec);
105
118
  return {
106
119
  flatResponse,
@@ -117,8 +130,8 @@ export class LibraryImpl {
117
130
  spec: flushOperationSpec
118
131
  });
119
132
  const poller = await createHttpPoller(lro, {
120
- restoreFrom: options?.resumeFrom,
121
- intervalInMs: options?.updateIntervalInMs
133
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
134
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
122
135
  });
123
136
  await poller.poll();
124
137
  return poller;
@@ -139,7 +152,7 @@ export class LibraryImpl {
139
152
  * @param options The options parameters.
140
153
  */
141
154
  async getOperationResult(operationId, options) {
142
- return tracingClient.withSpan("ArtifactsClient.getOperationResult", options ?? {}, async (options) => {
155
+ return tracingClient.withSpan("ArtifactsClient.getOperationResult", options !== null && options !== void 0 ? options : {}, async (options) => {
143
156
  return this.client.sendOperationRequest({ operationId, options }, getOperationResultOperationSpec);
144
157
  });
145
158
  }
@@ -151,24 +164,19 @@ export class LibraryImpl {
151
164
  */
152
165
  async beginDelete(libraryName, options) {
153
166
  const directSendOperation = async (args, spec) => {
154
- return tracingClient.withSpan("ArtifactsClient.beginDelete", options ?? {}, async () => {
167
+ return tracingClient.withSpan("ArtifactsClient.beginDelete", options !== null && options !== void 0 ? options : {}, async () => {
155
168
  return this.client.sendOperationRequest(args, spec);
156
169
  });
157
170
  };
158
171
  const sendOperationFn = async (args, spec) => {
172
+ var _a;
159
173
  let currentRawResponse = undefined;
160
- const providedCallback = args.options?.onResponse;
174
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
161
175
  const callback = (rawResponse, flatResponse) => {
162
176
  currentRawResponse = rawResponse;
163
- providedCallback?.(rawResponse, flatResponse);
164
- };
165
- const updatedArgs = {
166
- ...args,
167
- options: {
168
- ...args.options,
169
- onResponse: callback
170
- }
177
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
171
178
  };
179
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
172
180
  const flatResponse = await directSendOperation(updatedArgs, spec);
173
181
  return {
174
182
  flatResponse,
@@ -185,8 +193,8 @@ export class LibraryImpl {
185
193
  spec: deleteOperationSpec
186
194
  });
187
195
  const poller = await createHttpPoller(lro, {
188
- restoreFrom: options?.resumeFrom,
189
- intervalInMs: options?.updateIntervalInMs
196
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
197
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
190
198
  });
191
199
  await poller.poll();
192
200
  return poller;
@@ -208,7 +216,7 @@ export class LibraryImpl {
208
216
  * @param options The options parameters.
209
217
  */
210
218
  async get(libraryName, options) {
211
- return tracingClient.withSpan("ArtifactsClient.get", options ?? {}, async (options) => {
219
+ return tracingClient.withSpan("ArtifactsClient.get", options !== null && options !== void 0 ? options : {}, async (options) => {
212
220
  return this.client.sendOperationRequest({ libraryName, options }, getOperationSpec);
213
221
  });
214
222
  }
@@ -220,24 +228,19 @@ export class LibraryImpl {
220
228
  */
221
229
  async beginCreate(libraryName, options) {
222
230
  const directSendOperation = async (args, spec) => {
223
- return tracingClient.withSpan("ArtifactsClient.beginCreate", options ?? {}, async () => {
231
+ return tracingClient.withSpan("ArtifactsClient.beginCreate", options !== null && options !== void 0 ? options : {}, async () => {
224
232
  return this.client.sendOperationRequest(args, spec);
225
233
  });
226
234
  };
227
235
  const sendOperationFn = async (args, spec) => {
236
+ var _a;
228
237
  let currentRawResponse = undefined;
229
- const providedCallback = args.options?.onResponse;
238
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
230
239
  const callback = (rawResponse, flatResponse) => {
231
240
  currentRawResponse = rawResponse;
232
- providedCallback?.(rawResponse, flatResponse);
233
- };
234
- const updatedArgs = {
235
- ...args,
236
- options: {
237
- ...args.options,
238
- onResponse: callback
239
- }
241
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
240
242
  };
243
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
241
244
  const flatResponse = await directSendOperation(updatedArgs, spec);
242
245
  return {
243
246
  flatResponse,
@@ -254,8 +257,8 @@ export class LibraryImpl {
254
257
  spec: createOperationSpec
255
258
  });
256
259
  const poller = await createHttpPoller(lro, {
257
- restoreFrom: options?.resumeFrom,
258
- intervalInMs: options?.updateIntervalInMs
260
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
261
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
259
262
  });
260
263
  await poller.poll();
261
264
  return poller;
@@ -279,7 +282,7 @@ export class LibraryImpl {
279
282
  * @param options The options parameters.
280
283
  */
281
284
  async append(libraryName, content, options) {
282
- return tracingClient.withSpan("ArtifactsClient.append", options ?? {}, async (options) => {
285
+ return tracingClient.withSpan("ArtifactsClient.append", options !== null && options !== void 0 ? options : {}, async (options) => {
283
286
  return this.client.sendOperationRequest({ libraryName, content, options }, appendOperationSpec);
284
287
  });
285
288
  }
@@ -289,7 +292,7 @@ export class LibraryImpl {
289
292
  * @param options The options parameters.
290
293
  */
291
294
  async _listNext(nextLink, options) {
292
- return tracingClient.withSpan("ArtifactsClient._listNext", options ?? {}, async (options) => {
295
+ return tracingClient.withSpan("ArtifactsClient._listNext", options !== null && options !== void 0 ? options : {}, async (options) => {
293
296
  return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
294
297
  });
295
298
  }