@azure-rest/developer-devcenter 1.0.1-alpha.20241218.1 → 1.0.1-alpha.20241219.2

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 (72) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/LICENSE +1 -1
  3. package/dist/browser/azureDeveloperDevCenter.d.ts +6 -1
  4. package/dist/browser/azureDeveloperDevCenter.d.ts.map +1 -1
  5. package/dist/browser/azureDeveloperDevCenter.js +19 -5
  6. package/dist/browser/azureDeveloperDevCenter.js.map +1 -1
  7. package/dist/browser/models.d.ts +12 -8
  8. package/dist/browser/models.d.ts.map +1 -1
  9. package/dist/browser/models.js.map +1 -1
  10. package/dist/browser/outputModels.d.ts +176 -59
  11. package/dist/browser/outputModels.d.ts.map +1 -1
  12. package/dist/browser/outputModels.js.map +1 -1
  13. package/dist/browser/paginateHelper.d.ts +27 -2
  14. package/dist/browser/paginateHelper.d.ts.map +1 -1
  15. package/dist/browser/paginateHelper.js +98 -1
  16. package/dist/browser/paginateHelper.js.map +1 -1
  17. package/dist/browser/parameters.d.ts +2 -2
  18. package/dist/browser/parameters.d.ts.map +1 -1
  19. package/dist/browser/parameters.js.map +1 -1
  20. package/dist/commonjs/azureDeveloperDevCenter.d.ts +6 -1
  21. package/dist/commonjs/azureDeveloperDevCenter.d.ts.map +1 -1
  22. package/dist/commonjs/azureDeveloperDevCenter.js +19 -5
  23. package/dist/commonjs/azureDeveloperDevCenter.js.map +1 -1
  24. package/dist/commonjs/models.d.ts +12 -8
  25. package/dist/commonjs/models.d.ts.map +1 -1
  26. package/dist/commonjs/models.js.map +1 -1
  27. package/dist/commonjs/outputModels.d.ts +176 -59
  28. package/dist/commonjs/outputModels.d.ts.map +1 -1
  29. package/dist/commonjs/outputModels.js.map +1 -1
  30. package/dist/commonjs/paginateHelper.d.ts +27 -2
  31. package/dist/commonjs/paginateHelper.d.ts.map +1 -1
  32. package/dist/commonjs/paginateHelper.js +99 -2
  33. package/dist/commonjs/paginateHelper.js.map +1 -1
  34. package/dist/commonjs/parameters.d.ts +2 -2
  35. package/dist/commonjs/parameters.d.ts.map +1 -1
  36. package/dist/commonjs/parameters.js.map +1 -1
  37. package/dist/esm/azureDeveloperDevCenter.d.ts +6 -1
  38. package/dist/esm/azureDeveloperDevCenter.d.ts.map +1 -1
  39. package/dist/esm/azureDeveloperDevCenter.js +19 -5
  40. package/dist/esm/azureDeveloperDevCenter.js.map +1 -1
  41. package/dist/esm/models.d.ts +12 -8
  42. package/dist/esm/models.d.ts.map +1 -1
  43. package/dist/esm/models.js.map +1 -1
  44. package/dist/esm/outputModels.d.ts +176 -59
  45. package/dist/esm/outputModels.d.ts.map +1 -1
  46. package/dist/esm/outputModels.js.map +1 -1
  47. package/dist/esm/paginateHelper.d.ts +27 -2
  48. package/dist/esm/paginateHelper.d.ts.map +1 -1
  49. package/dist/esm/paginateHelper.js +98 -1
  50. package/dist/esm/paginateHelper.js.map +1 -1
  51. package/dist/esm/parameters.d.ts +2 -2
  52. package/dist/esm/parameters.d.ts.map +1 -1
  53. package/dist/esm/parameters.js.map +1 -1
  54. package/dist/react-native/azureDeveloperDevCenter.d.ts +6 -1
  55. package/dist/react-native/azureDeveloperDevCenter.d.ts.map +1 -1
  56. package/dist/react-native/azureDeveloperDevCenter.js +19 -5
  57. package/dist/react-native/azureDeveloperDevCenter.js.map +1 -1
  58. package/dist/react-native/models.d.ts +12 -8
  59. package/dist/react-native/models.d.ts.map +1 -1
  60. package/dist/react-native/models.js.map +1 -1
  61. package/dist/react-native/outputModels.d.ts +176 -59
  62. package/dist/react-native/outputModels.d.ts.map +1 -1
  63. package/dist/react-native/outputModels.js.map +1 -1
  64. package/dist/react-native/paginateHelper.d.ts +27 -2
  65. package/dist/react-native/paginateHelper.d.ts.map +1 -1
  66. package/dist/react-native/paginateHelper.js +98 -1
  67. package/dist/react-native/paginateHelper.js.map +1 -1
  68. package/dist/react-native/parameters.d.ts +2 -2
  69. package/dist/react-native/parameters.d.ts.map +1 -1
  70. package/dist/react-native/parameters.js.map +1 -1
  71. package/package.json +34 -40
  72. package/review/developer-devcenter.api.md +82 -37
@@ -1,7 +1,104 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import { getPagedAsyncIterator } from "@azure/core-paging";
3
+ import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
4
4
  import { createRestError } from "@azure-rest/core-client";
