@azure/template-dpg 1.0.0-beta.2 → 1.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/browser/WidgetServiceClient.d.ts +1 -1
  2. package/dist/browser/WidgetServiceClient.d.ts.map +1 -1
  3. package/dist/browser/WidgetServiceClient.js +1 -0
  4. package/dist/browser/WidgetServiceClient.js.map +1 -1
  5. package/dist/browser/api/WidgetServiceContext.d.ts +1 -1
  6. package/dist/browser/api/WidgetServiceContext.d.ts.map +1 -1
  7. package/dist/browser/api/WidgetServiceContext.js.map +1 -1
  8. package/dist/browser/api/index.d.ts +3 -3
  9. package/dist/browser/api/index.d.ts.map +1 -1
  10. package/dist/browser/api/index.js.map +1 -1
  11. package/dist/browser/api/operations.js +20 -27
  12. package/dist/browser/api/operations.js.map +1 -1
  13. package/dist/browser/index.d.ts +4 -4
  14. package/dist/browser/index.d.ts.map +1 -1
  15. package/dist/browser/index.js.map +1 -1
  16. package/dist/browser/rest/index.d.ts +5 -5
  17. package/dist/browser/rest/index.d.ts.map +1 -1
  18. package/dist/browser/rest/index.js +0 -5
  19. package/dist/browser/rest/index.js.map +1 -1
  20. package/dist/browser/rest/isUnexpected.js +4 -5
  21. package/dist/browser/rest/isUnexpected.js.map +1 -1
  22. package/dist/browser/rest/widgetServiceClient.js +11 -8
  23. package/dist/browser/rest/widgetServiceClient.js.map +1 -1
  24. package/dist/commonjs/WidgetServiceClient.d.ts +1 -1
  25. package/dist/commonjs/WidgetServiceClient.d.ts.map +1 -1
  26. package/dist/commonjs/WidgetServiceClient.js +73 -53
  27. package/dist/commonjs/WidgetServiceClient.js.map +7 -1
  28. package/dist/commonjs/api/WidgetServiceContext.d.ts +1 -1
  29. package/dist/commonjs/api/WidgetServiceContext.d.ts.map +1 -1
  30. package/dist/commonjs/api/WidgetServiceContext.js +45 -16
  31. package/dist/commonjs/api/WidgetServiceContext.js.map +7 -1
  32. package/dist/commonjs/api/foo.js +28 -14
  33. package/dist/commonjs/api/foo.js.map +7 -1
  34. package/dist/commonjs/api/index.d.ts +3 -3
  35. package/dist/commonjs/api/index.d.ts.map +1 -1
  36. package/dist/commonjs/api/index.js +41 -15
  37. package/dist/commonjs/api/index.js.map +7 -1
  38. package/dist/commonjs/api/models.js +16 -5
  39. package/dist/commonjs/api/models.js.map +7 -1
  40. package/dist/commonjs/api/operations.js +165 -157
  41. package/dist/commonjs/api/operations.js.map +7 -1
  42. package/dist/commonjs/common/interfaces.js +16 -5
  43. package/dist/commonjs/common/interfaces.js.map +7 -1
  44. package/dist/commonjs/index.d.ts +4 -4
  45. package/dist/commonjs/index.d.ts.map +1 -1
  46. package/dist/commonjs/index.js +28 -8
  47. package/dist/commonjs/index.js.map +7 -1
  48. package/dist/commonjs/logger.js +29 -15
  49. package/dist/commonjs/logger.js.map +7 -1
  50. package/dist/commonjs/rest/clientDefinitions.js +16 -5
  51. package/dist/commonjs/rest/clientDefinitions.js.map +7 -1
  52. package/dist/commonjs/rest/index.d.ts +5 -5
  53. package/dist/commonjs/rest/index.d.ts.map +1 -1
  54. package/dist/commonjs/rest/index.js +43 -22
  55. package/dist/commonjs/rest/index.js.map +7 -1
  56. package/dist/commonjs/rest/isUnexpected.js +73 -68
  57. package/dist/commonjs/rest/isUnexpected.js.map +7 -1
  58. package/dist/commonjs/rest/models.js +16 -5
  59. package/dist/commonjs/rest/models.js.map +7 -1
  60. package/dist/commonjs/rest/outputModels.js +16 -5
  61. package/dist/commonjs/rest/outputModels.js.map +7 -1
  62. package/dist/commonjs/rest/parameters.js +16 -5
  63. package/dist/commonjs/rest/parameters.js.map +7 -1
  64. package/dist/commonjs/rest/responses.js +16 -5
  65. package/dist/commonjs/rest/responses.js.map +7 -1
  66. package/dist/commonjs/rest/widgetServiceClient.js +50 -38
  67. package/dist/commonjs/rest/widgetServiceClient.js.map +7 -1
  68. package/dist/commonjs/tsdoc-metadata.json +11 -11
  69. package/dist/esm/WidgetServiceClient.d.ts +1 -1
  70. package/dist/esm/WidgetServiceClient.d.ts.map +1 -1
  71. package/dist/esm/WidgetServiceClient.js +1 -0
  72. package/dist/esm/WidgetServiceClient.js.map +1 -1
  73. package/dist/esm/api/WidgetServiceContext.d.ts +1 -1
  74. package/dist/esm/api/WidgetServiceContext.d.ts.map +1 -1
  75. package/dist/esm/api/WidgetServiceContext.js.map +1 -1
  76. package/dist/esm/api/index.d.ts +3 -3
  77. package/dist/esm/api/index.d.ts.map +1 -1
  78. package/dist/esm/api/index.js.map +1 -1
  79. package/dist/esm/api/operations.js +20 -27
  80. package/dist/esm/api/operations.js.map +1 -1
  81. package/dist/esm/index.d.ts +4 -4
  82. package/dist/esm/index.d.ts.map +1 -1
  83. package/dist/esm/index.js.map +1 -1
  84. package/dist/esm/rest/index.d.ts +5 -5
  85. package/dist/esm/rest/index.d.ts.map +1 -1
  86. package/dist/esm/rest/index.js +0 -5
  87. package/dist/esm/rest/index.js.map +1 -1
  88. package/dist/esm/rest/isUnexpected.js +4 -5
  89. package/dist/esm/rest/isUnexpected.js.map +1 -1
  90. package/dist/esm/rest/widgetServiceClient.js +11 -8
  91. package/dist/esm/rest/widgetServiceClient.js.map +1 -1
  92. package/dist/react-native/WidgetServiceClient.d.ts +1 -1
  93. package/dist/react-native/WidgetServiceClient.d.ts.map +1 -1
  94. package/dist/react-native/WidgetServiceClient.js +1 -0
  95. package/dist/react-native/WidgetServiceClient.js.map +1 -1
  96. package/dist/react-native/api/WidgetServiceContext.d.ts +1 -1
  97. package/dist/react-native/api/WidgetServiceContext.d.ts.map +1 -1
  98. package/dist/react-native/api/WidgetServiceContext.js.map +1 -1
  99. package/dist/react-native/api/index.d.ts +3 -3
  100. package/dist/react-native/api/index.d.ts.map +1 -1
  101. package/dist/react-native/api/index.js.map +1 -1
  102. package/dist/react-native/api/operations.js +20 -27
  103. package/dist/react-native/api/operations.js.map +1 -1
  104. package/dist/react-native/index.d.ts +4 -4
  105. package/dist/react-native/index.d.ts.map +1 -1
  106. package/dist/react-native/index.js.map +1 -1
  107. package/dist/react-native/rest/index.d.ts +5 -5
  108. package/dist/react-native/rest/index.d.ts.map +1 -1
  109. package/dist/react-native/rest/index.js +0 -5
  110. package/dist/react-native/rest/index.js.map +1 -1
  111. package/dist/react-native/rest/isUnexpected.js +4 -5
  112. package/dist/react-native/rest/isUnexpected.js.map +1 -1
  113. package/dist/react-native/rest/widgetServiceClient.js +11 -8
  114. package/dist/react-native/rest/widgetServiceClient.js.map +1 -1
  115. package/package.json +50 -60
