@azure/template-dpg 1.0.0-alpha.20260302.6 → 1.0.0-alpha.20260304.11

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 (69) hide show
  1. package/dist/commonjs/WidgetServiceClient.js +72 -54
  2. package/dist/commonjs/WidgetServiceClient.js.map +7 -1
  3. package/dist/commonjs/api/WidgetServiceContext.js +44 -16
  4. package/dist/commonjs/api/WidgetServiceContext.js.map +7 -1
  5. package/dist/commonjs/api/foo.js +27 -14
  6. package/dist/commonjs/api/foo.js.map +7 -1
  7. package/dist/commonjs/api/index.js +40 -15
  8. package/dist/commonjs/api/index.js.map +7 -1
  9. package/dist/commonjs/api/models.js +15 -5
  10. package/dist/commonjs/api/models.js.map +7 -1
  11. package/dist/commonjs/api/operations.js +164 -150
  12. package/dist/commonjs/api/operations.js.map +7 -1
  13. package/dist/commonjs/common/interfaces.js +15 -5
  14. package/dist/commonjs/common/interfaces.js.map +7 -1
  15. package/dist/commonjs/index.js +27 -8
  16. package/dist/commonjs/index.js.map +7 -1
  17. package/dist/commonjs/logger.js +28 -15
  18. package/dist/commonjs/logger.js.map +7 -1
  19. package/dist/commonjs/rest/clientDefinitions.js +15 -5
  20. package/dist/commonjs/rest/clientDefinitions.js.map +7 -1
  21. package/dist/commonjs/rest/index.js +42 -17
  22. package/dist/commonjs/rest/index.js.map +7 -1
  23. package/dist/commonjs/rest/isUnexpected.js +72 -67
  24. package/dist/commonjs/rest/isUnexpected.js.map +7 -1
  25. package/dist/commonjs/rest/models.js +15 -5
  26. package/dist/commonjs/rest/models.js.map +7 -1
  27. package/dist/commonjs/rest/outputModels.js +15 -5
  28. package/dist/commonjs/rest/outputModels.js.map +7 -1
  29. package/dist/commonjs/rest/parameters.js +15 -5
  30. package/dist/commonjs/rest/parameters.js.map +7 -1
  31. package/dist/commonjs/rest/responses.js +15 -5
  32. package/dist/commonjs/rest/responses.js.map +7 -1
  33. package/dist/commonjs/rest/widgetServiceClient.js +49 -41
  34. package/dist/commonjs/rest/widgetServiceClient.js.map +7 -1
  35. package/dist/esm/WidgetServiceClient.js +55 -49
  36. package/dist/esm/WidgetServiceClient.js.map +7 -1
  37. package/dist/esm/api/WidgetServiceContext.js +10 -11
  38. package/dist/esm/api/WidgetServiceContext.js.map +7 -1
  39. package/dist/esm/api/foo.js +5 -12
  40. package/dist/esm/api/foo.js.map +7 -1
  41. package/dist/esm/api/index.js +20 -5
  42. package/dist/esm/api/index.js.map +7 -1
  43. package/dist/esm/api/models.js +0 -4
  44. package/dist/esm/api/models.js.map +7 -1
  45. package/dist/esm/api/operations.js +152 -158
  46. package/dist/esm/api/operations.js.map +7 -1
  47. package/dist/esm/common/interfaces.js +0 -4
  48. package/dist/esm/common/interfaces.js.map +7 -1
  49. package/dist/esm/index.js +4 -4
  50. package/dist/esm/index.js.map +7 -1
  51. package/dist/esm/logger.js +4 -11
  52. package/dist/esm/logger.js.map +7 -1
  53. package/dist/esm/rest/clientDefinitions.js +0 -4
  54. package/dist/esm/rest/clientDefinitions.js.map +7 -1
  55. package/dist/esm/rest/index.js +4 -11
  56. package/dist/esm/rest/index.js.map +7 -1
  57. package/dist/esm/rest/isUnexpected.js +50 -65
  58. package/dist/esm/rest/isUnexpected.js.map +7 -1
  59. package/dist/esm/rest/models.js +0 -4
  60. package/dist/esm/rest/models.js.map +7 -1
  61. package/dist/esm/rest/outputModels.js +0 -4
  62. package/dist/esm/rest/outputModels.js.map +7 -1
  63. package/dist/esm/rest/parameters.js +0 -4
  64. package/dist/esm/rest/parameters.js.map +7 -1
  65. package/dist/esm/rest/responses.js +0 -4
  66. package/dist/esm/rest/responses.js.map +7 -1
  67. package/dist/esm/rest/widgetServiceClient.js +28 -36
  68. package/dist/esm/rest/widgetServiceClient.js.map +7 -1
  69. package/package.json +2 -21
