@azure/arm-devhub 1.0.0-beta.2 → 1.0.0-beta.4
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/CHANGELOG.md +53 -2
- package/LICENSE +4 -4
- package/README.md +25 -18
- package/{dist-esm/src → dist/browser}/developerHubServiceClient.d.ts +9 -2
- package/dist/browser/developerHubServiceClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/developerHubServiceClient.js +67 -27
- package/dist/browser/developerHubServiceClient.js.map +1 -0
- package/dist/browser/index.d.ts +5 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/index.js +4 -4
- package/dist/browser/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/models/index.d.ts +222 -20
- package/dist/browser/models/index.d.ts.map +1 -0
- package/dist/browser/models/index.js +130 -0
- package/dist/browser/models/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/models/mappers.d.ts +1 -0
- package/{dist-esm/src → dist/browser}/models/mappers.d.ts.map +1 -1
- package/{dist-esm/src → dist/browser}/models/mappers.js +219 -22
- package/dist/browser/models/mappers.js.map +1 -0
- package/{dist-esm/src → dist/browser}/models/parameters.d.ts +2 -1
- package/{dist-esm/src → dist/browser}/models/parameters.d.ts.map +1 -1
- package/{dist-esm/src → dist/browser}/models/parameters.js +8 -4
- package/dist/browser/models/parameters.js.map +1 -0
- package/dist/browser/operations/index.d.ts +3 -0
- package/{dist-esm/src → dist/browser}/operations/index.d.ts.map +1 -1
- package/{dist-esm/src → dist/browser}/operations/index.js +2 -2
- package/dist/browser/operations/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/operations.d.ts +3 -3
- package/dist/browser/operations/operations.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/operations.js +3 -2
- package/dist/browser/operations/operations.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/workflowOperations.d.ts +3 -3
- package/dist/browser/operations/workflowOperations.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/workflowOperations.js +50 -80
- package/dist/browser/operations/workflowOperations.js.map +1 -0
- package/dist/browser/operationsInterfaces/index.d.ts +3 -0
- package/{dist-esm/src → dist/browser}/operationsInterfaces/index.d.ts.map +1 -1
- package/{dist-esm/src → dist/browser}/operationsInterfaces/index.js +2 -2
- package/dist/browser/operationsInterfaces/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operationsInterfaces/operations.d.ts +1 -1
- package/dist/browser/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/operations.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operationsInterfaces/workflowOperations.d.ts +1 -1
- package/dist/browser/operationsInterfaces/workflowOperations.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/workflowOperations.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/{dist-esm/src → dist/browser}/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -0
- package/dist/commonjs/developerHubServiceClient.d.ts +48 -0
- package/dist/commonjs/developerHubServiceClient.d.ts.map +1 -0
- package/dist/commonjs/developerHubServiceClient.js +238 -0
- package/dist/commonjs/developerHubServiceClient.js.map +1 -0
- package/dist/commonjs/index.d.ts +5 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +19 -0
- package/dist/commonjs/index.js.map +1 -0
- package/{types/arm-devhub.d.ts → dist/commonjs/models/index.d.ts} +658 -616
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +133 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/mappers.d.ts +25 -0
- package/dist/commonjs/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/models/mappers.js +850 -0
- package/dist/commonjs/models/mappers.js.map +1 -0
- package/dist/commonjs/models/parameters.d.ts +18 -0
- package/dist/commonjs/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/models/parameters.js +167 -0
- package/dist/commonjs/models/parameters.js.map +1 -0
- package/dist/commonjs/operations/index.d.ts +3 -0
- package/dist/commonjs/operations/index.d.ts.map +1 -0
- package/dist/commonjs/operations/index.js +13 -0
- package/dist/commonjs/operations/index.js.map +1 -0
- package/dist/commonjs/operations/operations.d.ts +18 -0
- package/dist/commonjs/operations/operations.d.ts.map +1 -0
- package/dist/commonjs/operations/operations.js +52 -0
- package/dist/commonjs/operations/operations.js.map +1 -0
- package/dist/commonjs/operations/workflowOperations.d.ts +83 -0
- package/dist/commonjs/operations/workflowOperations.d.ts.map +1 -0
- package/dist/commonjs/operations/workflowOperations.js +357 -0
- package/dist/commonjs/operations/workflowOperations.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts +3 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/index.js +13 -0
- package/dist/commonjs/operationsInterfaces/index.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/operations.d.ts +10 -0
- package/dist/commonjs/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/operations.js +10 -0
- package/dist/commonjs/operationsInterfaces/operations.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/workflowOperations.d.ts +47 -0
- package/dist/commonjs/operationsInterfaces/workflowOperations.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/workflowOperations.js +10 -0
- package/dist/commonjs/operationsInterfaces/workflowOperations.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/pagingHelper.d.ts +13 -0
- package/dist/commonjs/pagingHelper.d.ts.map +1 -0
- package/dist/commonjs/pagingHelper.js +34 -0
- package/dist/commonjs/pagingHelper.js.map +1 -0
- package/{types → dist/commonjs}/tsdoc-metadata.json +11 -11
- package/dist/esm/developerHubServiceClient.d.ts +48 -0
- package/dist/esm/developerHubServiceClient.d.ts.map +1 -0
- package/dist/esm/developerHubServiceClient.js +233 -0
- package/dist/esm/developerHubServiceClient.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/{src/index.ts → dist/esm/index.js} +5 -5
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/models/index.d.ts +658 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +130 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/mappers.d.ts +25 -0
- package/dist/esm/models/mappers.d.ts.map +1 -0
- package/dist/esm/models/mappers.js +847 -0
- package/dist/esm/models/mappers.js.map +1 -0
- package/dist/esm/models/parameters.d.ts +18 -0
- package/dist/esm/models/parameters.d.ts.map +1 -0
- package/dist/esm/models/parameters.js +164 -0
- package/dist/esm/models/parameters.js.map +1 -0
- package/dist/esm/operations/index.d.ts +3 -0
- package/dist/esm/operations/index.d.ts.map +1 -0
- package/dist/esm/operations/index.js +10 -0
- package/dist/esm/operations/index.js.map +1 -0
- package/dist/esm/operations/operations.d.ts +18 -0
- package/dist/esm/operations/operations.d.ts.map +1 -0
- package/dist/esm/operations/operations.js +47 -0
- package/dist/esm/operations/operations.js.map +1 -0
- package/dist/esm/operations/workflowOperations.d.ts +83 -0
- package/dist/esm/operations/workflowOperations.d.ts.map +1 -0
- package/dist/esm/operations/workflowOperations.js +352 -0
- package/dist/esm/operations/workflowOperations.js.map +1 -0
- package/dist/esm/operationsInterfaces/index.d.ts +3 -0
- package/dist/esm/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/index.js +10 -0
- package/dist/esm/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/operationsInterfaces/operations.d.ts +10 -0
- package/dist/esm/operationsInterfaces/operations.d.ts.map +1 -0
- package/{src/operations/index.ts → dist/esm/operationsInterfaces/operations.js} +2 -3
- package/dist/esm/operationsInterfaces/operations.js.map +1 -0
- package/dist/esm/operationsInterfaces/workflowOperations.d.ts +47 -0
- package/dist/esm/operationsInterfaces/workflowOperations.d.ts.map +1 -0
- package/{src/operationsInterfaces/index.ts → dist/esm/operationsInterfaces/workflowOperations.js} +2 -3
- package/dist/esm/operationsInterfaces/workflowOperations.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/pagingHelper.d.ts +13 -0
- package/dist/esm/pagingHelper.d.ts.map +1 -0
- package/dist/esm/pagingHelper.js +30 -0
- package/dist/esm/pagingHelper.js.map +1 -0
- package/dist/react-native/developerHubServiceClient.d.ts +48 -0
- package/dist/react-native/developerHubServiceClient.d.ts.map +1 -0
- package/dist/react-native/developerHubServiceClient.js +233 -0
- package/dist/react-native/developerHubServiceClient.js.map +1 -0
- package/dist/react-native/index.d.ts +5 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +13 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/models/index.d.ts +658 -0
- package/dist/react-native/models/index.d.ts.map +1 -0
- package/dist/react-native/models/index.js +130 -0
- package/dist/react-native/models/index.js.map +1 -0
- package/dist/react-native/models/mappers.d.ts +25 -0
- package/dist/react-native/models/mappers.d.ts.map +1 -0
- package/dist/react-native/models/mappers.js +847 -0
- package/dist/react-native/models/mappers.js.map +1 -0
- package/dist/react-native/models/parameters.d.ts +18 -0
- package/dist/react-native/models/parameters.d.ts.map +1 -0
- package/dist/react-native/models/parameters.js +164 -0
- package/dist/react-native/models/parameters.js.map +1 -0
- package/dist/react-native/operations/index.d.ts +3 -0
- package/dist/react-native/operations/index.d.ts.map +1 -0
- package/dist/react-native/operations/index.js +10 -0
- package/dist/react-native/operations/index.js.map +1 -0
- package/dist/react-native/operations/operations.d.ts +18 -0
- package/dist/react-native/operations/operations.d.ts.map +1 -0
- package/dist/react-native/operations/operations.js +47 -0
- package/dist/react-native/operations/operations.js.map +1 -0
- package/dist/react-native/operations/workflowOperations.d.ts +83 -0
- package/dist/react-native/operations/workflowOperations.d.ts.map +1 -0
- package/dist/react-native/operations/workflowOperations.js +352 -0
- package/dist/react-native/operations/workflowOperations.js.map +1 -0
- package/dist/react-native/operationsInterfaces/index.d.ts +3 -0
- package/dist/react-native/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/index.js +10 -0
- package/dist/react-native/operationsInterfaces/index.js.map +1 -0
- package/dist/react-native/operationsInterfaces/operations.d.ts +10 -0
- package/dist/react-native/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/operations.js +9 -0
- package/dist/react-native/operationsInterfaces/operations.js.map +1 -0
- package/dist/react-native/operationsInterfaces/workflowOperations.d.ts +47 -0
- package/dist/react-native/operationsInterfaces/workflowOperations.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/workflowOperations.js +9 -0
- package/dist/react-native/operationsInterfaces/workflowOperations.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/pagingHelper.d.ts +13 -0
- package/dist/react-native/pagingHelper.d.ts.map +1 -0
- package/dist/react-native/pagingHelper.js +30 -0
- package/dist/react-native/pagingHelper.js.map +1 -0
- package/package.json +85 -76
- package/review/{arm-devhub.api.md → arm-devhub-node.api.md} +110 -2
- package/dist/index.js +0 -1562
- package/dist/index.js.map +0 -1
- package/dist/index.min.js +0 -1
- package/dist/index.min.js.map +0 -1
- package/dist-esm/samples-dev/gitHubOAuthCallbackSample.d.ts +0 -2
- package/dist-esm/samples-dev/gitHubOAuthCallbackSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/gitHubOAuthCallbackSample.js +0 -39
- package/dist-esm/samples-dev/gitHubOAuthCallbackSample.js.map +0 -1
- package/dist-esm/samples-dev/gitHubOAuthSample.d.ts +0 -2
- package/dist-esm/samples-dev/gitHubOAuthSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/gitHubOAuthSample.js +0 -41
- package/dist-esm/samples-dev/gitHubOAuthSample.js.map +0 -1
- package/dist-esm/samples-dev/listGitHubOAuthSample.d.ts +0 -2
- package/dist-esm/samples-dev/listGitHubOAuthSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/listGitHubOAuthSample.js +0 -37
- package/dist-esm/samples-dev/listGitHubOAuthSample.js.map +0 -1
- package/dist-esm/samples-dev/operationsListSample.d.ts +0 -2
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/operationsListSample.js +0 -37
- package/dist-esm/samples-dev/operationsListSample.js.map +0 -1
- package/dist-esm/samples-dev/workflowCreateOrUpdateSample.d.ts +0 -2
- package/dist-esm/samples-dev/workflowCreateOrUpdateSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/workflowCreateOrUpdateSample.js +0 -63
- package/dist-esm/samples-dev/workflowCreateOrUpdateSample.js.map +0 -1
- package/dist-esm/samples-dev/workflowDeleteSample.d.ts +0 -2
- package/dist-esm/samples-dev/workflowDeleteSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/workflowDeleteSample.js +0 -38
- package/dist-esm/samples-dev/workflowDeleteSample.js.map +0 -1
- package/dist-esm/samples-dev/workflowGetSample.d.ts +0 -2
- package/dist-esm/samples-dev/workflowGetSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/workflowGetSample.js +0 -38
- package/dist-esm/samples-dev/workflowGetSample.js.map +0 -1
- package/dist-esm/samples-dev/workflowListByResourceGroupSample.d.ts +0 -2
- package/dist-esm/samples-dev/workflowListByResourceGroupSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/workflowListByResourceGroupSample.js +0 -55
- package/dist-esm/samples-dev/workflowListByResourceGroupSample.js.map +0 -1
- package/dist-esm/samples-dev/workflowListSample.d.ts +0 -2
- package/dist-esm/samples-dev/workflowListSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/workflowListSample.js +0 -50
- package/dist-esm/samples-dev/workflowListSample.js.map +0 -1
- package/dist-esm/samples-dev/workflowUpdateTagsSample.d.ts +0 -2
- package/dist-esm/samples-dev/workflowUpdateTagsSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/workflowUpdateTagsSample.js +0 -41
- package/dist-esm/samples-dev/workflowUpdateTagsSample.js.map +0 -1
- package/dist-esm/src/developerHubServiceClient.d.ts.map +0 -1
- package/dist-esm/src/developerHubServiceClient.js.map +0 -1
- package/dist-esm/src/index.d.ts +0 -6
- package/dist-esm/src/index.d.ts.map +0 -1
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/models/index.d.ts.map +0 -1
- package/dist-esm/src/models/index.js +0 -56
- package/dist-esm/src/models/index.js.map +0 -1
- package/dist-esm/src/models/mappers.js.map +0 -1
- package/dist-esm/src/models/parameters.js.map +0 -1
- package/dist-esm/src/operations/index.d.ts +0 -3
- package/dist-esm/src/operations/index.js.map +0 -1
- package/dist-esm/src/operations/operations.d.ts.map +0 -1
- package/dist-esm/src/operations/operations.js.map +0 -1
- package/dist-esm/src/operations/workflowOperations.d.ts.map +0 -1
- package/dist-esm/src/operations/workflowOperations.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts +0 -3
- package/dist-esm/src/operationsInterfaces/index.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +0 -1
- package/dist-esm/src/operationsInterfaces/operations.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/workflowOperations.d.ts.map +0 -1
- package/dist-esm/src/operationsInterfaces/workflowOperations.js.map +0 -1
- package/dist-esm/src/pagingHelper.js.map +0 -1
- package/dist-esm/test/devhub_examples.spec.d.ts +0 -4
- package/dist-esm/test/devhub_examples.spec.d.ts.map +0 -1
- package/dist-esm/test/devhub_examples.spec.js +0 -67
- package/dist-esm/test/devhub_examples.spec.js.map +0 -1
- package/rollup.config.js +0 -122
- package/src/developerHubServiceClient.ts +0 -269
- package/src/models/index.ts +0 -515
- package/src/models/mappers.ts +0 -699
- package/src/models/parameters.ts +0 -186
- package/src/operations/operations.ts +0 -59
- package/src/operations/workflowOperations.ts +0 -476
- package/src/operationsInterfaces/operations.ts +0 -21
- package/src/operationsInterfaces/workflowOperations.ts +0 -92
- package/src/pagingHelper.ts +0 -39
- package/tsconfig.json +0 -33
- /package/{dist-esm/src → dist/browser}/operationsInterfaces/operations.js +0 -0
- /package/{dist-esm/src → dist/browser}/operationsInterfaces/workflowOperations.js +0 -0
- /package/{dist-esm/src → dist/browser}/pagingHelper.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/pagingHelper.d.ts.map +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as coreClient from "@azure/core-client";
|
|
2
|
+
import * as coreAuth from "@azure/core-auth";
|
|
3
|
+
import { Operations, WorkflowOperations } from "./operationsInterfaces/index.js";
|
|
4
|
+
import { DeveloperHubServiceClientOptionalParams, GitHubOAuthOptionalParams, GitHubOAuthOperationResponse, GitHubOAuthCallbackOptionalParams, GitHubOAuthCallbackResponse, ListGitHubOAuthOptionalParams, ListGitHubOAuthResponse, ArtifactGenerationProperties, GeneratePreviewArtifactsOptionalParams, GeneratePreviewArtifactsResponse } from "./models/index.js";
|
|
5
|
+
export declare class DeveloperHubServiceClient extends coreClient.ServiceClient {
|
|
6
|
+
$host: string;
|
|
7
|
+
apiVersion: string;
|
|
8
|
+
subscriptionId: string;
|
|
9
|
+
/**
|
|
10
|
+
* Initializes a new instance of the DeveloperHubServiceClient class.
|
|
11
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
12
|
+
* @param subscriptionId The ID of the target subscription.
|
|
13
|
+
* @param options The parameter options
|
|
14
|
+
*/
|
|
15
|
+
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: DeveloperHubServiceClientOptionalParams);
|
|
16
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
17
|
+
private addCustomApiVersionPolicy;
|
|
18
|
+
/**
|
|
19
|
+
* Gets GitHubOAuth info used to authenticate users with the Developer Hub GitHub App.
|
|
20
|
+
* @param location The name of Azure region.
|
|
21
|
+
* @param options The options parameters.
|
|
22
|
+
*/
|
|
23
|
+
gitHubOAuth(location: string, options?: GitHubOAuthOptionalParams): Promise<GitHubOAuthOperationResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Callback URL to hit once authenticated with GitHub App to have the service store the OAuth token.
|
|
26
|
+
* @param location The name of Azure region.
|
|
27
|
+
* @param code The code response from authenticating the GitHub App.
|
|
28
|
+
* @param state The state response from authenticating the GitHub App.
|
|
29
|
+
* @param options The options parameters.
|
|
30
|
+
*/
|
|
31
|
+
gitHubOAuthCallback(location: string, code: string, state: string, options?: GitHubOAuthCallbackOptionalParams): Promise<GitHubOAuthCallbackResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Callback URL to hit once authenticated with GitHub App to have the service store the OAuth token.
|
|
34
|
+
* @param location The name of Azure region.
|
|
35
|
+
* @param options The options parameters.
|
|
36
|
+
*/
|
|
37
|
+
listGitHubOAuth(location: string, options?: ListGitHubOAuthOptionalParams): Promise<ListGitHubOAuthResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Generate preview dockerfile and manifests.
|
|
40
|
+
* @param location The name of Azure region.
|
|
41
|
+
* @param parameters Properties used for generating artifacts such as Dockerfiles and manifests.
|
|
42
|
+
* @param options The options parameters.
|
|
43
|
+
*/
|
|
44
|
+
generatePreviewArtifacts(location: string, parameters: ArtifactGenerationProperties, options?: GeneratePreviewArtifactsOptionalParams): Promise<GeneratePreviewArtifactsResponse>;
|
|
45
|
+
operations: Operations;
|
|
46
|
+
workflowOperations: WorkflowOperations;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=developerHubServiceClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"developerHubServiceClient.d.ts","sourceRoot":"","sources":["../../src/developerHubServiceClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAOjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAGjF,OAAO,EACL,uCAAuC,EACvC,yBAAyB,EACzB,4BAA4B,EAC5B,iCAAiC,EACjC,2BAA2B,EAC3B,6BAA6B,EAC7B,uBAAuB,EACvB,4BAA4B,EAC5B,sCAAsC,EACtC,gCAAgC,EACjC,MAAM,mBAAmB,CAAC;AAE3B,qBAAa,yBAA0B,SAAQ,UAAU,CAAC,aAAa;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,uCAAuC;IA6EnD,8GAA8G;IAC9G,OAAO,CAAC,yBAAyB;IA2BjC;;;;OAIG;IACH,WAAW,CACT,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC,4BAA4B,CAAC;IAOxC;;;;;;OAMG;IACH,mBAAmB,CACjB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,iCAAiC,GAC1C,OAAO,CAAC,2BAA2B,CAAC;IAOvC;;;;OAIG;IACH,eAAe,CACb,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,6BAA6B,GACtC,OAAO,CAAC,uBAAuB,CAAC;IAOnC;;;;;OAKG;IACH,wBAAwB,CACtB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,4BAA4B,EACxC,OAAO,CAAC,EAAE,sCAAsC,GAC/C,OAAO,CAAC,gCAAgC,CAAC;IAO5C,UAAU,EAAE,UAAU,CAAC;IACvB,kBAAkB,EAAE,kBAAkB,CAAC;CACxC"}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import * as coreClient from "@azure/core-client";
|
|
9
|
+
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
10
|
+
import { OperationsImpl, WorkflowOperationsImpl } from "./operations/index.js";
|
|
11
|
+
import * as Parameters from "./models/parameters.js";
|
|
12
|
+
import * as Mappers from "./models/mappers.js";
|
|
13
|
+
export class DeveloperHubServiceClient extends coreClient.ServiceClient {
|
|
14
|
+
$host;
|
|
15
|
+
apiVersion;
|
|
16
|
+
subscriptionId;
|
|
17
|
+
/**
|
|
18
|
+
* Initializes a new instance of the DeveloperHubServiceClient class.
|
|
19
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
20
|
+
* @param subscriptionId The ID of the target subscription.
|
|
21
|
+
* @param options The parameter options
|
|
22
|
+
*/
|
|
23
|
+
constructor(credentials, subscriptionId, options) {
|
|
24
|
+
if (credentials === undefined) {
|
|
25
|
+
throw new Error("'credentials' cannot be null");
|
|
26
|
+
}
|
|
27
|
+
if (subscriptionId === undefined) {
|
|
28
|
+
throw new Error("'subscriptionId' cannot be null");
|
|
29
|
+
}
|
|
30
|
+
// Initializing default values for options
|
|
31
|
+
if (!options) {
|
|
32
|
+
options = {};
|
|
33
|
+
}
|
|
34
|
+
const defaults = {
|
|
35
|
+
requestContentType: "application/json; charset=utf-8",
|
|
36
|
+
credential: credentials
|
|
37
|
+
};
|
|
38
|
+
const packageDetails = `azsdk-js-arm-devhub/1.0.0-beta.4`;
|
|
39
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
40
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
41
|
+
: `${packageDetails}`;
|
|
42
|
+
const optionsWithDefaults = {
|
|
43
|
+
...defaults,
|
|
44
|
+
...options,
|
|
45
|
+
userAgentOptions: {
|
|
46
|
+
userAgentPrefix
|
|
47
|
+
},
|
|
48
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
49
|
+
};
|
|
50
|
+
super(optionsWithDefaults);
|
|
51
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
52
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
53
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
54
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
55
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
56
|
+
}
|
|
57
|
+
if (!options ||
|
|
58
|
+
!options.pipeline ||
|
|
59
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
60
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
61
|
+
this.pipeline.removePolicy({
|
|
62
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
63
|
+
});
|
|
64
|
+
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
65
|
+
credential: credentials,
|
|
66
|
+
scopes: optionsWithDefaults.credentialScopes ??
|
|
67
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
68
|
+
challengeCallbacks: {
|
|
69
|
+
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
70
|
+
}
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
// Parameter assignments
|
|
74
|
+
this.subscriptionId = subscriptionId;
|
|
75
|
+
// Assigning values to Constant parameters
|
|
76
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
77
|
+
this.apiVersion = options.apiVersion || "2022-10-11-preview";
|
|
78
|
+
this.operations = new OperationsImpl(this);
|
|
79
|
+
this.workflowOperations = new WorkflowOperationsImpl(this);
|
|
80
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
81
|
+
}
|
|
82
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
83
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
84
|
+
if (!apiVersion) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const apiVersionPolicy = {
|
|
88
|
+
name: "CustomApiVersionPolicy",
|
|
89
|
+
async sendRequest(request, next) {
|
|
90
|
+
const param = request.url.split("?");
|
|
91
|
+
if (param.length > 1) {
|
|
92
|
+
const newParams = param[1].split("&").map((item) => {
|
|
93
|
+
if (item.indexOf("api-version") > -1) {
|
|
94
|
+
return "api-version=" + apiVersion;
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
return item;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
101
|
+
}
|
|
102
|
+
return next(request);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Gets GitHubOAuth info used to authenticate users with the Developer Hub GitHub App.
|
|
109
|
+
* @param location The name of Azure region.
|
|
110
|
+
* @param options The options parameters.
|
|
111
|
+
*/
|
|
112
|
+
gitHubOAuth(location, options) {
|
|
113
|
+
return this.sendOperationRequest({ location, options }, gitHubOAuthOperationSpec);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Callback URL to hit once authenticated with GitHub App to have the service store the OAuth token.
|
|
117
|
+
* @param location The name of Azure region.
|
|
118
|
+
* @param code The code response from authenticating the GitHub App.
|
|
119
|
+
* @param state The state response from authenticating the GitHub App.
|
|
120
|
+
* @param options The options parameters.
|
|
121
|
+
*/
|
|
122
|
+
gitHubOAuthCallback(location, code, state, options) {
|
|
123
|
+
return this.sendOperationRequest({ location, code, state, options }, gitHubOAuthCallbackOperationSpec);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Callback URL to hit once authenticated with GitHub App to have the service store the OAuth token.
|
|
127
|
+
* @param location The name of Azure region.
|
|
128
|
+
* @param options The options parameters.
|
|
129
|
+
*/
|
|
130
|
+
listGitHubOAuth(location, options) {
|
|
131
|
+
return this.sendOperationRequest({ location, options }, listGitHubOAuthOperationSpec);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Generate preview dockerfile and manifests.
|
|
135
|
+
* @param location The name of Azure region.
|
|
136
|
+
* @param parameters Properties used for generating artifacts such as Dockerfiles and manifests.
|
|
137
|
+
* @param options The options parameters.
|
|
138
|
+
*/
|
|
139
|
+
generatePreviewArtifacts(location, parameters, options) {
|
|
140
|
+
return this.sendOperationRequest({ location, parameters, options }, generatePreviewArtifactsOperationSpec);
|
|
141
|
+
}
|
|
142
|
+
operations;
|
|
143
|
+
workflowOperations;
|
|
144
|
+
}
|
|
145
|
+
// Operation Specifications
|
|
146
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
147
|
+
const gitHubOAuthOperationSpec = {
|
|
148
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.DevHub/locations/{location}/githuboauth/default/getGitHubOAuthInfo",
|
|
149
|
+
httpMethod: "POST",
|
|
150
|
+
responses: {
|
|
151
|
+
200: {
|
|
152
|
+
bodyMapper: Mappers.GitHubOAuthInfoResponse
|
|
153
|
+
},
|
|
154
|
+
default: {
|
|
155
|
+
bodyMapper: Mappers.ErrorResponse
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
requestBody: Parameters.parameters,
|
|
159
|
+
queryParameters: [Parameters.apiVersion],
|
|
160
|
+
urlParameters: [
|
|
161
|
+
Parameters.$host,
|
|
162
|
+
Parameters.subscriptionId,
|
|
163
|
+
Parameters.location
|
|
164
|
+
],
|
|
165
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
166
|
+
mediaType: "json",
|
|
167
|
+
serializer
|
|
168
|
+
};
|
|
169
|
+
const gitHubOAuthCallbackOperationSpec = {
|
|
170
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.DevHub/locations/{location}/githuboauth/default",
|
|
171
|
+
httpMethod: "GET",
|
|
172
|
+
responses: {
|
|
173
|
+
200: {
|
|
174
|
+
bodyMapper: Mappers.GitHubOAuthResponse
|
|
175
|
+
},
|
|
176
|
+
default: {
|
|
177
|
+
bodyMapper: Mappers.ErrorResponse
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
queryParameters: [Parameters.apiVersion, Parameters.code, Parameters.state],
|
|
181
|
+
urlParameters: [
|
|
182
|
+
Parameters.$host,
|
|
183
|
+
Parameters.subscriptionId,
|
|
184
|
+
Parameters.location
|
|
185
|
+
],
|
|
186
|
+
headerParameters: [Parameters.accept],
|
|
187
|
+
serializer
|
|
188
|
+
};
|
|
189
|
+
const listGitHubOAuthOperationSpec = {
|
|
190
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.DevHub/locations/{location}/githuboauth",
|
|
191
|
+
httpMethod: "GET",
|
|
192
|
+
responses: {
|
|
193
|
+
200: {
|
|
194
|
+
bodyMapper: Mappers.GitHubOAuthListResponse
|
|
195
|
+
},
|
|
196
|
+
default: {
|
|
197
|
+
bodyMapper: Mappers.ErrorResponse
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
queryParameters: [Parameters.apiVersion],
|
|
201
|
+
urlParameters: [
|
|
202
|
+
Parameters.$host,
|
|
203
|
+
Parameters.subscriptionId,
|
|
204
|
+
Parameters.location
|
|
205
|
+
],
|
|
206
|
+
headerParameters: [Parameters.accept],
|
|
207
|
+
serializer
|
|
208
|
+
};
|
|
209
|
+
const generatePreviewArtifactsOperationSpec = {
|
|
210
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.DevHub/locations/{location}/generatePreviewArtifacts",
|
|
211
|
+
httpMethod: "POST",
|
|
212
|
+
responses: {
|
|
213
|
+
200: {
|
|
214
|
+
bodyMapper: {
|
|
215
|
+
type: { name: "Dictionary", value: { type: { name: "String" } } }
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
default: {
|
|
219
|
+
bodyMapper: Mappers.ErrorResponse
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
requestBody: Parameters.parameters1,
|
|
223
|
+
queryParameters: [Parameters.apiVersion],
|
|
224
|
+
urlParameters: [
|
|
225
|
+
Parameters.$host,
|
|
226
|
+
Parameters.subscriptionId,
|
|
227
|
+
Parameters.location
|
|
228
|
+
],
|
|
229
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
230
|
+
mediaType: "json",
|
|
231
|
+
serializer
|
|
232
|
+
};
|
|
233
|
+
//# sourceMappingURL=developerHubServiceClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"developerHubServiceClient.js","sourceRoot":"","sources":["../../src/developerHubServiceClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAc/C,MAAM,OAAO,yBAA0B,SAAQ,UAAU,CAAC,aAAa;IACrE,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAiD;QAEjD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAA4C;YACxD,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB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UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qCAAqC,GAA6B;IACtE,IAAI,EACF,0GAA0G;IAC5G,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE;gBACV,IAAI,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;aAClE;SACF;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,WAAW;IACnC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport { OperationsImpl, WorkflowOperationsImpl } from \"./operations/index.js\";\nimport { Operations, WorkflowOperations } from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n DeveloperHubServiceClientOptionalParams,\n GitHubOAuthOptionalParams,\n GitHubOAuthOperationResponse,\n GitHubOAuthCallbackOptionalParams,\n GitHubOAuthCallbackResponse,\n ListGitHubOAuthOptionalParams,\n ListGitHubOAuthResponse,\n ArtifactGenerationProperties,\n GeneratePreviewArtifactsOptionalParams,\n GeneratePreviewArtifactsResponse\n} from \"./models/index.js\";\n\nexport class DeveloperHubServiceClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the DeveloperHubServiceClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: DeveloperHubServiceClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: DeveloperHubServiceClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-devhub/1.0.0-beta.4`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2022-10-11-preview\";\n this.operations = new OperationsImpl(this);\n this.workflowOperations = new WorkflowOperationsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n /**\n * Gets GitHubOAuth info used to authenticate users with the Developer Hub GitHub App.\n * @param location The name of Azure region.\n * @param options The options parameters.\n */\n gitHubOAuth(\n location: string,\n options?: GitHubOAuthOptionalParams\n ): Promise<GitHubOAuthOperationResponse> {\n return this.sendOperationRequest(\n { location, options },\n gitHubOAuthOperationSpec\n );\n }\n\n /**\n * Callback URL to hit once authenticated with GitHub App to have the service store the OAuth token.\n * @param location The name of Azure region.\n * @param code The code response from authenticating the GitHub App.\n * @param state The state response from authenticating the GitHub App.\n * @param options The options parameters.\n */\n gitHubOAuthCallback(\n location: string,\n code: string,\n state: string,\n options?: GitHubOAuthCallbackOptionalParams\n ): Promise<GitHubOAuthCallbackResponse> {\n return this.sendOperationRequest(\n { location, code, state, options },\n gitHubOAuthCallbackOperationSpec\n );\n }\n\n /**\n * Callback URL to hit once authenticated with GitHub App to have the service store the OAuth token.\n * @param location The name of Azure region.\n * @param options The options parameters.\n */\n listGitHubOAuth(\n location: string,\n options?: ListGitHubOAuthOptionalParams\n ): Promise<ListGitHubOAuthResponse> {\n return this.sendOperationRequest(\n { location, options },\n listGitHubOAuthOperationSpec\n );\n }\n\n /**\n * Generate preview dockerfile and manifests.\n * @param location The name of Azure region.\n * @param parameters Properties used for generating artifacts such as Dockerfiles and manifests.\n * @param options The options parameters.\n */\n generatePreviewArtifacts(\n location: string,\n parameters: ArtifactGenerationProperties,\n options?: GeneratePreviewArtifactsOptionalParams\n ): Promise<GeneratePreviewArtifactsResponse> {\n return this.sendOperationRequest(\n { location, parameters, options },\n generatePreviewArtifactsOperationSpec\n );\n }\n\n operations: Operations;\n workflowOperations: WorkflowOperations;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst gitHubOAuthOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.DevHub/locations/{location}/githuboauth/default/getGitHubOAuthInfo\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.GitHubOAuthInfoResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst gitHubOAuthCallbackOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.DevHub/locations/{location}/githuboauth/default\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GitHubOAuthResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.code, Parameters.state],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listGitHubOAuthOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.DevHub/locations/{location}/githuboauth\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GitHubOAuthListResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst generatePreviewArtifactsOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.DevHub/locations/{location}/generatePreviewArtifacts\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: {\n type: { name: \"Dictionary\", value: { type: { name: \"String\" } } }\n }\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.parameters1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,cAAc,iCAAiC,CAAC"}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
8
|
/// <reference lib="esnext.asynciterable" />
|
|
10
|
-
export { getContinuationToken } from "./pagingHelper";
|
|
11
|
-
export * from "./models";
|
|
12
|
-
export { DeveloperHubServiceClient } from "./developerHubServiceClient";
|
|
13
|
-
export * from "./operationsInterfaces";
|
|
9
|
+
export { getContinuationToken } from "./pagingHelper.js";
|
|
10
|
+
export * from "./models/index.js";
|
|
11
|
+
export { DeveloperHubServiceClient } from "./developerHubServiceClient.js";
|
|
12
|
+
export * from "./operationsInterfaces/index.js";
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,4CAA4C;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,cAAc,iCAAiC,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\n/// <reference lib=\"esnext.asynciterable\" />\nexport { getContinuationToken } from \"./pagingHelper.js\";\nexport * from \"./models/index.js\";\nexport { DeveloperHubServiceClient } from \"./developerHubServiceClient.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"]}
|