@azure/arm-support 3.0.1-alpha.20250718.1 → 3.0.1-alpha.20250730.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.
- package/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/microsoftSupport.js +26 -5
- package/dist/browser/microsoftSupport.js.map +1 -1
- package/dist/browser/models/mappers.js +28 -12
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/chatTranscripts.js +23 -40
- package/dist/browser/operations/chatTranscripts.js.map +1 -1
- package/dist/browser/operations/chatTranscriptsNoSubscription.js +23 -40
- package/dist/browser/operations/chatTranscriptsNoSubscription.js.map +1 -1
- package/dist/browser/operations/communications.js +34 -46
- package/dist/browser/operations/communications.js.map +1 -1
- package/dist/browser/operations/communicationsNoSubscription.js +34 -46
- package/dist/browser/operations/communicationsNoSubscription.js.map +1 -1
- package/dist/browser/operations/fileWorkspaces.js +1 -0
- package/dist/browser/operations/fileWorkspaces.js.map +1 -1
- package/dist/browser/operations/fileWorkspacesNoSubscription.js +1 -0
- package/dist/browser/operations/fileWorkspacesNoSubscription.js.map +1 -1
- package/dist/browser/operations/files.js +23 -40
- package/dist/browser/operations/files.js.map +1 -1
- package/dist/browser/operations/filesNoSubscription.js +23 -40
- package/dist/browser/operations/filesNoSubscription.js.map +1 -1
- package/dist/browser/operations/operations.js +10 -27
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/problemClassifications.js +10 -27
- package/dist/browser/operations/problemClassifications.js.map +1 -1
- package/dist/browser/operations/services.js +10 -27
- package/dist/browser/operations/services.js.map +1 -1
- package/dist/browser/operations/supportTickets.js +34 -46
- package/dist/browser/operations/supportTickets.js.map +1 -1
- package/dist/browser/operations/supportTicketsNoSubscription.js +34 -46
- package/dist/browser/operations/supportTicketsNoSubscription.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/microsoftSupport.js +26 -5
- package/dist/commonjs/microsoftSupport.js.map +1 -1
- package/dist/commonjs/models/mappers.js +28 -12
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/chatTranscripts.js +23 -39
- package/dist/commonjs/operations/chatTranscripts.js.map +1 -1
- package/dist/commonjs/operations/chatTranscriptsNoSubscription.js +23 -39
- package/dist/commonjs/operations/chatTranscriptsNoSubscription.js.map +1 -1
- package/dist/commonjs/operations/communications.js +34 -45
- package/dist/commonjs/operations/communications.js.map +1 -1
- package/dist/commonjs/operations/communicationsNoSubscription.js +34 -45
- package/dist/commonjs/operations/communicationsNoSubscription.js.map +1 -1
- package/dist/commonjs/operations/fileWorkspaces.js +1 -0
- package/dist/commonjs/operations/fileWorkspaces.js.map +1 -1
- package/dist/commonjs/operations/fileWorkspacesNoSubscription.js +1 -0
- package/dist/commonjs/operations/fileWorkspacesNoSubscription.js.map +1 -1
- package/dist/commonjs/operations/files.js +23 -39
- package/dist/commonjs/operations/files.js.map +1 -1
- package/dist/commonjs/operations/filesNoSubscription.js +23 -39
- package/dist/commonjs/operations/filesNoSubscription.js.map +1 -1
- package/dist/commonjs/operations/operations.js +10 -26
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/problemClassifications.js +10 -26
- package/dist/commonjs/operations/problemClassifications.js.map +1 -1
- package/dist/commonjs/operations/services.js +10 -26
- package/dist/commonjs/operations/services.js.map +1 -1
- package/dist/commonjs/operations/supportTickets.js +34 -45
- package/dist/commonjs/operations/supportTickets.js.map +1 -1
- package/dist/commonjs/operations/supportTicketsNoSubscription.js +34 -45
- package/dist/commonjs/operations/supportTicketsNoSubscription.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/microsoftSupport.js +26 -5
- package/dist/esm/microsoftSupport.js.map +1 -1
- package/dist/esm/models/mappers.js +28 -12
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/chatTranscripts.js +23 -40
- package/dist/esm/operations/chatTranscripts.js.map +1 -1
- package/dist/esm/operations/chatTranscriptsNoSubscription.js +23 -40
- package/dist/esm/operations/chatTranscriptsNoSubscription.js.map +1 -1
- package/dist/esm/operations/communications.js +34 -46
- package/dist/esm/operations/communications.js.map +1 -1
- package/dist/esm/operations/communicationsNoSubscription.js +34 -46
- package/dist/esm/operations/communicationsNoSubscription.js.map +1 -1
- package/dist/esm/operations/fileWorkspaces.js +1 -0
- package/dist/esm/operations/fileWorkspaces.js.map +1 -1
- package/dist/esm/operations/fileWorkspacesNoSubscription.js +1 -0
- package/dist/esm/operations/fileWorkspacesNoSubscription.js.map +1 -1
- package/dist/esm/operations/files.js +23 -40
- package/dist/esm/operations/files.js.map +1 -1
- package/dist/esm/operations/filesNoSubscription.js +23 -40
- package/dist/esm/operations/filesNoSubscription.js.map +1 -1
- package/dist/esm/operations/operations.js +10 -27
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/problemClassifications.js +10 -27
- package/dist/esm/operations/problemClassifications.js.map +1 -1
- package/dist/esm/operations/services.js +10 -27
- package/dist/esm/operations/services.js.map +1 -1
- package/dist/esm/operations/supportTickets.js +34 -46
- package/dist/esm/operations/supportTickets.js.map +1 -1
- package/dist/esm/operations/supportTicketsNoSubscription.js +34 -46
- package/dist/esm/operations/supportTicketsNoSubscription.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/microsoftSupport.js +26 -5
- package/dist/react-native/microsoftSupport.js.map +1 -1
- package/dist/react-native/models/mappers.js +28 -12
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/chatTranscripts.js +23 -40
- package/dist/react-native/operations/chatTranscripts.js.map +1 -1
- package/dist/react-native/operations/chatTranscriptsNoSubscription.js +23 -40
- package/dist/react-native/operations/chatTranscriptsNoSubscription.js.map +1 -1
- package/dist/react-native/operations/communications.js +34 -46
- package/dist/react-native/operations/communications.js.map +1 -1
- package/dist/react-native/operations/communicationsNoSubscription.js +34 -46
- package/dist/react-native/operations/communicationsNoSubscription.js.map +1 -1
- package/dist/react-native/operations/fileWorkspaces.js +1 -0
- package/dist/react-native/operations/fileWorkspaces.js.map +1 -1
- package/dist/react-native/operations/fileWorkspacesNoSubscription.js +1 -0
- package/dist/react-native/operations/fileWorkspacesNoSubscription.js.map +1 -1
- package/dist/react-native/operations/files.js +23 -40
- package/dist/react-native/operations/files.js.map +1 -1
- package/dist/react-native/operations/filesNoSubscription.js +23 -40
- package/dist/react-native/operations/filesNoSubscription.js.map +1 -1
- package/dist/react-native/operations/operations.js +10 -27
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/problemClassifications.js +10 -27
- package/dist/react-native/operations/problemClassifications.js.map +1 -1
- package/dist/react-native/operations/services.js +10 -27
- package/dist/react-native/operations/services.js.map +1 -1
- package/dist/react-native/operations/supportTickets.js +34 -46
- package/dist/react-native/operations/supportTickets.js.map +1 -1
- package/dist/react-native/operations/supportTicketsNoSubscription.js +34 -46
- package/dist/react-native/operations/supportTicketsNoSubscription.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- package/review/arm-support-node.api.md +889 -889
|
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
|
18
18
|
/// <reference lib="esnext.asynciterable" />
|
|
19
19
|
/** Class containing SupportTickets operations. */
|
|
20
20
|
class SupportTicketsImpl {
|
|
21
|
+
client;
|
|
21
22
|
/**
|
|
22
23
|
* Initialize a new instance of the class SupportTickets class.
|
|
23
24
|
* @param client Reference to the service client
|
|
@@ -43,52 +44,35 @@ class SupportTicketsImpl {
|
|
|
43
44
|
return this;
|
|
44
45
|
},
|
|
45
46
|
byPage: (settings) => {
|
|
46
|
-
if (settings
|
|
47
|
+
if (settings?.maxPageSize) {
|
|
47
48
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
48
49
|
}
|
|
49
50
|
return this.listPagingPage(options, settings);
|
|
50
51
|
},
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
|
-
listPagingPage(options, settings) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
});
|
|
54
|
+
async *listPagingPage(options, settings) {
|
|
55
|
+
let result;
|
|
56
|
+
let continuationToken = settings?.continuationToken;
|
|
57
|
+
if (!continuationToken) {
|
|
58
|
+
result = await this._list(options);
|
|
59
|
+
let page = result.value || [];
|
|
60
|
+
continuationToken = result.nextLink;
|
|
61
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
62
|
+
yield page;
|
|
63
|
+
}
|
|
64
|
+
while (continuationToken) {
|
|
65
|
+
result = await this._listNext(continuationToken, options);
|
|
66
|
+
continuationToken = result.nextLink;
|
|
67
|
+
let page = result.value || [];
|
|
68
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
69
|
+
yield page;
|
|
70
|
+
}
|
|
72
71
|
}
|
|
73
|
-
listPagingAll(options) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
78
|
-
_c = _f.value;
|
|
79
|
-
_d = false;
|
|
80
|
-
const page = _c;
|
|
81
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
85
|
-
finally {
|
|
86
|
-
try {
|
|
87
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
88
|
-
}
|
|
89
|
-
finally { if (e_1) throw e_1.error; }
|
|
90
|
-
}
|
|
91
|
-
});
|
|
72
|
+
async *listPagingAll(options) {
|
|
73
|
+
for await (const page of this.listPagingPage(options)) {
|
|
74
|
+
yield* page;
|
|
75
|
+
}
|
|
92
76
|
}
|
|
93
77
|
/**
|
|
94
78
|
* Check the availability of a resource name. This API should be used to check the uniqueness of the
|
|
@@ -160,14 +144,19 @@ class SupportTicketsImpl {
|
|
|
160
144
|
return this.client.sendOperationRequest(args, spec);
|
|
161
145
|
};
|
|
162
146
|
const sendOperationFn = async (args, spec) => {
|
|
163
|
-
var _a;
|
|
164
147
|
let currentRawResponse = undefined;
|
|
165
|
-
const providedCallback =
|
|
148
|
+
const providedCallback = args.options?.onResponse;
|
|
166
149
|
const callback = (rawResponse, flatResponse) => {
|
|
167
150
|
currentRawResponse = rawResponse;
|
|
168
|
-
providedCallback
|
|
151
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
152
|
+
};
|
|
153
|
+
const updatedArgs = {
|
|
154
|
+
...args,
|
|
155
|
+
options: {
|
|
156
|
+
...args.options,
|
|
157
|
+
onResponse: callback,
|
|
158
|
+
},
|
|
169
159
|
};
|
|
170
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
171
160
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
172
161
|
return {
|
|
173
162
|
flatResponse,
|
|
@@ -184,8 +173,8 @@ class SupportTicketsImpl {
|
|
|
184
173
|
spec: createOperationSpec,
|
|
185
174
|
});
|
|
186
175
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
187
|
-
restoreFrom: options
|
|
188
|
-
intervalInMs: options
|
|
176
|
+
restoreFrom: options?.resumeFrom,
|
|
177
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
189
178
|
resourceLocationConfig: "azure-async-operation",
|
|
190
179
|
});
|
|
191
180
|
await poller.poll();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supportTickets.js","sourceRoot":"","sources":["../../../src/operations/supportTickets.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAmB9C,4CAA4C;AAC5C,kDAAkD;AAClD,MAAa,kBAAkB;IAG7B;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACI,IAAI,CACT,OAA0C;QAE1C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,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,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,OAA0C,EAC1C,QAAuB;;YAEvB,IAA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AU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,6BAA6B;IACrD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { SupportTickets } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n SupportTicketDetails,\n SupportTicketsListNextOptionalParams,\n SupportTicketsListOptionalParams,\n SupportTicketsListResponse,\n CheckNameAvailabilityInput,\n SupportTicketsCheckNameAvailabilityOptionalParams,\n SupportTicketsCheckNameAvailabilityResponse,\n SupportTicketsGetOptionalParams,\n SupportTicketsGetResponse,\n UpdateSupportTicket,\n SupportTicketsUpdateOptionalParams,\n SupportTicketsUpdateResponse,\n SupportTicketsCreateOptionalParams,\n SupportTicketsCreateResponse,\n SupportTicketsListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing SupportTickets operations. */\nexport class SupportTicketsImpl implements SupportTickets {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class SupportTickets class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the support tickets for an Azure subscription. You can also filter the support tickets by\n * _Status_, _CreatedDate_, _ServiceId_, and _ProblemClassificationId_ using the $filter parameter.\n * Output will be a paged result with _nextLink_, using which you can retrieve the next set of support\n * tickets. <br/><br/>Support ticket data is available for 18 months after ticket creation. If a ticket\n * was created more than 18 months ago, a request for data might cause an error.\n * @param options The options parameters.\n */\n public list(\n options?: SupportTicketsListOptionalParams,\n ): PagedAsyncIterableIterator<SupportTicketDetails> {\n const iter = this.listPagingAll(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.listPagingPage(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: SupportTicketsListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<SupportTicketDetails[]> {\n let result: SupportTicketsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(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._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: SupportTicketsListOptionalParams,\n ): AsyncIterableIterator<SupportTicketDetails> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Check the availability of a resource name. This API should be used to check the uniqueness of the\n * name for support ticket creation for the selected subscription.\n * @param checkNameAvailabilityInput Input to check.\n * @param options The options parameters.\n */\n checkNameAvailability(\n checkNameAvailabilityInput: CheckNameAvailabilityInput,\n options?: SupportTicketsCheckNameAvailabilityOptionalParams,\n ): Promise<SupportTicketsCheckNameAvailabilityResponse> {\n return this.client.sendOperationRequest(\n { checkNameAvailabilityInput, options },\n checkNameAvailabilityOperationSpec,\n );\n }\n\n /**\n * Lists all the support tickets for an Azure subscription. You can also filter the support tickets by\n * _Status_, _CreatedDate_, _ServiceId_, and _ProblemClassificationId_ using the $filter parameter.\n * Output will be a paged result with _nextLink_, using which you can retrieve the next set of support\n * tickets. <br/><br/>Support ticket data is available for 18 months after ticket creation. If a ticket\n * was created more than 18 months ago, a request for data might cause an error.\n * @param options The options parameters.\n */\n private _list(\n options?: SupportTicketsListOptionalParams,\n ): Promise<SupportTicketsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Get ticket details for an Azure subscription. Support ticket data is available for 18 months after\n * ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an\n * error.\n * @param supportTicketName Support ticket name.\n * @param options The options parameters.\n */\n get(\n supportTicketName: string,\n options?: SupportTicketsGetOptionalParams,\n ): Promise<SupportTicketsGetResponse> {\n return this.client.sendOperationRequest(\n { supportTicketName, options },\n getOperationSpec,\n );\n }\n\n /**\n * This API allows you to update the severity level, ticket status, advanced diagnostic consent and\n * your contact information in the support ticket.<br/><br/>Note: The severity levels cannot be changed\n * if a support ticket is actively being worked upon by an Azure support engineer. In such a case,\n * contact your support engineer to request severity update by adding a new communication using the\n * Communications API.\n * @param supportTicketName Support ticket name.\n * @param updateSupportTicket UpdateSupportTicket object.\n * @param options The options parameters.\n */\n update(\n supportTicketName: string,\n updateSupportTicket: UpdateSupportTicket,\n options?: SupportTicketsUpdateOptionalParams,\n ): Promise<SupportTicketsUpdateResponse> {\n return this.client.sendOperationRequest(\n { supportTicketName, updateSupportTicket, options },\n updateOperationSpec,\n );\n }\n\n /**\n * Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and\n * Subscription Management issues for the specified subscription. Learn the\n * [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call\n * the Services and ProblemClassifications API to get the most recent set of services and problem\n * categories required for support ticket creation.<br/><br/>Adding attachments is not currently\n * supported via the API. To add a file to an existing support ticket, visit the [Manage support\n * ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest)\n * page in the Azure portal, select the support ticket, and use the file upload control to add a new\n * file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not\n * supported via the API. The Azure support engineer working on your ticket will reach out to you for\n * consent if your issue requires gathering diagnostic information from your Azure\n * resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include\n * _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per\n * [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant).\n * The primary token will be from the tenant for whom a support ticket is being raised against the\n * subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from\n * the Cloud solution provider (CSP) partner tenant.\n * @param supportTicketName Support ticket name.\n * @param createSupportTicketParameters Support ticket request payload.\n * @param options The options parameters.\n */\n async beginCreate(\n supportTicketName: string,\n createSupportTicketParameters: SupportTicketDetails,\n options?: SupportTicketsCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<SupportTicketsCreateResponse>,\n SupportTicketsCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<SupportTicketsCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n 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: { supportTicketName, createSupportTicketParameters, options },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n SupportTicketsCreateResponse,\n OperationState<SupportTicketsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and\n * Subscription Management issues for the specified subscription. Learn the\n * [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call\n * the Services and ProblemClassifications API to get the most recent set of services and problem\n * categories required for support ticket creation.<br/><br/>Adding attachments is not currently\n * supported via the API. To add a file to an existing support ticket, visit the [Manage support\n * ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest)\n * page in the Azure portal, select the support ticket, and use the file upload control to add a new\n * file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not\n * supported via the API. The Azure support engineer working on your ticket will reach out to you for\n * consent if your issue requires gathering diagnostic information from your Azure\n * resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include\n * _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per\n * [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant).\n * The primary token will be from the tenant for whom a support ticket is being raised against the\n * subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from\n * the Cloud solution provider (CSP) partner tenant.\n * @param supportTicketName Support ticket name.\n * @param createSupportTicketParameters Support ticket request payload.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n supportTicketName: string,\n createSupportTicketParameters: SupportTicketDetails,\n options?: SupportTicketsCreateOptionalParams,\n ): Promise<SupportTicketsCreateResponse> {\n const poller = await this.beginCreate(\n supportTicketName,\n createSupportTicketParameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: SupportTicketsListNextOptionalParams,\n ): Promise<SupportTicketsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameAvailabilityOutput,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.checkNameAvailabilityInput,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.filter],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.supportTicketName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.updateSupportTicket,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.supportTicketName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 201: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 202: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 204: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.createSupportTicketParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.supportTicketName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"supportTickets.js","sourceRoot":"","sources":["../../../src/operations/supportTickets.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAmB9C,4CAA4C;AAC5C,kDAAkD;AAClD,MAAa,kBAAkB;IACZ,MAAM,CAAmB;IAE1C;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACI,IAAI,CACT,OAA0C;QAE1C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,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,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,cAAc,CAC3B,OAA0C,EAC1C,QAAuB;QAEvB,IAAI,MAAkC,CAAC;QACvC,IAAI,iB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,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { SupportTickets } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n SupportTicketDetails,\n SupportTicketsListNextOptionalParams,\n SupportTicketsListOptionalParams,\n SupportTicketsListResponse,\n CheckNameAvailabilityInput,\n SupportTicketsCheckNameAvailabilityOptionalParams,\n SupportTicketsCheckNameAvailabilityResponse,\n SupportTicketsGetOptionalParams,\n SupportTicketsGetResponse,\n UpdateSupportTicket,\n SupportTicketsUpdateOptionalParams,\n SupportTicketsUpdateResponse,\n SupportTicketsCreateOptionalParams,\n SupportTicketsCreateResponse,\n SupportTicketsListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing SupportTickets operations. */\nexport class SupportTicketsImpl implements SupportTickets {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class SupportTickets class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the support tickets for an Azure subscription. You can also filter the support tickets by\n * _Status_, _CreatedDate_, _ServiceId_, and _ProblemClassificationId_ using the $filter parameter.\n * Output will be a paged result with _nextLink_, using which you can retrieve the next set of support\n * tickets. <br/><br/>Support ticket data is available for 18 months after ticket creation. If a ticket\n * was created more than 18 months ago, a request for data might cause an error.\n * @param options The options parameters.\n */\n public list(\n options?: SupportTicketsListOptionalParams,\n ): PagedAsyncIterableIterator<SupportTicketDetails> {\n const iter = this.listPagingAll(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.listPagingPage(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: SupportTicketsListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<SupportTicketDetails[]> {\n let result: SupportTicketsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(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._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: SupportTicketsListOptionalParams,\n ): AsyncIterableIterator<SupportTicketDetails> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Check the availability of a resource name. This API should be used to check the uniqueness of the\n * name for support ticket creation for the selected subscription.\n * @param checkNameAvailabilityInput Input to check.\n * @param options The options parameters.\n */\n checkNameAvailability(\n checkNameAvailabilityInput: CheckNameAvailabilityInput,\n options?: SupportTicketsCheckNameAvailabilityOptionalParams,\n ): Promise<SupportTicketsCheckNameAvailabilityResponse> {\n return this.client.sendOperationRequest(\n { checkNameAvailabilityInput, options },\n checkNameAvailabilityOperationSpec,\n );\n }\n\n /**\n * Lists all the support tickets for an Azure subscription. You can also filter the support tickets by\n * _Status_, _CreatedDate_, _ServiceId_, and _ProblemClassificationId_ using the $filter parameter.\n * Output will be a paged result with _nextLink_, using which you can retrieve the next set of support\n * tickets. <br/><br/>Support ticket data is available for 18 months after ticket creation. If a ticket\n * was created more than 18 months ago, a request for data might cause an error.\n * @param options The options parameters.\n */\n private _list(\n options?: SupportTicketsListOptionalParams,\n ): Promise<SupportTicketsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Get ticket details for an Azure subscription. Support ticket data is available for 18 months after\n * ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an\n * error.\n * @param supportTicketName Support ticket name.\n * @param options The options parameters.\n */\n get(\n supportTicketName: string,\n options?: SupportTicketsGetOptionalParams,\n ): Promise<SupportTicketsGetResponse> {\n return this.client.sendOperationRequest(\n { supportTicketName, options },\n getOperationSpec,\n );\n }\n\n /**\n * This API allows you to update the severity level, ticket status, advanced diagnostic consent and\n * your contact information in the support ticket.<br/><br/>Note: The severity levels cannot be changed\n * if a support ticket is actively being worked upon by an Azure support engineer. In such a case,\n * contact your support engineer to request severity update by adding a new communication using the\n * Communications API.\n * @param supportTicketName Support ticket name.\n * @param updateSupportTicket UpdateSupportTicket object.\n * @param options The options parameters.\n */\n update(\n supportTicketName: string,\n updateSupportTicket: UpdateSupportTicket,\n options?: SupportTicketsUpdateOptionalParams,\n ): Promise<SupportTicketsUpdateResponse> {\n return this.client.sendOperationRequest(\n { supportTicketName, updateSupportTicket, options },\n updateOperationSpec,\n );\n }\n\n /**\n * Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and\n * Subscription Management issues for the specified subscription. Learn the\n * [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call\n * the Services and ProblemClassifications API to get the most recent set of services and problem\n * categories required for support ticket creation.<br/><br/>Adding attachments is not currently\n * supported via the API. To add a file to an existing support ticket, visit the [Manage support\n * ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest)\n * page in the Azure portal, select the support ticket, and use the file upload control to add a new\n * file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not\n * supported via the API. The Azure support engineer working on your ticket will reach out to you for\n * consent if your issue requires gathering diagnostic information from your Azure\n * resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include\n * _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per\n * [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant).\n * The primary token will be from the tenant for whom a support ticket is being raised against the\n * subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from\n * the Cloud solution provider (CSP) partner tenant.\n * @param supportTicketName Support ticket name.\n * @param createSupportTicketParameters Support ticket request payload.\n * @param options The options parameters.\n */\n async beginCreate(\n supportTicketName: string,\n createSupportTicketParameters: SupportTicketDetails,\n options?: SupportTicketsCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<SupportTicketsCreateResponse>,\n SupportTicketsCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<SupportTicketsCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n 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: { supportTicketName, createSupportTicketParameters, options },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n SupportTicketsCreateResponse,\n OperationState<SupportTicketsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and\n * Subscription Management issues for the specified subscription. Learn the\n * [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call\n * the Services and ProblemClassifications API to get the most recent set of services and problem\n * categories required for support ticket creation.<br/><br/>Adding attachments is not currently\n * supported via the API. To add a file to an existing support ticket, visit the [Manage support\n * ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest)\n * page in the Azure portal, select the support ticket, and use the file upload control to add a new\n * file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not\n * supported via the API. The Azure support engineer working on your ticket will reach out to you for\n * consent if your issue requires gathering diagnostic information from your Azure\n * resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include\n * _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per\n * [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant).\n * The primary token will be from the tenant for whom a support ticket is being raised against the\n * subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from\n * the Cloud solution provider (CSP) partner tenant.\n * @param supportTicketName Support ticket name.\n * @param createSupportTicketParameters Support ticket request payload.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n supportTicketName: string,\n createSupportTicketParameters: SupportTicketDetails,\n options?: SupportTicketsCreateOptionalParams,\n ): Promise<SupportTicketsCreateResponse> {\n const poller = await this.beginCreate(\n supportTicketName,\n createSupportTicketParameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: SupportTicketsListNextOptionalParams,\n ): Promise<SupportTicketsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameAvailabilityOutput,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.checkNameAvailabilityInput,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.filter],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.supportTicketName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.updateSupportTicket,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.supportTicketName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 201: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 202: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 204: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.createSupportTicketParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.supportTicketName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
|
18
18
|
/// <reference lib="esnext.asynciterable" />
|
|
19
19
|
/** Class containing SupportTicketsNoSubscription operations. */
|
|
20
20
|
class SupportTicketsNoSubscriptionImpl {
|
|
21
|
+
client;
|
|
21
22
|
/**
|
|
22
23
|
* Initialize a new instance of the class SupportTicketsNoSubscription class.
|
|
23
24
|
* @param client Reference to the service client
|
|
@@ -43,52 +44,35 @@ class SupportTicketsNoSubscriptionImpl {
|
|
|
43
44
|
return this;
|
|
44
45
|
},
|
|
45
46
|
byPage: (settings) => {
|
|
46
|
-
if (settings
|
|
47
|
+
if (settings?.maxPageSize) {
|
|
47
48
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
48
49
|
}
|
|
49
50
|
return this.listPagingPage(options, settings);
|
|
50
51
|
},
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
|
-
listPagingPage(options, settings) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
});
|
|
54
|
+
async *listPagingPage(options, settings) {
|
|
55
|
+
let result;
|
|
56
|
+
let continuationToken = settings?.continuationToken;
|
|
57
|
+
if (!continuationToken) {
|
|
58
|
+
result = await this._list(options);
|
|
59
|
+
let page = result.value || [];
|
|
60
|
+
continuationToken = result.nextLink;
|
|
61
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
62
|
+
yield page;
|
|
63
|
+
}
|
|
64
|
+
while (continuationToken) {
|
|
65
|
+
result = await this._listNext(continuationToken, options);
|
|
66
|
+
continuationToken = result.nextLink;
|
|
67
|
+
let page = result.value || [];
|
|
68
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
69
|
+
yield page;
|
|
70
|
+
}
|
|
72
71
|
}
|
|
73
|
-
listPagingAll(options) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
78
|
-
_c = _f.value;
|
|
79
|
-
_d = false;
|
|
80
|
-
const page = _c;
|
|
81
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
85
|
-
finally {
|
|
86
|
-
try {
|
|
87
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
88
|
-
}
|
|
89
|
-
finally { if (e_1) throw e_1.error; }
|
|
90
|
-
}
|
|
91
|
-
});
|
|
72
|
+
async *listPagingAll(options) {
|
|
73
|
+
for await (const page of this.listPagingPage(options)) {
|
|
74
|
+
yield* page;
|
|
75
|
+
}
|
|
92
76
|
}
|
|
93
77
|
/**
|
|
94
78
|
* Check the availability of a resource name. This API should be used to check the uniqueness of the
|
|
@@ -152,14 +136,19 @@ class SupportTicketsNoSubscriptionImpl {
|
|
|
152
136
|
return this.client.sendOperationRequest(args, spec);
|
|
153
137
|
};
|
|
154
138
|
const sendOperationFn = async (args, spec) => {
|
|
155
|
-
var _a;
|
|
156
139
|
let currentRawResponse = undefined;
|
|
157
|
-
const providedCallback =
|
|
140
|
+
const providedCallback = args.options?.onResponse;
|
|
158
141
|
const callback = (rawResponse, flatResponse) => {
|
|
159
142
|
currentRawResponse = rawResponse;
|
|
160
|
-
providedCallback
|
|
143
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
144
|
+
};
|
|
145
|
+
const updatedArgs = {
|
|
146
|
+
...args,
|
|
147
|
+
options: {
|
|
148
|
+
...args.options,
|
|
149
|
+
onResponse: callback,
|
|
150
|
+
},
|
|
161
151
|
};
|
|
162
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
163
152
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
164
153
|
return {
|
|
165
154
|
flatResponse,
|
|
@@ -176,8 +165,8 @@ class SupportTicketsNoSubscriptionImpl {
|
|
|
176
165
|
spec: createOperationSpec,
|
|
177
166
|
});
|
|
178
167
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
179
|
-
restoreFrom: options
|
|
180
|
-
intervalInMs: options
|
|
168
|
+
restoreFrom: options?.resumeFrom,
|
|
169
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
181
170
|
resourceLocationConfig: "azure-async-operation",
|
|
182
171
|
});
|
|
183
172
|
await poller.poll();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supportTicketsNoSubscription.js","sourceRoot":"","sources":["../../../src/operations/supportTicketsNoSubscription.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAmB9C,4CAA4C;AAC5C,gEAAgE;AAChE,MAAa,gCAAgC;IAK3C;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACI,IAAI,CACT,OAAwD;QAExD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,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,uB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D,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,6BAA6B;IACrD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC;IAC/D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { SupportTicketsNoSubscription } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n SupportTicketDetails,\n SupportTicketsNoSubscriptionListNextOptionalParams,\n SupportTicketsNoSubscriptionListOptionalParams,\n SupportTicketsNoSubscriptionListResponse,\n CheckNameAvailabilityInput,\n SupportTicketsNoSubscriptionCheckNameAvailabilityOptionalParams,\n SupportTicketsNoSubscriptionCheckNameAvailabilityResponse,\n SupportTicketsNoSubscriptionGetOptionalParams,\n SupportTicketsNoSubscriptionGetResponse,\n UpdateSupportTicket,\n SupportTicketsNoSubscriptionUpdateOptionalParams,\n SupportTicketsNoSubscriptionUpdateResponse,\n SupportTicketsNoSubscriptionCreateOptionalParams,\n SupportTicketsNoSubscriptionCreateResponse,\n SupportTicketsNoSubscriptionListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing SupportTicketsNoSubscription operations. */\nexport class SupportTicketsNoSubscriptionImpl\n implements SupportTicketsNoSubscription\n{\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class SupportTicketsNoSubscription class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the support tickets. <br/><br/>You can also filter the support tickets by <i>Status</i>,\n * <i>CreatedDate</i>, , <i>ServiceId</i>, and <i>ProblemClassificationId</i> using the $filter\n * parameter. Output will be a paged result with <i>nextLink</i>, using which you can retrieve the next\n * set of support tickets. <br/><br/>Support ticket data is available for 18 months after ticket\n * creation. If a ticket was created more than 18 months ago, a request for data might cause an error.\n * @param options The options parameters.\n */\n public list(\n options?: SupportTicketsNoSubscriptionListOptionalParams,\n ): PagedAsyncIterableIterator<SupportTicketDetails> {\n const iter = this.listPagingAll(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.listPagingPage(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: SupportTicketsNoSubscriptionListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<SupportTicketDetails[]> {\n let result: SupportTicketsNoSubscriptionListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(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._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: SupportTicketsNoSubscriptionListOptionalParams,\n ): AsyncIterableIterator<SupportTicketDetails> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Check the availability of a resource name. This API should be used to check the uniqueness of the\n * name for support ticket creation for the selected subscription.\n * @param checkNameAvailabilityInput Input to check.\n * @param options The options parameters.\n */\n checkNameAvailability(\n checkNameAvailabilityInput: CheckNameAvailabilityInput,\n options?: SupportTicketsNoSubscriptionCheckNameAvailabilityOptionalParams,\n ): Promise<SupportTicketsNoSubscriptionCheckNameAvailabilityResponse> {\n return this.client.sendOperationRequest(\n { checkNameAvailabilityInput, options },\n checkNameAvailabilityOperationSpec,\n );\n }\n\n /**\n * Lists all the support tickets. <br/><br/>You can also filter the support tickets by <i>Status</i>,\n * <i>CreatedDate</i>, , <i>ServiceId</i>, and <i>ProblemClassificationId</i> using the $filter\n * parameter. Output will be a paged result with <i>nextLink</i>, using which you can retrieve the next\n * set of support tickets. <br/><br/>Support ticket data is available for 18 months after ticket\n * creation. If a ticket was created more than 18 months ago, a request for data might cause an error.\n * @param options The options parameters.\n */\n private _list(\n options?: SupportTicketsNoSubscriptionListOptionalParams,\n ): Promise<SupportTicketsNoSubscriptionListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Gets details for a specific support ticket. Support ticket data is available for 18 months after\n * ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an\n * error.\n * @param supportTicketName Support ticket name.\n * @param options The options parameters.\n */\n get(\n supportTicketName: string,\n options?: SupportTicketsNoSubscriptionGetOptionalParams,\n ): Promise<SupportTicketsNoSubscriptionGetResponse> {\n return this.client.sendOperationRequest(\n { supportTicketName, options },\n getOperationSpec,\n );\n }\n\n /**\n * This API allows you to update the severity level, ticket status, and your contact information in the\n * support ticket.<br/><br/>Note: The severity levels cannot be changed if a support ticket is actively\n * being worked upon by an Azure support engineer. In such a case, contact your support engineer to\n * request severity update by adding a new communication using the Communications API.\n * @param supportTicketName Support ticket name.\n * @param updateSupportTicket UpdateSupportTicket object.\n * @param options The options parameters.\n */\n update(\n supportTicketName: string,\n updateSupportTicket: UpdateSupportTicket,\n options?: SupportTicketsNoSubscriptionUpdateOptionalParams,\n ): Promise<SupportTicketsNoSubscriptionUpdateResponse> {\n return this.client.sendOperationRequest(\n { supportTicketName, updateSupportTicket, options },\n updateOperationSpec,\n );\n }\n\n /**\n * Creates a new support ticket for Billing, and Subscription Management issues. Learn the\n * [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call\n * the Services and ProblemClassifications API to get the most recent set of services and problem\n * categories required for support ticket creation.<br/><br/>Adding attachments is not currently\n * supported via the API. To add a file to an existing support ticket, visit the [Manage support\n * ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest)\n * page in the Azure portal, select the support ticket, and use the file upload control to add a new\n * file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not\n * supported via the API. The Azure support engineer working on your ticket will reach out to you for\n * consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>\n * @param supportTicketName Support ticket name.\n * @param createSupportTicketParameters Support ticket request payload.\n * @param options The options parameters.\n */\n async beginCreate(\n supportTicketName: string,\n createSupportTicketParameters: SupportTicketDetails,\n options?: SupportTicketsNoSubscriptionCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<SupportTicketsNoSubscriptionCreateResponse>,\n SupportTicketsNoSubscriptionCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<SupportTicketsNoSubscriptionCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n 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: { supportTicketName, createSupportTicketParameters, options },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n SupportTicketsNoSubscriptionCreateResponse,\n OperationState<SupportTicketsNoSubscriptionCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a new support ticket for Billing, and Subscription Management issues. Learn the\n * [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call\n * the Services and ProblemClassifications API to get the most recent set of services and problem\n * categories required for support ticket creation.<br/><br/>Adding attachments is not currently\n * supported via the API. To add a file to an existing support ticket, visit the [Manage support\n * ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest)\n * page in the Azure portal, select the support ticket, and use the file upload control to add a new\n * file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not\n * supported via the API. The Azure support engineer working on your ticket will reach out to you for\n * consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>\n * @param supportTicketName Support ticket name.\n * @param createSupportTicketParameters Support ticket request payload.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n supportTicketName: string,\n createSupportTicketParameters: SupportTicketDetails,\n options?: SupportTicketsNoSubscriptionCreateOptionalParams,\n ): Promise<SupportTicketsNoSubscriptionCreateResponse> {\n const poller = await this.beginCreate(\n supportTicketName,\n createSupportTicketParameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: SupportTicketsNoSubscriptionListNextOptionalParams,\n ): Promise<SupportTicketsNoSubscriptionListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameAvailabilityOutput,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.checkNameAvailabilityInput,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/supportTickets\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.filter],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.supportTicketName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.updateSupportTicket,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.supportTicketName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 201: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 202: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 204: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.createSupportTicketParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.supportTicketName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"supportTicketsNoSubscription.js","sourceRoot":"","sources":["../../../src/operations/supportTicketsNoSubscription.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAmB9C,4CAA4C;AAC5C,gEAAgE;AAChE,MAAa,gCAAgC;IAG1B,MAAM,CAAmB;IAE1C;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACI,IAAI,CACT,OAAwD;QAExD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,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,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,cAAc,CAC3B,OAAwD,EACxD,QAAuB;QAEvB,IAAI,MAAgD,CAAC;QACrD,IAAI,iBAAiB,GAAG,QAAQ,EAAE,iBAAiB,CAAC;QACpD,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACnC,IAAI,IAAI,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;YAC9B,iBAAiB,GAAG,MAAM,CAAC,QAA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AAE,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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { SupportTicketsNoSubscription } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n SupportTicketDetails,\n SupportTicketsNoSubscriptionListNextOptionalParams,\n SupportTicketsNoSubscriptionListOptionalParams,\n SupportTicketsNoSubscriptionListResponse,\n CheckNameAvailabilityInput,\n SupportTicketsNoSubscriptionCheckNameAvailabilityOptionalParams,\n SupportTicketsNoSubscriptionCheckNameAvailabilityResponse,\n SupportTicketsNoSubscriptionGetOptionalParams,\n SupportTicketsNoSubscriptionGetResponse,\n UpdateSupportTicket,\n SupportTicketsNoSubscriptionUpdateOptionalParams,\n SupportTicketsNoSubscriptionUpdateResponse,\n SupportTicketsNoSubscriptionCreateOptionalParams,\n SupportTicketsNoSubscriptionCreateResponse,\n SupportTicketsNoSubscriptionListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing SupportTicketsNoSubscription operations. */\nexport class SupportTicketsNoSubscriptionImpl\n implements SupportTicketsNoSubscription\n{\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class SupportTicketsNoSubscription class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the support tickets. <br/><br/>You can also filter the support tickets by <i>Status</i>,\n * <i>CreatedDate</i>, , <i>ServiceId</i>, and <i>ProblemClassificationId</i> using the $filter\n * parameter. Output will be a paged result with <i>nextLink</i>, using which you can retrieve the next\n * set of support tickets. <br/><br/>Support ticket data is available for 18 months after ticket\n * creation. If a ticket was created more than 18 months ago, a request for data might cause an error.\n * @param options The options parameters.\n */\n public list(\n options?: SupportTicketsNoSubscriptionListOptionalParams,\n ): PagedAsyncIterableIterator<SupportTicketDetails> {\n const iter = this.listPagingAll(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.listPagingPage(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: SupportTicketsNoSubscriptionListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<SupportTicketDetails[]> {\n let result: SupportTicketsNoSubscriptionListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(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._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: SupportTicketsNoSubscriptionListOptionalParams,\n ): AsyncIterableIterator<SupportTicketDetails> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Check the availability of a resource name. This API should be used to check the uniqueness of the\n * name for support ticket creation for the selected subscription.\n * @param checkNameAvailabilityInput Input to check.\n * @param options The options parameters.\n */\n checkNameAvailability(\n checkNameAvailabilityInput: CheckNameAvailabilityInput,\n options?: SupportTicketsNoSubscriptionCheckNameAvailabilityOptionalParams,\n ): Promise<SupportTicketsNoSubscriptionCheckNameAvailabilityResponse> {\n return this.client.sendOperationRequest(\n { checkNameAvailabilityInput, options },\n checkNameAvailabilityOperationSpec,\n );\n }\n\n /**\n * Lists all the support tickets. <br/><br/>You can also filter the support tickets by <i>Status</i>,\n * <i>CreatedDate</i>, , <i>ServiceId</i>, and <i>ProblemClassificationId</i> using the $filter\n * parameter. Output will be a paged result with <i>nextLink</i>, using which you can retrieve the next\n * set of support tickets. <br/><br/>Support ticket data is available for 18 months after ticket\n * creation. If a ticket was created more than 18 months ago, a request for data might cause an error.\n * @param options The options parameters.\n */\n private _list(\n options?: SupportTicketsNoSubscriptionListOptionalParams,\n ): Promise<SupportTicketsNoSubscriptionListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Gets details for a specific support ticket. Support ticket data is available for 18 months after\n * ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an\n * error.\n * @param supportTicketName Support ticket name.\n * @param options The options parameters.\n */\n get(\n supportTicketName: string,\n options?: SupportTicketsNoSubscriptionGetOptionalParams,\n ): Promise<SupportTicketsNoSubscriptionGetResponse> {\n return this.client.sendOperationRequest(\n { supportTicketName, options },\n getOperationSpec,\n );\n }\n\n /**\n * This API allows you to update the severity level, ticket status, and your contact information in the\n * support ticket.<br/><br/>Note: The severity levels cannot be changed if a support ticket is actively\n * being worked upon by an Azure support engineer. In such a case, contact your support engineer to\n * request severity update by adding a new communication using the Communications API.\n * @param supportTicketName Support ticket name.\n * @param updateSupportTicket UpdateSupportTicket object.\n * @param options The options parameters.\n */\n update(\n supportTicketName: string,\n updateSupportTicket: UpdateSupportTicket,\n options?: SupportTicketsNoSubscriptionUpdateOptionalParams,\n ): Promise<SupportTicketsNoSubscriptionUpdateResponse> {\n return this.client.sendOperationRequest(\n { supportTicketName, updateSupportTicket, options },\n updateOperationSpec,\n );\n }\n\n /**\n * Creates a new support ticket for Billing, and Subscription Management issues. Learn the\n * [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call\n * the Services and ProblemClassifications API to get the most recent set of services and problem\n * categories required for support ticket creation.<br/><br/>Adding attachments is not currently\n * supported via the API. To add a file to an existing support ticket, visit the [Manage support\n * ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest)\n * page in the Azure portal, select the support ticket, and use the file upload control to add a new\n * file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not\n * supported via the API. The Azure support engineer working on your ticket will reach out to you for\n * consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>\n * @param supportTicketName Support ticket name.\n * @param createSupportTicketParameters Support ticket request payload.\n * @param options The options parameters.\n */\n async beginCreate(\n supportTicketName: string,\n createSupportTicketParameters: SupportTicketDetails,\n options?: SupportTicketsNoSubscriptionCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<SupportTicketsNoSubscriptionCreateResponse>,\n SupportTicketsNoSubscriptionCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<SupportTicketsNoSubscriptionCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n 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: { supportTicketName, createSupportTicketParameters, options },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n SupportTicketsNoSubscriptionCreateResponse,\n OperationState<SupportTicketsNoSubscriptionCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a new support ticket for Billing, and Subscription Management issues. Learn the\n * [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call\n * the Services and ProblemClassifications API to get the most recent set of services and problem\n * categories required for support ticket creation.<br/><br/>Adding attachments is not currently\n * supported via the API. To add a file to an existing support ticket, visit the [Manage support\n * ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest)\n * page in the Azure portal, select the support ticket, and use the file upload control to add a new\n * file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not\n * supported via the API. The Azure support engineer working on your ticket will reach out to you for\n * consent if your issue requires gathering diagnostic information from your Azure resources.<br/><br/>\n * @param supportTicketName Support ticket name.\n * @param createSupportTicketParameters Support ticket request payload.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n supportTicketName: string,\n createSupportTicketParameters: SupportTicketDetails,\n options?: SupportTicketsNoSubscriptionCreateOptionalParams,\n ): Promise<SupportTicketsNoSubscriptionCreateResponse> {\n const poller = await this.beginCreate(\n supportTicketName,\n createSupportTicketParameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: SupportTicketsNoSubscriptionListNextOptionalParams,\n ): Promise<SupportTicketsNoSubscriptionListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameAvailabilityOutput,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.checkNameAvailabilityInput,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/supportTickets\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.filter],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.supportTicketName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.updateSupportTicket,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.supportTicketName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 201: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 202: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 204: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.createSupportTicketParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.supportTicketName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -18,18 +18,16 @@ const pageMap = new WeakMap();
|
|
|
18
18
|
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
19
19
|
*/
|
|
20
20
|
function getContinuationToken(page) {
|
|
21
|
-
var _a;
|
|
22
21
|
if (typeof page !== "object" || page === null) {
|
|
23
22
|
return undefined;
|
|
24
23
|
}
|
|
25
|
-
return
|
|
24
|
+
return pageMap.get(page)?.continuationToken;
|
|
26
25
|
}
|
|
27
26
|
function setContinuationToken(page, continuationToken) {
|
|
28
|
-
var _a;
|
|
29
27
|
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
30
28
|
return;
|
|
31
29
|
}
|
|
32
|
-
const pageInfo =
|
|
30
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
33
31
|
pageInfo.continuationToken = continuationToken;
|
|
34
32
|
pageMap.set(page, pageInfo);
|
|
35
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAeH,oDAKC;AAED,oDAUC;AA1BD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,IAAa
|
|
1
|
+
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAeH,oDAKC;AAED,oDAUC;AA1BD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,IAAa;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,SAAgB,oBAAoB,CAClC,IAAa,EACb,iBAAqC;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,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\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given the last `.value` produced by the `byPage` iterator,\n * returns a continuation token that can be used to begin paging from\n * that point later.\n * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.\n * @returns The continuation token that can be passed into byPage() during future calls.\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined,\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.52.
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.52.9"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
package/dist/esm/lroImpl.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
2
1
|
export function createLroSpec(inputs) {
|
|
3
2
|
const { args, spec, sendOperationFn } = inputs;
|
|
4
3
|
return {
|
|
@@ -6,8 +5,13 @@ export function createLroSpec(inputs) {
|
|
|
6
5
|
requestPath: spec.path,
|
|
7
6
|
sendInitialRequest: () => sendOperationFn(args, spec),
|
|
8
7
|
sendPollRequest: (path, options) => {
|
|
9
|
-
const { requestBody
|
|
10
|
-
return sendOperationFn(args,
|
|
8
|
+
const { requestBody, ...restSpec } = spec;
|
|
9
|
+
return sendOperationFn(args, {
|
|
10
|
+
...restSpec,
|
|
11
|
+
httpMethod: "GET",
|
|
12
|
+
path,
|
|
13
|
+
abortSignal: options?.abortSignal,
|
|
14
|
+
});
|
|
11
15
|
},
|
|
12
16
|
};
|
|
13
17
|
}
|
package/dist/esm/lroImpl.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,aAAa,CAAI,MAQhC;IACC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IAC/C,OAAO;QACL,aAAa,EAAE,IAAI,CAAC,UAAU;QAC9B,WAAW,EAAE,IAAI,CAAC,IAAK;QACvB,kBAAkB,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC;QACrD,eAAe,EAAE,CACf,IAAY,EACZ,OAA2C,EAC3C,EAAE;YACF,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;YAC1C,OAAO,eAAe,CAAC,IAAI,EAAE;gBAC3B,GAAG,QAAQ;gBACX,UAAU,EAAE,KAAK;gBACjB,IAAI;gBACJ,WAAW,EAAE,OAAO,EAAE,WAAW;aAClC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,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 */\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport function createLroSpec<T>(inputs: {\n sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;\n args: Record<string, unknown>;\n spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>;\n}): LongRunningOperation<T> {\n const { args, spec, sendOperationFn } = inputs;\n return {\n requestMethod: spec.httpMethod,\n requestPath: spec.path!,\n sendInitialRequest: () => sendOperationFn(args, spec),\n sendPollRequest: (\n path: string,\n options?: { abortSignal?: AbortSignalLike },\n ) => {\n const { requestBody, ...restSpec } = spec;\n return sendOperationFn(args, {\n ...restSpec,\n httpMethod: \"GET\",\n path,\n abortSignal: options?.abortSignal,\n });\n },\n };\n}\n"]}
|
|
@@ -9,8 +9,10 @@ import * as coreClient from "@azure/core-client";
|
|
|
9
9
|
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
10
10
|
import { OperationsImpl, ServicesImpl, ProblemClassificationsImpl, SupportTicketsImpl, SupportTicketsNoSubscriptionImpl, CommunicationsImpl, CommunicationsNoSubscriptionImpl, ChatTranscriptsImpl, ChatTranscriptsNoSubscriptionImpl, FileWorkspacesImpl, FileWorkspacesNoSubscriptionImpl, FilesImpl, FilesNoSubscriptionImpl, } from "./operations/index.js";
|
|
11
11
|
export class MicrosoftSupport extends coreClient.ServiceClient {
|
|
12
|
+
$host;
|
|
13
|
+
apiVersion;
|
|
14
|
+
subscriptionId;
|
|
12
15
|
constructor(credentials, subscriptionIdOrOptions, options) {
|
|
13
|
-
var _a, _b, _c;
|
|
14
16
|
if (credentials === undefined) {
|
|
15
17
|
throw new Error("'credentials' cannot be null");
|
|
16
18
|
}
|
|
@@ -33,12 +35,17 @@ export class MicrosoftSupport extends coreClient.ServiceClient {
|
|
|
33
35
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
34
36
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
35
37
|
: `${packageDetails}`;
|
|
36
|
-
const optionsWithDefaults =
|
|
38
|
+
const optionsWithDefaults = {
|
|
39
|
+
...defaults,
|
|
40
|
+
...options,
|
|
41
|
+
userAgentOptions: {
|
|
37
42
|
userAgentPrefix,
|
|
38
|
-
},
|
|
43
|
+
},
|
|
44
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com",
|
|
45
|
+
};
|
|
39
46
|
super(optionsWithDefaults);
|
|
40
47
|
let bearerTokenAuthenticationPolicyFound = false;
|
|
41
|
-
if (
|
|
48
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
42
49
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
43
50
|
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
44
51
|
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
@@ -52,7 +59,8 @@ export class MicrosoftSupport extends coreClient.ServiceClient {
|
|
|
52
59
|
});
|
|
53
60
|
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
54
61
|
credential: credentials,
|
|
55
|
-
scopes:
|
|
62
|
+
scopes: optionsWithDefaults.credentialScopes ??
|
|
63
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
56
64
|
challengeCallbacks: {
|
|
57
65
|
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,
|
|
58
66
|
},
|
|
@@ -103,5 +111,18 @@ export class MicrosoftSupport extends coreClient.ServiceClient {
|
|
|
103
111
|
};
|
|
104
112
|
this.pipeline.addPolicy(apiVersionPolicy);
|
|
105
113
|
}
|
|
114
|
+
operations;
|
|
115
|
+
services;
|
|
116
|
+
problemClassifications;
|
|
117
|
+
supportTickets;
|
|
118
|
+
supportTicketsNoSubscription;
|
|
119
|
+
communications;
|
|
120
|
+
communicationsNoSubscription;
|
|
121
|
+
chatTranscripts;
|
|
122
|
+
chatTranscriptsNoSubscription;
|
|
123
|
+
fileWorkspaces;
|
|
124
|
+
fileWorkspacesNoSubscription;
|
|
125
|
+
files;
|
|
126
|
+
filesNoSubscription;
|
|
106
127
|
}
|
|
107
128
|
//# sourceMappingURL=microsoftSupport.js.map
|