@@ -1,191 +1,199 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports._listWidgetsSend = _listWidgetsSend;
6
- exports._listWidgetsDeserialize = _listWidgetsDeserialize;
7
- exports.listWidgets = listWidgets;
8
- exports._getWidgetSend = _getWidgetSend;
9
- exports._getWidgetDeserialize = _getWidgetDeserialize;
10
- exports.getWidget = getWidget;
11
- exports._createWidgetSend = _createWidgetSend;
12
- exports._createWidgetDeserialize = _createWidgetDeserialize;
13
- exports.createWidget = createWidget;
14
- exports._updateWidgetSend = _updateWidgetSend;
15
- exports._updateWidgetDeserialize = _updateWidgetDeserialize;
16
- exports.updateWidget = updateWidget;
17
- exports._deleteWidgetSend = _deleteWidgetSend;
18
- exports._deleteWidgetDeserialize = _deleteWidgetDeserialize;
19
- exports.deleteWidget = deleteWidget;
20
- exports._analyzeWidgetSend = _analyzeWidgetSend;
21
- exports._analyzeWidgetDeserialize = _analyzeWidgetDeserialize;
22
- exports.analyzeWidget = analyzeWidget;
23
- const core_rest_pipeline_1 = require("@azure/core-rest-pipeline");
24
- const index_js_1 = require("../rest/index.js");
25
- const foo_js_1 = require("./foo.js");
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
+ _analyzeWidgetDeserialize: () => _analyzeWidgetDeserialize,
21
+ _analyzeWidgetSend: () => _analyzeWidgetSend,
22
+ _createWidgetDeserialize: () => _createWidgetDeserialize,
23
+ _createWidgetSend: () => _createWidgetSend,
24
+ _deleteWidgetDeserialize: () => _deleteWidgetDeserialize,
25
+ _deleteWidgetSend: () => _deleteWidgetSend,
26
+ _getWidgetDeserialize: () => _getWidgetDeserialize,
27
+ _getWidgetSend: () => _getWidgetSend,
28
+ _listWidgetsDeserialize: () => _listWidgetsDeserialize,
29
+ _listWidgetsSend: () => _listWidgetsSend,
30
+ _updateWidgetDeserialize: () => _updateWidgetDeserialize,
31
+ _updateWidgetSend: () => _updateWidgetSend,
32
+ analyzeWidget: () => analyzeWidget,
33
+ createWidget: () => createWidget,
34
+ deleteWidget: () => deleteWidget,
35
+ getWidget: () => getWidget,
36
+ listWidgets: () => listWidgets,
37
+ updateWidget: () => updateWidget
38
+ });
39
+ module.exports = __toCommonJS(operations_exports);
40
+ var import_core_rest_pipeline = require("@azure/core-rest-pipeline");
41
+ var import_rest = require("../rest/index.js");
42
+ var import_foo = require("./foo.js");
26
43
  function _listWidgetsSend(context, options = { requestOptions: {} }) {
27
- var _a, _b, _c;
28
- return context.path("/widgets").get({
29
- allowInsecureConnection: (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.allowInsecureConnection,
30
- skipUrlEncoding: (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.skipUrlEncoding,
31
- headers: Object.assign({}, (_c = options.requestOptions) === null || _c === void 0 ? void 0 : _c.headers),
32
- });
44
+ return context.path("/widgets").get({
45
+ allowInsecureConnection: options.requestOptions?.allowInsecureConnection,
46
+ skipUrlEncoding: options.requestOptions?.skipUrlEncoding,
47
+ headers: { ...options.requestOptions?.headers }
48
+ });
33
49
  }
34
50
  async function _listWidgetsDeserialize(result) {
35
- var _a;
36
- if ((0, index_js_1.isUnexpected)(result)) {
37
- throw result.body;
38
- }
39
- return ((_a = result.body) !== null && _a !== void 0 ? _a : []).map((p) => ({
40
- id: p["id"],
41
- weight: p["weight"],
42
- color: p["color"],
43
- }));
44
- }
45
- /**
46
- * List all widgets in the system. This operation is not paginated, and returns a simple array of widgets.
47
- *
48
- * It does not accept any options or parameters.
49
- */
51
+ if ((0, import_rest.isUnexpected)(result)) {
52
+ throw result.body;
53
+ }
54
+ return (result.body ?? []).map((p) => ({
55
+ id: p["id"],
56
+ weight: p["weight"],
57
+ color: p["color"]
58
+ }));
59
+ }
50
60
  async function listWidgets(context, options = { requestOptions: {} }) {
51
- const result = await _listWidgetsSend(context, options);
52
- return _listWidgetsDeserialize(result);
61
+ const result = await _listWidgetsSend(context, options);
62
+ return _listWidgetsDeserialize(result);
53
63
  }
54
64
  function _getWidgetSend(context, id, options = { requestOptions: {} }) {
55
- var _a, _b, _c;
56
- return context.path("/widgets/{id}", id).get({
57
- allowInsecureConnection: (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.allowInsecureConnection,
58
- skipUrlEncoding: (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.skipUrlEncoding,
59
- headers: Object.assign({}, (_c = options.requestOptions) === null || _c === void 0 ? void 0 : _c.headers),
60
- });
65
+ return context.path("/widgets/{id}", id).get({
66
+ allowInsecureConnection: options.requestOptions?.allowInsecureConnection,
67
+ skipUrlEncoding: options.requestOptions?.skipUrlEncoding,
68
+ headers: { ...options.requestOptions?.headers }
69
+ });
61
70
  }
62
71
  async function _getWidgetDeserialize(result) {
63
- if ((0, index_js_1.isUnexpected)(result)) {
64
- throw result.body;
65
- }
66
- return {
67
- id: result.body["id"],
68
- weight: result.body["weight"],
69
- color: result.body["color"],
70
- };
72
+ if ((0, import_rest.isUnexpected)(result)) {
73
+ throw result.body;
74
+ }
75
+ return {
76
+ id: result.body["id"],
77
+ weight: result.body["weight"],
78
+ color: result.body["color"]
79
+ };
71
80
  }
72
- /** Get a widget by ID. */
73
81
  async function getWidget(context, id, options = { requestOptions: {} }) {
74
- const result = await _getWidgetSend(context, id, options);
75
- return _getWidgetDeserialize(result);
82
+ const result = await _getWidgetSend(context, id, options);
83
+ return _getWidgetDeserialize(result);
76
84
  }
77
85
  function _createWidgetSend(context, weight, color, options = { requestOptions: {} }) {
78
- var _a, _b, _c;
79
- return context.path("/widgets").post({
80
- allowInsecureConnection: (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.allowInsecureConnection,
81
- skipUrlEncoding: (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.skipUrlEncoding,
82
- headers: Object.assign({}, (_c = options.requestOptions) === null || _c === void 0 ? void 0 : _c.headers),
83
- body: { weight: weight, color: color },
84
- });
86
+ return context.path("/widgets").post({
87
+ allowInsecureConnection: options.requestOptions?.allowInsecureConnection,
88
+ skipUrlEncoding: options.requestOptions?.skipUrlEncoding,
89
+ headers: { ...options.requestOptions?.headers },
90
+ body: { weight, color }
91
+ });
85
92
  }
86
93
  async function _createWidgetDeserialize(result) {
87
- if ((0, index_js_1.isUnexpected)(result)) {
88
- throw result.body;
89
- }
90
- return {
91
- id: result.body["id"],
92
- weight: result.body["weight"],
93
- color: result.body["color"],
94
- };
95
- }
96
- /**
97
- * Create a new widget.
98
- *
99
- * The widget ID is not required during creation, as it is automatically set by the server. Providing an ID will
100
- * result in an error.
101
- */
94
+ if ((0, import_rest.isUnexpected)(result)) {
95
+ throw result.body;
96
+ }
97
+ return {
98
+ id: result.body["id"],
99
+ weight: result.body["weight"],
100
+ color: result.body["color"]
101
+ };
102
+ }
102
103
  async function createWidget(context, weight, color, options = { requestOptions: {} }) {
103
- const result = await _createWidgetSend(context, weight, color, options);
104
- return _createWidgetDeserialize(result);
104
+ const result = await _createWidgetSend(context, weight, color, options);
105
+ return _createWidgetDeserialize(result);
105
106
  }
106
107
  function _updateWidgetSend(context, id, options = { requestOptions: {} }) {
107
- var _a, _b, _c;
108
- return context.path("/widgets/{id}", id).patch({
109
- allowInsecureConnection: (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.allowInsecureConnection,
110
- skipUrlEncoding: (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.skipUrlEncoding,
111
- headers: Object.assign({}, (_c = options.requestOptions) === null || _c === void 0 ? void 0 : _c.headers),
112
- body: { weight: options === null || options === void 0 ? void 0 : options.weight, color: options === null || options === void 0 ? void 0 : options.color },
113
- });
108
+ return context.path("/widgets/{id}", id).patch({
109
+ allowInsecureConnection: options.requestOptions?.allowInsecureConnection,
110
+ skipUrlEncoding: options.requestOptions?.skipUrlEncoding,
111
+ headers: { ...options.requestOptions?.headers },
112
+ body: { weight: options?.weight, color: options?.color }
113
+ });
114
114
  }
115
115
  async function _updateWidgetDeserialize(result) {
116
- if ((0, index_js_1.isUnexpected)(result)) {
117
- throw result.body;
118
- }
119
- return {
120
- id: result.body["id"],
121
- weight: result.body["weight"],
122
- color: result.body["color"],
123
- };
124
- }
125
- /**
126
- * Update the contents of the widget. The widget ID is required in the input, but cannot be changed. All other fields
127
- * are optional and will be updated within the widget if provided.
128
- */
116
+ if ((0, import_rest.isUnexpected)(result)) {
117
+ throw result.body;
118
+ }
119
+ return {
120
+ id: result.body["id"],
121
+ weight: result.body["weight"],
122
+ color: result.body["color"]
123
+ };
124
+ }
129
125
  async function updateWidget(context, id, options = { requestOptions: {} }) {
130
- const result = await _updateWidgetSend(context, id, options);
131
- return _updateWidgetDeserialize(result);
126
+ const result = await _updateWidgetSend(context, id, options);
127
+ return _updateWidgetDeserialize(result);
132
128
  }
133
129
  function _deleteWidgetSend(context, id, options = { requestOptions: {} }) {
134
- var _a, _b, _c;
135
- return context.path("/widgets/{id}", id).delete({
136
- allowInsecureConnection: (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.allowInsecureConnection,
137
- skipUrlEncoding: (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.skipUrlEncoding,
138
- headers: Object.assign({}, (_c = options.requestOptions) === null || _c === void 0 ? void 0 : _c.headers),
139
- });
130
+ return context.path("/widgets/{id}", id).delete({
131
+ allowInsecureConnection: options.requestOptions?.allowInsecureConnection,
132
+ skipUrlEncoding: options.requestOptions?.skipUrlEncoding,
133
+ headers: { ...options.requestOptions?.headers }
134
+ });
140
135
  }
141
136
  async function _deleteWidgetDeserialize(result) {
142
- if ((0, index_js_1.isUnexpected)(result)) {
143
- throw result.body;
144
- }
145
- return;
137
+ if ((0, import_rest.isUnexpected)(result)) {
138
+ throw result.body;
139
+ }
140
+ return;
146
141
  }
147
- /** Delete a widget by ID. */
148
142
  async function deleteWidget(context, id, options = { requestOptions: {} }) {
149
- const result = await _deleteWidgetSend(context, id, options);
150
- return _deleteWidgetDeserialize(result);
143
+ const result = await _deleteWidgetSend(context, id, options);
144
+ return _deleteWidgetDeserialize(result);
151
145
  }
152
146
  function _analyzeWidgetSend(context, id, options = { requestOptions: {} }) {
153
- var _a, _b, _c;
154
- return context.path("/widgets/{id}/analyze", id).post({
155
- allowInsecureConnection: (_a = options.requestOptions) === null || _a === void 0 ? void 0 : _a.allowInsecureConnection,
156
- skipUrlEncoding: (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.skipUrlEncoding,
157
- headers: Object.assign({}, (_c = options.requestOptions) === null || _c === void 0 ? void 0 : _c.headers),
158
- });
147
+ return context.path("/widgets/{id}/analyze", id).post({
148
+ allowInsecureConnection: options.requestOptions?.allowInsecureConnection,
149
+ skipUrlEncoding: options.requestOptions?.skipUrlEncoding,
150
+ headers: { ...options.requestOptions?.headers }
151
+ });
159
152
  }
160
153
  async function _analyzeWidgetDeserialize(result) {
161
- if ((0, index_js_1.isUnexpected)(result)) {
162
- throw result.body;
163
- }
164
- return {
165
- summary: result.body["summary"],
166
- };
167
- }
168
- /**
169
- * In this customization we will perform the following tasks in addition to the generated:
170
- * - We are going to add special error handling for demonstration purposes
171
- */
154
+ if ((0, import_rest.isUnexpected)(result)) {
155
+ throw result.body;
156
+ }
157
+ return {
158
+ summary: result.body["summary"]
159
+ };
160
+ }
172
161
  async function analyzeWidget(context, id, options) {
173
- try {
174
- (0, foo_js_1.foo)();
175
- const result = await _analyzeWidget(context, id, options);
176
- return result;
177
- }
178
- catch (error) {
179
- console.error("Error occurred while calling analyzeWidget:", error);
180
- if (error.message && error.statusCode) {
181
- throw new core_rest_pipeline_1.RestError(error.message, { code: error.statusCode });
182
- }
183
- throw new Error(error);
162
+ try {
163
+ (0, import_foo.foo)();
164
+ const result = await _analyzeWidget(context, id, options);
165
+ return result;
166
+ } catch (error) {
167
+ console.error("Error occurred while calling analyzeWidget:", error);
168
+ if (error.message && error.statusCode) {
169
+ throw new import_core_rest_pipeline.RestError(error.message, { code: error.statusCode });
184
170
  }
171
+ throw new Error(error);
172
+ }
185
173
  }
186
- /** Analyze a widget. The only guarantee is that this method will return a string containing the results of the analysis. */
187
174
  async function _analyzeWidget(context, id, options = { requestOptions: {} }) {
188
- const result = await _analyzeWidgetSend(context, id, options);
189
- return _analyzeWidgetDeserialize(result);
190
- }
191
- //# sourceMappingURL=operations.js.map
175
+ const result = await _analyzeWidgetSend(context, id, options);
176
+ return _analyzeWidgetDeserialize(result);
177
+ }
178
+ // Annotate the CommonJS export names for ESM import in node:
179
+ 0 && (module.exports = {
180
+ _analyzeWidgetDeserialize,
181
+ _analyzeWidgetSend,
182
+ _createWidgetDeserialize,
183
+ _createWidgetSend,
184
+ _deleteWidgetDeserialize,
185
+ _deleteWidgetSend,
186
+ _getWidgetDeserialize,
187
+ _getWidgetSend,
188
+ _listWidgetsDeserialize,
189
+ _listWidgetsSend,
190
+ _updateWidgetDeserialize,
191
+ _updateWidgetSend,
192
+ analyzeWidget,
193
+ createWidget,
194
+ deleteWidget,
195
+ getWidget,
196
+ listWidgets,
197
+ updateWidget
198
+ });
199
+ //# sourceMappingURL=operations.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/api/operations.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAiDlC,4CASC;AAED,0DAYC;AAOD,kCAMC;AAED,wCAUC;AAED,sDAYC;AAGD,8BAOC;AAED,8CAYC;AAED,4DAYC;AAQD,oCAQC;AAED,8CAWC;AAED,4DAYC;AAMD,oCAOC;AAED,8CAUC;AAED,4DAQC;AAGD,oCAOC;AAED,gDAUC;AAED,8DAUC;AAMD,sCAiBC;AAjRD,kEAAsD;AAiBtD,+CAAgD;AAChD,qCAA+B;AAoB/B,SAAgB,gBAAgB,CAC9B,OAAe,EACf,UAA8B,EAAE,cAAc,EAAE,EAAE,EAAE;;IAEpD,OAAO,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC;QAClC,uBAAuB,EAAE,MAAA,OAAO,CAAC,cAAc,0CAAE,uBAAuB;QACxE,eAAe,EAAE,MAAA,OAAO,CAAC,cAAc,0CAAE,eAAe;QACxD,OAAO,oBAAO,MAAA,OAAO,CAAC,cAAc,0CAAE,OAAO,CAAE;KAChD,CAAC,CAAC;AACL,CAAC;AAEM,KAAK,UAAU,uBAAuB,CAC3C,MAA2D;;IAE3D,IAAI,IAAA,uBAAY,EAAC,MAAM,CAAC,EAAE,CAAC;QACzB,MAAM,MAAM,CAAC,IAAI,CAAC;IACpB,CAAC;IAED,OAAO,CAAC,MAAA,MAAM,CAAC,IAAI,mCAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACrC,EAA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;AACI,KAAK,UAAU,aAAa,CACjC,OAAe,EACf,EAAU,EACV,OAA8B;IAE9B,IAAI,CAAC;QACH,IAAA,YAAG,GAAE,CAAC;QACN,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;QAC1D,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,6CAA6C,EAAE,KAAK,CAAC,CAAC;QACpE,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;YACtC,MAAM,IAAI,8BAAS,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;QACjE,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;AACH,CAAC;AAED,4HAA4H;AAC5H,KAAK,UAAU,cAAc,CAC3B,OAAe,EACf,EAAU,EACV,UAAgC,EAAE,cAAc,EAAE,EAAE,EAAE;IAEtD,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,OAAO,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nimport type { StreamableMethod } from \"@azure-rest/core-client\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport type { RequestOptions } from \"../common/interfaces.js\";\nimport type { WidgetServiceContext as Client } from \"../rest/clientDefinitions.js\";\nimport type {\n AnalyzeWidget200Response,\n AnalyzeWidgetDefaultResponse,\n CreateWidget201Response,\n CreateWidgetDefaultResponse,\n DeleteWidget204Response,\n DeleteWidgetDefaultResponse,\n GetWidget200Response,\n GetWidgetDefaultResponse,\n ListWidgets200Response,\n ListWidgetsDefaultResponse,\n UpdateWidget200Response,\n UpdateWidgetDefaultResponse,\n} from \"../rest/index.js\";\nimport { isUnexpected } from \"../rest/index.js\";\nimport { foo } from \"./foo.js\";\nimport type { AnalyzeResult, ColorType, Widget } from \"./models.js\";\n\nexport interface ListWidgetsOptions extends RequestOptions {}\n\nexport interface GetWidgetOptions extends RequestOptions {}\n\nexport interface CreateWidgetOptions extends RequestOptions {}\n\nexport interface UpdateWidgetOptions extends RequestOptions {\n /** The weight of the widget. This is an int32, but must be greater than zero. */\n weight?: number;\n /** The color of the widget. */\n color?: ColorType;\n}\n\nexport interface DeleteWidgetOptions extends RequestOptions {}\n\nexport interface AnalyzeWidgetOptions extends RequestOptions {}\n\nexport function _listWidgetsSend(\n context: Client,\n options: ListWidgetsOptions = { requestOptions: {} },\n): StreamableMethod<ListWidgets200Response | ListWidgetsDefaultResponse> {\n return context.path(\"/widgets\").get({\n allowInsecureConnection: options.requestOptions?.allowInsecureConnection,\n skipUrlEncoding: options.requestOptions?.skipUrlEncoding,\n headers: { ...options.requestOptions?.headers },\n });\n}\n\nexport async function _listWidgetsDeserialize(\n result: ListWidgets200Response | ListWidgetsDefaultResponse,\n): Promise<Widget[]> {\n if (isUnexpected(result)) {\n throw result.body;\n }\n\n return (result.body ?? []).map((p) => ({\n id: p[\"id\"],\n weight: p[\"weight\"],\n color: p[\"color\"],\n }));\n}\n\n/**\n * List all widgets in the system. This operation is not paginated, and returns a simple array of widgets.\n *\n * It does not accept any options or parameters.\n */\nexport async function listWidgets(\n context: Client,\n options: ListWidgetsOptions = { requestOptions: {} },\n): Promise<Widget[]> {\n const result = await _listWidgetsSend(context, options);\n return _listWidgetsDeserialize(result);\n}\n\nexport function _getWidgetSend(\n context: Client,\n id: string,\n options: GetWidgetOptions = { requestOptions: {} },\n): StreamableMethod<GetWidget200Response | GetWidgetDefaultResponse> {\n return context.path(\"/widgets/{id}\", id).get({\n allowInsecureConnection: options.requestOptions?.allowInsecureConnection,\n skipUrlEncoding: options.requestOptions?.skipUrlEncoding,\n headers: { ...options.requestOptions?.headers },\n });\n}\n\nexport async function _getWidgetDeserialize(\n result: GetWidget200Response | GetWidgetDefaultResponse,\n): Promise<Widget> {\n if (isUnexpected(result)) {\n throw result.body;\n }\n\n return {\n id: result.body[\"id\"],\n weight: result.body[\"weight\"],\n color: result.body[\"color\"],\n };\n}\n\n/** Get a widget by ID. */\nexport async function getWidget(\n context: Client,\n id: string,\n options: GetWidgetOptions = { requestOptions: {} },\n): Promise<Widget> {\n const result = await _getWidgetSend(context, id, options);\n return _getWidgetDeserialize(result);\n}\n\nexport function _createWidgetSend(\n context: Client,\n weight: number,\n color: ColorType,\n options: CreateWidgetOptions = { requestOptions: {} },\n): StreamableMethod<CreateWidget201Response | CreateWidgetDefaultResponse> {\n return context.path(\"/widgets\").post({\n allowInsecureConnection: options.requestOptions?.allowInsecureConnection,\n skipUrlEncoding: options.requestOptions?.skipUrlEncoding,\n headers: { ...options.requestOptions?.headers },\n body: { weight: weight, color: color },\n });\n}\n\nexport async function _createWidgetDeserialize(\n result: CreateWidget201Response | CreateWidgetDefaultResponse,\n): Promise<Widget> {\n if (isUnexpected(result)) {\n throw result.body;\n }\n\n return {\n id: result.body[\"id\"],\n weight: result.body[\"weight\"],\n color: result.body[\"color\"],\n };\n}\n\n/**\n * Create a new widget.\n *\n * The widget ID is not required during creation, as it is automatically set by the server. Providing an ID will\n * result in an error.\n */\nexport async function createWidget(\n context: Client,\n weight: number,\n color: ColorType,\n options: CreateWidgetOptions = { requestOptions: {} },\n): Promise<Widget> {\n const result = await _createWidgetSend(context, weight, color, options);\n return _createWidgetDeserialize(result);\n}\n\nexport function _updateWidgetSend(\n context: Client,\n id: string,\n options: UpdateWidgetOptions = { requestOptions: {} },\n): StreamableMethod<UpdateWidget200Response | UpdateWidgetDefaultResponse> {\n return context.path(\"/widgets/{id}\", id).patch({\n allowInsecureConnection: options.requestOptions?.allowInsecureConnection,\n skipUrlEncoding: options.requestOptions?.skipUrlEncoding,\n headers: { ...options.requestOptions?.headers },\n body: { weight: options?.weight, color: options?.color },\n });\n}\n\nexport async function _updateWidgetDeserialize(\n result: UpdateWidget200Response | UpdateWidgetDefaultResponse,\n): Promise<Widget> {\n if (isUnexpected(result)) {\n throw result.body;\n }\n\n return {\n id: result.body[\"id\"],\n weight: result.body[\"weight\"],\n color: result.body[\"color\"],\n };\n}\n\n/**\n * Update the contents of the widget. The widget ID is required in the input, but cannot be changed. All other fields\n * are optional and will be updated within the widget if provided.\n */\nexport async function updateWidget(\n context: Client,\n id: string,\n options: UpdateWidgetOptions = { requestOptions: {} },\n): Promise<Widget> {\n const result = await _updateWidgetSend(context, id, options);\n return _updateWidgetDeserialize(result);\n}\n\nexport function _deleteWidgetSend(\n context: Client,\n id: string,\n options: DeleteWidgetOptions = { requestOptions: {} },\n): StreamableMethod<DeleteWidget204Response | DeleteWidgetDefaultResponse> {\n return context.path(\"/widgets/{id}\", id).delete({\n allowInsecureConnection: options.requestOptions?.allowInsecureConnection,\n skipUrlEncoding: options.requestOptions?.skipUrlEncoding,\n headers: { ...options.requestOptions?.headers },\n });\n}\n\nexport async function _deleteWidgetDeserialize(\n result: DeleteWidget204Response | DeleteWidgetDefaultResponse,\n): Promise<void> {\n if (isUnexpected(result)) {\n throw result.body;\n }\n\n return;\n}\n\n/** Delete a widget by ID. */\nexport async function deleteWidget(\n context: Client,\n id: string,\n options: DeleteWidgetOptions = { requestOptions: {} },\n): Promise<void> {\n const result = await _deleteWidgetSend(context, id, options);\n return _deleteWidgetDeserialize(result);\n}\n\nexport function _analyzeWidgetSend(\n context: Client,\n id: string,\n options: AnalyzeWidgetOptions = { requestOptions: {} },\n): StreamableMethod<AnalyzeWidget200Response | AnalyzeWidgetDefaultResponse> {\n return context.path(\"/widgets/{id}/analyze\", id).post({\n allowInsecureConnection: options.requestOptions?.allowInsecureConnection,\n skipUrlEncoding: options.requestOptions?.skipUrlEncoding,\n headers: { ...options.requestOptions?.headers },\n });\n}\n\nexport async function _analyzeWidgetDeserialize(\n result: AnalyzeWidget200Response | AnalyzeWidgetDefaultResponse,\n): Promise<AnalyzeResult> {\n if (isUnexpected(result)) {\n throw result.body;\n }\n\n return {\n summary: result.body[\"summary\"],\n };\n}\n\n/**\n * In this customization we will perform the following tasks in addition to the generated:\n * - We are going to add special error handling for demonstration purposes\n */\nexport async function analyzeWidget(\n context: Client,\n id: string,\n options?: AnalyzeWidgetOptions,\n): Promise<AnalyzeResult> {\n try {\n foo();\n const result = await _analyzeWidget(context, id, options);\n return result;\n } catch (error: any) {\n console.error(\"Error occurred while calling analyzeWidget:\", error);\n if (error.message && error.statusCode) {\n throw new RestError(error.message, { code: error.statusCode });\n }\n\n throw new Error(error);\n }\n}\n\n/** Analyze a widget. The only guarantee is that this method will return a string containing the results of the analysis. */\nasync function _analyzeWidget(\n context: Client,\n id: string,\n options: AnalyzeWidgetOptions = { requestOptions: {} },\n): Promise<AnalyzeResult> {\n const result = await _analyzeWidgetSend(context, id, options);\n return _analyzeWidgetDeserialize(result);\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/api/operations.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nimport type { StreamableMethod } from \"@azure-rest/core-client\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport type { RequestOptions } from \"../common/interfaces.js\";\nimport type { WidgetServiceContext as Client } from \"../rest/clientDefinitions.js\";\nimport type {\n AnalyzeWidget200Response,\n AnalyzeWidgetDefaultResponse,\n CreateWidget201Response,\n CreateWidgetDefaultResponse,\n DeleteWidget204Response,\n DeleteWidgetDefaultResponse,\n GetWidget200Response,\n GetWidgetDefaultResponse,\n ListWidgets200Response,\n ListWidgetsDefaultResponse,\n UpdateWidget200Response,\n UpdateWidgetDefaultResponse,\n} from \"../rest/index.js\";\nimport { isUnexpected } from \"../rest/index.js\";\nimport { foo } from \"./foo.js\";\nimport type { AnalyzeResult, ColorType, Widget } from \"./models.js\";\n\nexport interface ListWidgetsOptions extends RequestOptions {}\n\nexport interface GetWidgetOptions extends RequestOptions {}\n\nexport interface CreateWidgetOptions extends RequestOptions {}\n\nexport interface UpdateWidgetOptions extends RequestOptions {\n /** The weight of the widget. This is an int32, but must be greater than zero. */\n weight?: number;\n /** The color of the widget. */\n color?: ColorType;\n}\n\nexport interface DeleteWidgetOptions extends RequestOptions {}\n\nexport interface AnalyzeWidgetOptions extends RequestOptions {}\n\nexport function _listWidgetsSend(\n context: Client,\n options: ListWidgetsOptions = { requestOptions: {} },\n): StreamableMethod<ListWidgets200Response | ListWidgetsDefaultResponse> {\n return context.path(\"/widgets\").get({\n allowInsecureConnection: options.requestOptions?.allowInsecureConnection,\n skipUrlEncoding: options.requestOptions?.skipUrlEncoding,\n headers: { ...options.requestOptions?.headers },\n });\n}\n\nexport async function _listWidgetsDeserialize(\n result: ListWidgets200Response | ListWidgetsDefaultResponse,\n): Promise<Widget[]> {\n if (isUnexpected(result)) {\n throw result.body;\n }\n\n return (result.body ?? []).map((p) => ({\n id: p[\"id\"],\n weight: p[\"weight\"],\n color: p[\"color\"],\n }));\n}\n\n/**\n * List all widgets in the system. This operation is not paginated, and returns a simple array of widgets.\n *\n * It does not accept any options or parameters.\n */\nexport async function listWidgets(\n context: Client,\n options: ListWidgetsOptions = { requestOptions: {} },\n): Promise<Widget[]> {\n const result = await _listWidgetsSend(context, options);\n return _listWidgetsDeserialize(result);\n}\n\nexport function _getWidgetSend(\n context: Client,\n id: string,\n options: GetWidgetOptions = { requestOptions: {} },\n): StreamableMethod<GetWidget200Response | GetWidgetDefaultResponse> {\n return context.path(\"/widgets/{id}\", id).get({\n allowInsecureConnection: options.requestOptions?.allowInsecureConnection,\n skipUrlEncoding: options.requestOptions?.skipUrlEncoding,\n headers: { ...options.requestOptions?.headers },\n });\n}\n\nexport async function _getWidgetDeserialize(\n result: GetWidget200Response | GetWidgetDefaultResponse,\n): Promise<Widget> {\n if (isUnexpected(result)) {\n throw result.body;\n }\n\n return {\n id: result.body[\"id\"],\n weight: result.body[\"weight\"],\n color: result.body[\"color\"],\n };\n}\n\n/** Get a widget by ID. */\nexport async function getWidget(\n context: Client,\n id: string,\n options: GetWidgetOptions = { requestOptions: {} },\n): Promise<Widget> {\n const result = await _getWidgetSend(context, id, options);\n return _getWidgetDeserialize(result);\n}\n\nexport function _createWidgetSend(\n context: Client,\n weight: number,\n color: ColorType,\n options: CreateWidgetOptions = { requestOptions: {} },\n): StreamableMethod<CreateWidget201Response | CreateWidgetDefaultResponse> {\n return context.path(\"/widgets\").post({\n allowInsecureConnection: options.requestOptions?.allowInsecureConnection,\n skipUrlEncoding: options.requestOptions?.skipUrlEncoding,\n headers: { ...options.requestOptions?.headers },\n body: { weight: weight, color: color },\n });\n}\n\nexport async function _createWidgetDeserialize(\n result: CreateWidget201Response | CreateWidgetDefaultResponse,\n): Promise<Widget> {\n if (isUnexpected(result)) {\n throw result.body;\n }\n\n return {\n id: result.body[\"id\"],\n weight: result.body[\"weight\"],\n color: result.body[\"color\"],\n };\n}\n\n/**\n * Create a new widget.\n *\n * The widget ID is not required during creation, as it is automatically set by the server. Providing an ID will\n * result in an error.\n */\nexport async function createWidget(\n context: Client,\n weight: number,\n color: ColorType,\n options: CreateWidgetOptions = { requestOptions: {} },\n): Promise<Widget> {\n const result = await _createWidgetSend(context, weight, color, options);\n return _createWidgetDeserialize(result);\n}\n\nexport function _updateWidgetSend(\n context: Client,\n id: string,\n options: UpdateWidgetOptions = { requestOptions: {} },\n): StreamableMethod<UpdateWidget200Response | UpdateWidgetDefaultResponse> {\n return context.path(\"/widgets/{id}\", id).patch({\n allowInsecureConnection: options.requestOptions?.allowInsecureConnection,\n skipUrlEncoding: options.requestOptions?.skipUrlEncoding,\n headers: { ...options.requestOptions?.headers },\n body: { weight: options?.weight, color: options?.color },\n });\n}\n\nexport async function _updateWidgetDeserialize(\n result: UpdateWidget200Response | UpdateWidgetDefaultResponse,\n): Promise<Widget> {\n if (isUnexpected(result)) {\n throw result.body;\n }\n\n return {\n id: result.body[\"id\"],\n weight: result.body[\"weight\"],\n color: result.body[\"color\"],\n };\n}\n\n/**\n * Update the contents of the widget. The widget ID is required in the input, but cannot be changed. All other fields\n * are optional and will be updated within the widget if provided.\n */\nexport async function updateWidget(\n context: Client,\n id: string,\n options: UpdateWidgetOptions = { requestOptions: {} },\n): Promise<Widget> {\n const result = await _updateWidgetSend(context, id, options);\n return _updateWidgetDeserialize(result);\n}\n\nexport function _deleteWidgetSend(\n context: Client,\n id: string,\n options: DeleteWidgetOptions = { requestOptions: {} },\n): StreamableMethod<DeleteWidget204Response | DeleteWidgetDefaultResponse> {\n return context.path(\"/widgets/{id}\", id).delete({\n allowInsecureConnection: options.requestOptions?.allowInsecureConnection,\n skipUrlEncoding: options.requestOptions?.skipUrlEncoding,\n headers: { ...options.requestOptions?.headers },\n });\n}\n\nexport async function _deleteWidgetDeserialize(\n result: DeleteWidget204Response | DeleteWidgetDefaultResponse,\n): Promise<void> {\n if (isUnexpected(result)) {\n throw result.body;\n }\n\n return;\n}\n\n/** Delete a widget by ID. */\nexport async function deleteWidget(\n context: Client,\n id: string,\n options: DeleteWidgetOptions = { requestOptions: {} },\n): Promise<void> {\n const result = await _deleteWidgetSend(context, id, options);\n return _deleteWidgetDeserialize(result);\n}\n\nexport function _analyzeWidgetSend(\n context: Client,\n id: string,\n options: AnalyzeWidgetOptions = { requestOptions: {} },\n): StreamableMethod<AnalyzeWidget200Response | AnalyzeWidgetDefaultResponse> {\n return context.path(\"/widgets/{id}/analyze\", id).post({\n allowInsecureConnection: options.requestOptions?.allowInsecureConnection,\n skipUrlEncoding: options.requestOptions?.skipUrlEncoding,\n headers: { ...options.requestOptions?.headers },\n });\n}\n\nexport async function _analyzeWidgetDeserialize(\n result: AnalyzeWidget200Response | AnalyzeWidgetDefaultResponse,\n): Promise<AnalyzeResult> {\n if (isUnexpected(result)) {\n throw result.body;\n }\n\n return {\n summary: result.body[\"summary\"],\n };\n}\n\n/**\n * In this customization we will perform the following tasks in addition to the generated:\n * - We are going to add special error handling for demonstration purposes\n */\nexport async function analyzeWidget(\n context: Client,\n id: string,\n options?: AnalyzeWidgetOptions,\n): Promise<AnalyzeResult> {\n try {\n foo();\n const result = await _analyzeWidget(context, id, options);\n return result;\n } catch (error: any) {\n console.error(\"Error occurred while calling analyzeWidget:\", error);\n if (error.message && error.statusCode) {\n throw new RestError(error.message, { code: error.statusCode });\n }\n\n throw new Error(error);\n }\n}\n\n/** Analyze a widget. The only guarantee is that this method will return a string containing the results of the analysis. */\nasync function _analyzeWidget(\n context: Client,\n id: string,\n options: AnalyzeWidgetOptions = { requestOptions: {} },\n): Promise<AnalyzeResult> {\n const result = await _analyzeWidgetSend(context, id, options);\n return _analyzeWidgetDeserialize(result);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA,gCAA0B;AAiB1B,kBAA6B;AAC7B,iBAAoB;AAoBb,SAAS,iBACd,SACA,UAA8B,EAAE,gBAAgB,CAAC,EAAE,GACoB;AACvE,SAAO,QAAQ,KAAK,UAAU,EAAE,IAAI;AAAA,IAClC,yBAAyB,QAAQ,gBAAgB;AAAA,IACjD,iBAAiB,QAAQ,gBAAgB;AAAA,IACzC,SAAS,EAAE,GAAG,QAAQ,gBAAgB,QAAQ;AAAA,EAChD,CAAC;AACH;AAEA,eAAsB,wBACpB,QACmB;AACnB,UAAI,0BAAa,MAAM,GAAG;AACxB,UAAM,OAAO;AAAA,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AE,GAC7B;AACxB,QAAM,SAAS,MAAM,mBAAmB,SAAS,IAAI,OAAO;AAC5D,SAAO,0BAA0B,MAAM;AACzC;",
6
+ "names": []
7
+ }
@@ -1,5 +1,16 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- //# sourceMappingURL=interfaces.js.map
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 interfaces_exports = {};
15
+ module.exports = __toCommonJS(interfaces_exports);
16
+ //# sourceMappingURL=interfaces.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/common/interfaces.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nimport type { RawHttpHeadersInput } from \"@azure/core-rest-pipeline\";\n\nexport interface RequestOptions {\n requestOptions?: {\n /**\n * Headers to send along with the request\n */\n headers?: RawHttpHeadersInput;\n /** Set to true if the request is sent over HTTP instead of HTTPS */\n allowInsecureConnection?: boolean;\n /** Set to true if you want to skip encoding the path parameters */\n skipUrlEncoding?: boolean;\n };\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/common/interfaces.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nimport type { RawHttpHeadersInput } from \"@azure/core-rest-pipeline\";\n\nexport interface RequestOptions {\n requestOptions?: {\n /**\n * Headers to send along with the request\n */\n headers?: RawHttpHeadersInput;\n /** Set to true if the request is sent over HTTP instead of HTTPS */\n allowInsecureConnection?: boolean;\n /** Set to true if you want to skip encoding the path parameters */\n skipUrlEncoding?: boolean;\n };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -5,8 +5,8 @@
5
5
  *
6
6
  * If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
7
7
  */
8
- export { Widget, ColorType, AnalyzeResult } from "./api/models.js";
9
- export { ListWidgetsOptions, GetWidgetOptions, CreateWidgetOptions, UpdateWidgetOptions, DeleteWidgetOptions, AnalyzeWidgetOptions, } from "./api/operations.js";
10
- export { WidgetServiceClient, WidgetServiceClientOptions } from "./WidgetServiceClient.js";
11
- export { RequestOptions } from "./common/interfaces.js";
8
+ export type { Widget, ColorType, AnalyzeResult } from "./api/models.js";
9
+ export type { ListWidgetsOptions, GetWidgetOptions, CreateWidgetOptions, UpdateWidgetOptions, DeleteWidgetOptions, AnalyzeWidgetOptions, } from "./api/operations.js";
10
+ export { WidgetServiceClient, type WidgetServiceClientOptions } from "./WidgetServiceClient.js";
11
+ export type { RequestOptions } from "./common/interfaces.js";
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAC3F,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACxE,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,KAAK,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAChG,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1,8 +1,28 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.WidgetServiceClient = void 0;
6
- var WidgetServiceClient_js_1 = require("./WidgetServiceClient.js");
7
- Object.defineProperty(exports, "WidgetServiceClient", { enumerable: true, get: function () { return WidgetServiceClient_js_1.WidgetServiceClient; } });
8
- //# sourceMappingURL=index.js.map
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 src_exports = {};
19
+ __export(src_exports, {
20
+ WidgetServiceClient: () => import_WidgetServiceClient.WidgetServiceClient
21
+ });
22
+ module.exports = __toCommonJS(src_exports);
23
+ var import_WidgetServiceClient = require("./WidgetServiceClient.js");
24
+ // Annotate the CommonJS export names for ESM import in node:
25
+ 0 && (module.exports = {
26
+ WidgetServiceClient
27
+ });
28
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAmBlC,mEAA2F;AAAlF,6HAAA,mBAAmB,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nexport { Widget, ColorType, AnalyzeResult } from \"./api/models.js\";\nexport {\n ListWidgetsOptions,\n GetWidgetOptions,\n CreateWidgetOptions,\n UpdateWidgetOptions,\n DeleteWidgetOptions,\n AnalyzeWidgetOptions,\n} from \"./api/operations.js\";\nexport { WidgetServiceClient, WidgetServiceClientOptions } from \"./WidgetServiceClient.js\";\nexport { RequestOptions } from \"./common/interfaces.js\";\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nexport type { Widget, ColorType, AnalyzeResult } from \"./api/models.js\";\nexport type {\n ListWidgetsOptions,\n GetWidgetOptions,\n CreateWidgetOptions,\n UpdateWidgetOptions,\n DeleteWidgetOptions,\n AnalyzeWidgetOptions,\n} from \"./api/operations.js\";\nexport { WidgetServiceClient, type WidgetServiceClientOptions } from \"./WidgetServiceClient.js\";\nexport type { RequestOptions } from \"./common/interfaces.js\";\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBA,iCAAqE;",
6
+ "names": []
7
+ }
@@ -1,15 +1,29 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.logger = void 0;
6
- /**
7
- * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
8
- *
9
- * Any changes you make here may be lost.
10
- *
11
- * If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
12
- */
13
- const logger_1 = require("@azure/logger");
14
- exports.logger = (0, logger_1.createClientLogger)("widget");
15
- //# sourceMappingURL=logger.js.map
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 logger_exports = {};
19
+ __export(logger_exports, {
20
+ logger: () => logger
21
+ });
22
+ module.exports = __toCommonJS(logger_exports);
23
+ var import_logger = require("@azure/logger");
24
+ const logger = (0, import_logger.createClientLogger)("widget");
25
+ // Annotate the CommonJS export names for ESM import in node:
26
+ 0 && (module.exports = {
27
+ logger
28
+ });
29
+ //# sourceMappingURL=logger.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC;;;;;;GAMG;AAEH,0CAAmD;AACtC,QAAA,MAAM,GAAG,IAAA,2BAAkB,EAAC,QAAQ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"widget\");\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/logger.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"widget\");\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,oBAAmC;AAC5B,MAAM,aAAS,kCAAmB,QAAQ;",
6
+ "names": []
7
+ }
@@ -1,5 +1,16 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- //# sourceMappingURL=clientDefinitions.js.map
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 clientDefinitions_exports = {};
15
+ module.exports = __toCommonJS(clientDefinitions_exports);
16
+ //# sourceMappingURL=clientDefinitions.js.map