5
+ /**
6
+ * returns an async iterator that iterates over results. It also has a `byPage`
7
+ * method that returns pages of items at once.
8
+ *
9
+ * @param pagedResult - an object that specifies how to get pages.
10
+ * @returns a paged async iterator that iterates over results.
11
+ */
12
+ function getPagedAsyncIterator(pagedResult) {
13
+ var _a;
14
+ const iter = getItemAsyncIterator(pagedResult);
15
+ return {
16
+ next() {
17
+ return iter.next();
18
+ },
19
+ [Symbol.asyncIterator]() {
20
+ return this;
21
+ },
22
+ byPage: (_a = pagedResult === null || pagedResult === void 0 ? void 0 : pagedResult.byPage) !== null && _a !== void 0 ? _a : ((settings) => {
23
+ const { continuationToken } = settings !== null && settings !== void 0 ? settings : {};
24
+ return getPageAsyncIterator(pagedResult, {
25
+ pageLink: continuationToken,
26
+ });
27
+ }),
28
+ };
29
+ }
30
+ function getItemAsyncIterator(pagedResult) {
31
+ return __asyncGenerator(this, arguments, function* getItemAsyncIterator_1() {
32
+ var _a, e_1, _b, _c, _d, e_2, _e, _f;
33
+ const pages = getPageAsyncIterator(pagedResult);
34
+ const firstVal = yield __await(pages.next());
35
+ // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is
36
+ if (!Array.isArray(firstVal.value)) {
37
+ // can extract elements from this page
38
+ const { toElements } = pagedResult;
39
+ if (toElements) {
40
+ yield __await(yield* __asyncDelegator(__asyncValues(toElements(firstVal.value))));
41
+ try {
42
+ for (var _g = true, pages_1 = __asyncValues(pages), pages_1_1; pages_1_1 = yield __await(pages_1.next()), _a = pages_1_1.done, !_a; _g = true) {
43
+ _c = pages_1_1.value;
44
+ _g = false;
45
+ const page = _c;
46
+ yield __await(yield* __asyncDelegator(__asyncValues(toElements(page))));
47
+ }
48
+ }
49
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
50
+ finally {
51
+ try {
52
+ if (!_g && !_a && (_b = pages_1.return)) yield __await(_b.call(pages_1));
53
+ }
54
+ finally { if (e_1) throw e_1.error; }
55
+ }
56
+ }
57
+ else {
58
+ yield yield __await(firstVal.value);
59
+ // `pages` is of type `AsyncIterableIterator<TPage>` but TPage = TElement in this case
60
+ yield __await(yield* __asyncDelegator(__asyncValues(pages)));
61
+ }
62
+ }
63
+ else {
64
+ yield __await(yield* __asyncDelegator(__asyncValues(firstVal.value)));
65
+ try {
66
+ for (var _h = true, pages_2 = __asyncValues(pages), pages_2_1; pages_2_1 = yield __await(pages_2.next()), _d = pages_2_1.done, !_d; _h = true) {
67
+ _f = pages_2_1.value;
68
+ _h = false;
69
+ const page = _f;
70
+ // pages is of type `AsyncIterableIterator<TPage>` so `page` is of type `TPage`. In this branch,
71
+ // it must be the case that `TPage = TElement[]`
72
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
73
+ }
74
+ }
75
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
76
+ finally {
77
+ try {
78
+ if (!_h && !_d && (_e = pages_2.return)) yield __await(_e.call(pages_2));
79
+ }
80
+ finally { if (e_2) throw e_2.error; }
81
+ }
82
+ }
83
+ });
84
+ }
85
+ function getPageAsyncIterator(pagedResult_1) {
86
+ return __asyncGenerator(this, arguments, function* getPageAsyncIterator_1(pagedResult, options = {}) {
87
+ const { pageLink } = options;
88
+ let response = yield __await(pagedResult.getPage(pageLink !== null && pageLink !== void 0 ? pageLink : pagedResult.firstPageLink));
89
+ if (!response) {
90
+ return yield __await(void 0);
91
+ }
92
+ yield yield __await(response.page);
93
+ while (response.nextPageLink) {
94
+ response = yield __await(pagedResult.getPage(response.nextPageLink));
95
+ if (!response) {
96
+ return yield __await(void 0);
97
+ }
98
+ yield yield __await(response.page);
99
+ }
100
+ });
101
+ }
5
102
  /**
6
103
  * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
7
104
  * @param client - Client to use for sending the next page requests
@@ -1 +1 @@
1
- {"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAyC1D;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CACtB,MAAc,EACd,eAA0B,EAC1B,UAAoC,EAAE;IAItC,IAAI,QAAQ,GAAG,IAAI,CAAC;IACpB,MAAM,QAAQ,GAAG,OAAO,CAAC;IACzB,MAAM,YAAY,GAAG,UAAU,CAAC;IAChC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAClC,MAAM,WAAW,GAA4B;QAC3C,aAAa,EAAE,EAAE;QACjB,OAAO,EACL,OAAO,aAAa,KAAK,UAAU;YACjC,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE;gBACzB,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC;gBACvF,QAAQ,GAAG,KAAK,CAAC;gBACjB,kBAAkB,CAAC,MAAM,CAAC,CAAC;gBAC3B,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;gBACxD,MAAM,MAAM,GAAG,WAAW,CAAW,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;gBAC5D,OAAO;oBACL,IAAI,EAAE,MAAM;oBACZ,YAAY,EAAE,QAAQ;iBACvB,CAAC;YACJ,CAAC;KAC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Corporation.\n// Licensed under the MIT License.\n\nimport type { PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { getPagedAsyncIterator } from \"@azure/core-paging\";\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } from \"@azure-rest/core-client\";\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (\n pageLink: string,\n maxPageSize?: number,\n) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends {\n body: { value?: infer TPage };\n}\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {},\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n const itemName = \"value\";\n const nextLinkName = \"nextLink\";\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\"200\", \"201\", \"202\", \"203\", \"204\", \"205\", \"206\", \"207\", \"208\", \"226\"];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"]}
1
+ {"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;;;;;GAMG;AACH,SAAS,qBAAqB,CAM5B,WAAqD;;IAErD,MAAM,IAAI,GAAG,oBAAoB,CAAwC,WAAW,CAAC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Ac,IAAa,EAAE,QAAgB;IAC/D,MAAM,KAAK,GAAI,IAAgC,CAAC,QAAQ,CAAQ,CAAC;IAEjE,qEAAqE;IACrE,qEAAqE;IACrE,iDAAiD;IACjD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,kFAAkF,QAAQ,EAAE,CAC7F,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB,CAAC,QAA+B;IACzD,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAClG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,MAAM,eAAe,CACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } from \"@azure-rest/core-client\";\n\n/**\n * returns an async iterator that iterates over results. It also has a `byPage`\n * method that returns pages of items at once.\n *\n * @param pagedResult - an object that specifies how to get pages.\n * @returns a paged async iterator that iterates over results.\n */\nfunction getPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings = PageSettings,\n TLink = string,\n>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const iter = getItemAsyncIterator<TElement, TPage, TLink, TPageSettings>(pagedResult);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage:\n pagedResult?.byPage ??\n (((settings?: PageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken as unknown as TLink | undefined,\n });\n }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator<TPage>),\n };\n}\n\nasync function* getItemAsyncIterator<TElement, TPage, TLink, TPageSettings>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n): AsyncIterableIterator<TElement> {\n const pages = getPageAsyncIterator(pagedResult);\n const firstVal = await pages.next();\n // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is\n if (!Array.isArray(firstVal.value)) {\n // can extract elements from this page\n const { toElements } = pagedResult;\n if (toElements) {\n yield* toElements(firstVal.value) as TElement[];\n for await (const page of pages) {\n yield* toElements(page) as TElement[];\n }\n } else {\n yield firstVal.value;\n // `pages` is of type `AsyncIterableIterator<TPage>` but TPage = TElement in this case\n yield* pages as unknown as AsyncIterableIterator<TElement>;\n }\n } else {\n yield* firstVal.value;\n for await (const page of pages) {\n // pages is of type `AsyncIterableIterator<TPage>` so `page` is of type `TPage`. In this branch,\n // it must be the case that `TPage = TElement[]`\n yield* page as unknown as TElement[];\n }\n }\n}\n\nasync function* getPageAsyncIterator<TPage, TLink, TPageSettings>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n options: {\n pageLink?: TLink;\n } = {},\n): AsyncIterableIterator<TPage> {\n const { pageLink } = options;\n let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);\n if (!response) {\n return;\n }\n yield response.page;\n while (response.nextPageLink) {\n response = await pagedResult.getPage(response.nextPageLink);\n if (!response) {\n return;\n }\n yield response.page;\n }\n}\n\n/**\n * An interface that tracks the settings for paged iteration\n */\nexport interface PageSettings {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n}\n\n/**\n * An interface that allows async iterable iteration both to completion and by page.\n */\nexport interface PagedAsyncIterableIterator<\n TElement,\n TPage = TElement[],\n TPageSettings = PageSettings,\n> {\n /**\n * The next method, part of the iteration protocol\n */\n next(): Promise<IteratorResult<TElement>>;\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;\n}\n\n/**\n * An interface that describes how to communicate with the service.\n */\ninterface PagedResult<TPage, TPageSettings = PageSettings, TLink = string> {\n /**\n * Link to the first page of results.\n */\n firstPageLink: TLink;\n /**\n * A method that returns a page of results.\n */\n getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>;\n /**\n * a function to implement the `byPage` method on the paged async iterator.\n */\n byPage?: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;\n\n /**\n * A function to extract elements from a page.\n */\n toElements?: (page: TPage) => unknown[];\n}\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (pageLink: string) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends {\n body: { value?: infer TPage };\n}\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {},\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n const itemName = \"value\";\n const nextLinkName = \"nextLink\";\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\"200\", \"201\", \"202\", \"203\", \"204\", \"205\", \"206\", \"207\", \"208\", \"226\"];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"]}
@@ -32,7 +32,7 @@ export type ListActionsParameters = RequestParameters;
32
32
  export type GetActionParameters = RequestParameters;
33
33
  export type SkipActionParameters = RequestParameters;
34
34
  export interface DelayActionQueryParamProperties {
35
- /** The time to delay the Dev Box action or actions until. */
35
+ /** The time to delay the Dev Box action or actions until, in RFC3339 format. */
36
36
  until: Date | string;
37
37
  }
38
38
  export interface DelayActionQueryParam {
@@ -40,7 +40,7 @@ export interface DelayActionQueryParam {
40
40
  }
41
41
  export type DelayActionParameters = DelayActionQueryParam & RequestParameters;
42
42
  export interface DelayActionsQueryParamProperties {
43
- /** The time to delay the Dev Box action or actions until. */
43
+ /** The time to delay the Dev Box action or actions until, in RFC3339 format. */
44
44
  until: Date | string;
45
45
  }
46
46
  export interface DelayActionsQueryParam {
@@ -1 +1 @@
1
- {"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AACvD,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AACrD,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAC9C,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AACpD,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAClD,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;AAC1D,MAAM,MAAM,+BAA+B,GAAG,iBAAiB,CAAC;AAChE,MAAM,MAAM,6BAA6B,GAAG,iBAAiB,CAAC;AAC9D,MAAM,MAAM,2BAA2B,GAAG,iBAAiB,CAAC;AAC5D,MAAM,MAAM,4BAA4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M,MAAM,gCAAgC,GAAG,iBAAiB,CAAC;AACjE,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;AAE/D,MAAM,WAAW,mCAAmC;IAClD,iCAAiC;IACjC,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,MAAM,oCAAoC,GAAG,mCAAmC,GACpF,iBAAiB,CAAC;AACpB,MAAM,MAAM,2BAA2B,GAAG,iBAAiB,CAAC;AAC5D,MAAM,MAAM,+BAA+B,GAAG,iBAAiB,CAAC;AAChE,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AACrD,MAAM,MAAM,6CAA6C,GAAG,iBAAiB,CAAC;AAC9E,MAAM,MAAM,6CAA6C,GAAG,iBAAiB,CAAC;AAC9E,MAAM,MAAM,kCAAkC,GAAG,iBAAiB,CAAC;AACnE,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RequestParameters } from \"@azure-rest/core-client\";\nimport type { DevBox, Environment } from \"./models.js\";\n\nexport type ListProjectsParameters = RequestParameters;\nexport type GetProjectParameters = RequestParameters;\nexport type GetParameters = RequestParameters;\nexport type ListPoolsParameters = RequestParameters;\nexport type GetPoolParameters = RequestParameters;\nexport type ListAllDevBoxesParameters = RequestParameters;\nexport type ListAllDevBoxesByUserParameters = RequestParameters;\nexport type ListSchedulesByPoolParameters = RequestParameters;\nexport type GetScheduleByPoolParameters = RequestParameters;\nexport type ListDevBoxesByUserParameters = RequestParameters;\nexport type GetDevBoxByUserParameters = RequestParameters;\n\nexport interface CreateDevBoxBodyParam {\n /** Represents the body request of a Dev Box creation. Dev Box Pool name is required. Optionally set the owner of the Dev Box as local administrator */\n body: DevBox;\n}\n\nexport type CreateDevBoxParameters = CreateDevBoxBodyParam & RequestParameters;\nexport type DeleteDevBoxParameters = RequestParameters;\nexport type StartDevBoxParameters = RequestParameters;\n\nexport interface StopDevBoxQueryParamProperties {\n /** Optional parameter to hibernate the dev box. */\n hibernate?: boolean;\n}\n\nexport interface StopDevBoxQueryParam {\n queryParameters?: StopDevBoxQueryParamProperties;\n}\n\nexport type StopDevBoxParameters = StopDevBoxQueryParam & RequestParameters;\nexport type RestartDevBoxParameters = RequestParameters;\nexport type GetRemoteConnectionParameters = RequestParameters;\nexport type ListActionsParameters = RequestParameters;\nexport type GetActionParameters = RequestParameters;\nexport type SkipActionParameters = RequestParameters;\n\nexport interface DelayActionQueryParamProperties {\n /** The time to delay the Dev Box action or actions until. */\n until: Date | string;\n}\n\nexport interface DelayActionQueryParam {\n queryParameters: DelayActionQueryParamProperties;\n}\n\nexport type DelayActionParameters = DelayActionQueryParam & RequestParameters;\n\nexport interface DelayActionsQueryParamProperties {\n /** The time to delay the Dev Box action or actions until. */\n until: Date | string;\n}\n\nexport interface DelayActionsQueryParam {\n queryParameters: DelayActionsQueryParamProperties;\n}\n\nexport type DelayActionsParameters = DelayActionsQueryParam & RequestParameters;\nexport type ListEnvironmentsParameters = RequestParameters;\nexport type ListEnvironmentsByUserParameters = RequestParameters;\nexport type GetEnvironmentByUserParameters = RequestParameters;\n\nexport interface CreateOrReplaceEnvironmentBodyParam {\n /** Represents an environment. */\n body: Environment;\n}\n\nexport type CreateOrReplaceEnvironmentParameters = CreateOrReplaceEnvironmentBodyParam &\n RequestParameters;\nexport type DeleteEnvironmentParameters = RequestParameters;\nexport type ListCatalogsByProjectParameters = RequestParameters;\nexport type GetCatalogParameters = RequestParameters;\nexport type ListEnvironmentDefinitionsByProjectParameters = RequestParameters;\nexport type ListEnvironmentDefinitionsByCatalogParameters = RequestParameters;\nexport type GetEnvironmentDefinitionParameters = RequestParameters;\nexport type ListEnvironmentTypesParameters = RequestParameters;\n"]}
1
+ {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RequestParameters } from \"@azure-rest/core-client\";\nimport type { DevBox, Environment } from \"./models.js\";\n\nexport type ListProjectsParameters = RequestParameters;\nexport type GetProjectParameters = RequestParameters;\nexport type GetParameters = RequestParameters;\nexport type ListPoolsParameters = RequestParameters;\nexport type GetPoolParameters = RequestParameters;\nexport type ListAllDevBoxesParameters = RequestParameters;\nexport type ListAllDevBoxesByUserParameters = RequestParameters;\nexport type ListSchedulesByPoolParameters = RequestParameters;\nexport type GetScheduleByPoolParameters = RequestParameters;\nexport type ListDevBoxesByUserParameters = RequestParameters;\nexport type GetDevBoxByUserParameters = RequestParameters;\n\nexport interface CreateDevBoxBodyParam {\n /** Represents the body request of a Dev Box creation. Dev Box Pool name is required. Optionally set the owner of the Dev Box as local administrator */\n body: DevBox;\n}\n\nexport type CreateDevBoxParameters = CreateDevBoxBodyParam & RequestParameters;\nexport type DeleteDevBoxParameters = RequestParameters;\nexport type StartDevBoxParameters = RequestParameters;\n\nexport interface StopDevBoxQueryParamProperties {\n /** Optional parameter to hibernate the dev box. */\n hibernate?: boolean;\n}\n\nexport interface StopDevBoxQueryParam {\n queryParameters?: StopDevBoxQueryParamProperties;\n}\n\nexport type StopDevBoxParameters = StopDevBoxQueryParam & RequestParameters;\nexport type RestartDevBoxParameters = RequestParameters;\nexport type GetRemoteConnectionParameters = RequestParameters;\nexport type ListActionsParameters = RequestParameters;\nexport type GetActionParameters = RequestParameters;\nexport type SkipActionParameters = RequestParameters;\n\nexport interface DelayActionQueryParamProperties {\n /** The time to delay the Dev Box action or actions until, in RFC3339 format. */\n until: Date | string;\n}\n\nexport interface DelayActionQueryParam {\n queryParameters: DelayActionQueryParamProperties;\n}\n\nexport type DelayActionParameters = DelayActionQueryParam & RequestParameters;\n\nexport interface DelayActionsQueryParamProperties {\n /** The time to delay the Dev Box action or actions until, in RFC3339 format. */\n until: Date | string;\n}\n\nexport interface DelayActionsQueryParam {\n queryParameters: DelayActionsQueryParamProperties;\n}\n\nexport type DelayActionsParameters = DelayActionsQueryParam & RequestParameters;\nexport type ListEnvironmentsParameters = RequestParameters;\nexport type ListEnvironmentsByUserParameters = RequestParameters;\nexport type GetEnvironmentByUserParameters = RequestParameters;\n\nexport interface CreateOrReplaceEnvironmentBodyParam {\n /** Represents an environment. */\n body: Environment;\n}\n\nexport type CreateOrReplaceEnvironmentParameters = CreateOrReplaceEnvironmentBodyParam &\n RequestParameters;\nexport type DeleteEnvironmentParameters = RequestParameters;\nexport type ListCatalogsByProjectParameters = RequestParameters;\nexport type GetCatalogParameters = RequestParameters;\nexport type ListEnvironmentDefinitionsByProjectParameters = RequestParameters;\nexport type ListEnvironmentDefinitionsByCatalogParameters = RequestParameters;\nexport type GetEnvironmentDefinitionParameters = RequestParameters;\nexport type ListEnvironmentTypesParameters = RequestParameters;\n"]}
@@ -1,11 +1,16 @@
1
1
  import type { ClientOptions } from "@azure-rest/core-client";