@@ -1,57 +1,75 @@
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
- const core_auth_1 = require("@azure/core-auth");
7
- const WidgetServiceContext_js_1 = require("./api/WidgetServiceContext.js");
8
- const index_js_1 = require("./api/index.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 WidgetServiceClient_exports = {};
19
+ __export(WidgetServiceClient_exports, {
20
+ WidgetServiceClient: () => WidgetServiceClient
21
+ });
22
+ module.exports = __toCommonJS(WidgetServiceClient_exports);
23
+ var import_core_auth = require("@azure/core-auth");
24
+ var import_WidgetServiceContext = require("./api/WidgetServiceContext.js");
25
+ var import_api = require("./api/index.js");
9
26
  class WidgetServiceClient {
10
- _client;
11
- constructor(endpoint, credentialOrOptions, options = {}) {
12
- if ((0, core_auth_1.isTokenCredential)(credentialOrOptions)) {
13
- this._client = (0, WidgetServiceContext_js_1.createWidgetService)(endpoint, credentialOrOptions, options);
14
- }
15
- else {
16
- this._client = (0, WidgetServiceContext_js_1.createWidgetService)(endpoint, credentialOrOptions);
17
- }
18
- }
19
- /**
20
- * List all widgets in the system. This operation is not paginated, and returns a simple array of widgets.
21
- *
22
- * It does not accept any options or parameters.
23
- */
24
- listWidgets(options = { requestOptions: {} }) {
25
- return (0, index_js_1.listWidgets)(this._client, options);
26
- }
27
- /** Get a widget by ID. */
28
- getWidget(id, options = { requestOptions: {} }) {
29
- return (0, index_js_1.getWidget)(this._client, id, options);
30
- }
31
- /**
32
- * Create a new widget.
33
- *
34
- * The widget ID is not required during creation, as it is automatically set by the server. Providing an ID will
35
- * result in an error.
36
- */
37
- createWidget(weight, color, options = { requestOptions: {} }) {
38
- return (0, index_js_1.createWidget)(this._client, weight, color, options);
39
- }
40
- /**
41
- * Update the contents of the widget. The widget ID is required in the input, but cannot be changed. All other fields
42
- * are optional and will be updated within the widget if provided.
43
- */
44
- updateWidget(id, options = { requestOptions: {} }) {
45
- return (0, index_js_1.updateWidget)(this._client, id, options);
46
- }
47
- /** Delete a widget by ID. */
48
- deleteWidget(id, options = { requestOptions: {} }) {
49
- return (0, index_js_1.deleteWidget)(this._client, id, options);
50
- }
51
- /** Analyze a widget. The only guarantee is that this method will return a string containing the results of the analysis. */
52
- analyzeWidget(id, options = { requestOptions: {} }) {
53
- return (0, index_js_1.analyzeWidget)(this._client, id, options);
27
+ _client;
28
+ constructor(endpoint, credentialOrOptions, options = {}) {
29
+ if ((0, import_core_auth.isTokenCredential)(credentialOrOptions)) {
30
+ this._client = (0, import_WidgetServiceContext.createWidgetService)(endpoint, credentialOrOptions, options);
31
+ } else {
32
+ this._client = (0, import_WidgetServiceContext.createWidgetService)(endpoint, credentialOrOptions);
54
33
  }
34
+ }
35
+ /**
36
+ * List all widgets in the system. This operation is not paginated, and returns a simple array of widgets.
37
+ *
38
+ * It does not accept any options or parameters.
39
+ */
40
+ listWidgets(options = { requestOptions: {} }) {
41
+ return (0, import_api.listWidgets)(this._client, options);
42
+ }
43
+ /** Get a widget by ID. */
44
+ getWidget(id, options = { requestOptions: {} }) {
45
+ return (0, import_api.getWidget)(this._client, id, options);
46
+ }
47
+ /**
48
+ * Create a new widget.
49
+ *
50
+ * The widget ID is not required during creation, as it is automatically set by the server. Providing an ID will
51
+ * result in an error.
52
+ */
53
+ createWidget(weight, color, options = { requestOptions: {} }) {
54
+ return (0, import_api.createWidget)(this._client, weight, color, options);
55
+ }
56
+ /**
57
+ * Update the contents of the widget. The widget ID is required in the input, but cannot be changed. All other fields
58
+ * are optional and will be updated within the widget if provided.
59
+ */
60
+ updateWidget(id, options = { requestOptions: {} }) {
61
+ return (0, import_api.updateWidget)(this._client, id, options);
62
+ }
63
+ /** Delete a widget by ID. */
64
+ deleteWidget(id, options = { requestOptions: {} }) {
65
+ return (0, import_api.deleteWidget)(this._client, id, options);
66
+ }
67
+ /** Analyze a widget. The only guarantee is that this method will return a string containing the results of the analysis. */
68
+ analyzeWidget(id, options = { requestOptions: {} }) {
69
+ return (0, import_api.analyzeWidget)(this._client, id, options);
70
+ }
55
71
  }
56
- exports.WidgetServiceClient = WidgetServiceClient;
57
- //# sourceMappingURL=WidgetServiceClient.js.map
72
+ // Annotate the CommonJS export names for ESM import in node:
73
+ 0 && (module.exports = {
74
+ WidgetServiceClient
75
+ });
@@ -1 +1,7 @@
1
- {"version":3,"file":"WidgetServiceClient.js","sourceRoot":"","sources":["../../src/WidgetServiceClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAWlC,gDAAqD;AAErD,2EAAoE;AAYpE,6CAOwB;AAKxB,MAAa,mBAAmB;IACtB,OAAO,CAAuB;IAKtC,YACE,QAAgB,EAChB,mBAAkE,EAClE,UAAsC,EAAE;QAExC,IAAI,IAAA,6BAAiB,EAAC,mBAAmB,CAAC,EAAE,CAAC;YAC3C,IAAI,CAAC,OAAO,GAAG,IAAA,6CAAmB,EAAC,QAAQ,EAAE,mBAAmB,EAAE,OAAO,CAAC,CAAC;QAC7E,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,OAAO,GAAG,IAAA,6CAAmB,EAAC,QAAQ,EAAE,mBAAmB,CAAC,CAAC;QACpE,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,WAAW,CAAC,UAA8B,EAAE,cAAc,EAAE,EAAE,EAAE;QAC9D,OAAO,IAAA,sBAAW,EAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC;IAED,0BAA0B;IAC1B,SAAS,CAAC,EAAU,EAAE,UAA4B,EAAE,cAAc,EAAE,EAAE,EAAE;QACtE,OAAO,IAAA,oBAAS,EAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED;;;;;OAKG;IACH,YAAY,CACV,MAAc,EACd,KAAgB,EAChB,UAA+B,EAAE,cAAc,EAAE,EAAE,EAAE;QAErD,OAAO,IAAA,uBAAY,EAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED;;;OAGG;IACH,YAAY,CAAC,EAAU,EAAE,UAA+B,EAAE,cAAc,EAAE,EAAE,EAAE;QAC5E,OAAO,IAAA,uBAAY,EAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;IAED,6BAA6B;IAC7B,YAAY,CAAC,EAAU,EAAE,UAA+B,EAAE,cAAc,EAAE,EAAE,EAAE;QAC5E,OAAO,IAAA,uBAAY,EAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;IAED,4HAA4H;IAC5H,aAAa,CACX,EAAU,EACV,UAAgC,EAAE,cAAc,EAAE,EAAE,EAAE;QAEtD,OAAO,IAAA,wBAAa,EAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;CACF;AAlED,kDAkEC","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 { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type { WidgetServiceClientOptions } from \"./api/WidgetServiceContext.js\";\nimport { createWidgetService } from \"./api/WidgetServiceContext.js\";\nimport type {\n AnalyzeResult,\n AnalyzeWidgetOptions,\n ColorType,\n CreateWidgetOptions,\n DeleteWidgetOptions,\n GetWidgetOptions,\n ListWidgetsOptions,\n UpdateWidgetOptions,\n Widget,\n} from \"./api/index.js\";\nimport {\n analyzeWidget,\n createWidget,\n deleteWidget,\n getWidget,\n listWidgets,\n updateWidget,\n} from \"./api/index.js\";\nimport type { WidgetServiceContext } from \"./rest/clientDefinitions.js\";\n\nexport type { WidgetServiceClientOptions } from \"./api/WidgetServiceContext.js\";\n\nexport class WidgetServiceClient {\n private _client: WidgetServiceContext;\n\n /** */\n constructor(endpoint: string, options?: WidgetServiceClientOptions);\n constructor(endpoint: string, credential: TokenCredential, options?: WidgetServiceClientOptions);\n constructor(\n endpoint: string,\n credentialOrOptions?: TokenCredential | WidgetServiceClientOptions,\n options: WidgetServiceClientOptions = {},\n ) {\n if (isTokenCredential(credentialOrOptions)) {\n this._client = createWidgetService(endpoint, credentialOrOptions, options);\n } else {\n this._client = createWidgetService(endpoint, credentialOrOptions);\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 */\n listWidgets(options: ListWidgetsOptions = { requestOptions: {} }): Promise<Widget[]> {\n return listWidgets(this._client, options);\n }\n\n /** Get a widget by ID. */\n getWidget(id: string, options: GetWidgetOptions = { requestOptions: {} }): Promise<Widget> {\n return getWidget(this._client, id, options);\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 */\n createWidget(\n weight: number,\n color: ColorType,\n options: CreateWidgetOptions = { requestOptions: {} },\n ): Promise<Widget> {\n return createWidget(this._client, weight, color, options);\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 */\n updateWidget(id: string, options: UpdateWidgetOptions = { requestOptions: {} }): Promise<Widget> {\n return updateWidget(this._client, id, options);\n }\n\n /** Delete a widget by ID. */\n deleteWidget(id: string, options: DeleteWidgetOptions = { requestOptions: {} }): Promise<void> {\n return deleteWidget(this._client, id, options);\n }\n\n /** Analyze a widget. The only guarantee is that this method will return a string containing the results of the analysis. */\n analyzeWidget(\n id: string,\n options: AnalyzeWidgetOptions = { requestOptions: {} },\n ): Promise<AnalyzeResult> {\n return analyzeWidget(this._client, id, options);\n }\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/template/template-dpg/src/WidgetServiceClient.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 { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type { WidgetServiceClientOptions } from \"./api/WidgetServiceContext.js\";\nimport { createWidgetService } from \"./api/WidgetServiceContext.js\";\nimport type {\n AnalyzeResult,\n AnalyzeWidgetOptions,\n ColorType,\n CreateWidgetOptions,\n DeleteWidgetOptions,\n GetWidgetOptions,\n ListWidgetsOptions,\n UpdateWidgetOptions,\n Widget,\n} from \"./api/index.js\";\nimport {\n analyzeWidget,\n createWidget,\n deleteWidget,\n getWidget,\n listWidgets,\n updateWidget,\n} from \"./api/index.js\";\nimport type { WidgetServiceContext } from \"./rest/clientDefinitions.js\";\n\nexport type { WidgetServiceClientOptions } from \"./api/WidgetServiceContext.js\";\n\nexport class WidgetServiceClient {\n private _client: WidgetServiceContext;\n\n /** */\n constructor(endpoint: string, options?: WidgetServiceClientOptions);\n constructor(endpoint: string, credential: TokenCredential, options?: WidgetServiceClientOptions);\n constructor(\n endpoint: string,\n credentialOrOptions?: TokenCredential | WidgetServiceClientOptions,\n options: WidgetServiceClientOptions = {},\n ) {\n if (isTokenCredential(credentialOrOptions)) {\n this._client = createWidgetService(endpoint, credentialOrOptions, options);\n } else {\n this._client = createWidgetService(endpoint, credentialOrOptions);\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 */\n listWidgets(options: ListWidgetsOptions = { requestOptions: {} }): Promise<Widget[]> {\n return listWidgets(this._client, options);\n }\n\n /** Get a widget by ID. */\n getWidget(id: string, options: GetWidgetOptions = { requestOptions: {} }): Promise<Widget> {\n return getWidget(this._client, id, options);\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 */\n createWidget(\n weight: number,\n color: ColorType,\n options: CreateWidgetOptions = { requestOptions: {} },\n ): Promise<Widget> {\n return createWidget(this._client, weight, color, options);\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 */\n updateWidget(id: string, options: UpdateWidgetOptions = { requestOptions: {} }): Promise<Widget> {\n return updateWidget(this._client, id, options);\n }\n\n /** Delete a widget by ID. */\n deleteWidget(id: string, options: DeleteWidgetOptions = { requestOptions: {} }): Promise<void> {\n return deleteWidget(this._client, id, options);\n }\n\n /** Analyze a widget. The only guarantee is that this method will return a string containing the results of the analysis. */\n analyzeWidget(\n id: string,\n options: AnalyzeWidgetOptions = { requestOptions: {} },\n ): Promise<AnalyzeResult> {\n return analyzeWidget(this._client, id, options);\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA,uBAAkC;AAElC,kCAAoC;AAYpC,iBAOO;AAKA,MAAM,oBAAoB;AAAA,EACvB;AAAA,EAKR,YACE,UACA,qBACA,UAAsC,CAAC,GACvC;AACA,YAAI,oCAAkB,mBAAmB,GAAG;AAC1C,WAAK,cAAU,iDAAoB,UAAU,qBAAqB,OAAO;AAAA,IAC3E,OAAO;AACL,WAAK,cAAU,iDAAoB,UAAU,mBAAmB;AAAA,IAClE;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,YAAY,UAA8B,EAAE,gBAAgB,CAAC,EAAE,GAAsB;AACnF,eAAO,wBAAY,KAAK,SAAS,OAAO;AAAA,EAC1C;AAAA;AAAA,EAGA,UAAU,IAAY,UAA4B,EAAE,gBAAgB,CAAC,EAAE,GAAoB;AACzF,eAAO,sBAAU,KAAK,SAAS,IAAI,OAAO;AAAA,EAC5C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,aACE,QACA,OACA,UAA+B,EAAE,gBAAgB,CAAC,EAAE,GACnC;AACjB,eAAO,yBAAa,KAAK,SAAS,QAAQ,OAAO,OAAO;AAAA,EAC1D;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,aAAa,IAAY,UAA+B,EAAE,gBAAgB,CAAC,EAAE,GAAoB;AAC/F,eAAO,yBAAa,KAAK,SAAS,IAAI,OAAO;AAAA,EAC/C;AAAA;AAAA,EAGA,aAAa,IAAY,UAA+B,EAAE,gBAAgB,CAAC,EAAE,GAAkB;AAC7F,eAAO,yBAAa,KAAK,SAAS,IAAI,OAAO;AAAA,EAC/C;AAAA;AAAA,EAGA,cACE,IACA,UAAgC,EAAE,gBAAgB,CAAC,EAAE,GAC7B;AACxB,eAAO,0BAAc,KAAK,SAAS,IAAI,OAAO;AAAA,EAChD;AACF;",
6
+ "names": []
7
+ }
@@ -1,18 +1,46 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.createWidgetService = createWidgetService;
6
- const tslib_1 = require("tslib");
7
- const core_auth_1 = require("@azure/core-auth");
8
- const widgetServiceClient_js_1 = tslib_1.__importDefault(require("../rest/widgetServiceClient.js"));
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var WidgetServiceContext_exports = {};
29
+ __export(WidgetServiceContext_exports, {
30
+ createWidgetService: () => createWidgetService
31
+ });
32
+ module.exports = __toCommonJS(WidgetServiceContext_exports);
33
+ var import_core_auth = require("@azure/core-auth");
34
+ var import_widgetServiceClient = __toESM(require("../rest/widgetServiceClient.js"));
9
35
  function createWidgetService(endpoint, credentialOrOptions, options = {}) {
10
- const baseUrl = endpoint;
11
- if ((0, core_auth_1.isTokenCredential)(credentialOrOptions)) {
12
- return (0, widgetServiceClient_js_1.default)(baseUrl, credentialOrOptions, options);
13
- }
14
- else {
15
- return (0, widgetServiceClient_js_1.default)(baseUrl, credentialOrOptions);
16
- }
36
+ const baseUrl = endpoint;
37
+ if ((0, import_core_auth.isTokenCredential)(credentialOrOptions)) {
38
+ return (0, import_widgetServiceClient.default)(baseUrl, credentialOrOptions, options);
39
+ } else {
40
+ return (0, import_widgetServiceClient.default)(baseUrl, credentialOrOptions);
41
+ }
17
42
  }
18
- //# sourceMappingURL=WidgetServiceContext.js.map
43
+ // Annotate the CommonJS export names for ESM import in node:
44
+ 0 && (module.exports = {
45
+ createWidgetService
46
+ });
@@ -1 +1,7 @@
1
- {"version":3,"file":"WidgetServiceContext.js","sourceRoot":"","sources":["../../../src/api/WidgetServiceContext.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAgClC,kDAWC;;AA/BD,gDAAqD;AAErD,oGAAuD;AAkBvD,SAAgB,mBAAmB,CACjC,QAAgB,EAChB,mBAAqD,EACrD,UAAyB,EAAE;IAE3B,MAAM,OAAO,GAAG,QAAQ,CAAC;IACzB,IAAI,IAAA,6BAAiB,EAAC,mBAAmB,CAAC,EAAE,CAAC;QAC3C,OAAO,IAAA,gCAAS,EAAC,OAAO,EAAE,mBAAmB,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;SAAM,CAAC;QACN,OAAO,IAAA,gCAAS,EAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;IACjD,CAAC;AACH,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 { ClientOptions } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type { WidgetServiceContext } from \"../rest/index.js\";\nimport getClient from \"../rest/widgetServiceClient.js\";\n\nexport type { WidgetServiceContext } from \"../rest/index.js\";\n\nexport interface WidgetServiceClientOptions extends ClientOptions {}\n\n/**\n * This customization adds authentication to the client.\n */\nexport function createWidgetService(\n endpoint: string,\n options?: ClientOptions,\n): WidgetServiceContext;\nexport function createWidgetService(\n endpoint: string,\n credential: TokenCredential,\n options?: ClientOptions,\n): WidgetServiceContext;\nexport function createWidgetService(\n endpoint: string,\n credentialOrOptions?: TokenCredential | ClientOptions,\n options: ClientOptions = {},\n): WidgetServiceContext {\n const baseUrl = endpoint;\n if (isTokenCredential(credentialOrOptions)) {\n return getClient(baseUrl, credentialOrOptions, options);\n } else {\n return getClient(baseUrl, credentialOrOptions);\n }\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/template/template-dpg/src/api/WidgetServiceContext.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 { ClientOptions } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type { WidgetServiceContext } from \"../rest/index.js\";\nimport getClient from \"../rest/widgetServiceClient.js\";\n\nexport type { WidgetServiceContext } from \"../rest/index.js\";\n\nexport interface WidgetServiceClientOptions extends ClientOptions {}\n\n/**\n * This customization adds authentication to the client.\n */\nexport function createWidgetService(\n endpoint: string,\n options?: ClientOptions,\n): WidgetServiceContext;\nexport function createWidgetService(\n endpoint: string,\n credential: TokenCredential,\n options?: ClientOptions,\n): WidgetServiceContext;\nexport function createWidgetService(\n endpoint: string,\n credentialOrOptions?: TokenCredential | ClientOptions,\n options: ClientOptions = {},\n): WidgetServiceContext {\n const baseUrl = endpoint;\n if (isTokenCredential(credentialOrOptions)) {\n return getClient(baseUrl, credentialOrOptions, options);\n } else {\n return getClient(baseUrl, credentialOrOptions);\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaA,uBAAkC;AAElC,iCAAsB;AAkBf,SAAS,oBACd,UACA,qBACA,UAAyB,CAAC,GACJ;AACtB,QAAM,UAAU;AAChB,UAAI,oCAAkB,mBAAmB,GAAG;AAC1C,eAAO,2BAAAA,SAAU,SAAS,qBAAqB,OAAO;AAAA,EACxD,OAAO;AACL,eAAO,2BAAAA,SAAU,SAAS,mBAAmB;AAAA,EAC/C;AACF;",
6
+ "names": ["getClient"]
7
+ }
@@ -1,16 +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.foo = foo;
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
- */
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 foo_exports = {};
19
+ __export(foo_exports, {
20
+ foo: () => foo
21
+ });
22
+ module.exports = __toCommonJS(foo_exports);
13
23
  function foo() {
14
- console.log("foo");
24
+ console.log("foo");
15
25
  }
16
- //# sourceMappingURL=foo.js.map
26
+ // Annotate the CommonJS export names for ESM import in node:
27
+ 0 && (module.exports = {
28
+ foo
29
+ });
@@ -1 +1,7 @@
1
- {"version":3,"file":"foo.js","sourceRoot":"","sources":["../../../src/api/foo.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AASlC,kBAEC;AATD;;;;;;GAMG;AACH,SAAgB,GAAG;IACjB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACrB,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 */\nexport function foo(): void {\n console.log(\"foo\");\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/template/template-dpg/src/api/foo.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 */\nexport function foo(): void {\n console.log(\"foo\");\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUO,SAAS,MAAY;AAC1B,UAAQ,IAAI,KAAK;AACnB;",
6
+ "names": []
7
+ }
@@ -1,15 +1,40 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.createWidgetService = exports.analyzeWidget = exports.deleteWidget = exports.updateWidget = exports.createWidget = exports.getWidget = exports.listWidgets = void 0;
6
- var operations_js_1 = require("./operations.js");
7
- Object.defineProperty(exports, "listWidgets", { enumerable: true, get: function () { return operations_js_1.listWidgets; } });
8
- Object.defineProperty(exports, "getWidget", { enumerable: true, get: function () { return operations_js_1.getWidget; } });
9
- Object.defineProperty(exports, "createWidget", { enumerable: true, get: function () { return operations_js_1.createWidget; } });
10
- Object.defineProperty(exports, "updateWidget", { enumerable: true, get: function () { return operations_js_1.updateWidget; } });
11
- Object.defineProperty(exports, "deleteWidget", { enumerable: true, get: function () { return operations_js_1.deleteWidget; } });
12
- Object.defineProperty(exports, "analyzeWidget", { enumerable: true, get: function () { return operations_js_1.analyzeWidget; } });
13
- var WidgetServiceContext_js_1 = require("./WidgetServiceContext.js");
14
- Object.defineProperty(exports, "createWidgetService", { enumerable: true, get: function () { return WidgetServiceContext_js_1.createWidgetService; } });
15
- //# 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 api_exports = {};
19
+ __export(api_exports, {
20
+ analyzeWidget: () => import_operations.analyzeWidget,
21
+ createWidget: () => import_operations.createWidget,
22
+ createWidgetService: () => import_WidgetServiceContext.createWidgetService,
23
+ deleteWidget: () => import_operations.deleteWidget,
24
+ getWidget: () => import_operations.getWidget,
25
+ listWidgets: () => import_operations.listWidgets,
26
+ updateWidget: () => import_operations.updateWidget
27
+ });
28
+ module.exports = __toCommonJS(api_exports);
29
+ var import_operations = require("./operations.js");
30
+ var import_WidgetServiceContext = require("./WidgetServiceContext.js");
31
+ // Annotate the CommonJS export names for ESM import in node:
32
+ 0 && (module.exports = {
33
+ analyzeWidget,
34
+ createWidget,
35
+ createWidgetService,
36
+ deleteWidget,
37
+ getWidget,
38
+ listWidgets,
39
+ updateWidget
40
+ });
@@ -1 +1,7 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAWlC,iDAayB;AAZvB,4GAAA,WAAW,OAAA;AACX,0GAAA,SAAS,OAAA;AACT,6GAAA,YAAY,OAAA;AACZ,6GAAA,YAAY,OAAA;AACZ,6GAAA,YAAY,OAAA;AACZ,8GAAA,aAAa,OAAA;AAQf,qEAImC;AAHjC,8HAAA,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 type { Widget, ColorType, AnalyzeResult } from \"./models.js\";\nexport {\n listWidgets,\n getWidget,\n createWidget,\n updateWidget,\n deleteWidget,\n analyzeWidget,\n type ListWidgetsOptions,\n type GetWidgetOptions,\n type CreateWidgetOptions,\n type UpdateWidgetOptions,\n type DeleteWidgetOptions,\n type AnalyzeWidgetOptions,\n} from \"./operations.js\";\nexport {\n createWidgetService,\n type WidgetServiceContext,\n type WidgetServiceClientOptions,\n} from \"./WidgetServiceContext.js\";\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/template/template-dpg/src/api/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 \"./models.js\";\nexport {\n listWidgets,\n getWidget,\n createWidget,\n updateWidget,\n deleteWidget,\n analyzeWidget,\n type ListWidgetsOptions,\n type GetWidgetOptions,\n type CreateWidgetOptions,\n type UpdateWidgetOptions,\n type DeleteWidgetOptions,\n type AnalyzeWidgetOptions,\n} from \"./operations.js\";\nexport {\n createWidgetService,\n type WidgetServiceContext,\n type WidgetServiceClientOptions,\n} from \"./WidgetServiceContext.js\";\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA,wBAaO;AACP,kCAIO;",
6
+ "names": []
7
+ }
@@ -1,5 +1,15 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- //# sourceMappingURL=models.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 models_exports = {};
15
+ module.exports = __toCommonJS(models_exports);
@@ -1 +1,7 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/api/models.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\n/** */\nexport interface Widget {\n /** The UUID of this widget. This is generated automatically by the service. */\n id: string;\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\n/** Type of ColorType */\n/** */\nexport type ColorType = \"red\" | \"blue\";\n\n/** */\nexport interface AnalyzeResult {\n /** */\n summary: string;\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/template/template-dpg/src/api/models.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\n/** */\nexport interface Widget {\n /** The UUID of this widget. This is generated automatically by the service. */\n id: string;\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\n/** Type of ColorType */\n/** */\nexport type ColorType = \"red\" | \"blue\";\n\n/** */\nexport interface AnalyzeResult {\n /** */\n summary: string;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }