@azure/template 1.0.13-beta.5823502 → 1.0.13-beta.5963717
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/api/index.d.ts +1 -1
- package/dist/browser/api/index.js.map +1 -1
- package/dist/browser/api/widgetAnalyticsContext.d.ts +2 -2
- package/dist/browser/api/widgetAnalyticsContext.js +1 -1
- package/dist/browser/api/widgetAnalyticsContext.js.map +1 -1
- package/dist/browser/api/widgets/index.d.ts +1 -1
- package/dist/browser/api/widgets/index.js.map +1 -1
- package/dist/browser/api/widgets/operations.d.ts +6 -6
- package/dist/browser/api/widgets/operations.js +2 -2
- package/dist/browser/api/widgets/operations.js.map +1 -1
- package/dist/browser/api/widgets/options.d.ts +1 -1
- package/dist/browser/api/widgets/options.js.map +1 -1
- package/dist/browser/classic/index.d.ts +1 -1
- package/dist/browser/classic/index.js.map +1 -1
- package/dist/browser/classic/widgets/index.d.ts +5 -5
- package/dist/browser/classic/widgets/index.js.map +1 -1
- package/dist/browser/index.d.ts +7 -7
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/models/index.d.ts +1 -1
- package/dist/browser/models/index.js.map +1 -1
- package/dist/browser/models/models.d.ts +1 -1
- package/dist/browser/models/models.js.map +1 -1
- package/dist/browser/restorePollerHelpers.d.ts +4 -4
- package/dist/browser/restorePollerHelpers.js +1 -1
- package/dist/browser/restorePollerHelpers.js.map +1 -1
- package/dist/browser/static-helpers/pagingHelpers.d.ts +1 -1
- package/dist/browser/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/browser/static-helpers/pollingHelpers.d.ts +3 -3
- package/dist/browser/static-helpers/pollingHelpers.js +1 -1
- package/dist/browser/static-helpers/pollingHelpers.js.map +1 -1
- package/dist/browser/widgetAnalyticsClient.d.ts +5 -5
- package/dist/browser/widgetAnalyticsClient.js +1 -1
- package/dist/browser/widgetAnalyticsClient.js.map +1 -1
- package/dist/commonjs/api/index.d.ts +1 -1
- package/dist/commonjs/api/index.js +27 -8
- package/dist/commonjs/api/index.js.map +7 -1
- package/dist/commonjs/api/widgetAnalyticsContext.d.ts +2 -2
- package/dist/commonjs/api/widgetAnalyticsContext.js +54 -38
- package/dist/commonjs/api/widgetAnalyticsContext.js.map +7 -1
- package/dist/commonjs/api/widgets/index.d.ts +1 -1
- package/dist/commonjs/api/widgets/index.js +35 -12
- package/dist/commonjs/api/widgets/index.js.map +7 -1
- package/dist/commonjs/api/widgets/operations.d.ts +6 -6
- package/dist/commonjs/api/widgets/operations.js +208 -147
- package/dist/commonjs/api/widgets/operations.js.map +7 -1
- package/dist/commonjs/api/widgets/options.d.ts +1 -1
- package/dist/commonjs/api/widgets/options.js +15 -5
- package/dist/commonjs/api/widgets/options.js.map +7 -1
- package/dist/commonjs/classic/index.d.ts +1 -1
- package/dist/commonjs/classic/index.js +15 -5
- package/dist/commonjs/classic/index.js.map +7 -1
- package/dist/commonjs/classic/widgets/index.d.ts +5 -5
- package/dist/commonjs/classic/widgets/index.js +37 -17
- package/dist/commonjs/classic/widgets/index.js.map +7 -1
- package/dist/commonjs/index.d.ts +7 -7
- package/dist/commonjs/index.js +35 -13
- package/dist/commonjs/index.js.map +7 -1
- package/dist/commonjs/logger.js +28 -8
- package/dist/commonjs/logger.js.map +7 -1
- package/dist/commonjs/models/index.d.ts +1 -1
- package/dist/commonjs/models/index.js +29 -9
- package/dist/commonjs/models/index.js.map +7 -1
- package/dist/commonjs/models/models.d.ts +1 -1
- package/dist/commonjs/models/models.js +86 -68
- package/dist/commonjs/models/models.js.map +7 -1
- package/dist/commonjs/restorePollerHelpers.d.ts +4 -4
- package/dist/commonjs/restorePollerHelpers.js +96 -87
- package/dist/commonjs/restorePollerHelpers.js.map +7 -1
- package/dist/commonjs/static-helpers/pagingHelpers.d.ts +1 -1
- package/dist/commonjs/static-helpers/pagingHelpers.js +109 -103
- package/dist/commonjs/static-helpers/pagingHelpers.js.map +7 -1
- package/dist/commonjs/static-helpers/pollingHelpers.d.ts +3 -3
- package/dist/commonjs/static-helpers/pollingHelpers.js +86 -76
- package/dist/commonjs/static-helpers/pollingHelpers.js.map +7 -1
- package/dist/commonjs/static-helpers/urlTemplate.js +157 -159
- package/dist/commonjs/static-helpers/urlTemplate.js.map +7 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/commonjs/widgetAnalyticsClient.d.ts +5 -5
- package/dist/commonjs/widgetAnalyticsClient.js +50 -33
- package/dist/commonjs/widgetAnalyticsClient.js.map +7 -1
- package/dist/esm/api/index.d.ts +1 -1
- package/dist/esm/api/index.js +6 -4
- package/dist/esm/api/index.js.map +7 -1
- package/dist/esm/api/widgetAnalyticsContext.d.ts +2 -2
- package/dist/esm/api/widgetAnalyticsContext.js +30 -34
- package/dist/esm/api/widgetAnalyticsContext.js.map +7 -1
- package/dist/esm/api/widgets/index.d.ts +1 -1
- package/dist/esm/api/widgets/index.js +14 -4
- package/dist/esm/api/widgets/index.js.map +7 -1
- package/dist/esm/api/widgets/operations.d.ts +6 -6
- package/dist/esm/api/widgets/operations.js +186 -140
- package/dist/esm/api/widgets/operations.js.map +7 -1
- package/dist/esm/api/widgets/options.d.ts +1 -1
- package/dist/esm/api/widgets/options.js +0 -4
- package/dist/esm/api/widgets/options.js.map +7 -1
- package/dist/esm/classic/index.d.ts +1 -1
- package/dist/esm/classic/index.js +0 -4
- package/dist/esm/classic/index.js.map +7 -1
- package/dist/esm/classic/widgets/index.d.ts +5 -5
- package/dist/esm/classic/widgets/index.js +21 -15
- package/dist/esm/classic/widgets/index.js.map +7 -1
- package/dist/esm/index.d.ts +7 -7
- package/dist/esm/index.js +12 -6
- package/dist/esm/index.js.map +7 -1
- package/dist/esm/logger.js +4 -4
- package/dist/esm/logger.js.map +7 -1
- package/dist/esm/models/index.d.ts +1 -1
- package/dist/esm/models/index.js +8 -4
- package/dist/esm/models/index.js.map +7 -1
- package/dist/esm/models/models.d.ts +1 -1
- package/dist/esm/models/models.js +62 -65
- package/dist/esm/models/models.js.map +7 -1
- package/dist/esm/restorePollerHelpers.d.ts +4 -4
- package/dist/esm/restorePollerHelpers.js +76 -84
- package/dist/esm/restorePollerHelpers.js.map +7 -1
- package/dist/esm/static-helpers/pagingHelpers.d.ts +1 -1
- package/dist/esm/static-helpers/pagingHelpers.js +85 -99
- package/dist/esm/static-helpers/pagingHelpers.js.map +7 -1
- package/dist/esm/static-helpers/pollingHelpers.d.ts +3 -3
- package/dist/esm/static-helpers/pollingHelpers.js +63 -73
- package/dist/esm/static-helpers/pollingHelpers.js.map +7 -1
- package/dist/esm/static-helpers/urlTemplate.js +134 -156
- package/dist/esm/static-helpers/urlTemplate.js.map +7 -1
- package/dist/esm/widgetAnalyticsClient.d.ts +5 -5
- package/dist/esm/widgetAnalyticsClient.js +27 -29
- package/dist/esm/widgetAnalyticsClient.js.map +7 -1
- package/dist/react-native/api/index.d.ts +1 -1
- package/dist/react-native/api/index.js.map +1 -1
- package/dist/react-native/api/widgetAnalyticsContext.d.ts +2 -2
- package/dist/react-native/api/widgetAnalyticsContext.js +1 -1
- package/dist/react-native/api/widgetAnalyticsContext.js.map +1 -1
- package/dist/react-native/api/widgets/index.d.ts +1 -1
- package/dist/react-native/api/widgets/index.js.map +1 -1
- package/dist/react-native/api/widgets/operations.d.ts +6 -6
- package/dist/react-native/api/widgets/operations.js +2 -2
- package/dist/react-native/api/widgets/operations.js.map +1 -1
- package/dist/react-native/api/widgets/options.d.ts +1 -1
- package/dist/react-native/api/widgets/options.js.map +1 -1
- package/dist/react-native/classic/index.d.ts +1 -1
- package/dist/react-native/classic/index.js.map +1 -1
- package/dist/react-native/classic/widgets/index.d.ts +5 -5
- package/dist/react-native/classic/widgets/index.js.map +1 -1
- package/dist/react-native/index.d.ts +7 -7
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/models/index.d.ts +1 -1
- package/dist/react-native/models/index.js.map +1 -1
- package/dist/react-native/models/models.d.ts +1 -1
- package/dist/react-native/models/models.js.map +1 -1
- package/dist/react-native/restorePollerHelpers.d.ts +4 -4
- package/dist/react-native/restorePollerHelpers.js +1 -1
- package/dist/react-native/restorePollerHelpers.js.map +1 -1
- package/dist/react-native/static-helpers/pagingHelpers.d.ts +1 -1
- package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/react-native/static-helpers/pollingHelpers.d.ts +3 -3
- package/dist/react-native/static-helpers/pollingHelpers.js +1 -1
- package/dist/react-native/static-helpers/pollingHelpers.js.map +1 -1
- package/dist/react-native/widgetAnalyticsClient.d.ts +5 -5
- package/dist/react-native/widgetAnalyticsClient.js +1 -1
- package/dist/react-native/widgetAnalyticsClient.js.map +1 -1
- package/package.json +3 -23
|
@@ -1,179 +1,240 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var operations_exports = {};
|
|
19
|
+
__export(operations_exports, {
|
|
20
|
+
_createOrUpdateWidgetDeserialize: () => _createOrUpdateWidgetDeserialize,
|
|
21
|
+
_createOrUpdateWidgetSend: () => _createOrUpdateWidgetSend,
|
|
22
|
+
_deleteWidgetDeserialize: () => _deleteWidgetDeserialize,
|
|
23
|
+
_deleteWidgetSend: () => _deleteWidgetSend,
|
|
24
|
+
_getWidgetDeserialize: () => _getWidgetDeserialize,
|
|
25
|
+
_getWidgetOperationStatusDeserialize: () => _getWidgetOperationStatusDeserialize,
|
|
26
|
+
_getWidgetOperationStatusSend: () => _getWidgetOperationStatusSend,
|
|
27
|
+
_getWidgetSend: () => _getWidgetSend,
|
|
28
|
+
_listWidgetsDeserialize: () => _listWidgetsDeserialize,
|
|
29
|
+
_listWidgetsSend: () => _listWidgetsSend,
|
|
30
|
+
createOrUpdateWidget: () => createOrUpdateWidget,
|
|
31
|
+
deleteWidget: () => deleteWidget,
|
|
32
|
+
getWidget: () => getWidget,
|
|
33
|
+
getWidgetOperationStatus: () => getWidgetOperationStatus,
|
|
34
|
+
listWidgets: () => listWidgets
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(operations_exports);
|
|
37
|
+
var import_models = require("../../models/models.js");
|
|
38
|
+
var import_pagingHelpers = require("../../static-helpers/pagingHelpers.js");
|
|
39
|
+
var import_pollingHelpers = require("../../static-helpers/pollingHelpers.js");
|
|
40
|
+
var import_urlTemplate = require("../../static-helpers/urlTemplate.js");
|
|
41
|
+
var import_core_client = require("@azure-rest/core-client");
|
|
25
42
|
function _listWidgetsSend(context, options = { requestOptions: {} }) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
const path = (0, import_urlTemplate.expandUrlTemplate)(
|
|
44
|
+
"/widgets{?api%2Dversion}",
|
|
45
|
+
{
|
|
46
|
+
"api%2Dversion": context.apiVersion
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
return context.path(path).get({
|
|
53
|
+
...(0, import_core_client.operationOptionsToRequestParameters)(options),
|
|
54
|
+
headers: {
|
|
55
|
+
accept: "application/json",
|
|
56
|
+
...options.requestOptions?.headers
|
|
57
|
+
}
|
|
58
|
+
});
|
|
38
59
|
}
|
|
39
60
|
async function _listWidgetsDeserialize(result) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
61
|
+
const expectedStatuses = ["200"];
|
|
62
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
63
|
+
throw (0, import_core_client.createRestError)(result);
|
|
64
|
+
}
|
|
65
|
+
return (0, import_models._pagedWidgetSuiteDeserializer)(result.body);
|
|
45
66
|
}
|
|
46
|
-
/** List Widget resources */
|
|
47
67
|
function listWidgets(context, options = { requestOptions: {} }) {
|
|
48
|
-
|
|
68
|
+
return (0, import_pagingHelpers.buildPagedAsyncIterator)(
|
|
69
|
+
context,
|
|
70
|
+
() => _listWidgetsSend(context, options),
|
|
71
|
+
_listWidgetsDeserialize,
|
|
72
|
+
["200"],
|
|
73
|
+
{ itemName: "value", nextLinkName: "nextLink" }
|
|
74
|
+
);
|
|
49
75
|
}
|
|
50
76
|
function _deleteWidgetSend(context, widgetName, options = { requestOptions: {} }) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
headers: {
|
|
60
|
-
accept: "application/json",
|
|
61
|
-
...options.requestOptions?.headers,
|
|
62
|
-
},
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
async function _deleteWidgetDeserialize(result) {
|
|
66
|
-
const expectedStatuses = ["202", "200"];
|
|
67
|
-
if (!expectedStatuses.includes(result.status)) {
|
|
68
|
-
throw (0, core_client_1.createRestError)(result);
|
|
77
|
+
const path = (0, import_urlTemplate.expandUrlTemplate)(
|
|
78
|
+
"/widgets/{widgetName}{?api%2Dversion}",
|
|
79
|
+
{
|
|
80
|
+
widgetName,
|
|
81
|
+
"api%2Dversion": context.apiVersion
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding
|
|
69
85
|
}
|
|
70
|
-
|
|
71
|
-
|
|
86
|
+
);
|
|
87
|
+
return context.path(path).delete({
|
|
88
|
+
...(0, import_core_client.operationOptionsToRequestParameters)(options),
|
|
89
|
+
headers: {
|
|
90
|
+
accept: "application/json",
|
|
91
|
+
...options.requestOptions?.headers
|
|
72
92
|
}
|
|
73
|
-
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
async function _deleteWidgetDeserialize(result) {
|
|
96
|
+
const expectedStatuses = ["202", "200"];
|
|
97
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
98
|
+
throw (0, import_core_client.createRestError)(result);
|
|
99
|
+
}
|
|
100
|
+
if (result?.body?.result === void 0) {
|
|
101
|
+
throw (0, import_core_client.createRestError)(
|
|
102
|
+
`Expected a result in the response at position "result.body.result"`,
|
|
103
|
+
result
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
return (0, import_models.widgetSuiteDeserializer)(result.body.result);
|
|
74
107
|
}
|
|
75
|
-
/** Delete a Widget asynchronously. */
|
|
76
108
|
function deleteWidget(context, widgetName, options = { requestOptions: {} }) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
109
|
+
return (0, import_pollingHelpers.getLongRunningPoller)(context, _deleteWidgetDeserialize, ["202", "200"], {
|
|
110
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
111
|
+
abortSignal: options?.abortSignal,
|
|
112
|
+
getInitialResponse: () => _deleteWidgetSend(context, widgetName, options),
|
|
113
|
+
resourceLocationConfig: "operation-location"
|
|
114
|
+
});
|
|
83
115
|
}
|
|
84
116
|
function _createOrUpdateWidgetSend(context, widgetName, resource, options = { requestOptions: {} }) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
117
|
+
const path = (0, import_urlTemplate.expandUrlTemplate)(
|
|
118
|
+
"/widgets/{widgetName}{?api%2Dversion}",
|
|
119
|
+
{
|
|
120
|
+
widgetName,
|
|
121
|
+
"api%2Dversion": context.apiVersion
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
return context.path(path).patch({
|
|
128
|
+
...(0, import_core_client.operationOptionsToRequestParameters)(options),
|
|
129
|
+
contentType: "application/merge-patch+json",
|
|
130
|
+
headers: {
|
|
131
|
+
accept: "application/json",
|
|
132
|
+
...options.requestOptions?.headers
|
|
133
|
+
},
|
|
134
|
+
body: (0, import_models.widgetSuiteSerializer)(resource)
|
|
135
|
+
});
|
|
100
136
|
}
|
|
101
137
|
async function _createOrUpdateWidgetDeserialize(result) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
138
|
+
const expectedStatuses = ["201", "200", "202"];
|
|
139
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
140
|
+
throw (0, import_core_client.createRestError)(result);
|
|
141
|
+
}
|
|
142
|
+
if (result?.body?.result === void 0) {
|
|
143
|
+
throw (0, import_core_client.createRestError)(
|
|
144
|
+
`Expected a result in the response at position "result.body.result"`,
|
|
145
|
+
result
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
return (0, import_models.widgetSuiteDeserializer)(result.body.result);
|
|
110
149
|
}
|
|
111
|
-
/** Creates or updates a Widget asynchronously. */
|
|
112
150
|
function createOrUpdateWidget(context, widgetName, resource, options = { requestOptions: {} }) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
151
|
+
return (0, import_pollingHelpers.getLongRunningPoller)(context, _createOrUpdateWidgetDeserialize, ["201", "200", "202"], {
|
|
152
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
153
|
+
abortSignal: options?.abortSignal,
|
|
154
|
+
getInitialResponse: () => _createOrUpdateWidgetSend(context, widgetName, resource, options),
|
|
155
|
+
resourceLocationConfig: "operation-location"
|
|
156
|
+
});
|
|
119
157
|
}
|
|
120
158
|
function _getWidgetOperationStatusSend(context, widgetName, operationId, options = {
|
|
121
|
-
|
|
159
|
+
requestOptions: {}
|
|
122
160
|
}) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
161
|
+
const path = (0, import_urlTemplate.expandUrlTemplate)(
|
|
162
|
+
"/widgets/{widgetName}/operations/{operationId}{?api%2Dversion}",
|
|
163
|
+
{
|
|
164
|
+
widgetName,
|
|
165
|
+
operationId,
|
|
166
|
+
"api%2Dversion": context.apiVersion
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
return context.path(path).get({
|
|
173
|
+
...(0, import_core_client.operationOptionsToRequestParameters)(options),
|
|
174
|
+
headers: {
|
|
175
|
+
accept: "application/json",
|
|
176
|
+
...options.requestOptions?.headers
|
|
177
|
+
}
|
|
178
|
+
});
|
|
137
179
|
}
|
|
138
180
|
async function _getWidgetOperationStatusDeserialize(result) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
181
|
+
const expectedStatuses = ["200"];
|
|
182
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
183
|
+
throw (0, import_core_client.createRestError)(result);
|
|
184
|
+
}
|
|
185
|
+
return (0, import_models.resourceOperationStatusWidgetSuiteWidgetSuiteErrorDeserializer)(result.body);
|
|
144
186
|
}
|
|
145
|
-
/** Gets status of a Widget operation. */
|
|
146
187
|
async function getWidgetOperationStatus(context, widgetName, operationId, options = {
|
|
147
|
-
|
|
188
|
+
requestOptions: {}
|
|
148
189
|
}) {
|
|
149
|
-
|
|
150
|
-
|
|
190
|
+
const result = await _getWidgetOperationStatusSend(context, widgetName, operationId, options);
|
|
191
|
+
return _getWidgetOperationStatusDeserialize(result);
|
|
151
192
|
}
|
|
152
193
|
function _getWidgetSend(context, widgetName, options = { requestOptions: {} }) {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
194
|
+
const path = (0, import_urlTemplate.expandUrlTemplate)(
|
|
195
|
+
"/widgets/{widgetName}{?api%2Dversion}",
|
|
196
|
+
{
|
|
197
|
+
widgetName,
|
|
198
|
+
"api%2Dversion": context.apiVersion
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding
|
|
202
|
+
}
|
|
203
|
+
);
|
|
204
|
+
return context.path(path).get({
|
|
205
|
+
...(0, import_core_client.operationOptionsToRequestParameters)(options),
|
|
206
|
+
headers: {
|
|
207
|
+
accept: "application/json",
|
|
208
|
+
...options.requestOptions?.headers
|
|
209
|
+
}
|
|
210
|
+
});
|
|
166
211
|
}
|
|
167
212
|
async function _getWidgetDeserialize(result) {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
213
|
+
const expectedStatuses = ["200"];
|
|
214
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
215
|
+
throw (0, import_core_client.createRestError)(result);
|
|
216
|
+
}
|
|
217
|
+
return (0, import_models.widgetSuiteDeserializer)(result.body);
|
|
173
218
|
}
|
|
174
|
-
/** Fetch a Widget by name. */
|
|
175
219
|
async function getWidget(context, widgetName, options = { requestOptions: {} }) {
|
|
176
|
-
|
|
177
|
-
|
|
220
|
+
const result = await _getWidgetSend(context, widgetName, options);
|
|
221
|
+
return _getWidgetDeserialize(result);
|
|
178
222
|
}
|
|
179
|
-
|
|
223
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
224
|
+
0 && (module.exports = {
|
|
225
|
+
_createOrUpdateWidgetDeserialize,
|
|
226
|
+
_createOrUpdateWidgetSend,
|
|
227
|
+
_deleteWidgetDeserialize,
|
|
228
|
+
_deleteWidgetSend,
|
|
229
|
+
_getWidgetDeserialize,
|
|
230
|
+
_getWidgetOperationStatusDeserialize,
|
|
231
|
+
_getWidgetOperationStatusSend,
|
|
232
|
+
_getWidgetSend,
|
|
233
|
+
_listWidgetsDeserialize,
|
|
234
|
+
_listWidgetsSend,
|
|
235
|
+
createOrUpdateWidget,
|
|
236
|
+
deleteWidget,
|
|
237
|
+
getWidget,
|
|
238
|
+
getWidgetOperationStatus,
|
|
239
|
+
listWidgets
|
|
240
|
+
});
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/widgets/operations.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAiClC,4CAoBC;AAED,0DASC;AAGD,kCAWC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6BAAe,EAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,IAAA,mCAAuB,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED,8BAA8B;AACvB,KAAK,UAAU,SAAS,CAC7B,OAAe,EACf,UAAkB,EAClB,UAA0C,EAAE,cAAc,EAAE,EAAE,EAAE;IAEhE,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAClE,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC;AACvC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { WidgetAnalyticsContext as Client } from \"../index.js\";\nimport {\n WidgetSuite,\n widgetSuiteSerializer,\n widgetSuiteDeserializer,\n ResourceOperationStatusWidgetSuiteWidgetSuiteError,\n resourceOperationStatusWidgetSuiteWidgetSuiteErrorDeserializer,\n _PagedWidgetSuite,\n _pagedWidgetSuiteDeserializer,\n} from \"../../models/models.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { getLongRunningPoller } from \"../../static-helpers/pollingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n WidgetsListWidgetsOptionalParams,\n WidgetsDeleteWidgetOptionalParams,\n WidgetsCreateOrUpdateWidgetOptionalParams,\n WidgetsGetWidgetOperationStatusOptionalParams,\n WidgetsGetWidgetOptionalParams,\n} from \"./options.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\n\nexport function _listWidgetsSend(\n context: Client,\n options: WidgetsListWidgetsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/widgets{?api%2Dversion}\",\n {\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listWidgetsDeserialize(\n result: PathUncheckedResponse,\n): Promise<_PagedWidgetSuite> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return _pagedWidgetSuiteDeserializer(result.body);\n}\n\n/** List Widget resources */\nexport function listWidgets(\n context: Client,\n options: WidgetsListWidgetsOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<WidgetSuite> {\n return buildPagedAsyncIterator(\n context,\n () => _listWidgetsSend(context, options),\n _listWidgetsDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _deleteWidgetSend(\n context: Client,\n widgetName: string,\n options: WidgetsDeleteWidgetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/widgets/{widgetName}{?api%2Dversion}\",\n {\n widgetName: widgetName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _deleteWidgetDeserialize(\n result: PathUncheckedResponse,\n): Promise<WidgetSuite> {\n const expectedStatuses = [\"202\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n if (result?.body?.result === undefined) {\n throw createRestError(\n `Expected a result in the response at position \"result.body.result\"`,\n result,\n );\n }\n\n return widgetSuiteDeserializer(result.body.result);\n}\n\n/** Delete a Widget asynchronously. */\nexport function deleteWidget(\n context: Client,\n widgetName: string,\n options: WidgetsDeleteWidgetOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<WidgetSuite>, WidgetSuite> {\n return getLongRunningPoller(context, _deleteWidgetDeserialize, [\"202\", \"200\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () => _deleteWidgetSend(context, widgetName, options),\n resourceLocationConfig: \"operation-location\",\n }) as PollerLike<OperationState<WidgetSuite>, WidgetSuite>;\n}\n\nexport function _createOrUpdateWidgetSend(\n context: Client,\n widgetName: string,\n resource: WidgetSuite,\n options: WidgetsCreateOrUpdateWidgetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/widgets/{widgetName}{?api%2Dversion}\",\n {\n widgetName: widgetName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).patch({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/merge-patch+json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: widgetSuiteSerializer(resource),\n });\n}\n\nexport async function _createOrUpdateWidgetDeserialize(\n result: PathUncheckedResponse,\n): Promise<WidgetSuite> {\n const expectedStatuses = [\"201\", \"200\", \"202\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n if (result?.body?.result === undefined) {\n throw createRestError(\n `Expected a result in the response at position \"result.body.result\"`,\n result,\n );\n }\n\n return widgetSuiteDeserializer(result.body.result);\n}\n\n/** Creates or updates a Widget asynchronously. */\nexport function createOrUpdateWidget(\n context: Client,\n widgetName: string,\n resource: WidgetSuite,\n options: WidgetsCreateOrUpdateWidgetOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<WidgetSuite>, WidgetSuite> {\n return getLongRunningPoller(context, _createOrUpdateWidgetDeserialize, [\"201\", \"200\", \"202\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () => _createOrUpdateWidgetSend(context, widgetName, resource, options),\n resourceLocationConfig: \"operation-location\",\n }) as PollerLike<OperationState<WidgetSuite>, WidgetSuite>;\n}\n\nexport function _getWidgetOperationStatusSend(\n context: Client,\n widgetName: string,\n operationId: string,\n options: WidgetsGetWidgetOperationStatusOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/widgets/{widgetName}/operations/{operationId}{?api%2Dversion}\",\n {\n widgetName: widgetName,\n operationId: operationId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getWidgetOperationStatusDeserialize(\n result: PathUncheckedResponse,\n): Promise<ResourceOperationStatusWidgetSuiteWidgetSuiteError> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return resourceOperationStatusWidgetSuiteWidgetSuiteErrorDeserializer(result.body);\n}\n\n/** Gets status of a Widget operation. */\nexport async function getWidgetOperationStatus(\n context: Client,\n widgetName: string,\n operationId: string,\n options: WidgetsGetWidgetOperationStatusOptionalParams = {\n requestOptions: {},\n },\n): Promise<ResourceOperationStatusWidgetSuiteWidgetSuiteError> {\n const result = await _getWidgetOperationStatusSend(context, widgetName, operationId, options);\n return _getWidgetOperationStatusDeserialize(result);\n}\n\nexport function _getWidgetSend(\n context: Client,\n widgetName: string,\n options: WidgetsGetWidgetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/widgets/{widgetName}{?api%2Dversion}\",\n {\n widgetName: widgetName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getWidgetDeserialize(result: PathUncheckedResponse): Promise<WidgetSuite> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return widgetSuiteDeserializer(result.body);\n}\n\n/** Fetch a Widget by name. */\nexport async function getWidget(\n context: Client,\n widgetName: string,\n options: WidgetsGetWidgetOptionalParams = { requestOptions: {} },\n): Promise<WidgetSuite> {\n const result = await _getWidgetSend(context, widgetName, options);\n return _getWidgetDeserialize(result);\n}\n"]}
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/template/template/src/api/widgets/operations.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { WidgetAnalyticsContext as Client } from \"../index.js\";\nimport type {\n WidgetSuite,\n ResourceOperationStatusWidgetSuiteWidgetSuiteError,\n _PagedWidgetSuite,\n} from \"../../models/models.js\";\nimport {\n widgetSuiteSerializer,\n widgetSuiteDeserializer,\n resourceOperationStatusWidgetSuiteWidgetSuiteErrorDeserializer,\n _pagedWidgetSuiteDeserializer,\n} from \"../../models/models.js\";\nimport type { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { buildPagedAsyncIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { getLongRunningPoller } from \"../../static-helpers/pollingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport type {\n WidgetsListWidgetsOptionalParams,\n WidgetsDeleteWidgetOptionalParams,\n WidgetsCreateOrUpdateWidgetOptionalParams,\n WidgetsGetWidgetOperationStatusOptionalParams,\n WidgetsGetWidgetOptionalParams,\n} from \"./options.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\nimport type { PollerLike, OperationState } from \"@azure/core-lro\";\n\nexport function _listWidgetsSend(\n context: Client,\n options: WidgetsListWidgetsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/widgets{?api%2Dversion}\",\n {\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listWidgetsDeserialize(\n result: PathUncheckedResponse,\n): Promise<_PagedWidgetSuite> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return _pagedWidgetSuiteDeserializer(result.body);\n}\n\n/** List Widget resources */\nexport function listWidgets(\n context: Client,\n options: WidgetsListWidgetsOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<WidgetSuite> {\n return buildPagedAsyncIterator(\n context,\n () => _listWidgetsSend(context, options),\n _listWidgetsDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _deleteWidgetSend(\n context: Client,\n widgetName: string,\n options: WidgetsDeleteWidgetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/widgets/{widgetName}{?api%2Dversion}\",\n {\n widgetName: widgetName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _deleteWidgetDeserialize(\n result: PathUncheckedResponse,\n): Promise<WidgetSuite> {\n const expectedStatuses = [\"202\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n if (result?.body?.result === undefined) {\n throw createRestError(\n `Expected a result in the response at position \"result.body.result\"`,\n result,\n );\n }\n\n return widgetSuiteDeserializer(result.body.result);\n}\n\n/** Delete a Widget asynchronously. */\nexport function deleteWidget(\n context: Client,\n widgetName: string,\n options: WidgetsDeleteWidgetOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<WidgetSuite>, WidgetSuite> {\n return getLongRunningPoller(context, _deleteWidgetDeserialize, [\"202\", \"200\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () => _deleteWidgetSend(context, widgetName, options),\n resourceLocationConfig: \"operation-location\",\n }) as PollerLike<OperationState<WidgetSuite>, WidgetSuite>;\n}\n\nexport function _createOrUpdateWidgetSend(\n context: Client,\n widgetName: string,\n resource: WidgetSuite,\n options: WidgetsCreateOrUpdateWidgetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/widgets/{widgetName}{?api%2Dversion}\",\n {\n widgetName: widgetName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).patch({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/merge-patch+json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: widgetSuiteSerializer(resource),\n });\n}\n\nexport async function _createOrUpdateWidgetDeserialize(\n result: PathUncheckedResponse,\n): Promise<WidgetSuite> {\n const expectedStatuses = [\"201\", \"200\", \"202\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n if (result?.body?.result === undefined) {\n throw createRestError(\n `Expected a result in the response at position \"result.body.result\"`,\n result,\n );\n }\n\n return widgetSuiteDeserializer(result.body.result);\n}\n\n/** Creates or updates a Widget asynchronously. */\nexport function createOrUpdateWidget(\n context: Client,\n widgetName: string,\n resource: WidgetSuite,\n options: WidgetsCreateOrUpdateWidgetOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<WidgetSuite>, WidgetSuite> {\n return getLongRunningPoller(context, _createOrUpdateWidgetDeserialize, [\"201\", \"200\", \"202\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () => _createOrUpdateWidgetSend(context, widgetName, resource, options),\n resourceLocationConfig: \"operation-location\",\n }) as PollerLike<OperationState<WidgetSuite>, WidgetSuite>;\n}\n\nexport function _getWidgetOperationStatusSend(\n context: Client,\n widgetName: string,\n operationId: string,\n options: WidgetsGetWidgetOperationStatusOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/widgets/{widgetName}/operations/{operationId}{?api%2Dversion}\",\n {\n widgetName: widgetName,\n operationId: operationId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getWidgetOperationStatusDeserialize(\n result: PathUncheckedResponse,\n): Promise<ResourceOperationStatusWidgetSuiteWidgetSuiteError> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return resourceOperationStatusWidgetSuiteWidgetSuiteErrorDeserializer(result.body);\n}\n\n/** Gets status of a Widget operation. */\nexport async function getWidgetOperationStatus(\n context: Client,\n widgetName: string,\n operationId: string,\n options: WidgetsGetWidgetOperationStatusOptionalParams = {\n requestOptions: {},\n },\n): Promise<ResourceOperationStatusWidgetSuiteWidgetSuiteError> {\n const result = await _getWidgetOperationStatusSend(context, widgetName, operationId, options);\n return _getWidgetOperationStatusDeserialize(result);\n}\n\nexport function _getWidgetSend(\n context: Client,\n widgetName: string,\n options: WidgetsGetWidgetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/widgets/{widgetName}{?api%2Dversion}\",\n {\n widgetName: widgetName,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getWidgetDeserialize(result: PathUncheckedResponse): Promise<WidgetSuite> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return widgetSuiteDeserializer(result.body);\n}\n\n/** Fetch a Widget by name. */\nexport async function getWidget(\n context: Client,\n widgetName: string,\n options: WidgetsGetWidgetOptionalParams = { requestOptions: {} },\n): Promise<WidgetSuite> {\n const result = await _getWidgetSend(context, widgetName, options);\n return _getWidgetDeserialize(result);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,oBAKO;AAEP,2BAAwC;AACxC,4BAAqC;AACrC,yBAAkC;AASlC,yBAAqE;AAG9D,SAAS,iBACd,SACA,UAA4C,EAAE,gBAAgB,CAAC,EAAE,GAC/C;AAClB,QAAM,WAAO;AAAA,IACX;AAAA,IACA;AAAA,MACE,iBAAiB,QAAQ;AAAA,IAC3B;AAAA,IACA;AAAA,MACE,eAAe,SAAS,gBAAgB;AAAA,IAC1C;AAAA,EACF;AACA,SAAO,QAAQ,KAAK,IAAI,EAAE,IAAI;AAAA,IAC5B,OAAG,wDAAoC,OAAO;AAAA,IAC9C,SAAS;AAAA,MACP,QAAQ;AAAA,MACR,GAAG,QAAQ,gBAAgB;AAAA,IAC7B;AAAA,EACF,CAAC;AACH;AAEA,eAAsB,wBACpB,QAC4B;AAC5B,QAAM,mBAAmB,CAAC,KAAK;AAC/B,MAAI,CAAC,iBAAiB,SAAS,OAAO,MAAM,GAAG;AAC7C,cAAM,oCAAgB,MAAM;AAAA,EAC9B;AAEA,aAAO,6CAA8B,OAAO,IAAI;AAClD;AAGO,SAAS,YACd,SACA,UAA4C,EAAE,gBAAgB,CAAC,EAAE,GACxB;AACzC,aAAO;AAAA,IACL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AACrC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var options_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(options_exports);
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/template/template/src/api/widgets/options.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationOptions } from \"@azure-rest/core-client\";\n\n/** Optional parameters. */\nexport interface WidgetsListWidgetsOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface WidgetsDeleteWidgetOptionalParams extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n}\n\n/** Optional parameters. */\nexport interface WidgetsCreateOrUpdateWidgetOptionalParams extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n}\n\n/** Optional parameters. */\nexport interface WidgetsGetWidgetOperationStatusOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface WidgetsGetWidgetOptionalParams extends OperationOptions {}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { WidgetsOperations } from "./widgets/index.js";
|
|
1
|
+
export type { WidgetsOperations } from "./widgets/index.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var classic_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(classic_exports);
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/template/template/src/classic/index.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport type { WidgetsOperations } from \"./widgets/index.js\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { WidgetAnalyticsContext } from "../../api/widgetAnalyticsContext.js";
|
|
2
|
-
import { WidgetsListWidgetsOptionalParams, WidgetsDeleteWidgetOptionalParams, WidgetsCreateOrUpdateWidgetOptionalParams, WidgetsGetWidgetOperationStatusOptionalParams, WidgetsGetWidgetOptionalParams } from "../../api/widgets/options.js";
|
|
3
|
-
import { WidgetSuite, ResourceOperationStatusWidgetSuiteWidgetSuiteError } from "../../models/models.js";
|
|
4
|
-
import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
|
|
5
|
-
import { PollerLike, OperationState } from "@azure/core-lro";
|
|
1
|
+
import type { WidgetAnalyticsContext } from "../../api/widgetAnalyticsContext.js";
|
|
2
|
+
import type { WidgetsListWidgetsOptionalParams, WidgetsDeleteWidgetOptionalParams, WidgetsCreateOrUpdateWidgetOptionalParams, WidgetsGetWidgetOperationStatusOptionalParams, WidgetsGetWidgetOptionalParams } from "../../api/widgets/options.js";
|
|
3
|
+
import type { WidgetSuite, ResourceOperationStatusWidgetSuiteWidgetSuiteError } from "../../models/models.js";
|
|
4
|
+
import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
|
|
5
|
+
import type { PollerLike, OperationState } from "@azure/core-lro";
|
|
6
6
|
/** Interface representing a Widgets operations. */
|
|
7
7
|
export interface WidgetsOperations {
|
|
8
8
|
/** List Widget resources */
|
|
@@ -1,21 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var widgets_exports = {};
|
|
19
|
+
__export(widgets_exports, {
|
|
20
|
+
_getWidgetsOperations: () => _getWidgetsOperations
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(widgets_exports);
|
|
23
|
+
var import_operations = require("../../api/widgets/operations.js");
|
|
7
24
|
function _getWidgets(context) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
25
|
+
return {
|
|
26
|
+
listWidgets: (options) => (0, import_operations.listWidgets)(context, options),
|
|
27
|
+
deleteWidget: (widgetName, options) => (0, import_operations.deleteWidget)(context, widgetName, options),
|
|
28
|
+
createOrUpdateWidget: (widgetName, resource, options) => (0, import_operations.createOrUpdateWidget)(context, widgetName, resource, options),
|
|
29
|
+
getWidgetOperationStatus: (widgetName, operationId, options) => (0, import_operations.getWidgetOperationStatus)(context, widgetName, operationId, options),
|
|
30
|
+
getWidget: (widgetName, options) => (0, import_operations.getWidget)(context, widgetName, options)
|
|
31
|
+
};
|
|
15
32
|
}
|
|
16
33
|
function _getWidgetsOperations(context) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
34
|
+
return {
|
|
35
|
+
..._getWidgets(context)
|
|
36
|
+
};
|
|
20
37
|
}
|
|
21
|
-
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
_getWidgetsOperations
|
|
41
|
+
});
|