@azure-rest/purview-scanning 1.0.0-alpha.20211214.4 → 1.0.0-alpha.20220211.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.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist-esm/src/parameters.js.map +1 -1
- package/package.json +15 -19
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/purviewScanning.ts","../src/paginateHelper.ts","../src/index.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n KeyVaultConnectionsGetParameters,\n KeyVaultConnectionsCreateParameters,\n KeyVaultConnectionsDeleteParameters,\n KeyVaultConnectionsListAllParameters,\n ClassificationRulesGetParameters,\n ClassificationRulesCreateOrUpdateParameters,\n ClassificationRulesDeleteParameters,\n ClassificationRulesListAllParameters,\n ClassificationRulesListVersionsByClassificationRuleNameParameters,\n ClassificationRulesTagClassificationVersionParameters,\n DataSourcesCreateOrUpdateParameters,\n DataSourcesGetParameters,\n DataSourcesDeleteParameters,\n DataSourcesListAllParameters,\n FiltersGetParameters,\n FiltersCreateOrUpdateParameters,\n ScansCreateOrUpdateParameters,\n ScansGetParameters,\n ScansDeleteParameters,\n ScansListByDataSourceParameters,\n ScanResultRunScanParameters,\n ScanResultCancelScanParameters,\n ScanResultListScanHistoryParameters,\n ScanRulesetsGetParameters,\n ScanRulesetsCreateOrUpdateParameters,\n ScanRulesetsDeleteParameters,\n ScanRulesetsListAllParameters,\n SystemScanRulesetsListAllParameters,\n SystemScanRulesetsGetParameters,\n SystemScanRulesetsGetByVersionParameters,\n SystemScanRulesetsGetLatestParameters,\n SystemScanRulesetsListVersionsByDataSourceParameters,\n TriggersGetTriggerParameters,\n TriggersCreateTriggerParameters,\n TriggersDeleteTriggerParameters,\n} from \"./parameters\";\nimport {\n KeyVaultConnectionsGet200Response,\n KeyVaultConnectionsGetdefaultResponse,\n KeyVaultConnectionsCreate200Response,\n KeyVaultConnectionsCreatedefaultResponse,\n KeyVaultConnectionsDelete200Response,\n KeyVaultConnectionsDelete204Response,\n KeyVaultConnectionsDeletedefaultResponse,\n KeyVaultConnectionsListAll200Response,\n KeyVaultConnectionsListAlldefaultResponse,\n ClassificationRulesGet200Response,\n ClassificationRulesGetdefaultResponse,\n ClassificationRulesCreateOrUpdate200Response,\n ClassificationRulesCreateOrUpdate201Response,\n ClassificationRulesCreateOrUpdatedefaultResponse,\n ClassificationRulesDelete200Response,\n ClassificationRulesDelete204Response,\n ClassificationRulesDeletedefaultResponse,\n ClassificationRulesListAll200Response,\n ClassificationRulesListAlldefaultResponse,\n ClassificationRulesListVersionsByClassificationRuleName200Response,\n ClassificationRulesListVersionsByClassificationRuleNamedefaultResponse,\n ClassificationRulesTagClassificationVersion202Response,\n ClassificationRulesTagClassificationVersiondefaultResponse,\n DataSourcesCreateOrUpdate200Response,\n DataSourcesCreateOrUpdate201Response,\n DataSourcesCreateOrUpdatedefaultResponse,\n DataSourcesGet200Response,\n DataSourcesGetdefaultResponse,\n DataSourcesDelete200Response,\n DataSourcesDelete204Response,\n DataSourcesDeletedefaultResponse,\n DataSourcesListAll200Response,\n DataSourcesListAlldefaultResponse,\n FiltersGet200Response,\n FiltersGetdefaultResponse,\n FiltersCreateOrUpdate200Response,\n FiltersCreateOrUpdate201Response,\n FiltersCreateOrUpdatedefaultResponse,\n ScansCreateOrUpdate200Response,\n ScansCreateOrUpdate201Response,\n ScansCreateOrUpdatedefaultResponse,\n ScansGet200Response,\n ScansGetdefaultResponse,\n ScansDelete200Response,\n ScansDelete204Response,\n ScansDeletedefaultResponse,\n ScansListByDataSource200Response,\n ScansListByDataSourcedefaultResponse,\n ScanResultRunScan202Response,\n ScanResultRunScandefaultResponse,\n ScanResultCancelScan202Response,\n ScanResultCancelScandefaultResponse,\n ScanResultListScanHistory200Response,\n ScanResultListScanHistorydefaultResponse,\n ScanRulesetsGet200Response,\n ScanRulesetsGetdefaultResponse,\n ScanRulesetsCreateOrUpdate200Response,\n ScanRulesetsCreateOrUpdate201Response,\n ScanRulesetsCreateOrUpdatedefaultResponse,\n ScanRulesetsDelete200Response,\n ScanRulesetsDelete204Response,\n ScanRulesetsDeletedefaultResponse,\n ScanRulesetsListAll200Response,\n ScanRulesetsListAlldefaultResponse,\n SystemScanRulesetsListAll200Response,\n SystemScanRulesetsListAlldefaultResponse,\n SystemScanRulesetsGet200Response,\n SystemScanRulesetsGetdefaultResponse,\n SystemScanRulesetsGetByVersion200Response,\n SystemScanRulesetsGetByVersiondefaultResponse,\n SystemScanRulesetsGetLatest200Response,\n SystemScanRulesetsGetLatestdefaultResponse,\n SystemScanRulesetsListVersionsByDataSource200Response,\n SystemScanRulesetsListVersionsByDataSourcedefaultResponse,\n TriggersGetTrigger200Response,\n TriggersGetTriggerdefaultResponse,\n TriggersCreateTrigger200Response,\n TriggersCreateTrigger201Response,\n TriggersCreateTriggerdefaultResponse,\n TriggersDeleteTrigger200Response,\n TriggersDeleteTrigger204Response,\n TriggersDeleteTriggerdefaultResponse,\n} from \"./responses\";\nimport { getClient, ClientOptions, Client } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport interface KeyVaultConnectionsGet {\n /** Gets key vault information */\n get(\n options?: KeyVaultConnectionsGetParameters\n ): Promise<KeyVaultConnectionsGet200Response | KeyVaultConnectionsGetdefaultResponse>;\n /** Creates an instance of a key vault connection */\n put(\n options: KeyVaultConnectionsCreateParameters\n ): Promise<KeyVaultConnectionsCreate200Response | KeyVaultConnectionsCreatedefaultResponse>;\n /** Deletes the key vault connection associated with the account */\n delete(\n options?: KeyVaultConnectionsDeleteParameters\n ): Promise<\n | KeyVaultConnectionsDelete200Response\n | KeyVaultConnectionsDelete204Response\n | KeyVaultConnectionsDeletedefaultResponse\n >;\n}\n\nexport interface KeyVaultConnectionsListAll {\n /** List key vault connections in account */\n get(\n options?: KeyVaultConnectionsListAllParameters\n ): Promise<KeyVaultConnectionsListAll200Response | KeyVaultConnectionsListAlldefaultResponse>;\n}\n\nexport interface ClassificationRulesGet {\n /** Get a classification rule */\n get(\n options?: ClassificationRulesGetParameters\n ): Promise<ClassificationRulesGet200Response | ClassificationRulesGetdefaultResponse>;\n /** Creates or Updates a classification rule */\n put(\n options?: ClassificationRulesCreateOrUpdateParameters\n ): Promise<\n | ClassificationRulesCreateOrUpdate200Response\n | ClassificationRulesCreateOrUpdate201Response\n | ClassificationRulesCreateOrUpdatedefaultResponse\n >;\n /** Deletes a classification rule */\n delete(\n options?: ClassificationRulesDeleteParameters\n ): Promise<\n | ClassificationRulesDelete200Response\n | ClassificationRulesDelete204Response\n | ClassificationRulesDeletedefaultResponse\n >;\n}\n\nexport interface ClassificationRulesListAll {\n /** List classification rules in Account */\n get(\n options?: ClassificationRulesListAllParameters\n ): Promise<ClassificationRulesListAll200Response | ClassificationRulesListAlldefaultResponse>;\n}\n\nexport interface ClassificationRulesListVersionsByClassificationRuleName {\n /** Lists the rule versions of a classification rule */\n get(\n options?: ClassificationRulesListVersionsByClassificationRuleNameParameters\n ): Promise<\n | ClassificationRulesListVersionsByClassificationRuleName200Response\n | ClassificationRulesListVersionsByClassificationRuleNamedefaultResponse\n >;\n}\n\nexport interface ClassificationRulesTagClassificationVersion {\n /** Sets Classification Action on a specific classification rule version. */\n post(\n options: ClassificationRulesTagClassificationVersionParameters\n ): Promise<\n | ClassificationRulesTagClassificationVersion202Response\n | ClassificationRulesTagClassificationVersiondefaultResponse\n >;\n}\n\nexport interface DataSourcesCreateOrUpdate {\n /** Creates or Updates a data source */\n put(\n options?: DataSourcesCreateOrUpdateParameters\n ): Promise<\n | DataSourcesCreateOrUpdate200Response\n | DataSourcesCreateOrUpdate201Response\n | DataSourcesCreateOrUpdatedefaultResponse\n >;\n /** Get a data source */\n get(\n options?: DataSourcesGetParameters\n ): Promise<DataSourcesGet200Response | DataSourcesGetdefaultResponse>;\n /** Deletes a data source */\n delete(\n options?: DataSourcesDeleteParameters\n ): Promise<\n DataSourcesDelete200Response | DataSourcesDelete204Response | DataSourcesDeletedefaultResponse\n >;\n}\n\nexport interface DataSourcesListAll {\n /** List data sources in Data catalog */\n get(\n options?: DataSourcesListAllParameters\n ): Promise<DataSourcesListAll200Response | DataSourcesListAlldefaultResponse>;\n}\n\nexport interface FiltersGet {\n /** Get a filter */\n get(options?: FiltersGetParameters): Promise<FiltersGet200Response | FiltersGetdefaultResponse>;\n /** Creates or updates a filter */\n put(\n options?: FiltersCreateOrUpdateParameters\n ): Promise<\n | FiltersCreateOrUpdate200Response\n | FiltersCreateOrUpdate201Response\n | FiltersCreateOrUpdatedefaultResponse\n >;\n}\n\nexport interface ScansCreateOrUpdate {\n /** Creates an instance of a scan */\n put(\n options: ScansCreateOrUpdateParameters\n ): Promise<\n | ScansCreateOrUpdate200Response\n | ScansCreateOrUpdate201Response\n | ScansCreateOrUpdatedefaultResponse\n >;\n /** Gets a scan information */\n get(options?: ScansGetParameters): Promise<ScansGet200Response | ScansGetdefaultResponse>;\n /** Deletes the scan associated with the data source */\n delete(\n options?: ScansDeleteParameters\n ): Promise<ScansDelete200Response | ScansDelete204Response | ScansDeletedefaultResponse>;\n}\n\nexport interface ScansListByDataSource {\n /** List scans in data source */\n get(\n options?: ScansListByDataSourceParameters\n ): Promise<ScansListByDataSource200Response | ScansListByDataSourcedefaultResponse>;\n}\n\nexport interface ScanResultRunScan {\n /** Runs the scan */\n put(\n options?: ScanResultRunScanParameters\n ): Promise<ScanResultRunScan202Response | ScanResultRunScandefaultResponse>;\n}\n\nexport interface ScanResultCancelScan {\n /** Cancels a scan */\n post(\n options?: ScanResultCancelScanParameters\n ): Promise<ScanResultCancelScan202Response | ScanResultCancelScandefaultResponse>;\n}\n\nexport interface ScanResultListScanHistory {\n /** Lists the scan history of a scan */\n get(\n options?: ScanResultListScanHistoryParameters\n ): Promise<ScanResultListScanHistory200Response | ScanResultListScanHistorydefaultResponse>;\n}\n\nexport interface ScanRulesetsGet {\n /** Get a scan ruleset */\n get(\n options?: ScanRulesetsGetParameters\n ): Promise<ScanRulesetsGet200Response | ScanRulesetsGetdefaultResponse>;\n /** Creates or Updates a scan ruleset */\n put(\n options?: ScanRulesetsCreateOrUpdateParameters\n ): Promise<\n | ScanRulesetsCreateOrUpdate200Response\n | ScanRulesetsCreateOrUpdate201Response\n | ScanRulesetsCreateOrUpdatedefaultResponse\n >;\n /** Deletes a scan ruleset */\n delete(\n options?: ScanRulesetsDeleteParameters\n ): Promise<\n | ScanRulesetsDelete200Response\n | ScanRulesetsDelete204Response\n | ScanRulesetsDeletedefaultResponse\n >;\n}\n\nexport interface ScanRulesetsListAll {\n /** List scan rulesets in Data catalog */\n get(\n options?: ScanRulesetsListAllParameters\n ): Promise<ScanRulesetsListAll200Response | ScanRulesetsListAlldefaultResponse>;\n}\n\nexport interface SystemScanRulesetsListAll {\n /** List all system scan rulesets for an account */\n get(\n options?: SystemScanRulesetsListAllParameters\n ): Promise<SystemScanRulesetsListAll200Response | SystemScanRulesetsListAlldefaultResponse>;\n}\n\nexport interface SystemScanRulesetsGet {\n /** Get a system scan ruleset for a data source */\n get(\n options?: SystemScanRulesetsGetParameters\n ): Promise<SystemScanRulesetsGet200Response | SystemScanRulesetsGetdefaultResponse>;\n}\n\nexport interface SystemScanRulesetsGetByVersion {\n /** Get a scan ruleset by version */\n get(\n options?: SystemScanRulesetsGetByVersionParameters\n ): Promise<\n SystemScanRulesetsGetByVersion200Response | SystemScanRulesetsGetByVersiondefaultResponse\n >;\n}\n\nexport interface SystemScanRulesetsGetLatest {\n /** Get the latest version of a system scan ruleset */\n get(\n options?: SystemScanRulesetsGetLatestParameters\n ): Promise<SystemScanRulesetsGetLatest200Response | SystemScanRulesetsGetLatestdefaultResponse>;\n}\n\nexport interface SystemScanRulesetsListVersionsByDataSource {\n /** List system scan ruleset versions in Data catalog */\n get(\n options?: SystemScanRulesetsListVersionsByDataSourceParameters\n ): Promise<\n | SystemScanRulesetsListVersionsByDataSource200Response\n | SystemScanRulesetsListVersionsByDataSourcedefaultResponse\n >;\n}\n\nexport interface TriggersGetTrigger {\n /** Gets trigger information */\n get(\n options?: TriggersGetTriggerParameters\n ): Promise<TriggersGetTrigger200Response | TriggersGetTriggerdefaultResponse>;\n /** Creates an instance of a trigger */\n put(\n options: TriggersCreateTriggerParameters\n ): Promise<\n | TriggersCreateTrigger200Response\n | TriggersCreateTrigger201Response\n | TriggersCreateTriggerdefaultResponse\n >;\n /** Deletes the trigger associated with the scan */\n delete(\n options?: TriggersDeleteTriggerParameters\n ): Promise<\n | TriggersDeleteTrigger200Response\n | TriggersDeleteTrigger204Response\n | TriggersDeleteTriggerdefaultResponse\n >;\n}\n\nexport interface Routes {\n /** Resource for '/azureKeyVaults/\\{keyVaultName\\}' has methods for the following verbs: get, put, delete */\n (path: \"/azureKeyVaults/{keyVaultName}\", keyVaultName: string): KeyVaultConnectionsGet;\n /** Resource for '/azureKeyVaults' has methods for the following verbs: get */\n (path: \"/azureKeyVaults\"): KeyVaultConnectionsListAll;\n /** Resource for '/classificationrules/\\{classificationRuleName\\}' has methods for the following verbs: get, put, delete */\n (\n path: \"/classificationrules/{classificationRuleName}\",\n classificationRuleName: string\n ): ClassificationRulesGet;\n /** Resource for '/classificationrules' has methods for the following verbs: get */\n (path: \"/classificationrules\"): ClassificationRulesListAll;\n /** Resource for '/classificationrules/\\{classificationRuleName\\}/versions' has methods for the following verbs: get */\n (\n path: \"/classificationrules/{classificationRuleName}/versions\",\n classificationRuleName: string\n ): ClassificationRulesListVersionsByClassificationRuleName;\n /** Resource for '/classificationrules/\\{classificationRuleName\\}/versions/\\{classificationRuleVersion\\}/:tag' has methods for the following verbs: post */\n (\n path: \"/classificationrules/{classificationRuleName}/versions/{classificationRuleVersion}/:tag\",\n classificationRuleName: string,\n classificationRuleVersion: string\n ): ClassificationRulesTagClassificationVersion;\n /** Resource for '/datasources/\\{dataSourceName\\}' has methods for the following verbs: put, get, delete */\n (path: \"/datasources/{dataSourceName}\", dataSourceName: string): DataSourcesCreateOrUpdate;\n /** Resource for '/datasources' has methods for the following verbs: get */\n (path: \"/datasources\"): DataSourcesListAll;\n /** Resource for '/datasources/\\{dataSourceName\\}/scans/\\{scanName\\}/filters/custom' has methods for the following verbs: get, put */\n (\n path: \"/datasources/{dataSourceName}/scans/{scanName}/filters/custom\",\n dataSourceName: string,\n scanName: string\n ): FiltersGet;\n /** Resource for '/datasources/\\{dataSourceName\\}/scans/\\{scanName\\}' has methods for the following verbs: put, get, delete */\n (\n path: \"/datasources/{dataSourceName}/scans/{scanName}\",\n dataSourceName: string,\n scanName: string\n ): ScansCreateOrUpdate;\n /** Resource for '/datasources/\\{dataSourceName\\}/scans' has methods for the following verbs: get */\n (path: \"/datasources/{dataSourceName}/scans\", dataSourceName: string): ScansListByDataSource;\n /** Resource for '/datasources/\\{dataSourceName\\}/scans/\\{scanName\\}/runs/\\{runId\\}' has methods for the following verbs: put */\n (\n path: \"/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}\",\n dataSourceName: string,\n scanName: string,\n runId: string\n ): ScanResultRunScan;\n /** Resource for '/datasources/\\{dataSourceName\\}/scans/\\{scanName\\}/runs/\\{runId\\}/:cancel' has methods for the following verbs: post */\n (\n path: \"/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}/:cancel\",\n dataSourceName: string,\n scanName: string,\n runId: string\n ): ScanResultCancelScan;\n /** Resource for '/datasources/\\{dataSourceName\\}/scans/\\{scanName\\}/runs' has methods for the following verbs: get */\n (\n path: \"/datasources/{dataSourceName}/scans/{scanName}/runs\",\n dataSourceName: string,\n scanName: string\n ): ScanResultListScanHistory;\n /** Resource for '/scanrulesets/\\{scanRulesetName\\}' has methods for the following verbs: get, put, delete */\n (path: \"/scanrulesets/{scanRulesetName}\", scanRulesetName: string): ScanRulesetsGet;\n /** Resource for '/scanrulesets' has methods for the following verbs: get */\n (path: \"/scanrulesets\"): ScanRulesetsListAll;\n /** Resource for '/systemScanRulesets' has methods for the following verbs: get */\n (path: \"/systemScanRulesets\"): SystemScanRulesetsListAll;\n /** Resource for '/systemScanRulesets/datasources/\\{dataSourceType\\}' has methods for the following verbs: get */\n (\n path: \"/systemScanRulesets/datasources/{dataSourceType}\",\n dataSourceType: string\n ): SystemScanRulesetsGet;\n /** Resource for '/systemScanRulesets/versions/\\{version\\}' has methods for the following verbs: get */\n (path: \"/systemScanRulesets/versions/{version}\", version: string): SystemScanRulesetsGetByVersion;\n /** Resource for '/systemScanRulesets/versions/latest' has methods for the following verbs: get */\n (path: \"/systemScanRulesets/versions/latest\"): SystemScanRulesetsGetLatest;\n /** Resource for '/systemScanRulesets/versions' has methods for the following verbs: get */\n (path: \"/systemScanRulesets/versions\"): SystemScanRulesetsListVersionsByDataSource;\n /** Resource for '/datasources/\\{dataSourceName\\}/scans/\\{scanName\\}/triggers/default' has methods for the following verbs: get, put, delete */\n (\n path: \"/datasources/{dataSourceName}/scans/{scanName}/triggers/default\",\n dataSourceName: string,\n scanName: string\n ): TriggersGetTrigger;\n}\n\nexport type PurviewScanningRestClient = Client & {\n path: Routes;\n};\n\nexport default function PurviewScanning(\n Endpoint: string,\n credentials: TokenCredential,\n options: ClientOptions = {}\n): PurviewScanningRestClient {\n const baseUrl = options.baseUrl ?? `${Endpoint}`;\n options.apiVersion = options.apiVersion ?? \"2018-12-01-preview\";\n options = {\n ...options,\n credentials: {\n scopes: [\"https://purview.azure.net/.default\"],\n },\n };\n\n return getClient(baseUrl, credentials, options) as PurviewScanningRestClient;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getPagedAsyncIterator, PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { Client, createRestError, 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 * 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","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport PurviewScanning from \"./purviewScanning\";\n\nexport * from \"./purviewScanning\";\nexport * from \"./models\";\nexport * from \"./parameters\";\nexport * from \"./responses\";\nexport * from \"./paginateHelper\";\n\nexport default PurviewScanning;\n"],"names":["getClient","getPagedAsyncIterator","createRestError"],"mappings":";;;;;;;AAAA;SAwdwB,eAAe,CACrC,QAAgB,EAChB,WAA4B,EAC5B,UAAyB,EAAE;;IAE3B,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,GAAG,QAAQ,EAAE,CAAC;IACjD,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,OAAO,mCACF,OAAO,KACV,WAAW,EAAE;YACX,MAAM,EAAE,CAAC,oCAAoC,CAAC;SAC/C,GACF,CAAC;IAEF,OAAOA,oBAAS,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAA8B,CAAC;AAC/E;;ACveA;AACA,AA4CA;;;;;;;AAOA,SAAgB,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;cAC/B,aAAa;cACb,OAAO,QAAgB;gBACrB,MAAM,MAAM,GAAG,QAAQ,GAAG,eAAe,GAAG,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;aACH;KACR,CAAC;IAEF,OAAOC,gCAAqB,CAAC,WAAW,CAAC,CAAC;AAC5C,CAAC;AAED;;;AAGA,SAAS,WAAW,CAAC,IAAa,EAAE,YAAqB;IACvD,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,QAAQ,GAAI,IAAgC,CAAC,YAAY,CAAC,CAAC;IAEjE,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;QACnE,MAAM,IAAI,KAAK,CAAC,iBAAiB,YAAY,kCAAkC,CAAC,CAAC;KAClF;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;AAGA,SAAS,WAAW,CAAc,IAAa,EAAE,QAAgB;IAC/D,MAAM,KAAK,GAAI,IAAgC,CAAC,QAAQ,CAAQ,CAAC;;;;IAKjE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACzB,MAAM,IAAI,KAAK,CACb,kFAAkF,QAAQ,EAAE,CAC7F,CAAC;KACH;IAED,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC;AACrB,CAAC;AAED;;;AAGA,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;QACjD,MAAMC,0BAAe,CACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;KACH;AACH,CAAC;;AClID,uCAAuC;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/purviewScanning.ts","../src/paginateHelper.ts","../src/index.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n KeyVaultConnectionsGetParameters,\n KeyVaultConnectionsCreateParameters,\n KeyVaultConnectionsDeleteParameters,\n KeyVaultConnectionsListAllParameters,\n ClassificationRulesGetParameters,\n ClassificationRulesCreateOrUpdateParameters,\n ClassificationRulesDeleteParameters,\n ClassificationRulesListAllParameters,\n ClassificationRulesListVersionsByClassificationRuleNameParameters,\n ClassificationRulesTagClassificationVersionParameters,\n DataSourcesCreateOrUpdateParameters,\n DataSourcesGetParameters,\n DataSourcesDeleteParameters,\n DataSourcesListAllParameters,\n FiltersGetParameters,\n FiltersCreateOrUpdateParameters,\n ScansCreateOrUpdateParameters,\n ScansGetParameters,\n ScansDeleteParameters,\n ScansListByDataSourceParameters,\n ScanResultRunScanParameters,\n ScanResultCancelScanParameters,\n ScanResultListScanHistoryParameters,\n ScanRulesetsGetParameters,\n ScanRulesetsCreateOrUpdateParameters,\n ScanRulesetsDeleteParameters,\n ScanRulesetsListAllParameters,\n SystemScanRulesetsListAllParameters,\n SystemScanRulesetsGetParameters,\n SystemScanRulesetsGetByVersionParameters,\n SystemScanRulesetsGetLatestParameters,\n SystemScanRulesetsListVersionsByDataSourceParameters,\n TriggersGetTriggerParameters,\n TriggersCreateTriggerParameters,\n TriggersDeleteTriggerParameters,\n} from \"./parameters\";\nimport {\n KeyVaultConnectionsGet200Response,\n KeyVaultConnectionsGetdefaultResponse,\n KeyVaultConnectionsCreate200Response,\n KeyVaultConnectionsCreatedefaultResponse,\n KeyVaultConnectionsDelete200Response,\n KeyVaultConnectionsDelete204Response,\n KeyVaultConnectionsDeletedefaultResponse,\n KeyVaultConnectionsListAll200Response,\n KeyVaultConnectionsListAlldefaultResponse,\n ClassificationRulesGet200Response,\n ClassificationRulesGetdefaultResponse,\n ClassificationRulesCreateOrUpdate200Response,\n ClassificationRulesCreateOrUpdate201Response,\n ClassificationRulesCreateOrUpdatedefaultResponse,\n ClassificationRulesDelete200Response,\n ClassificationRulesDelete204Response,\n ClassificationRulesDeletedefaultResponse,\n ClassificationRulesListAll200Response,\n ClassificationRulesListAlldefaultResponse,\n ClassificationRulesListVersionsByClassificationRuleName200Response,\n ClassificationRulesListVersionsByClassificationRuleNamedefaultResponse,\n ClassificationRulesTagClassificationVersion202Response,\n ClassificationRulesTagClassificationVersiondefaultResponse,\n DataSourcesCreateOrUpdate200Response,\n DataSourcesCreateOrUpdate201Response,\n DataSourcesCreateOrUpdatedefaultResponse,\n DataSourcesGet200Response,\n DataSourcesGetdefaultResponse,\n DataSourcesDelete200Response,\n DataSourcesDelete204Response,\n DataSourcesDeletedefaultResponse,\n DataSourcesListAll200Response,\n DataSourcesListAlldefaultResponse,\n FiltersGet200Response,\n FiltersGetdefaultResponse,\n FiltersCreateOrUpdate200Response,\n FiltersCreateOrUpdate201Response,\n FiltersCreateOrUpdatedefaultResponse,\n ScansCreateOrUpdate200Response,\n ScansCreateOrUpdate201Response,\n ScansCreateOrUpdatedefaultResponse,\n ScansGet200Response,\n ScansGetdefaultResponse,\n ScansDelete200Response,\n ScansDelete204Response,\n ScansDeletedefaultResponse,\n ScansListByDataSource200Response,\n ScansListByDataSourcedefaultResponse,\n ScanResultRunScan202Response,\n ScanResultRunScandefaultResponse,\n ScanResultCancelScan202Response,\n ScanResultCancelScandefaultResponse,\n ScanResultListScanHistory200Response,\n ScanResultListScanHistorydefaultResponse,\n ScanRulesetsGet200Response,\n ScanRulesetsGetdefaultResponse,\n ScanRulesetsCreateOrUpdate200Response,\n ScanRulesetsCreateOrUpdate201Response,\n ScanRulesetsCreateOrUpdatedefaultResponse,\n ScanRulesetsDelete200Response,\n ScanRulesetsDelete204Response,\n ScanRulesetsDeletedefaultResponse,\n ScanRulesetsListAll200Response,\n ScanRulesetsListAlldefaultResponse,\n SystemScanRulesetsListAll200Response,\n SystemScanRulesetsListAlldefaultResponse,\n SystemScanRulesetsGet200Response,\n SystemScanRulesetsGetdefaultResponse,\n SystemScanRulesetsGetByVersion200Response,\n SystemScanRulesetsGetByVersiondefaultResponse,\n SystemScanRulesetsGetLatest200Response,\n SystemScanRulesetsGetLatestdefaultResponse,\n SystemScanRulesetsListVersionsByDataSource200Response,\n SystemScanRulesetsListVersionsByDataSourcedefaultResponse,\n TriggersGetTrigger200Response,\n TriggersGetTriggerdefaultResponse,\n TriggersCreateTrigger200Response,\n TriggersCreateTrigger201Response,\n TriggersCreateTriggerdefaultResponse,\n TriggersDeleteTrigger200Response,\n TriggersDeleteTrigger204Response,\n TriggersDeleteTriggerdefaultResponse,\n} from \"./responses\";\nimport { getClient, ClientOptions, Client } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport interface KeyVaultConnectionsGet {\n /** Gets key vault information */\n get(\n options?: KeyVaultConnectionsGetParameters\n ): Promise<KeyVaultConnectionsGet200Response | KeyVaultConnectionsGetdefaultResponse>;\n /** Creates an instance of a key vault connection */\n put(\n options: KeyVaultConnectionsCreateParameters\n ): Promise<KeyVaultConnectionsCreate200Response | KeyVaultConnectionsCreatedefaultResponse>;\n /** Deletes the key vault connection associated with the account */\n delete(\n options?: KeyVaultConnectionsDeleteParameters\n ): Promise<\n | KeyVaultConnectionsDelete200Response\n | KeyVaultConnectionsDelete204Response\n | KeyVaultConnectionsDeletedefaultResponse\n >;\n}\n\nexport interface KeyVaultConnectionsListAll {\n /** List key vault connections in account */\n get(\n options?: KeyVaultConnectionsListAllParameters\n ): Promise<KeyVaultConnectionsListAll200Response | KeyVaultConnectionsListAlldefaultResponse>;\n}\n\nexport interface ClassificationRulesGet {\n /** Get a classification rule */\n get(\n options?: ClassificationRulesGetParameters\n ): Promise<ClassificationRulesGet200Response | ClassificationRulesGetdefaultResponse>;\n /** Creates or Updates a classification rule */\n put(\n options?: ClassificationRulesCreateOrUpdateParameters\n ): Promise<\n | ClassificationRulesCreateOrUpdate200Response\n | ClassificationRulesCreateOrUpdate201Response\n | ClassificationRulesCreateOrUpdatedefaultResponse\n >;\n /** Deletes a classification rule */\n delete(\n options?: ClassificationRulesDeleteParameters\n ): Promise<\n | ClassificationRulesDelete200Response\n | ClassificationRulesDelete204Response\n | ClassificationRulesDeletedefaultResponse\n >;\n}\n\nexport interface ClassificationRulesListAll {\n /** List classification rules in Account */\n get(\n options?: ClassificationRulesListAllParameters\n ): Promise<ClassificationRulesListAll200Response | ClassificationRulesListAlldefaultResponse>;\n}\n\nexport interface ClassificationRulesListVersionsByClassificationRuleName {\n /** Lists the rule versions of a classification rule */\n get(\n options?: ClassificationRulesListVersionsByClassificationRuleNameParameters\n ): Promise<\n | ClassificationRulesListVersionsByClassificationRuleName200Response\n | ClassificationRulesListVersionsByClassificationRuleNamedefaultResponse\n >;\n}\n\nexport interface ClassificationRulesTagClassificationVersion {\n /** Sets Classification Action on a specific classification rule version. */\n post(\n options: ClassificationRulesTagClassificationVersionParameters\n ): Promise<\n | ClassificationRulesTagClassificationVersion202Response\n | ClassificationRulesTagClassificationVersiondefaultResponse\n >;\n}\n\nexport interface DataSourcesCreateOrUpdate {\n /** Creates or Updates a data source */\n put(\n options?: DataSourcesCreateOrUpdateParameters\n ): Promise<\n | DataSourcesCreateOrUpdate200Response\n | DataSourcesCreateOrUpdate201Response\n | DataSourcesCreateOrUpdatedefaultResponse\n >;\n /** Get a data source */\n get(\n options?: DataSourcesGetParameters\n ): Promise<DataSourcesGet200Response | DataSourcesGetdefaultResponse>;\n /** Deletes a data source */\n delete(\n options?: DataSourcesDeleteParameters\n ): Promise<\n DataSourcesDelete200Response | DataSourcesDelete204Response | DataSourcesDeletedefaultResponse\n >;\n}\n\nexport interface DataSourcesListAll {\n /** List data sources in Data catalog */\n get(\n options?: DataSourcesListAllParameters\n ): Promise<DataSourcesListAll200Response | DataSourcesListAlldefaultResponse>;\n}\n\nexport interface FiltersGet {\n /** Get a filter */\n get(options?: FiltersGetParameters): Promise<FiltersGet200Response | FiltersGetdefaultResponse>;\n /** Creates or updates a filter */\n put(\n options?: FiltersCreateOrUpdateParameters\n ): Promise<\n | FiltersCreateOrUpdate200Response\n | FiltersCreateOrUpdate201Response\n | FiltersCreateOrUpdatedefaultResponse\n >;\n}\n\nexport interface ScansCreateOrUpdate {\n /** Creates an instance of a scan */\n put(\n options: ScansCreateOrUpdateParameters\n ): Promise<\n | ScansCreateOrUpdate200Response\n | ScansCreateOrUpdate201Response\n | ScansCreateOrUpdatedefaultResponse\n >;\n /** Gets a scan information */\n get(options?: ScansGetParameters): Promise<ScansGet200Response | ScansGetdefaultResponse>;\n /** Deletes the scan associated with the data source */\n delete(\n options?: ScansDeleteParameters\n ): Promise<ScansDelete200Response | ScansDelete204Response | ScansDeletedefaultResponse>;\n}\n\nexport interface ScansListByDataSource {\n /** List scans in data source */\n get(\n options?: ScansListByDataSourceParameters\n ): Promise<ScansListByDataSource200Response | ScansListByDataSourcedefaultResponse>;\n}\n\nexport interface ScanResultRunScan {\n /** Runs the scan */\n put(\n options?: ScanResultRunScanParameters\n ): Promise<ScanResultRunScan202Response | ScanResultRunScandefaultResponse>;\n}\n\nexport interface ScanResultCancelScan {\n /** Cancels a scan */\n post(\n options?: ScanResultCancelScanParameters\n ): Promise<ScanResultCancelScan202Response | ScanResultCancelScandefaultResponse>;\n}\n\nexport interface ScanResultListScanHistory {\n /** Lists the scan history of a scan */\n get(\n options?: ScanResultListScanHistoryParameters\n ): Promise<ScanResultListScanHistory200Response | ScanResultListScanHistorydefaultResponse>;\n}\n\nexport interface ScanRulesetsGet {\n /** Get a scan ruleset */\n get(\n options?: ScanRulesetsGetParameters\n ): Promise<ScanRulesetsGet200Response | ScanRulesetsGetdefaultResponse>;\n /** Creates or Updates a scan ruleset */\n put(\n options?: ScanRulesetsCreateOrUpdateParameters\n ): Promise<\n | ScanRulesetsCreateOrUpdate200Response\n | ScanRulesetsCreateOrUpdate201Response\n | ScanRulesetsCreateOrUpdatedefaultResponse\n >;\n /** Deletes a scan ruleset */\n delete(\n options?: ScanRulesetsDeleteParameters\n ): Promise<\n | ScanRulesetsDelete200Response\n | ScanRulesetsDelete204Response\n | ScanRulesetsDeletedefaultResponse\n >;\n}\n\nexport interface ScanRulesetsListAll {\n /** List scan rulesets in Data catalog */\n get(\n options?: ScanRulesetsListAllParameters\n ): Promise<ScanRulesetsListAll200Response | ScanRulesetsListAlldefaultResponse>;\n}\n\nexport interface SystemScanRulesetsListAll {\n /** List all system scan rulesets for an account */\n get(\n options?: SystemScanRulesetsListAllParameters\n ): Promise<SystemScanRulesetsListAll200Response | SystemScanRulesetsListAlldefaultResponse>;\n}\n\nexport interface SystemScanRulesetsGet {\n /** Get a system scan ruleset for a data source */\n get(\n options?: SystemScanRulesetsGetParameters\n ): Promise<SystemScanRulesetsGet200Response | SystemScanRulesetsGetdefaultResponse>;\n}\n\nexport interface SystemScanRulesetsGetByVersion {\n /** Get a scan ruleset by version */\n get(\n options?: SystemScanRulesetsGetByVersionParameters\n ): Promise<\n SystemScanRulesetsGetByVersion200Response | SystemScanRulesetsGetByVersiondefaultResponse\n >;\n}\n\nexport interface SystemScanRulesetsGetLatest {\n /** Get the latest version of a system scan ruleset */\n get(\n options?: SystemScanRulesetsGetLatestParameters\n ): Promise<SystemScanRulesetsGetLatest200Response | SystemScanRulesetsGetLatestdefaultResponse>;\n}\n\nexport interface SystemScanRulesetsListVersionsByDataSource {\n /** List system scan ruleset versions in Data catalog */\n get(\n options?: SystemScanRulesetsListVersionsByDataSourceParameters\n ): Promise<\n | SystemScanRulesetsListVersionsByDataSource200Response\n | SystemScanRulesetsListVersionsByDataSourcedefaultResponse\n >;\n}\n\nexport interface TriggersGetTrigger {\n /** Gets trigger information */\n get(\n options?: TriggersGetTriggerParameters\n ): Promise<TriggersGetTrigger200Response | TriggersGetTriggerdefaultResponse>;\n /** Creates an instance of a trigger */\n put(\n options: TriggersCreateTriggerParameters\n ): Promise<\n | TriggersCreateTrigger200Response\n | TriggersCreateTrigger201Response\n | TriggersCreateTriggerdefaultResponse\n >;\n /** Deletes the trigger associated with the scan */\n delete(\n options?: TriggersDeleteTriggerParameters\n ): Promise<\n | TriggersDeleteTrigger200Response\n | TriggersDeleteTrigger204Response\n | TriggersDeleteTriggerdefaultResponse\n >;\n}\n\nexport interface Routes {\n /** Resource for '/azureKeyVaults/\\{keyVaultName\\}' has methods for the following verbs: get, put, delete */\n (path: \"/azureKeyVaults/{keyVaultName}\", keyVaultName: string): KeyVaultConnectionsGet;\n /** Resource for '/azureKeyVaults' has methods for the following verbs: get */\n (path: \"/azureKeyVaults\"): KeyVaultConnectionsListAll;\n /** Resource for '/classificationrules/\\{classificationRuleName\\}' has methods for the following verbs: get, put, delete */\n (\n path: \"/classificationrules/{classificationRuleName}\",\n classificationRuleName: string\n ): ClassificationRulesGet;\n /** Resource for '/classificationrules' has methods for the following verbs: get */\n (path: \"/classificationrules\"): ClassificationRulesListAll;\n /** Resource for '/classificationrules/\\{classificationRuleName\\}/versions' has methods for the following verbs: get */\n (\n path: \"/classificationrules/{classificationRuleName}/versions\",\n classificationRuleName: string\n ): ClassificationRulesListVersionsByClassificationRuleName;\n /** Resource for '/classificationrules/\\{classificationRuleName\\}/versions/\\{classificationRuleVersion\\}/:tag' has methods for the following verbs: post */\n (\n path: \"/classificationrules/{classificationRuleName}/versions/{classificationRuleVersion}/:tag\",\n classificationRuleName: string,\n classificationRuleVersion: string\n ): ClassificationRulesTagClassificationVersion;\n /** Resource for '/datasources/\\{dataSourceName\\}' has methods for the following verbs: put, get, delete */\n (path: \"/datasources/{dataSourceName}\", dataSourceName: string): DataSourcesCreateOrUpdate;\n /** Resource for '/datasources' has methods for the following verbs: get */\n (path: \"/datasources\"): DataSourcesListAll;\n /** Resource for '/datasources/\\{dataSourceName\\}/scans/\\{scanName\\}/filters/custom' has methods for the following verbs: get, put */\n (\n path: \"/datasources/{dataSourceName}/scans/{scanName}/filters/custom\",\n dataSourceName: string,\n scanName: string\n ): FiltersGet;\n /** Resource for '/datasources/\\{dataSourceName\\}/scans/\\{scanName\\}' has methods for the following verbs: put, get, delete */\n (\n path: \"/datasources/{dataSourceName}/scans/{scanName}\",\n dataSourceName: string,\n scanName: string\n ): ScansCreateOrUpdate;\n /** Resource for '/datasources/\\{dataSourceName\\}/scans' has methods for the following verbs: get */\n (path: \"/datasources/{dataSourceName}/scans\", dataSourceName: string): ScansListByDataSource;\n /** Resource for '/datasources/\\{dataSourceName\\}/scans/\\{scanName\\}/runs/\\{runId\\}' has methods for the following verbs: put */\n (\n path: \"/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}\",\n dataSourceName: string,\n scanName: string,\n runId: string\n ): ScanResultRunScan;\n /** Resource for '/datasources/\\{dataSourceName\\}/scans/\\{scanName\\}/runs/\\{runId\\}/:cancel' has methods for the following verbs: post */\n (\n path: \"/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}/:cancel\",\n dataSourceName: string,\n scanName: string,\n runId: string\n ): ScanResultCancelScan;\n /** Resource for '/datasources/\\{dataSourceName\\}/scans/\\{scanName\\}/runs' has methods for the following verbs: get */\n (\n path: \"/datasources/{dataSourceName}/scans/{scanName}/runs\",\n dataSourceName: string,\n scanName: string\n ): ScanResultListScanHistory;\n /** Resource for '/scanrulesets/\\{scanRulesetName\\}' has methods for the following verbs: get, put, delete */\n (path: \"/scanrulesets/{scanRulesetName}\", scanRulesetName: string): ScanRulesetsGet;\n /** Resource for '/scanrulesets' has methods for the following verbs: get */\n (path: \"/scanrulesets\"): ScanRulesetsListAll;\n /** Resource for '/systemScanRulesets' has methods for the following verbs: get */\n (path: \"/systemScanRulesets\"): SystemScanRulesetsListAll;\n /** Resource for '/systemScanRulesets/datasources/\\{dataSourceType\\}' has methods for the following verbs: get */\n (\n path: \"/systemScanRulesets/datasources/{dataSourceType}\",\n dataSourceType: string\n ): SystemScanRulesetsGet;\n /** Resource for '/systemScanRulesets/versions/\\{version\\}' has methods for the following verbs: get */\n (path: \"/systemScanRulesets/versions/{version}\", version: string): SystemScanRulesetsGetByVersion;\n /** Resource for '/systemScanRulesets/versions/latest' has methods for the following verbs: get */\n (path: \"/systemScanRulesets/versions/latest\"): SystemScanRulesetsGetLatest;\n /** Resource for '/systemScanRulesets/versions' has methods for the following verbs: get */\n (path: \"/systemScanRulesets/versions\"): SystemScanRulesetsListVersionsByDataSource;\n /** Resource for '/datasources/\\{dataSourceName\\}/scans/\\{scanName\\}/triggers/default' has methods for the following verbs: get, put, delete */\n (\n path: \"/datasources/{dataSourceName}/scans/{scanName}/triggers/default\",\n dataSourceName: string,\n scanName: string\n ): TriggersGetTrigger;\n}\n\nexport type PurviewScanningRestClient = Client & {\n path: Routes;\n};\n\nexport default function PurviewScanning(\n Endpoint: string,\n credentials: TokenCredential,\n options: ClientOptions = {}\n): PurviewScanningRestClient {\n const baseUrl = options.baseUrl ?? `${Endpoint}`;\n options.apiVersion = options.apiVersion ?? \"2018-12-01-preview\";\n options = {\n ...options,\n credentials: {\n scopes: [\"https://purview.azure.net/.default\"],\n },\n };\n\n return getClient(baseUrl, credentials, options) as PurviewScanningRestClient;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getPagedAsyncIterator, PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { Client, createRestError, 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 * 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","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport PurviewScanning from \"./purviewScanning\";\n\nexport * from \"./purviewScanning\";\nexport * from \"./models\";\nexport * from \"./parameters\";\nexport * from \"./responses\";\nexport * from \"./paginateHelper\";\n\nexport default PurviewScanning;\n"],"names":["getClient","getPagedAsyncIterator","createRestError"],"mappings":";;;;;;;AAAA;SAwdwB,eAAe,CACrC,QAAgB,EAChB,WAA4B,EAC5B,UAAyB,EAAE;;IAE3B,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,GAAG,QAAQ,EAAE,CAAC;IACjD,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,OAAO,mCACF,OAAO,KACV,WAAW,EAAE;YACX,MAAM,EAAE,CAAC,oCAAoC,CAAC;SAC/C,GACF,CAAC;IAEF,OAAOA,oBAAS,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAA8B,CAAC;AAC/E;;ACveA;AA6CA;;;;;;;SAOgB,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;cAC/B,aAAa;cACb,OAAO,QAAgB;gBACrB,MAAM,MAAM,GAAG,QAAQ,GAAG,eAAe,GAAG,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;aACH;KACR,CAAC;IAEF,OAAOC,gCAAqB,CAAC,WAAW,CAAC,CAAC;AAC5C,CAAC;AAED;;;AAGA,SAAS,WAAW,CAAC,IAAa,EAAE,YAAqB;IACvD,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,QAAQ,GAAI,IAAgC,CAAC,YAAY,CAAC,CAAC;IAEjE,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;QACnE,MAAM,IAAI,KAAK,CAAC,iBAAiB,YAAY,kCAAkC,CAAC,CAAC;KAClF;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;AAGA,SAAS,WAAW,CAAc,IAAa,EAAE,QAAgB;IAC/D,MAAM,KAAK,GAAI,IAAgC,CAAC,QAAQ,CAAQ,CAAC;;;;IAKjE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACzB,MAAM,IAAI,KAAK,CACb,kFAAkF,QAAQ,EAAE,CAC7F,CAAC;KACH;IAED,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC;AACrB,CAAC;AAED;;;AAGA,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;QACjD,MAAMC,0BAAe,CACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;KACH;AACH;;AClIA;;;;;"}
|
|
@@ -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 { RequestParameters } from \"@azure-rest/core-client\";\nimport {\n AzureKeyVault,\n ClassificationRule,\n DataSource,\n Filter,\n Scan,\n ScanRuleset,\n Trigger,\n} from \"./models\";\n\nexport type KeyVaultConnectionsGetParameters = RequestParameters;\n\nexport interface KeyVaultConnectionsCreateBodyParam {\n body: AzureKeyVault;\n}\n\nexport type KeyVaultConnectionsCreateParameters = KeyVaultConnectionsCreateBodyParam &\n RequestParameters;\nexport type KeyVaultConnectionsDeleteParameters = RequestParameters;\nexport type KeyVaultConnectionsListAllParameters = RequestParameters;\nexport type ClassificationRulesGetParameters = RequestParameters;\n\nexport interface ClassificationRulesCreateOrUpdateBodyParam {\n body?: ClassificationRule;\n}\n\nexport type ClassificationRulesCreateOrUpdateParameters
|
|
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 { RequestParameters } from \"@azure-rest/core-client\";\nimport {\n AzureKeyVault,\n ClassificationRule,\n DataSource,\n Filter,\n Scan,\n ScanRuleset,\n Trigger,\n} from \"./models\";\n\nexport type KeyVaultConnectionsGetParameters = RequestParameters;\n\nexport interface KeyVaultConnectionsCreateBodyParam {\n body: AzureKeyVault;\n}\n\nexport type KeyVaultConnectionsCreateParameters = KeyVaultConnectionsCreateBodyParam &\n RequestParameters;\nexport type KeyVaultConnectionsDeleteParameters = RequestParameters;\nexport type KeyVaultConnectionsListAllParameters = RequestParameters;\nexport type ClassificationRulesGetParameters = RequestParameters;\n\nexport interface ClassificationRulesCreateOrUpdateBodyParam {\n body?: ClassificationRule;\n}\n\nexport type ClassificationRulesCreateOrUpdateParameters =\n ClassificationRulesCreateOrUpdateBodyParam & RequestParameters;\nexport type ClassificationRulesDeleteParameters = RequestParameters;\nexport type ClassificationRulesListAllParameters = RequestParameters;\nexport type ClassificationRulesListVersionsByClassificationRuleNameParameters = RequestParameters;\n\nexport interface ClassificationRulesTagClassificationVersionQueryParamProperties {\n action: \"Keep\" | \"Delete\";\n}\n\nexport interface ClassificationRulesTagClassificationVersionQueryParam {\n queryParameters: ClassificationRulesTagClassificationVersionQueryParamProperties;\n}\n\nexport type ClassificationRulesTagClassificationVersionParameters =\n ClassificationRulesTagClassificationVersionQueryParam & RequestParameters;\n\nexport interface DataSourcesCreateOrUpdateBodyParam {\n body?: DataSource;\n}\n\nexport type DataSourcesCreateOrUpdateParameters = DataSourcesCreateOrUpdateBodyParam &\n RequestParameters;\nexport type DataSourcesGetParameters = RequestParameters;\nexport type DataSourcesDeleteParameters = RequestParameters;\nexport type DataSourcesListAllParameters = RequestParameters;\nexport type FiltersGetParameters = RequestParameters;\n\nexport interface FiltersCreateOrUpdateBodyParam {\n body?: Filter;\n}\n\nexport type FiltersCreateOrUpdateParameters = FiltersCreateOrUpdateBodyParam & RequestParameters;\n\nexport interface ScansCreateOrUpdateBodyParam {\n body: Scan;\n}\n\nexport type ScansCreateOrUpdateParameters = ScansCreateOrUpdateBodyParam & RequestParameters;\nexport type ScansGetParameters = RequestParameters;\nexport type ScansDeleteParameters = RequestParameters;\nexport type ScansListByDataSourceParameters = RequestParameters;\n\nexport interface ScanResultRunScanQueryParamProperties {\n scanLevel?: \"Full\" | \"Incremental\";\n}\n\nexport interface ScanResultRunScanQueryParam {\n queryParameters?: ScanResultRunScanQueryParamProperties;\n}\n\nexport type ScanResultRunScanParameters = ScanResultRunScanQueryParam & RequestParameters;\nexport type ScanResultCancelScanParameters = RequestParameters;\nexport type ScanResultListScanHistoryParameters = RequestParameters;\nexport type ScanRulesetsGetParameters = RequestParameters;\n\nexport interface ScanRulesetsCreateOrUpdateBodyParam {\n body?: ScanRuleset;\n}\n\nexport type ScanRulesetsCreateOrUpdateParameters = ScanRulesetsCreateOrUpdateBodyParam &\n RequestParameters;\nexport type ScanRulesetsDeleteParameters = RequestParameters;\nexport type ScanRulesetsListAllParameters = RequestParameters;\nexport type SystemScanRulesetsListAllParameters = RequestParameters;\nexport type SystemScanRulesetsGetParameters = RequestParameters;\n\nexport interface SystemScanRulesetsGetByVersionQueryParamProperties {\n dataSourceType?:\n | \"None\"\n | \"AzureSubscription\"\n | \"AzureResourceGroup\"\n | \"AzureSynapseWorkspace\"\n | \"AzureSynapse\"\n | \"AdlsGen1\"\n | \"AdlsGen2\"\n | \"AmazonAccount\"\n | \"AmazonS3\"\n | \"AmazonSql\"\n | \"AzureCosmosDb\"\n | \"AzureDataExplorer\"\n | \"AzureFileService\"\n | \"AzureSqlDatabase\"\n | \"AmazonPostgreSql\"\n | \"AzurePostgreSql\"\n | \"SqlServerDatabase\"\n | \"AzureSqlDatabaseManagedInstance\"\n | \"AzureSqlDataWarehouse\"\n | \"AzureMySql\"\n | \"AzureStorage\"\n | \"Teradata\"\n | \"Oracle\"\n | \"SapS4Hana\"\n | \"SapEcc\"\n | \"PowerBI\";\n}\n\nexport interface SystemScanRulesetsGetByVersionQueryParam {\n queryParameters?: SystemScanRulesetsGetByVersionQueryParamProperties;\n}\n\nexport type SystemScanRulesetsGetByVersionParameters = SystemScanRulesetsGetByVersionQueryParam &\n RequestParameters;\n\nexport interface SystemScanRulesetsGetLatestQueryParamProperties {\n dataSourceType?:\n | \"None\"\n | \"AzureSubscription\"\n | \"AzureResourceGroup\"\n | \"AzureSynapseWorkspace\"\n | \"AzureSynapse\"\n | \"AdlsGen1\"\n | \"AdlsGen2\"\n | \"AmazonAccount\"\n | \"AmazonS3\"\n | \"AmazonSql\"\n | \"AzureCosmosDb\"\n | \"AzureDataExplorer\"\n | \"AzureFileService\"\n | \"AzureSqlDatabase\"\n | \"AmazonPostgreSql\"\n | \"AzurePostgreSql\"\n | \"SqlServerDatabase\"\n | \"AzureSqlDatabaseManagedInstance\"\n | \"AzureSqlDataWarehouse\"\n | \"AzureMySql\"\n | \"AzureStorage\"\n | \"Teradata\"\n | \"Oracle\"\n | \"SapS4Hana\"\n | \"SapEcc\"\n | \"PowerBI\";\n}\n\nexport interface SystemScanRulesetsGetLatestQueryParam {\n queryParameters?: SystemScanRulesetsGetLatestQueryParamProperties;\n}\n\nexport type SystemScanRulesetsGetLatestParameters = SystemScanRulesetsGetLatestQueryParam &\n RequestParameters;\n\nexport interface SystemScanRulesetsListVersionsByDataSourceQueryParamProperties {\n dataSourceType?:\n | \"None\"\n | \"AzureSubscription\"\n | \"AzureResourceGroup\"\n | \"AzureSynapseWorkspace\"\n | \"AzureSynapse\"\n | \"AdlsGen1\"\n | \"AdlsGen2\"\n | \"AmazonAccount\"\n | \"AmazonS3\"\n | \"AmazonSql\"\n | \"AzureCosmosDb\"\n | \"AzureDataExplorer\"\n | \"AzureFileService\"\n | \"AzureSqlDatabase\"\n | \"AmazonPostgreSql\"\n | \"AzurePostgreSql\"\n | \"SqlServerDatabase\"\n | \"AzureSqlDatabaseManagedInstance\"\n | \"AzureSqlDataWarehouse\"\n | \"AzureMySql\"\n | \"AzureStorage\"\n | \"Teradata\"\n | \"Oracle\"\n | \"SapS4Hana\"\n | \"SapEcc\"\n | \"PowerBI\";\n}\n\nexport interface SystemScanRulesetsListVersionsByDataSourceQueryParam {\n queryParameters?: SystemScanRulesetsListVersionsByDataSourceQueryParamProperties;\n}\n\nexport type SystemScanRulesetsListVersionsByDataSourceParameters =\n SystemScanRulesetsListVersionsByDataSourceQueryParam & RequestParameters;\nexport type TriggersGetTriggerParameters = RequestParameters;\n\nexport interface TriggersCreateTriggerBodyParam {\n body: Trigger;\n}\n\nexport type TriggersCreateTriggerParameters = TriggersCreateTriggerBodyParam & RequestParameters;\nexport type TriggersDeleteTriggerParameters = RequestParameters;\n"]}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"sdk-type": "client",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "An isomorphic rest level client library for the Azure Purview Scanning service.",
|
|
6
|
-
"version": "1.0.0-alpha.
|
|
6
|
+
"version": "1.0.0-alpha.20220211.2",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"node",
|
|
9
9
|
"azure",
|
|
@@ -50,24 +50,21 @@
|
|
|
50
50
|
"disableDocsMs": true,
|
|
51
51
|
"apiRefLink": "https://docs.microsoft.com/rest/api/purview"
|
|
52
52
|
},
|
|
53
|
-
"browser": {
|
|
54
|
-
"./dist-esm/test/public/utils/env.js": "./dist-esm/test/public/utils/env.browser.js"
|
|
55
|
-
},
|
|
56
53
|
"scripts": {
|
|
57
54
|
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
|
|
58
|
-
"build:browser": "tsc -p . &&
|
|
59
|
-
"build:node": "tsc -p . &&
|
|
55
|
+
"build:browser": "tsc -p . && dev-tool run bundle",
|
|
56
|
+
"build:node": "tsc -p . && dev-tool run bundle",
|
|
60
57
|
"build:samples": "echo Obsolete.",
|
|
61
|
-
"build:test": "tsc -p . &&
|
|
62
|
-
"build": "npm run clean && tsc -p . &&
|
|
63
|
-
"build:debug": "tsc -p . &&
|
|
58
|
+
"build:test": "tsc -p . && dev-tool run bundle",
|
|
59
|
+
"build": "npm run clean && tsc -p . && dev-tool run bundle && api-extractor run --local",
|
|
60
|
+
"build:debug": "tsc -p . && dev-tool run bundle && api-extractor run --local",
|
|
64
61
|
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
|
|
65
62
|
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
|
66
63
|
"execute:samples": "dev-tool samples run samples-dev",
|
|
67
64
|
"extract-api": "rimraf review && mkdirp ./review && api-extractor run --local",
|
|
68
65
|
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
|
|
69
|
-
"integration-test:browser": "
|
|
70
|
-
"integration-test:node": "
|
|
66
|
+
"integration-test:browser": "dev-tool run test:browser",
|
|
67
|
+
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.spec.js'",
|
|
71
68
|
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
|
72
69
|
"generate:client": "autorest --typescript swagger/README.md && npm run format",
|
|
73
70
|
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
|
|
@@ -76,15 +73,15 @@
|
|
|
76
73
|
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser",
|
|
77
74
|
"test:node": "npm run clean && npm run build:test && npm run unit-test:node",
|
|
78
75
|
"test": "npm run clean && npm run build:test && npm run unit-test",
|
|
79
|
-
"unit-test:browser": "
|
|
80
|
-
"unit-test:node": "
|
|
76
|
+
"unit-test:browser": "dev-tool run test:browser",
|
|
77
|
+
"unit-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 --exclude 'test/**/browser/*.spec.ts' 'test/**/*.spec.ts'",
|
|
81
78
|
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
|
|
82
79
|
},
|
|
83
80
|
"sideEffects": false,
|
|
84
81
|
"autoPublish": false,
|
|
85
82
|
"dependencies": {
|
|
86
83
|
"@azure/core-auth": "^1.3.0",
|
|
87
|
-
"@azure-rest/core-client": "1.0.0-
|
|
84
|
+
"@azure-rest/core-client": ">=1.0.0-alpha <1.0.0-alphb",
|
|
88
85
|
"@azure/core-paging": "^1.1.1",
|
|
89
86
|
"@azure/core-rest-pipeline": "^1.1.0",
|
|
90
87
|
"@azure/logger": "^1.0.0",
|
|
@@ -94,7 +91,9 @@
|
|
|
94
91
|
"@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
|
|
95
92
|
"@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
|
|
96
93
|
"@azure/identity": "^2.0.1",
|
|
97
|
-
"@azure
|
|
94
|
+
"@azure/test-utils": ">=1.0.0-alpha <1.0.0-alphb",
|
|
95
|
+
"@azure-tools/test-credential": ">=1.0.0-alpha <1.0.0-alphb",
|
|
96
|
+
"@azure-tools/test-recorder": ">=2.0.0-alpha <2.0.0-alphb",
|
|
98
97
|
"@microsoft/api-extractor": "^7.18.11",
|
|
99
98
|
"@types/chai": "^4.1.6",
|
|
100
99
|
"@types/mocha": "^7.0.2",
|
|
@@ -109,8 +108,6 @@
|
|
|
109
108
|
"karma-env-preprocessor": "^0.1.1",
|
|
110
109
|
"karma-firefox-launcher": "^1.1.0",
|
|
111
110
|
"karma-ie-launcher": "^1.0.0",
|
|
112
|
-
"karma-json-preprocessor": "^0.3.3",
|
|
113
|
-
"karma-json-to-file-reporter": "^1.0.1",
|
|
114
111
|
"karma-junit-reporter": "^2.0.1",
|
|
115
112
|
"karma-mocha-reporter": "^2.2.5",
|
|
116
113
|
"karma-mocha": "^2.0.1",
|
|
@@ -121,9 +118,8 @@
|
|
|
121
118
|
"mocha-junit-reporter": "^2.0.0",
|
|
122
119
|
"mocha": "^7.1.1",
|
|
123
120
|
"nyc": "^15.0.0",
|
|
124
|
-
"prettier": "2.
|
|
121
|
+
"prettier": "2.5.1",
|
|
125
122
|
"rimraf": "^3.0.0",
|
|
126
|
-
"rollup": "^1.16.3",
|
|
127
123
|
"source-map-support": "^0.5.9",
|
|
128
124
|
"typescript": "~4.2.0"
|
|
129
125
|
}
|