2
2
  import type { TokenCredential } from "@azure/core-auth";
3
3
  import type { AzureDeveloperDevCenterClient } from "./clientDefinitions.js";
4
+ /** The optional parameters for the client */
5
+ export interface AzureDeveloperDevCenterClientOptions extends ClientOptions {
6
+ /** The api version option of the client */
7
+ apiVersion?: string;
8
+ }
4
9
  /**
5
10
  * Initialize a new instance of `AzureDeveloperDevCenterClient`
6
11
  * @param endpointParam - The DevCenter-specific URI to operate on.
7
12
  * @param credentials - uniquely identify client credential
8
13
  * @param options - the parameter for all optional parameters
9
14
  */
10
- export default function createClient(endpointParam: string, credentials: TokenCredential, options?: ClientOptions): AzureDeveloperDevCenterClient;
15
+ export default function createClient(endpointParam: string, credentials: TokenCredential, { apiVersion, ...options }?: AzureDeveloperDevCenterClientOptions): AzureDeveloperDevCenterClient;
11
16
  //# sourceMappingURL=azureDeveloperDevCenter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"azureDeveloperDevCenter.d.ts","sourceRoot":"","sources":["../../src/azureDeveloperDevCenter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,eAAe,EAC5B,OAAO,GAAE,aAAkB,GAC1B,6BAA6B,CAwB/B"}
