@azure-rest/agrifood-farming 1.0.0-alpha.20211222.1 → 1.0.0-alpha.20220131.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { getLongRunningPoller, } from "@azure-rest/core-client-lro";
4
- /**
5
- * Gets a poller object to help polling for a long running operation status.
6
- * @param client - FarmBeats Rest Client.
7
- * @param initialResponse - Initial response for the operation that needs to be polled.
8
- * @param options - Polling options
9
- * @returns - Gets a poller that can be run on demand or automatically awaited until the operation is completed.
10
- */
11
- export function getPoller(client, initialResponse, options = {}) {
12
- return getLongRunningPoller(client, initialResponse, options);
13
- }
14
- //# sourceMappingURL=getPoller.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getPoller.js","sourceRoot":"","sources":["../../src/getPoller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,oBAAoB,GAIrB,MAAM,6BAA6B,CAAC;AAIrC;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CACvB,MAA2B,EAC3B,eAAwB,EACxB,UAAyB,EAAE;IAE3B,OAAO,oBAAoB,CAAC,MAAM,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;AAChE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n getLongRunningPoller,\n PollerLike,\n PollOperationState,\n PollerOptions,\n} from \"@azure-rest/core-client-lro\";\nimport { HttpResponse } from \"@azure-rest/core-client\";\nimport { FarmBeatsRestClient } from \"./farmBeats\";\n\n/**\n * Gets a poller object to help polling for a long running operation status.\n * @param client - FarmBeats Rest Client.\n * @param initialResponse - Initial response for the operation that needs to be polled.\n * @param options - Polling options\n * @returns - Gets a poller that can be run on demand or automatically awaited until the operation is completed.\n */\nexport function getPoller<TResult extends HttpResponse>(\n client: FarmBeatsRestClient,\n initialResponse: TResult,\n options: PollerOptions = {}\n): PollerLike<PollOperationState<TResult>, TResult> {\n return getLongRunningPoller(client, initialResponse, options);\n}\n"]}
@@ -1,14 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { paginateResponse } from "@azure-rest/core-client-paging";
4
- /**
5
- * This is the wrapper function that would be exposed. It is hiding the Pagination Options because it can be
6
- * obtained from the swagger
7
- * @param client - Client to use for sending the next page requests
8
- * @param initialResponse - Initial response containing the nextLink and current page of elements
9
- * @returns - PagedAsyncIterableIterator to iterate the elements
10
- */
11
- export function paginate(client, initialResponse) {
12
- return paginateResponse(client, initialResponse);
13
- }
14
- //# sourceMappingURL=paging.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"paging.js","sourceRoot":"","sources":["../../src/paging.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,gBAAgB,EAA8B,MAAM,gCAAgC,CAAC;AAqB9F;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CACtB,MAAc,EACd,eAAwB;IAExB,OAAO,gBAAgB,CAA0B,MAAM,EAAE,eAAe,CAAC,CAAC;AAC5E,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { paginateResponse, PagedAsyncIterableIterator } from \"@azure-rest/core-client-paging\";\nimport { Client, PathUncheckedResponse } 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 * 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 * This is the wrapper function that would be exposed. It is hiding the Pagination Options because it can be\n * obtained from the swagger\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 * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TReturn extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TReturn\n): PagedAsyncIterableIterator<PaginateReturn<TReturn>, PaginateReturn<TReturn>[]> {\n return paginateResponse<PaginateReturn<TReturn>>(client, initialResponse);\n}\n"]}