1
+ {"version":3,"file":"azureDeveloperDevCenter.d.ts","sourceRoot":"","sources":["../../src/azureDeveloperDevCenter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAE5E,6CAA6C;AAC7C,MAAM,WAAW,oCAAqC,SAAQ,aAAa;IACzE,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,eAAe,EAC5B,EAAE,UAAyB,EAAE,GAAG,OAAO,EAAE,GAAE,oCAAyC,GACnF,6BAA6B,CAuC/B"}
@@ -1,5 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
+ import { __rest } from "tslib";
3
4
  import { getClient } from "@azure-rest/core-client";
4
5
  import { logger } from "./logger.js";
5
6
  /**
@@ -8,11 +9,11 @@ import { logger } from "./logger.js";
8
9
  * @param credentials - uniquely identify client credential
9
10
  * @param options - the parameter for all optional parameters
10
11
  */
11
- export default function createClient(endpointParam, credentials, options = {}) {
12
- var _a, _b, _c, _d, _e, _f, _g;
13
- const endpointUrl = (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUrl) !== null && _b !== void 0 ? _b : `${endpointParam}`;
14
- options.apiVersion = (_c = options.apiVersion) !== null && _c !== void 0 ? _c : "2023-04-01";
15
- const userAgentInfo = `azsdk-js-developer-devcenter-rest/1.0.0`;
12
+ export default function createClient(endpointParam, credentials, _a = {}) {
13
+ var _b, _c, _d, _e, _f, _g;
14
+ var { apiVersion = "2023-04-01" } = _a, options = __rest(_a, ["apiVersion"]);
15
+ const endpointUrl = (_c = (_b = options.endpoint) !== null && _b !== void 0 ? _b : options.baseUrl) !== null && _c !== void 0 ? _c : `${endpointParam}`;
16
+ const userAgentInfo = `azsdk-js-developer-devcenter-rest/1.0.1`;
16
17
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
17
18
  ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
18
19
  : `${userAgentInfo}`;
@@ -24,6 +25,19 @@ export default function createClient(endpointParam, credentials, options = {}) {
24
25
  scopes: (_g = (_f = options.credentials) === null || _f === void 0 ? void 0 : _f.scopes) !== null && _g !== void 0 ? _g : ["https://devcenter.azure.com/.default"],
25
26
  } });
26
27
  const client = getClient(endpointUrl, credentials, options);
28
+ client.pipeline.removePolicy({ name: "ApiVersionPolicy" });
29
+ client.pipeline.addPolicy({
30
+ name: "ClientApiVersionPolicy",
31
+ sendRequest: (req, next) => {
32
+ // Use the apiVersion defined in request url directly
33
+ // Append one if there is no apiVersion and we have one at client options
34
+ const url = new URL(req.url);
35
+ if (!url.searchParams.get("api-version") && apiVersion) {
36
+ req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${apiVersion}`;
37
+ }
38
+ return next(req);
39
+ },
40
+ });
27
41
  return client;
28
42
  }
29
43
  //# sourceMappingURL=azureDeveloperDevCenter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"azureDeveloperDevCenter.js","sourceRoot":"","sources":["../../src/azureDeveloperDevCenter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,aAAqB,EACrB,WAA4B,EAC5B,UAAyB,EAAE;;IAE3B,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,GAAG,aAAa,EAAE,CAAC;IAC9E,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,YAAY,CAAC;IACxD,MAAM,aAAa,GAAG,yCAAyC,CAAC;IAChE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI;SACtD,EACD,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI,CAAC,sCAAsC,CAAC;SAChF,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAkC,CAAC;IAE7F,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { AzureDeveloperDevCenterClient } from \"./clientDefinitions.js\";\n\n/**\n * Initialize a new instance of `AzureDeveloperDevCenterClient`\n * @param endpointParam - The DevCenter-specific URI to operate on.\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpointParam: string,\n credentials: TokenCredential,\n options: ClientOptions = {},\n): AzureDeveloperDevCenterClient {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}`;\n options.apiVersion = options.apiVersion ?? \"2023-04-01\";\n const userAgentInfo = `azsdk-js-developer-devcenter-rest/1.0.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://devcenter.azure.com/.default\"],\n },\n };\n\n const client = getClient(endpointUrl, credentials, options) as AzureDeveloperDevCenterClient;\n\n return client;\n}\n"]}
1
+ {"version":3,"file":"azureDeveloperDevCenter.js","sourceRoot":"","sources":["../../src/azureDeveloperDevCenter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAUrC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,aAAqB,EACrB,WAA4B,EAC5B,KAAkF,EAAE;;QAApF,EAAE,UAAU,GAAG,YAAY,OAAyD,EAApD,OAAO,cAAvC,cAAyC,CAAF;IAEvC,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAA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GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { AzureDeveloperDevCenterClient } from \"./clientDefinitions.js\";\n\n/** The optional parameters for the client */\nexport interface AzureDeveloperDevCenterClientOptions extends ClientOptions {\n /** The api version option of the client */\n apiVersion?: string;\n}\n\n/**\n * Initialize a new instance of `AzureDeveloperDevCenterClient`\n * @param endpointParam - The DevCenter-specific URI to operate on.\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpointParam: string,\n credentials: TokenCredential,\n { apiVersion = \"2023-04-01\", ...options }: AzureDeveloperDevCenterClientOptions = {},\n): AzureDeveloperDevCenterClient {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}`;\n const userAgentInfo = `azsdk-js-developer-devcenter-rest/1.0.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://devcenter.azure.com/.default\"],\n },\n };\n const client = getClient(endpointUrl, credentials, options) as AzureDeveloperDevCenterClient;\n\n client.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n client.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\") && apiVersion) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n\n return client;\n}\n"]}
@@ -16,7 +16,11 @@ export interface ImageReference {
16
16
  export interface DevBox {
17
17
  /** The name of the Dev Box pool this machine belongs to. */
18
18
  poolName: string;
19
- /** Indicates whether the owner of the Dev Box is a local administrator. */
19
+ /**
20
+ * Indicates whether the owner of the Dev Box is a local administrator.
21
+ *
22
+ * Possible values: "Enabled", "Disabled"
23
+ */
20
24
  localAdministrator?: LocalAdminStatus;
21
25
  }
22
26
  /** Properties of an environment. */
@@ -31,17 +35,17 @@ export interface Environment {
31
35
  environmentDefinitionName: string;
32
36
  }
33
37
  /** Alias for OsType */
34
- export type OsType = "Windows" | string;
38
+ export type OsType = string;
35
39
  /** Alias for SkuName */
36
- export type SkuName = "general_i_8c32gb256ssd_v2" | "general_i_8c32gb512ssd_v2" | "general_i_8c32gb1024ssd_v2" | "general_i_8c32gb2048ssd_v2" | "general_i_16c64gb256ssd_v2" | "general_i_16c64gb512ssd_v2" | "general_i_16c64gb1024ssd_v2" | "general_i_16c64gb2048ssd_v2" | "general_i_32c128gb512ssd_v2" | "general_i_32c128gb1024ssd_v2" | "general_i_32c128gb2048ssd_v2" | "general_a_8c32gb256ssd_v2" | "general_a_8c32gb512ssd_v2" | "general_a_8c32gb1024ssd_v2" | "general_a_8c32gb2048ssd_v2" | "general_a_16c64gb256ssd_v2" | "general_a_16c64gb512ssd_v2" | "general_a_16c64gb1024ssd_v2" | "general_a_16c64gb2048ssd_v2" | "general_a_32c128gb512ssd_v2" | "general_a_32c128gb1024ssd_v2" | "general_a_32c128gb2048ssd_v2" | string;
40
+ export type SkuName = string;
37
41
  /** Alias for HibernateSupport */
38
- export type HibernateSupport = "Enabled" | "Disabled" | "OsUnsupported" | string;
42
+ export type HibernateSupport = string;
39
43
  /** Alias for LocalAdminStatus */
40
- export type LocalAdminStatus = "Enabled" | "Disabled" | string;
44
+ export type LocalAdminStatus = string;
41
45
  /** Alias for DevBoxProvisioningState */
42
- export type DevBoxProvisioningState = "Succeeded" | "Failed" | "Canceled" | "Creating" | "Deleting" | "Updating" | "Starting" | "Stopping" | "Provisioning" | "ProvisionedWithWarning" | "InGracePeriod" | "NotProvisioned" | string;
46
+ export type DevBoxProvisioningState = string;
43
47
  /** Alias for PowerState */
44
- export type PowerState = "Unknown" | "Running" | "Deallocated" | "PoweredOff" | "Hibernated" | string;
48
+ export type PowerState = string;
45
49
  /** Alias for EnvironmentProvisioningState */
46
- export type EnvironmentProvisioningState = "Succeeded" | "Failed" | "Canceled" | "Creating" | "Accepted" | "Deleting" | "Updating" | "Preparing" | "Running" | "Syncing" | "MovingResources" | "TransientFailure" | "StorageProvisioningFailed" | string;
50
+ export type EnvironmentProvisioningState = string;
47
51
  //# sourceMappingURL=models.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,+CAA+C;AAC/C,MAAM,WAAW,eAAe;CAAG;AAEnC,gDAAgD;AAChD,MAAM,WAAW,cAAc;IAC7B,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,8CAA8C;AAC9C,MAAM,WAAW,MAAM;CAAG;AAE1B,kDAAkD;AAClD,MAAM,WAAW,cAAc;CAAG;AAElC,iBAAiB;AACjB,MAAM,WAAW,MAAM;IACrB,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,gBAAgB,CAAC;CACvC;AAED,oCAAoC;AACpC,MAAM,WAAW,WAAW;IAC1B,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,wBAAwB;IACxB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,GACT,iBAAiB,GACjB,kBAAkB,GAClB,2BAA2B,GAC3B,MAAM,CAAC"}
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,+CAA+C;AAC/C,MAAM,WAAW,eAAe;CAAG;AAEnC,gDAAgD;AAChD,MAAM,WAAW,cAAc;IAC7B,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,8CAA8C;AAC9C,MAAM,WAAW,MAAM;CAAG;AAE1B,kDAAkD;AAClD,MAAM,WAAW,cAAc;CAAG;AAElC,iBAAiB;AACjB,MAAM,WAAW,MAAM;IACrB,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,gBAAgB,CAAC;CACvC;AAED,oCAAoC;AACpC,MAAM,WAAW,WAAW;IAC1B,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,wBAAwB;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,yBAAyB,EAAE,MAAM,CAAC;CACnC;AAED,uBAAuB;AACvB,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC;AAC5B,wBAAwB;AACxB,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAC7B,iCAAiC;AACjC,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AACtC,iCAAiC;AACjC,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AACtC,wCAAwC;AACxC,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAC7C,2BAA2B;AAC3B,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAChC,6CAA6C;AAC7C,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** Hardware specifications for the Dev Box. */\nexport interface HardwareProfile {}\n\n/** Storage settings for the Dev Box's disks. */\nexport interface StorageProfile {\n /** Settings for the operating system disk. */\n osDisk?: OsDisk;\n}\n\n/** Settings for the operating system disk. */\nexport interface OsDisk {}\n\n/** Specifies information about the image used. */\nexport interface ImageReference {}\n\n/** A Dev Box. */\nexport interface DevBox {\n /** The name of the Dev Box pool this machine belongs to. */\n poolName: string;\n /** Indicates whether the owner of the Dev Box is a local administrator. */\n localAdministrator?: LocalAdminStatus;\n}\n\n/** Properties of an environment. */\nexport interface Environment {\n /** Parameters object for the environment. */\n parameters?: Record<string, unknown>;\n /** Environment type. */\n environmentType: string;\n /** Name of the catalog. */\n catalogName: string;\n /** Name of the environment definition. */\n environmentDefinitionName: string;\n}\n\n/** Alias for OsType */\nexport type OsType = \"Windows\" | string;\n/** Alias for SkuName */\nexport type SkuName =\n | \"general_i_8c32gb256ssd_v2\"\n | \"general_i_8c32gb512ssd_v2\"\n | \"general_i_8c32gb1024ssd_v2\"\n | \"general_i_8c32gb2048ssd_v2\"\n | \"general_i_16c64gb256ssd_v2\"\n | \"general_i_16c64gb512ssd_v2\"\n | \"general_i_16c64gb1024ssd_v2\"\n | \"general_i_16c64gb2048ssd_v2\"\n | \"general_i_32c128gb512ssd_v2\"\n | \"general_i_32c128gb1024ssd_v2\"\n | \"general_i_32c128gb2048ssd_v2\"\n | \"general_a_8c32gb256ssd_v2\"\n | \"general_a_8c32gb512ssd_v2\"\n | \"general_a_8c32gb1024ssd_v2\"\n | \"general_a_8c32gb2048ssd_v2\"\n | \"general_a_16c64gb256ssd_v2\"\n | \"general_a_16c64gb512ssd_v2\"\n | \"general_a_16c64gb1024ssd_v2\"\n | \"general_a_16c64gb2048ssd_v2\"\n | \"general_a_32c128gb512ssd_v2\"\n | \"general_a_32c128gb1024ssd_v2\"\n | \"general_a_32c128gb2048ssd_v2\"\n | string;\n/** Alias for HibernateSupport */\nexport type HibernateSupport = \"Enabled\" | \"Disabled\" | \"OsUnsupported\" | string;\n/** Alias for LocalAdminStatus */\nexport type LocalAdminStatus = \"Enabled\" | \"Disabled\" | string;\n/** Alias for DevBoxProvisioningState */\nexport type DevBoxProvisioningState =\n | \"Succeeded\"\n | \"Failed\"\n | \"Canceled\"\n | \"Creating\"\n | \"Deleting\"\n | \"Updating\"\n | \"Starting\"\n | \"Stopping\"\n | \"Provisioning\"\n | \"ProvisionedWithWarning\"\n | \"InGracePeriod\"\n | \"NotProvisioned\"\n | string;\n/** Alias for PowerState */\nexport type PowerState =\n | \"Unknown\"\n | \"Running\"\n | \"Deallocated\"\n | \"PoweredOff\"\n | \"Hibernated\"\n | string;\n/** Alias for EnvironmentProvisioningState */\nexport type EnvironmentProvisioningState =\n | \"Succeeded\"\n | \"Failed\"\n | \"Canceled\"\n | \"Creating\"\n | \"Accepted\"\n | \"Deleting\"\n | \"Updating\"\n | \"Preparing\"\n | \"Running\"\n | \"Syncing\"\n | \"MovingResources\"\n | \"TransientFailure\"\n | \"StorageProvisioningFailed\"\n | string;\n"]}
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** Hardware specifications for the Dev Box. */\nexport interface HardwareProfile {}\n\n/** Storage settings for the Dev Box's disks. */\nexport interface StorageProfile {\n /** Settings for the operating system disk. */\n osDisk?: OsDisk;\n}\n\n/** Settings for the operating system disk. */\nexport interface OsDisk {}\n\n/** Specifies information about the image used. */\nexport interface ImageReference {}\n\n/** A Dev Box. */\nexport interface DevBox {\n /** The name of the Dev Box pool this machine belongs to. */\n poolName: string;\n /**\n * Indicates whether the owner of the Dev Box is a local administrator.\n *\n * Possible values: \"Enabled\", \"Disabled\"\n */\n localAdministrator?: LocalAdminStatus;\n}\n\n/** Properties of an environment. */\nexport interface Environment {\n /** Parameters object for the environment. */\n parameters?: Record<string, unknown>;\n /** Environment type. */\n environmentType: string;\n /** Name of the catalog. */\n catalogName: string;\n /** Name of the environment definition. */\n environmentDefinitionName: string;\n}\n\n/** Alias for OsType */\nexport type OsType = string;\n/** Alias for SkuName */\nexport type SkuName = string;\n/** Alias for HibernateSupport */\nexport type HibernateSupport = string;\n/** Alias for LocalAdminStatus */\nexport type LocalAdminStatus = string;\n/** Alias for DevBoxProvisioningState */\nexport type DevBoxProvisioningState = string;\n/** Alias for PowerState */\nexport type PowerState = string;\n/** Alias for EnvironmentProvisioningState */\nexport type EnvironmentProvisioningState = string;\n"]}