@azure/arm-trustedsigning 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +100 -0
- package/dist/browser/api/certificateProfiles/index.d.ts +32 -0
- package/dist/browser/api/certificateProfiles/index.d.ts.map +1 -0
- package/dist/browser/api/certificateProfiles/index.js +331 -0
- package/dist/browser/api/certificateProfiles/index.js.map +1 -0
- package/dist/browser/api/codeSigningAccounts/index.d.ts +40 -0
- package/dist/browser/api/codeSigningAccounts/index.d.ts.map +1 -0
- package/dist/browser/api/codeSigningAccounts/index.js +325 -0
- package/dist/browser/api/codeSigningAccounts/index.js.map +1 -0
- package/dist/browser/api/codeSigningContext.d.ts +12 -0
- package/dist/browser/api/codeSigningContext.d.ts.map +1 -0
- package/dist/browser/api/codeSigningContext.js +32 -0
- package/dist/browser/api/codeSigningContext.js.map +1 -0
- package/dist/browser/api/index.d.ts +2 -0
- package/dist/browser/api/index.d.ts.map +1 -0
- package/dist/browser/api/index.js +4 -0
- package/dist/browser/api/index.js.map +1 -0
- package/dist/browser/api/operations/index.d.ts +10 -0
- package/dist/browser/api/operations/index.d.ts.map +1 -0
- package/dist/browser/api/operations/index.js +40 -0
- package/dist/browser/api/operations/index.js.map +1 -0
- package/dist/browser/classic/certificateProfiles/index.d.ts +32 -0
- package/dist/browser/classic/certificateProfiles/index.d.ts.map +1 -0
- package/dist/browser/classic/certificateProfiles/index.js +16 -0
- package/dist/browser/classic/certificateProfiles/index.js.map +1 -0
- package/dist/browser/classic/codeSigningAccounts/index.d.ts +38 -0
- package/dist/browser/classic/codeSigningAccounts/index.d.ts.map +1 -0
- package/dist/browser/classic/codeSigningAccounts/index.js +18 -0
- package/dist/browser/classic/codeSigningAccounts/index.js.map +1 -0
- package/dist/browser/classic/index.d.ts +4 -0
- package/dist/browser/classic/index.d.ts.map +1 -0
- package/dist/browser/classic/index.js +4 -0
- package/dist/browser/classic/index.js.map +1 -0
- package/dist/browser/classic/operations/index.d.ts +14 -0
- package/dist/browser/classic/operations/index.d.ts.map +1 -0
- package/dist/browser/classic/operations/index.js +12 -0
- package/dist/browser/classic/operations/index.js.map +1 -0
- package/dist/browser/codeSigningClient.d.ts +21 -0
- package/dist/browser/codeSigningClient.d.ts.map +1 -0
- package/dist/browser/codeSigningClient.js +22 -0
- package/dist/browser/codeSigningClient.js.map +1 -0
- package/dist/browser/helpers/serializerHelpers.d.ts +3 -0
- package/dist/browser/helpers/serializerHelpers.d.ts.map +1 -0
- package/dist/browser/helpers/serializerHelpers.js +24 -0
- package/dist/browser/helpers/serializerHelpers.js.map +1 -0
- package/dist/browser/index.d.ts +7 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +6 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/logger.d.ts +2 -0
- package/dist/browser/logger.d.ts.map +1 -0
- package/dist/browser/logger.js +5 -0
- package/dist/browser/logger.js.map +1 -0
- package/dist/browser/models/index.d.ts +3 -0
- package/dist/browser/models/index.d.ts.map +1 -0
- package/dist/browser/models/index.js +4 -0
- package/dist/browser/models/index.js.map +1 -0
- package/dist/browser/models/models.d.ts +426 -0
- package/dist/browser/models/models.d.ts.map +1 -0
- package/dist/browser/models/models.js +184 -0
- package/dist/browser/models/models.js.map +1 -0
- package/dist/browser/models/options.d.ts +51 -0
- package/dist/browser/models/options.d.ts.map +1 -0
- package/dist/browser/models/options.js +4 -0
- package/dist/browser/models/options.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/restorePollerHelpers.d.ts +21 -0
- package/dist/browser/restorePollerHelpers.d.ts.map +1 -0
- package/dist/browser/restorePollerHelpers.js +104 -0
- package/dist/browser/restorePollerHelpers.js.map +1 -0
- package/dist/browser/static-helpers/pagingHelpers.d.ts +72 -0
- package/dist/browser/static-helpers/pagingHelpers.d.ts.map +1 -0
- package/dist/browser/static-helpers/pagingHelpers.js +137 -0
- package/dist/browser/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/browser/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/browser/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/browser/static-helpers/pollingHelpers.js +76 -0
- package/dist/browser/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/commonjs/api/certificateProfiles/index.d.ts +32 -0
- package/dist/commonjs/api/certificateProfiles/index.d.ts.map +1 -0
- package/dist/commonjs/api/certificateProfiles/index.js +348 -0
- package/dist/commonjs/api/certificateProfiles/index.js.map +1 -0
- package/dist/commonjs/api/codeSigningAccounts/index.d.ts +40 -0
- package/dist/commonjs/api/codeSigningAccounts/index.d.ts.map +1 -0
- package/dist/commonjs/api/codeSigningAccounts/index.js +348 -0
- package/dist/commonjs/api/codeSigningAccounts/index.js.map +1 -0
- package/dist/commonjs/api/codeSigningContext.d.ts +12 -0
- package/dist/commonjs/api/codeSigningContext.d.ts.map +1 -0
- package/dist/commonjs/api/codeSigningContext.js +35 -0
- package/dist/commonjs/api/codeSigningContext.js.map +1 -0
- package/dist/commonjs/api/index.d.ts +2 -0
- package/dist/commonjs/api/index.d.ts.map +1 -0
- package/dist/commonjs/api/index.js +8 -0
- package/dist/commonjs/api/index.js.map +1 -0
- package/dist/commonjs/api/operations/index.d.ts +10 -0
- package/dist/commonjs/api/operations/index.d.ts.map +1 -0
- package/dist/commonjs/api/operations/index.js +45 -0
- package/dist/commonjs/api/operations/index.js.map +1 -0
- package/dist/commonjs/classic/certificateProfiles/index.d.ts +32 -0
- package/dist/commonjs/classic/certificateProfiles/index.d.ts.map +1 -0
- package/dist/commonjs/classic/certificateProfiles/index.js +20 -0
- package/dist/commonjs/classic/certificateProfiles/index.js.map +1 -0
- package/dist/commonjs/classic/codeSigningAccounts/index.d.ts +38 -0
- package/dist/commonjs/classic/codeSigningAccounts/index.d.ts.map +1 -0
- package/dist/commonjs/classic/codeSigningAccounts/index.js +22 -0
- package/dist/commonjs/classic/codeSigningAccounts/index.js.map +1 -0
- package/dist/commonjs/classic/index.d.ts +4 -0
- package/dist/commonjs/classic/index.d.ts.map +1 -0
- package/dist/commonjs/classic/index.js +5 -0
- package/dist/commonjs/classic/index.js.map +1 -0
- package/dist/commonjs/classic/operations/index.d.ts +14 -0
- package/dist/commonjs/classic/operations/index.d.ts.map +1 -0
- package/dist/commonjs/classic/operations/index.js +16 -0
- package/dist/commonjs/classic/operations/index.js.map +1 -0
- package/dist/commonjs/codeSigningClient.d.ts +21 -0
- package/dist/commonjs/codeSigningClient.d.ts.map +1 -0
- package/dist/commonjs/codeSigningClient.js +26 -0
- package/dist/commonjs/codeSigningClient.js.map +1 -0
- package/dist/commonjs/helpers/serializerHelpers.d.ts +3 -0
- package/dist/commonjs/helpers/serializerHelpers.d.ts.map +1 -0
- package/dist/commonjs/helpers/serializerHelpers.js +27 -0
- package/dist/commonjs/helpers/serializerHelpers.js.map +1 -0
- package/dist/commonjs/index.d.ts +7 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +21 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/logger.d.ts +2 -0
- package/dist/commonjs/logger.d.ts.map +1 -0
- package/dist/commonjs/logger.js +8 -0
- package/dist/commonjs/logger.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +3 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +17 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/models.d.ts +426 -0
- package/dist/commonjs/models/models.d.ts.map +1 -0
- package/dist/commonjs/models/models.js +199 -0
- package/dist/commonjs/models/models.js.map +1 -0
- package/dist/commonjs/models/options.d.ts +51 -0
- package/dist/commonjs/models/options.d.ts.map +1 -0
- package/dist/commonjs/models/options.js +5 -0
- package/dist/commonjs/models/options.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/restorePollerHelpers.d.ts +21 -0
- package/dist/commonjs/restorePollerHelpers.d.ts.map +1 -0
- package/dist/commonjs/restorePollerHelpers.js +107 -0
- package/dist/commonjs/restorePollerHelpers.js.map +1 -0
- package/dist/commonjs/static-helpers/pagingHelpers.d.ts +72 -0
- package/dist/commonjs/static-helpers/pagingHelpers.d.ts.map +1 -0
- package/dist/commonjs/static-helpers/pagingHelpers.js +140 -0
- package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/commonjs/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/commonjs/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/commonjs/static-helpers/pollingHelpers.js +79 -0
- package/dist/commonjs/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/api/certificateProfiles/index.d.ts +32 -0
- package/dist/esm/api/certificateProfiles/index.d.ts.map +1 -0
- package/dist/esm/api/certificateProfiles/index.js +331 -0
- package/dist/esm/api/certificateProfiles/index.js.map +1 -0
- package/dist/esm/api/codeSigningAccounts/index.d.ts +40 -0
- package/dist/esm/api/codeSigningAccounts/index.d.ts.map +1 -0
- package/dist/esm/api/codeSigningAccounts/index.js +325 -0
- package/dist/esm/api/codeSigningAccounts/index.js.map +1 -0
- package/dist/esm/api/codeSigningContext.d.ts +12 -0
- package/dist/esm/api/codeSigningContext.d.ts.map +1 -0
- package/dist/esm/api/codeSigningContext.js +32 -0
- package/dist/esm/api/codeSigningContext.js.map +1 -0
- package/dist/esm/api/index.d.ts +2 -0
- package/dist/esm/api/index.d.ts.map +1 -0
- package/dist/esm/api/index.js +4 -0
- package/dist/esm/api/index.js.map +1 -0
- package/dist/esm/api/operations/index.d.ts +10 -0
- package/dist/esm/api/operations/index.d.ts.map +1 -0
- package/dist/esm/api/operations/index.js +40 -0
- package/dist/esm/api/operations/index.js.map +1 -0
- package/dist/esm/classic/certificateProfiles/index.d.ts +32 -0
- package/dist/esm/classic/certificateProfiles/index.d.ts.map +1 -0
- package/dist/esm/classic/certificateProfiles/index.js +16 -0
- package/dist/esm/classic/certificateProfiles/index.js.map +1 -0
- package/dist/esm/classic/codeSigningAccounts/index.d.ts +38 -0
- package/dist/esm/classic/codeSigningAccounts/index.d.ts.map +1 -0
- package/dist/esm/classic/codeSigningAccounts/index.js +18 -0
- package/dist/esm/classic/codeSigningAccounts/index.js.map +1 -0
- package/dist/esm/classic/index.d.ts +4 -0
- package/dist/esm/classic/index.d.ts.map +1 -0
- package/dist/esm/classic/index.js +4 -0
- package/dist/esm/classic/index.js.map +1 -0
- package/dist/esm/classic/operations/index.d.ts +14 -0
- package/dist/esm/classic/operations/index.d.ts.map +1 -0
- package/dist/esm/classic/operations/index.js +12 -0
- package/dist/esm/classic/operations/index.js.map +1 -0
- package/dist/esm/codeSigningClient.d.ts +21 -0
- package/dist/esm/codeSigningClient.d.ts.map +1 -0
- package/dist/esm/codeSigningClient.js +22 -0
- package/dist/esm/codeSigningClient.js.map +1 -0
- package/dist/esm/helpers/serializerHelpers.d.ts +3 -0
- package/dist/esm/helpers/serializerHelpers.d.ts.map +1 -0
- package/dist/esm/helpers/serializerHelpers.js +24 -0
- package/dist/esm/helpers/serializerHelpers.js.map +1 -0
- package/dist/esm/index.d.ts +7 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/logger.d.ts +2 -0
- package/dist/esm/logger.d.ts.map +1 -0
- package/dist/esm/logger.js +5 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/models.d.ts +426 -0
- package/dist/esm/models/models.d.ts.map +1 -0
- package/dist/esm/models/models.js +184 -0
- package/dist/esm/models/models.js.map +1 -0
- package/dist/esm/models/options.d.ts +51 -0
- package/dist/esm/models/options.d.ts.map +1 -0
- package/dist/esm/models/options.js +4 -0
- package/dist/esm/models/options.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/restorePollerHelpers.d.ts +21 -0
- package/dist/esm/restorePollerHelpers.d.ts.map +1 -0
- package/dist/esm/restorePollerHelpers.js +104 -0
- package/dist/esm/restorePollerHelpers.js.map +1 -0
- package/dist/esm/static-helpers/pagingHelpers.d.ts +72 -0
- package/dist/esm/static-helpers/pagingHelpers.d.ts.map +1 -0
- package/dist/esm/static-helpers/pagingHelpers.js +137 -0
- package/dist/esm/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/esm/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/esm/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/esm/static-helpers/pollingHelpers.js +76 -0
- package/dist/esm/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/react-native/api/certificateProfiles/index.d.ts +32 -0
- package/dist/react-native/api/certificateProfiles/index.d.ts.map +1 -0
- package/dist/react-native/api/certificateProfiles/index.js +331 -0
- package/dist/react-native/api/certificateProfiles/index.js.map +1 -0
- package/dist/react-native/api/codeSigningAccounts/index.d.ts +40 -0
- package/dist/react-native/api/codeSigningAccounts/index.d.ts.map +1 -0
- package/dist/react-native/api/codeSigningAccounts/index.js +325 -0
- package/dist/react-native/api/codeSigningAccounts/index.js.map +1 -0
- package/dist/react-native/api/codeSigningContext.d.ts +12 -0
- package/dist/react-native/api/codeSigningContext.d.ts.map +1 -0
- package/dist/react-native/api/codeSigningContext.js +32 -0
- package/dist/react-native/api/codeSigningContext.js.map +1 -0
- package/dist/react-native/api/index.d.ts +2 -0
- package/dist/react-native/api/index.d.ts.map +1 -0
- package/dist/react-native/api/index.js +4 -0
- package/dist/react-native/api/index.js.map +1 -0
- package/dist/react-native/api/operations/index.d.ts +10 -0
- package/dist/react-native/api/operations/index.d.ts.map +1 -0
- package/dist/react-native/api/operations/index.js +40 -0
- package/dist/react-native/api/operations/index.js.map +1 -0
- package/dist/react-native/classic/certificateProfiles/index.d.ts +32 -0
- package/dist/react-native/classic/certificateProfiles/index.d.ts.map +1 -0
- package/dist/react-native/classic/certificateProfiles/index.js +16 -0
- package/dist/react-native/classic/certificateProfiles/index.js.map +1 -0
- package/dist/react-native/classic/codeSigningAccounts/index.d.ts +38 -0
- package/dist/react-native/classic/codeSigningAccounts/index.d.ts.map +1 -0
- package/dist/react-native/classic/codeSigningAccounts/index.js +18 -0
- package/dist/react-native/classic/codeSigningAccounts/index.js.map +1 -0
- package/dist/react-native/classic/index.d.ts +4 -0
- package/dist/react-native/classic/index.d.ts.map +1 -0
- package/dist/react-native/classic/index.js +4 -0
- package/dist/react-native/classic/index.js.map +1 -0
- package/dist/react-native/classic/operations/index.d.ts +14 -0
- package/dist/react-native/classic/operations/index.d.ts.map +1 -0
- package/dist/react-native/classic/operations/index.js +12 -0
- package/dist/react-native/classic/operations/index.js.map +1 -0
- package/dist/react-native/codeSigningClient.d.ts +21 -0
- package/dist/react-native/codeSigningClient.d.ts.map +1 -0
- package/dist/react-native/codeSigningClient.js +22 -0
- package/dist/react-native/codeSigningClient.js.map +1 -0
- package/dist/react-native/helpers/serializerHelpers.d.ts +3 -0
- package/dist/react-native/helpers/serializerHelpers.d.ts.map +1 -0
- package/dist/react-native/helpers/serializerHelpers.js +24 -0
- package/dist/react-native/helpers/serializerHelpers.js.map +1 -0
- package/dist/react-native/index.d.ts +7 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +6 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/logger.d.ts +2 -0
- package/dist/react-native/logger.d.ts.map +1 -0
- package/dist/react-native/logger.js +5 -0
- package/dist/react-native/logger.js.map +1 -0
- package/dist/react-native/models/index.d.ts +3 -0
- package/dist/react-native/models/index.d.ts.map +1 -0
- package/dist/react-native/models/index.js +4 -0
- package/dist/react-native/models/index.js.map +1 -0
- package/dist/react-native/models/models.d.ts +426 -0
- package/dist/react-native/models/models.d.ts.map +1 -0
- package/dist/react-native/models/models.js +184 -0
- package/dist/react-native/models/models.js.map +1 -0
- package/dist/react-native/models/options.d.ts +51 -0
- package/dist/react-native/models/options.d.ts.map +1 -0
- package/dist/react-native/models/options.js +4 -0
- package/dist/react-native/models/options.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/restorePollerHelpers.d.ts +21 -0
- package/dist/react-native/restorePollerHelpers.d.ts.map +1 -0
- package/dist/react-native/restorePollerHelpers.js +104 -0
- package/dist/react-native/restorePollerHelpers.js.map +1 -0
- package/dist/react-native/static-helpers/pagingHelpers.d.ts +72 -0
- package/dist/react-native/static-helpers/pagingHelpers.d.ts.map +1 -0
- package/dist/react-native/static-helpers/pagingHelpers.js +137 -0
- package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/react-native/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/react-native/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/react-native/static-helpers/pollingHelpers.js +76 -0
- package/dist/react-native/static-helpers/pollingHelpers.js.map +1 -0
- package/package.json +170 -0
- package/review/arm-trustedsigning-models.api.md +313 -0
- package/review/arm-trustedsigning.api.md +386 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.getLongRunningPoller = getLongRunningPoller;
|
|
6
|
+
const core_lro_1 = require("@azure/core-lro");
|
|
7
|
+
const core_client_1 = require("@azure-rest/core-client");
|
|
8
|
+
function getLongRunningPoller(client, processResponseBody, expectedStatuses, options) {
|
|
9
|
+
const { restoreFrom, getInitialResponse } = options;
|
|
10
|
+
if (!restoreFrom && !getInitialResponse) {
|
|
11
|
+
throw new Error("Either restoreFrom or getInitialResponse must be specified");
|
|
12
|
+
}
|
|
13
|
+
let initialResponse = undefined;
|
|
14
|
+
const pollAbortController = new AbortController();
|
|
15
|
+
const poller = {
|
|
16
|
+
sendInitialRequest: async () => {
|
|
17
|
+
if (!getInitialResponse) {
|
|
18
|
+
throw new Error("getInitialResponse is required when initializing a new poller");
|
|
19
|
+
}
|
|
20
|
+
initialResponse = await getInitialResponse();
|
|
21
|
+
return getLroResponse(initialResponse, expectedStatuses);
|
|
22
|
+
},
|
|
23
|
+
sendPollRequest: async (path, pollOptions) => {
|
|
24
|
+
var _a, _b, _c, _d, _e, _f;
|
|
25
|
+
// The poll request would both listen to the user provided abort signal and the poller's own abort signal
|
|
26
|
+
function abortListener() {
|
|
27
|
+
pollAbortController.abort();
|
|
28
|
+
}
|
|
29
|
+
const abortSignal = pollAbortController.signal;
|
|
30
|
+
if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) {
|
|
31
|
+
pollAbortController.abort();
|
|
32
|
+
}
|
|
33
|
+
else if ((_b = pollOptions === null || pollOptions === void 0 ? void 0 : pollOptions.abortSignal) === null || _b === void 0 ? void 0 : _b.aborted) {
|
|
34
|
+
pollAbortController.abort();
|
|
35
|
+
}
|
|
36
|
+
else if (!abortSignal.aborted) {
|
|
37
|
+
(_c = options.abortSignal) === null || _c === void 0 ? void 0 : _c.addEventListener("abort", abortListener, {
|
|
38
|
+
once: true,
|
|
39
|
+
});
|
|
40
|
+
(_d = pollOptions === null || pollOptions === void 0 ? void 0 : pollOptions.abortSignal) === null || _d === void 0 ? void 0 : _d.addEventListener("abort", abortListener, {
|
|
41
|
+
once: true,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
let response;
|
|
45
|
+
try {
|
|
46
|
+
response = await client.pathUnchecked(path).get({ abortSignal });
|
|
47
|
+
}
|
|
48
|
+
finally {
|
|
49
|
+
(_e = options.abortSignal) === null || _e === void 0 ? void 0 : _e.removeEventListener("abort", abortListener);
|
|
50
|
+
(_f = pollOptions === null || pollOptions === void 0 ? void 0 : pollOptions.abortSignal) === null || _f === void 0 ? void 0 : _f.removeEventListener("abort", abortListener);
|
|
51
|
+
}
|
|
52
|
+
return getLroResponse(response, expectedStatuses);
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
return (0, core_lro_1.createHttpPoller)(poller, {
|
|
56
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
57
|
+
resourceLocationConfig: options === null || options === void 0 ? void 0 : options.resourceLocationConfig,
|
|
58
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.restoreFrom,
|
|
59
|
+
processResult: (result) => {
|
|
60
|
+
return processResponseBody(result);
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Converts a Rest Client response to a response that the LRO implementation understands
|
|
66
|
+
* @param response - a rest client http response
|
|
67
|
+
* @param deserializeFn - deserialize function to convert Rest response to modular output
|
|
68
|
+
* @returns - An LRO response that the LRO implementation understands
|
|
69
|
+
*/
|
|
70
|
+
function getLroResponse(response, expectedStatuses) {
|
|
71
|
+
if (!expectedStatuses.includes(response.status)) {
|
|
72
|
+
throw (0, core_client_1.createRestError)(response);
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
flatResponse: response,
|
|
76
|
+
rawResponse: Object.assign(Object.assign({}, response), { statusCode: Number.parseInt(response.status), body: response.body }),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=pollingHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pollingHelpers.js","sourceRoot":"","sources":["../../../src/static-helpers/pollingHelpers.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAuClC,oDA8DC;AAnGD,8CAOyB;AAEzB,yDAAyF;AA4BzF,SAAgB,oBAAoB,CAClC,MAAc,EACd,mBAA4D,EAC5D,gBAA0B,EAC1B,OAA+C;IAE/C,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC;IACpD,IAAI,CAAC,WAAW,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACxC,MAAM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T License.\n\nimport {\n PollerLike,\n OperationState,\n ResourceLocationConfig,\n RunningOperation,\n createHttpPoller,\n OperationResponse,\n} from \"@azure/core-lro\";\n\nimport { Client, PathUncheckedResponse, createRestError } from \"@azure-rest/core-client\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\n\nexport interface GetLongRunningPollerOptions<TResponse> {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /**\n * The potential location of the result of the LRO if specified by the LRO extension in the swagger.\n */\n resourceLocationConfig?: ResourceLocationConfig;\n /**\n * The original url of the LRO\n * Should not be null when restoreFrom is set\n */\n initialRequestUrl?: string;\n /**\n * A serialized poller which can be used to resume an existing paused Long-Running-Operation.\n */\n restoreFrom?: string;\n /**\n * The function to get the initial response\n */\n getInitialResponse?: () => PromiseLike<TResponse>;\n}\nexport function getLongRunningPoller<TResponse extends PathUncheckedResponse, TResult = void>(\n client: Client,\n processResponseBody: (result: TResponse) => Promise<TResult>,\n expectedStatuses: string[],\n options: GetLongRunningPollerOptions<TResponse>,\n): PollerLike<OperationState<TResult>, TResult> {\n const { restoreFrom, getInitialResponse } = options;\n if (!restoreFrom && !getInitialResponse) {\n throw new Error(\"Either restoreFrom or getInitialResponse must be specified\");\n }\n let initialResponse: TResponse | undefined = undefined;\n const pollAbortController = new AbortController();\n const poller: RunningOperation<TResponse> = {\n sendInitialRequest: async () => {\n if (!getInitialResponse) {\n throw new Error(\"getInitialResponse is required when initializing a new poller\");\n }\n initialResponse = await getInitialResponse();\n return getLroResponse(initialResponse, expectedStatuses);\n },\n sendPollRequest: async (\n path: string,\n pollOptions?: {\n abortSignal?: AbortSignalLike;\n },\n ) => {\n // The poll request would both listen to the user provided abort signal and the poller's own abort signal\n function abortListener(): void {\n pollAbortController.abort();\n }\n const abortSignal = pollAbortController.signal;\n if (options.abortSignal?.aborted) {\n pollAbortController.abort();\n } else if (pollOptions?.abortSignal?.aborted) {\n pollAbortController.abort();\n } else if (!abortSignal.aborted) {\n options.abortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n pollOptions?.abortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n }\n let response;\n try {\n response = await client.pathUnchecked(path).get({ abortSignal });\n } finally {\n options.abortSignal?.removeEventListener(\"abort\", abortListener);\n pollOptions?.abortSignal?.removeEventListener(\"abort\", abortListener);\n }\n\n return getLroResponse(response as TResponse, expectedStatuses);\n },\n };\n return createHttpPoller(poller, {\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: options?.resourceLocationConfig,\n restoreFrom: options?.restoreFrom,\n processResult: (result: unknown) => {\n return processResponseBody(result as TResponse);\n },\n });\n}\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @param deserializeFn - deserialize function to convert Rest response to modular output\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResponse extends PathUncheckedResponse>(\n response: TResponse,\n expectedStatuses: string[],\n): OperationResponse<TResponse> {\n if (!expectedStatuses.includes(response.status)) {\n throw createRestError(response);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.47.9"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CertificateProfile, RevokeCertificate, _CertificateProfileListResult } from "../../models/models.js";
|
|
2
|
+
import { CodeSigningContext as Client } from "../index.js";
|
|
3
|
+
import { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client";
|
|
4
|
+
import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
|
|
5
|
+
import { PollerLike, OperationState } from "@azure/core-lro";
|
|
6
|
+
import { CertificateProfilesGetOptionalParams, CertificateProfilesCreateOptionalParams, CertificateProfilesDeleteOptionalParams, CertificateProfilesListByCodeSigningAccountOptionalParams, CertificateProfilesRevokeCertificateOptionalParams } from "../../models/options.js";
|
|
7
|
+
export declare function _getSend(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, profileName: string, options?: CertificateProfilesGetOptionalParams): StreamableMethod;
|
|
8
|
+
export declare function _getDeserialize(result: PathUncheckedResponse): Promise<CertificateProfile>;
|
|
9
|
+
/** Get details of a certificate profile. */
|
|
10
|
+
export declare function get(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, profileName: string, options?: CertificateProfilesGetOptionalParams): Promise<CertificateProfile>;
|
|
11
|
+
export declare function _createSend(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, profileName: string, resource: CertificateProfile, options?: CertificateProfilesCreateOptionalParams): StreamableMethod;
|
|
12
|
+
export declare function _createDeserialize(result: PathUncheckedResponse): Promise<CertificateProfile>;
|
|
13
|
+
/** Create a certificate profile. */
|
|
14
|
+
export declare function create(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, profileName: string, resource: CertificateProfile, options?: CertificateProfilesCreateOptionalParams): PollerLike<OperationState<CertificateProfile>, CertificateProfile>;
|
|
15
|
+
export declare function _$deleteSend(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, profileName: string, options?: CertificateProfilesDeleteOptionalParams): StreamableMethod;
|
|
16
|
+
export declare function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void>;
|
|
17
|
+
/** Delete a certificate profile. */
|
|
18
|
+
/**
|
|
19
|
+
* @fixme delete is a reserved word that cannot be used as an operation name.
|
|
20
|
+
* Please add @clientName("clientName") or @clientName("<JS-Specific-Name>", "javascript")
|
|
21
|
+
* to the operation to override the generated name.
|
|
22
|
+
*/
|
|
23
|
+
export declare function $delete(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, profileName: string, options?: CertificateProfilesDeleteOptionalParams): PollerLike<OperationState<void>, void>;
|
|
24
|
+
export declare function _listByCodeSigningAccountSend(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, options?: CertificateProfilesListByCodeSigningAccountOptionalParams): StreamableMethod;
|
|
25
|
+
export declare function _listByCodeSigningAccountDeserialize(result: PathUncheckedResponse): Promise<_CertificateProfileListResult>;
|
|
26
|
+
/** List certificate profiles under a trusted signing account. */
|
|
27
|
+
export declare function listByCodeSigningAccount(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, options?: CertificateProfilesListByCodeSigningAccountOptionalParams): PagedAsyncIterableIterator<CertificateProfile>;
|
|
28
|
+
export declare function _revokeCertificateSend(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, profileName: string, body: RevokeCertificate, options?: CertificateProfilesRevokeCertificateOptionalParams): StreamableMethod;
|
|
29
|
+
export declare function _revokeCertificateDeserialize(result: PathUncheckedResponse): Promise<void>;
|
|
30
|
+
/** Revoke a certificate under a certificate profile. */
|
|
31
|
+
export declare function revokeCertificate(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, profileName: string, body: RevokeCertificate, options?: CertificateProfilesRevokeCertificateOptionalParams): Promise<void>;
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/certificateProfiles/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,kBAAkB,EAClB,iBAAiB,EACjB,6BAA6B,EAC9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,kBAAkB,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EACL,gBAAgB,EAEhB,qBAAqB,EAEtB,MAAM,yBAAyB,CAAC;AACjC,O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E,iBAAiB,EACvB,OAAO,GAAE,kDAER,GACA,gBAAgB,CAmBlB;AAED,wBAAsB,6BAA6B,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAOhG;AAED,wDAAwD;AACxD,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,iBAAiB,EAAE,MAAM,EACzB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,iBAAiB,EACvB,OAAO,GAAE,kDAER,GACA,OAAO,CAAC,IAAI,CAAC,CAWf"}
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { certificateProfilePropertiesSerializer, } from "../../models/models.js";
|
|
4
|
+
import { operationOptionsToRequestParameters, createRestError, } from "@azure-rest/core-client";
|
|
5
|
+
import { buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js";
|
|
6
|
+
import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js";
|
|
7
|
+
export function _getSend(context, subscriptionId, resourceGroupName, accountName, profileName, options = { requestOptions: {} }) {
|
|
8
|
+
return context
|
|
9
|
+
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}", subscriptionId, resourceGroupName, accountName, profileName)
|
|
10
|
+
.get(Object.assign({}, operationOptionsToRequestParameters(options)));
|
|
11
|
+
}
|
|
12
|
+
export async function _getDeserialize(result) {
|
|
13
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
|
|
14
|
+
const expectedStatuses = ["200"];
|
|
15
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
16
|
+
throw createRestError(result);
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
id: result.body["id"],
|
|
20
|
+
name: result.body["name"],
|
|
21
|
+
type: result.body["type"],
|
|
22
|
+
systemData: !result.body.systemData
|
|
23
|
+
? undefined
|
|
24
|
+
: {
|
|
25
|
+
createdBy: (_a = result.body.systemData) === null || _a === void 0 ? void 0 : _a["createdBy"],
|
|
26
|
+
createdByType: (_b = result.body.systemData) === null || _b === void 0 ? void 0 : _b["createdByType"],
|
|
27
|
+
createdAt: ((_c = result.body.systemData) === null || _c === void 0 ? void 0 : _c["createdAt"]) !== undefined
|
|
28
|
+
? new Date((_d = result.body.systemData) === null || _d === void 0 ? void 0 : _d["createdAt"])
|
|
29
|
+
: undefined,
|
|
30
|
+
lastModifiedBy: (_e = result.body.systemData) === null || _e === void 0 ? void 0 : _e["lastModifiedBy"],
|
|
31
|
+
lastModifiedByType: (_f = result.body.systemData) === null || _f === void 0 ? void 0 : _f["lastModifiedByType"],
|
|
32
|
+
lastModifiedAt: ((_g = result.body.systemData) === null || _g === void 0 ? void 0 : _g["lastModifiedAt"]) !== undefined
|
|
33
|
+
? new Date((_h = result.body.systemData) === null || _h === void 0 ? void 0 : _h["lastModifiedAt"])
|
|
34
|
+
: undefined,
|
|
35
|
+
},
|
|
36
|
+
properties: !result.body.properties
|
|
37
|
+
? undefined
|
|
38
|
+
: {
|
|
39
|
+
profileType: (_j = result.body.properties) === null || _j === void 0 ? void 0 : _j["profileType"],
|
|
40
|
+
commonName: (_k = result.body.properties) === null || _k === void 0 ? void 0 : _k["commonName"],
|
|
41
|
+
organization: (_l = result.body.properties) === null || _l === void 0 ? void 0 : _l["organization"],
|
|
42
|
+
organizationUnit: (_m = result.body.properties) === null || _m === void 0 ? void 0 : _m["organizationUnit"],
|
|
43
|
+
streetAddress: (_o = result.body.properties) === null || _o === void 0 ? void 0 : _o["streetAddress"],
|
|
44
|
+
includeStreetAddress: (_p = result.body.properties) === null || _p === void 0 ? void 0 : _p["includeStreetAddress"],
|
|
45
|
+
city: (_q = result.body.properties) === null || _q === void 0 ? void 0 : _q["city"],
|
|
46
|
+
includeCity: (_r = result.body.properties) === null || _r === void 0 ? void 0 : _r["includeCity"],
|
|
47
|
+
state: (_s = result.body.properties) === null || _s === void 0 ? void 0 : _s["state"],
|
|
48
|
+
includeState: (_t = result.body.properties) === null || _t === void 0 ? void 0 : _t["includeState"],
|
|
49
|
+
country: (_u = result.body.properties) === null || _u === void 0 ? void 0 : _u["country"],
|
|
50
|
+
includeCountry: (_v = result.body.properties) === null || _v === void 0 ? void 0 : _v["includeCountry"],
|
|
51
|
+
postalCode: (_w = result.body.properties) === null || _w === void 0 ? void 0 : _w["postalCode"],
|
|
52
|
+
includePostalCode: (_x = result.body.properties) === null || _x === void 0 ? void 0 : _x["includePostalCode"],
|
|
53
|
+
enhancedKeyUsage: (_y = result.body.properties) === null || _y === void 0 ? void 0 : _y["enhancedKeyUsage"],
|
|
54
|
+
identityValidationId: (_z = result.body.properties) === null || _z === void 0 ? void 0 : _z["identityValidationId"],
|
|
55
|
+
provisioningState: (_0 = result.body.properties) === null || _0 === void 0 ? void 0 : _0["provisioningState"],
|
|
56
|
+
status: (_1 = result.body.properties) === null || _1 === void 0 ? void 0 : _1["status"],
|
|
57
|
+
certificates: ((_2 = result.body.properties) === null || _2 === void 0 ? void 0 : _2["certificates"]) === undefined
|
|
58
|
+
? (_3 = result.body.properties) === null || _3 === void 0 ? void 0 : _3["certificates"]
|
|
59
|
+
: (_4 = result.body.properties) === null || _4 === void 0 ? void 0 : _4["certificates"].map((p) => {
|
|
60
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
61
|
+
return {
|
|
62
|
+
serialNumber: p["serialNumber"],
|
|
63
|
+
subjectName: p["subjectName"],
|
|
64
|
+
thumbprint: p["thumbprint"],
|
|
65
|
+
createdDate: p["createdDate"],
|
|
66
|
+
expiryDate: p["expiryDate"],
|
|
67
|
+
status: p["status"],
|
|
68
|
+
revocation: !p.revocation
|
|
69
|
+
? undefined
|
|
70
|
+
: {
|
|
71
|
+
requestedAt: ((_a = p.revocation) === null || _a === void 0 ? void 0 : _a["requestedAt"]) !== undefined
|
|
72
|
+
? new Date((_b = p.revocation) === null || _b === void 0 ? void 0 : _b["requestedAt"])
|
|
73
|
+
: undefined,
|
|
74
|
+
effectiveAt: ((_c = p.revocation) === null || _c === void 0 ? void 0 : _c["effectiveAt"]) !== undefined
|
|
75
|
+
? new Date((_d = p.revocation) === null || _d === void 0 ? void 0 : _d["effectiveAt"])
|
|
76
|
+
: undefined,
|
|
77
|
+
reason: (_e = p.revocation) === null || _e === void 0 ? void 0 : _e["reason"],
|
|
78
|
+
remarks: (_f = p.revocation) === null || _f === void 0 ? void 0 : _f["remarks"],
|
|
79
|
+
status: (_g = p.revocation) === null || _g === void 0 ? void 0 : _g["status"],
|
|
80
|
+
failureReason: (_h = p.revocation) === null || _h === void 0 ? void 0 : _h["failureReason"],
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
}),
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/** Get details of a certificate profile. */
|
|
88
|
+
export async function get(context, subscriptionId, resourceGroupName, accountName, profileName, options = { requestOptions: {} }) {
|
|
89
|
+
const result = await _getSend(context, subscriptionId, resourceGroupName, accountName, profileName, options);
|
|
90
|
+
return _getDeserialize(result);
|
|
91
|
+
}
|
|
92
|
+
export function _createSend(context, subscriptionId, resourceGroupName, accountName, profileName, resource, options = { requestOptions: {} }) {
|
|
93
|
+
return context
|
|
94
|
+
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}", subscriptionId, resourceGroupName, accountName, profileName)
|
|
95
|
+
.put(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { body: {
|
|
96
|
+
properties: !resource.properties
|
|
97
|
+
? resource.properties
|
|
98
|
+
: certificateProfilePropertiesSerializer(resource.properties),
|
|
99
|
+
} }));
|
|
100
|
+
}
|
|
101
|
+
export async function _createDeserialize(result) {
|
|
102
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
|
|
103
|
+
const expectedStatuses = ["200", "201"];
|
|
104
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
105
|
+
throw createRestError(result);
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
id: result.body["id"],
|
|
109
|
+
name: result.body["name"],
|
|
110
|
+
type: result.body["type"],
|
|
111
|
+
systemData: !result.body.systemData
|
|
112
|
+
? undefined
|
|
113
|
+
: {
|
|
114
|
+
createdBy: (_a = result.body.systemData) === null || _a === void 0 ? void 0 : _a["createdBy"],
|
|
115
|
+
createdByType: (_b = result.body.systemData) === null || _b === void 0 ? void 0 : _b["createdByType"],
|
|
116
|
+
createdAt: ((_c = result.body.systemData) === null || _c === void 0 ? void 0 : _c["createdAt"]) !== undefined
|
|
117
|
+
? new Date((_d = result.body.systemData) === null || _d === void 0 ? void 0 : _d["createdAt"])
|
|
118
|
+
: undefined,
|
|
119
|
+
lastModifiedBy: (_e = result.body.systemData) === null || _e === void 0 ? void 0 : _e["lastModifiedBy"],
|
|
120
|
+
lastModifiedByType: (_f = result.body.systemData) === null || _f === void 0 ? void 0 : _f["lastModifiedByType"],
|
|
121
|
+
lastModifiedAt: ((_g = result.body.systemData) === null || _g === void 0 ? void 0 : _g["lastModifiedAt"]) !== undefined
|
|
122
|
+
? new Date((_h = result.body.systemData) === null || _h === void 0 ? void 0 : _h["lastModifiedAt"])
|
|
123
|
+
: undefined,
|
|
124
|
+
},
|
|
125
|
+
properties: !result.body.properties
|
|
126
|
+
? undefined
|
|
127
|
+
: {
|
|
128
|
+
profileType: (_j = result.body.properties) === null || _j === void 0 ? void 0 : _j["profileType"],
|
|
129
|
+
commonName: (_k = result.body.properties) === null || _k === void 0 ? void 0 : _k["commonName"],
|
|
130
|
+
organization: (_l = result.body.properties) === null || _l === void 0 ? void 0 : _l["organization"],
|
|
131
|
+
organizationUnit: (_m = result.body.properties) === null || _m === void 0 ? void 0 : _m["organizationUnit"],
|
|
132
|
+
streetAddress: (_o = result.body.properties) === null || _o === void 0 ? void 0 : _o["streetAddress"],
|
|
133
|
+
includeStreetAddress: (_p = result.body.properties) === null || _p === void 0 ? void 0 : _p["includeStreetAddress"],
|
|
134
|
+
city: (_q = result.body.properties) === null || _q === void 0 ? void 0 : _q["city"],
|
|
135
|
+
includeCity: (_r = result.body.properties) === null || _r === void 0 ? void 0 : _r["includeCity"],
|
|
136
|
+
state: (_s = result.body.properties) === null || _s === void 0 ? void 0 : _s["state"],
|
|
137
|
+
includeState: (_t = result.body.properties) === null || _t === void 0 ? void 0 : _t["includeState"],
|
|
138
|
+
country: (_u = result.body.properties) === null || _u === void 0 ? void 0 : _u["country"],
|
|
139
|
+
includeCountry: (_v = result.body.properties) === null || _v === void 0 ? void 0 : _v["includeCountry"],
|
|
140
|
+
postalCode: (_w = result.body.properties) === null || _w === void 0 ? void 0 : _w["postalCode"],
|
|
141
|
+
includePostalCode: (_x = result.body.properties) === null || _x === void 0 ? void 0 : _x["includePostalCode"],
|
|
142
|
+
enhancedKeyUsage: (_y = result.body.properties) === null || _y === void 0 ? void 0 : _y["enhancedKeyUsage"],
|
|
143
|
+
identityValidationId: (_z = result.body.properties) === null || _z === void 0 ? void 0 : _z["identityValidationId"],
|
|
144
|
+
provisioningState: (_0 = result.body.properties) === null || _0 === void 0 ? void 0 : _0["provisioningState"],
|
|
145
|
+
status: (_1 = result.body.properties) === null || _1 === void 0 ? void 0 : _1["status"],
|
|
146
|
+
certificates: ((_2 = result.body.properties) === null || _2 === void 0 ? void 0 : _2["certificates"]) === undefined
|
|
147
|
+
? (_3 = result.body.properties) === null || _3 === void 0 ? void 0 : _3["certificates"]
|
|
148
|
+
: (_4 = result.body.properties) === null || _4 === void 0 ? void 0 : _4["certificates"].map((p) => {
|
|
149
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
150
|
+
return {
|
|
151
|
+
serialNumber: p["serialNumber"],
|
|
152
|
+
subjectName: p["subjectName"],
|
|
153
|
+
thumbprint: p["thumbprint"],
|
|
154
|
+
createdDate: p["createdDate"],
|
|
155
|
+
expiryDate: p["expiryDate"],
|
|
156
|
+
status: p["status"],
|
|
157
|
+
revocation: !p.revocation
|
|
158
|
+
? undefined
|
|
159
|
+
: {
|
|
160
|
+
requestedAt: ((_a = p.revocation) === null || _a === void 0 ? void 0 : _a["requestedAt"]) !== undefined
|
|
161
|
+
? new Date((_b = p.revocation) === null || _b === void 0 ? void 0 : _b["requestedAt"])
|
|
162
|
+
: undefined,
|
|
163
|
+
effectiveAt: ((_c = p.revocation) === null || _c === void 0 ? void 0 : _c["effectiveAt"]) !== undefined
|
|
164
|
+
? new Date((_d = p.revocation) === null || _d === void 0 ? void 0 : _d["effectiveAt"])
|
|
165
|
+
: undefined,
|
|
166
|
+
reason: (_e = p.revocation) === null || _e === void 0 ? void 0 : _e["reason"],
|
|
167
|
+
remarks: (_f = p.revocation) === null || _f === void 0 ? void 0 : _f["remarks"],
|
|
168
|
+
status: (_g = p.revocation) === null || _g === void 0 ? void 0 : _g["status"],
|
|
169
|
+
failureReason: (_h = p.revocation) === null || _h === void 0 ? void 0 : _h["failureReason"],
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
}),
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
/** Create a certificate profile. */
|
|
177
|
+
export function create(context, subscriptionId, resourceGroupName, accountName, profileName, resource, options = { requestOptions: {} }) {
|
|
178
|
+
return getLongRunningPoller(context, _createDeserialize, ["200", "201"], {
|
|
179
|
+
updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
180
|
+
abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
|
|
181
|
+
getInitialResponse: () => _createSend(context, subscriptionId, resourceGroupName, accountName, profileName, resource, options),
|
|
182
|
+
resourceLocationConfig: "azure-async-operation",
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
export function _$deleteSend(context, subscriptionId, resourceGroupName, accountName, profileName, options = { requestOptions: {} }) {
|
|
186
|
+
return context
|
|
187
|
+
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}", subscriptionId, resourceGroupName, accountName, profileName)
|
|
188
|
+
.delete(Object.assign({}, operationOptionsToRequestParameters(options)));
|
|
189
|
+
}
|
|
190
|
+
export async function _$deleteDeserialize(result) {
|
|
191
|
+
const expectedStatuses = ["202", "204", "200"];
|
|
192
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
193
|
+
throw createRestError(result);
|
|
194
|
+
}
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
/** Delete a certificate profile. */
|
|
198
|
+
/**
|
|
199
|
+
* @fixme delete is a reserved word that cannot be used as an operation name.
|
|
200
|
+
* Please add @clientName("clientName") or @clientName("<JS-Specific-Name>", "javascript")
|
|
201
|
+
* to the operation to override the generated name.
|
|
202
|
+
*/
|
|
203
|
+
export function $delete(context, subscriptionId, resourceGroupName, accountName, profileName, options = { requestOptions: {} }) {
|
|
204
|
+
return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], {
|
|
205
|
+
updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
206
|
+
abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
|
|
207
|
+
getInitialResponse: () => _$deleteSend(context, subscriptionId, resourceGroupName, accountName, profileName, options),
|
|
208
|
+
resourceLocationConfig: "location",
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
export function _listByCodeSigningAccountSend(context, subscriptionId, resourceGroupName, accountName, options = {
|
|
212
|
+
requestOptions: {},
|
|
213
|
+
}) {
|
|
214
|
+
return context
|
|
215
|
+
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles", subscriptionId, resourceGroupName, accountName)
|
|
216
|
+
.get(Object.assign({}, operationOptionsToRequestParameters(options)));
|
|
217
|
+
}
|
|
218
|
+
export async function _listByCodeSigningAccountDeserialize(result) {
|
|
219
|
+
const expectedStatuses = ["200"];
|
|
220
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
221
|
+
throw createRestError(result);
|
|
222
|
+
}
|
|
223
|
+
return {
|
|
224
|
+
value: result.body["value"].map((p) => {
|
|
225
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
|
|
226
|
+
return {
|
|
227
|
+
id: p["id"],
|
|
228
|
+
name: p["name"],
|
|
229
|
+
type: p["type"],
|
|
230
|
+
systemData: !p.systemData
|
|
231
|
+
? undefined
|
|
232
|
+
: {
|
|
233
|
+
createdBy: (_a = p.systemData) === null || _a === void 0 ? void 0 : _a["createdBy"],
|
|
234
|
+
createdByType: (_b = p.systemData) === null || _b === void 0 ? void 0 : _b["createdByType"],
|
|
235
|
+
createdAt: ((_c = p.systemData) === null || _c === void 0 ? void 0 : _c["createdAt"]) !== undefined
|
|
236
|
+
? new Date((_d = p.systemData) === null || _d === void 0 ? void 0 : _d["createdAt"])
|
|
237
|
+
: undefined,
|
|
238
|
+
lastModifiedBy: (_e = p.systemData) === null || _e === void 0 ? void 0 : _e["lastModifiedBy"],
|
|
239
|
+
lastModifiedByType: (_f = p.systemData) === null || _f === void 0 ? void 0 : _f["lastModifiedByType"],
|
|
240
|
+
lastModifiedAt: ((_g = p.systemData) === null || _g === void 0 ? void 0 : _g["lastModifiedAt"]) !== undefined
|
|
241
|
+
? new Date((_h = p.systemData) === null || _h === void 0 ? void 0 : _h["lastModifiedAt"])
|
|
242
|
+
: undefined,
|
|
243
|
+
},
|
|
244
|
+
properties: !p.properties
|
|
245
|
+
? undefined
|
|
246
|
+
: {
|
|
247
|
+
profileType: (_j = p.properties) === null || _j === void 0 ? void 0 : _j["profileType"],
|
|
248
|
+
commonName: (_k = p.properties) === null || _k === void 0 ? void 0 : _k["commonName"],
|
|
249
|
+
organization: (_l = p.properties) === null || _l === void 0 ? void 0 : _l["organization"],
|
|
250
|
+
organizationUnit: (_m = p.properties) === null || _m === void 0 ? void 0 : _m["organizationUnit"],
|
|
251
|
+
streetAddress: (_o = p.properties) === null || _o === void 0 ? void 0 : _o["streetAddress"],
|
|
252
|
+
includeStreetAddress: (_p = p.properties) === null || _p === void 0 ? void 0 : _p["includeStreetAddress"],
|
|
253
|
+
city: (_q = p.properties) === null || _q === void 0 ? void 0 : _q["city"],
|
|
254
|
+
includeCity: (_r = p.properties) === null || _r === void 0 ? void 0 : _r["includeCity"],
|
|
255
|
+
state: (_s = p.properties) === null || _s === void 0 ? void 0 : _s["state"],
|
|
256
|
+
includeState: (_t = p.properties) === null || _t === void 0 ? void 0 : _t["includeState"],
|
|
257
|
+
country: (_u = p.properties) === null || _u === void 0 ? void 0 : _u["country"],
|
|
258
|
+
includeCountry: (_v = p.properties) === null || _v === void 0 ? void 0 : _v["includeCountry"],
|
|
259
|
+
postalCode: (_w = p.properties) === null || _w === void 0 ? void 0 : _w["postalCode"],
|
|
260
|
+
includePostalCode: (_x = p.properties) === null || _x === void 0 ? void 0 : _x["includePostalCode"],
|
|
261
|
+
enhancedKeyUsage: (_y = p.properties) === null || _y === void 0 ? void 0 : _y["enhancedKeyUsage"],
|
|
262
|
+
identityValidationId: (_z = p.properties) === null || _z === void 0 ? void 0 : _z["identityValidationId"],
|
|
263
|
+
provisioningState: (_0 = p.properties) === null || _0 === void 0 ? void 0 : _0["provisioningState"],
|
|
264
|
+
status: (_1 = p.properties) === null || _1 === void 0 ? void 0 : _1["status"],
|
|
265
|
+
certificates: ((_2 = p.properties) === null || _2 === void 0 ? void 0 : _2["certificates"]) === undefined
|
|
266
|
+
? (_3 = p.properties) === null || _3 === void 0 ? void 0 : _3["certificates"]
|
|
267
|
+
: (_4 = p.properties) === null || _4 === void 0 ? void 0 : _4["certificates"].map((p) => {
|
|
268
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
269
|
+
return {
|
|
270
|
+
serialNumber: p["serialNumber"],
|
|
271
|
+
subjectName: p["subjectName"],
|
|
272
|
+
thumbprint: p["thumbprint"],
|
|
273
|
+
createdDate: p["createdDate"],
|
|
274
|
+
expiryDate: p["expiryDate"],
|
|
275
|
+
status: p["status"],
|
|
276
|
+
revocation: !p.revocation
|
|
277
|
+
? undefined
|
|
278
|
+
: {
|
|
279
|
+
requestedAt: ((_a = p.revocation) === null || _a === void 0 ? void 0 : _a["requestedAt"]) !== undefined
|
|
280
|
+
? new Date((_b = p.revocation) === null || _b === void 0 ? void 0 : _b["requestedAt"])
|
|
281
|
+
: undefined,
|
|
282
|
+
effectiveAt: ((_c = p.revocation) === null || _c === void 0 ? void 0 : _c["effectiveAt"]) !== undefined
|
|
283
|
+
? new Date((_d = p.revocation) === null || _d === void 0 ? void 0 : _d["effectiveAt"])
|
|
284
|
+
: undefined,
|
|
285
|
+
reason: (_e = p.revocation) === null || _e === void 0 ? void 0 : _e["reason"],
|
|
286
|
+
remarks: (_f = p.revocation) === null || _f === void 0 ? void 0 : _f["remarks"],
|
|
287
|
+
status: (_g = p.revocation) === null || _g === void 0 ? void 0 : _g["status"],
|
|
288
|
+
failureReason: (_h = p.revocation) === null || _h === void 0 ? void 0 : _h["failureReason"],
|
|
289
|
+
},
|
|
290
|
+
};
|
|
291
|
+
}),
|
|
292
|
+
},
|
|
293
|
+
};
|
|
294
|
+
}),
|
|
295
|
+
nextLink: result.body["nextLink"],
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
/** List certificate profiles under a trusted signing account. */
|
|
299
|
+
export function listByCodeSigningAccount(context, subscriptionId, resourceGroupName, accountName, options = {
|
|
300
|
+
requestOptions: {},
|
|
301
|
+
}) {
|
|
302
|
+
return buildPagedAsyncIterator(context, () => _listByCodeSigningAccountSend(context, subscriptionId, resourceGroupName, accountName, options), _listByCodeSigningAccountDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink" });
|
|
303
|
+
}
|
|
304
|
+
export function _revokeCertificateSend(context, subscriptionId, resourceGroupName, accountName, profileName, body, options = {
|
|
305
|
+
requestOptions: {},
|
|
306
|
+
}) {
|
|
307
|
+
return context
|
|
308
|
+
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}/revokeCertificate", subscriptionId, resourceGroupName, accountName, profileName)
|
|
309
|
+
.post(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { body: {
|
|
310
|
+
serialNumber: body["serialNumber"],
|
|
311
|
+
thumbprint: body["thumbprint"],
|
|
312
|
+
effectiveAt: body["effectiveAt"].toISOString(),
|
|
313
|
+
reason: body["reason"],
|
|
314
|
+
remarks: body["remarks"],
|
|
315
|
+
} }));
|
|
316
|
+
}
|
|
317
|
+
export async function _revokeCertificateDeserialize(result) {
|
|
318
|
+
const expectedStatuses = ["204"];
|
|
319
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
320
|
+
throw createRestError(result);
|
|
321
|
+
}
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
/** Revoke a certificate under a certificate profile. */
|
|
325
|
+
export async function revokeCertificate(context, subscriptionId, resourceGroupName, accountName, profileName, body, options = {
|
|
326
|
+
requestOptions: {},
|
|
327
|
+
}) {
|
|
328
|
+
const result = await _revokeCertificateSend(context, subscriptionId, resourceGroupName, accountName, profileName, body, options);
|
|
329
|
+
return _revokeCertificateDeserialize(result);
|
|
330
|
+
}
|
|
331
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/certificateProfiles/index.ts"],"names":[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W,EACX,WAAW,CACZ;SACA,IAAI,iCACA,mCAAmC,CAAC,OAAO,CAAC,KAC/C,IAAI,EAAE;YACJ,YAAY,EAAE,IAAI,CAAC,cAAc,CAAC;YAClC,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC;YAC9B,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,WAAW,EAAE;YAC9C,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC;YACtB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC;SACzB,IACD,CAAC;AACP,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,6BAA6B,CAAC,MAA6B;IAC/E,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,eAAe,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,OAAO;AACT,CAAC;AAED,wDAAwD;AACxD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAAe,EACf,cAAsB,EACtB,iBAAyB,EACzB,WAAmB,EACnB,WAAmB,EACnB,IAAuB,EACvB,UAA8D;IAC5D,cAAc,EAAE,EAAE;CACnB;IAED,MAAM,MAAM,GAAG,MAAM,sBAAsB,CACzC,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,IAAI,EACJ,OAAO,CACR,CAAC;IACF,OAAO,6BAA6B,CAAC,MAAM,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n certificateProfilePropertiesSerializer,\n CertificateProfile,\n RevokeCertificate,\n _CertificateProfileListResult,\n} from \"../../models/models.js\";\nimport { CodeSigningContext as Client } from \"../index.js\";\nimport {\n StreamableMethod,\n operationOptionsToRequestParameters,\n PathUncheckedResponse,\n createRestError,\n} from \"@azure-rest/core-client\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { getLongRunningPoller } from \"../../static-helpers/pollingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\nimport {\n CertificateProfilesGetOptionalParams,\n CertificateProfilesCreateOptionalParams,\n CertificateProfilesDeleteOptionalParams,\n CertificateProfilesListByCodeSigningAccountOptionalParams,\n CertificateProfilesRevokeCertificateOptionalParams,\n} from \"../../models/options.js\";\n\nexport function _getSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options: CertificateProfilesGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}\",\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n )\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _getDeserialize(result: PathUncheckedResponse): Promise<CertificateProfile> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n id: result.body[\"id\"],\n name: result.body[\"name\"],\n type: result.body[\"type\"],\n systemData: !result.body.systemData\n ? undefined\n : {\n createdBy: result.body.systemData?.[\"createdBy\"],\n createdByType: result.body.systemData?.[\"createdByType\"],\n createdAt:\n result.body.systemData?.[\"createdAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: result.body.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: result.body.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n result.body.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !result.body.properties\n ? undefined\n : {\n profileType: result.body.properties?.[\"profileType\"],\n commonName: result.body.properties?.[\"commonName\"],\n organization: result.body.properties?.[\"organization\"],\n organizationUnit: result.body.properties?.[\"organizationUnit\"],\n streetAddress: result.body.properties?.[\"streetAddress\"],\n includeStreetAddress: result.body.properties?.[\"includeStreetAddress\"],\n city: result.body.properties?.[\"city\"],\n includeCity: result.body.properties?.[\"includeCity\"],\n state: result.body.properties?.[\"state\"],\n includeState: result.body.properties?.[\"includeState\"],\n country: result.body.properties?.[\"country\"],\n includeCountry: result.body.properties?.[\"includeCountry\"],\n postalCode: result.body.properties?.[\"postalCode\"],\n includePostalCode: result.body.properties?.[\"includePostalCode\"],\n enhancedKeyUsage: result.body.properties?.[\"enhancedKeyUsage\"],\n identityValidationId: result.body.properties?.[\"identityValidationId\"],\n provisioningState: result.body.properties?.[\"provisioningState\"],\n status: result.body.properties?.[\"status\"],\n certificates:\n result.body.properties?.[\"certificates\"] === undefined\n ? result.body.properties?.[\"certificates\"]\n : result.body.properties?.[\"certificates\"].map((p: any) => {\n return {\n serialNumber: p[\"serialNumber\"],\n subjectName: p[\"subjectName\"],\n thumbprint: p[\"thumbprint\"],\n createdDate: p[\"createdDate\"],\n expiryDate: p[\"expiryDate\"],\n status: p[\"status\"],\n revocation: !p.revocation\n ? undefined\n : {\n requestedAt:\n p.revocation?.[\"requestedAt\"] !== undefined\n ? new Date(p.revocation?.[\"requestedAt\"])\n : undefined,\n effectiveAt:\n p.revocation?.[\"effectiveAt\"] !== undefined\n ? new Date(p.revocation?.[\"effectiveAt\"])\n : undefined,\n reason: p.revocation?.[\"reason\"],\n remarks: p.revocation?.[\"remarks\"],\n status: p.revocation?.[\"status\"],\n failureReason: p.revocation?.[\"failureReason\"],\n },\n };\n }),\n },\n };\n}\n\n/** Get details of a certificate profile. */\nexport async function get(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options: CertificateProfilesGetOptionalParams = { requestOptions: {} },\n): Promise<CertificateProfile> {\n const result = await _getSend(\n context,\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n options,\n );\n return _getDeserialize(result);\n}\n\nexport function _createSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n resource: CertificateProfile,\n options: CertificateProfilesCreateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}\",\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n )\n .put({\n ...operationOptionsToRequestParameters(options),\n body: {\n properties: !resource.properties\n ? resource.properties\n : certificateProfilePropertiesSerializer(resource.properties),\n },\n });\n}\n\nexport async function _createDeserialize(\n result: PathUncheckedResponse,\n): Promise<CertificateProfile> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n id: result.body[\"id\"],\n name: result.body[\"name\"],\n type: result.body[\"type\"],\n systemData: !result.body.systemData\n ? undefined\n : {\n createdBy: result.body.systemData?.[\"createdBy\"],\n createdByType: result.body.systemData?.[\"createdByType\"],\n createdAt:\n result.body.systemData?.[\"createdAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: result.body.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: result.body.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n result.body.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !result.body.properties\n ? undefined\n : {\n profileType: result.body.properties?.[\"profileType\"],\n commonName: result.body.properties?.[\"commonName\"],\n organization: result.body.properties?.[\"organization\"],\n organizationUnit: result.body.properties?.[\"organizationUnit\"],\n streetAddress: result.body.properties?.[\"streetAddress\"],\n includeStreetAddress: result.body.properties?.[\"includeStreetAddress\"],\n city: result.body.properties?.[\"city\"],\n includeCity: result.body.properties?.[\"includeCity\"],\n state: result.body.properties?.[\"state\"],\n includeState: result.body.properties?.[\"includeState\"],\n country: result.body.properties?.[\"country\"],\n includeCountry: result.body.properties?.[\"includeCountry\"],\n postalCode: result.body.properties?.[\"postalCode\"],\n includePostalCode: result.body.properties?.[\"includePostalCode\"],\n enhancedKeyUsage: result.body.properties?.[\"enhancedKeyUsage\"],\n identityValidationId: result.body.properties?.[\"identityValidationId\"],\n provisioningState: result.body.properties?.[\"provisioningState\"],\n status: result.body.properties?.[\"status\"],\n certificates:\n result.body.properties?.[\"certificates\"] === undefined\n ? result.body.properties?.[\"certificates\"]\n : result.body.properties?.[\"certificates\"].map((p: any) => {\n return {\n serialNumber: p[\"serialNumber\"],\n subjectName: p[\"subjectName\"],\n thumbprint: p[\"thumbprint\"],\n createdDate: p[\"createdDate\"],\n expiryDate: p[\"expiryDate\"],\n status: p[\"status\"],\n revocation: !p.revocation\n ? undefined\n : {\n requestedAt:\n p.revocation?.[\"requestedAt\"] !== undefined\n ? new Date(p.revocation?.[\"requestedAt\"])\n : undefined,\n effectiveAt:\n p.revocation?.[\"effectiveAt\"] !== undefined\n ? new Date(p.revocation?.[\"effectiveAt\"])\n : undefined,\n reason: p.revocation?.[\"reason\"],\n remarks: p.revocation?.[\"remarks\"],\n status: p.revocation?.[\"status\"],\n failureReason: p.revocation?.[\"failureReason\"],\n },\n };\n }),\n },\n };\n}\n\n/** Create a certificate profile. */\nexport function create(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n resource: CertificateProfile,\n options: CertificateProfilesCreateOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<CertificateProfile>, CertificateProfile> {\n return getLongRunningPoller(context, _createDeserialize, [\"200\", \"201\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _createSend(\n context,\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n resource,\n options,\n ),\n resourceLocationConfig: \"azure-async-operation\",\n }) as PollerLike<OperationState<CertificateProfile>, CertificateProfile>;\n}\n\nexport function _$deleteSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options: CertificateProfilesDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}\",\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n )\n .delete({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"202\", \"204\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return;\n}\n\n/** Delete a certificate profile. */\n/**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\nexport function $delete(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options: CertificateProfilesDeleteOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<void>, void> {\n return getLongRunningPoller(context, _$deleteDeserialize, [\"202\", \"204\", \"200\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _$deleteSend(context, subscriptionId, resourceGroupName, accountName, profileName, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<void>, void>;\n}\n\nexport function _listByCodeSigningAccountSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n options: CertificateProfilesListByCodeSigningAccountOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles\",\n subscriptionId,\n resourceGroupName,\n accountName,\n )\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _listByCodeSigningAccountDeserialize(\n result: PathUncheckedResponse,\n): Promise<_CertificateProfileListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n value: result.body[\"value\"].map((p: any) => {\n return {\n id: p[\"id\"],\n name: p[\"name\"],\n type: p[\"type\"],\n systemData: !p.systemData\n ? undefined\n : {\n createdBy: p.systemData?.[\"createdBy\"],\n createdByType: p.systemData?.[\"createdByType\"],\n createdAt:\n p.systemData?.[\"createdAt\"] !== undefined\n ? new Date(p.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: p.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: p.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n p.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(p.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !p.properties\n ? undefined\n : {\n profileType: p.properties?.[\"profileType\"],\n commonName: p.properties?.[\"commonName\"],\n organization: p.properties?.[\"organization\"],\n organizationUnit: p.properties?.[\"organizationUnit\"],\n streetAddress: p.properties?.[\"streetAddress\"],\n includeStreetAddress: p.properties?.[\"includeStreetAddress\"],\n city: p.properties?.[\"city\"],\n includeCity: p.properties?.[\"includeCity\"],\n state: p.properties?.[\"state\"],\n includeState: p.properties?.[\"includeState\"],\n country: p.properties?.[\"country\"],\n includeCountry: p.properties?.[\"includeCountry\"],\n postalCode: p.properties?.[\"postalCode\"],\n includePostalCode: p.properties?.[\"includePostalCode\"],\n enhancedKeyUsage: p.properties?.[\"enhancedKeyUsage\"],\n identityValidationId: p.properties?.[\"identityValidationId\"],\n provisioningState: p.properties?.[\"provisioningState\"],\n status: p.properties?.[\"status\"],\n certificates:\n p.properties?.[\"certificates\"] === undefined\n ? p.properties?.[\"certificates\"]\n : p.properties?.[\"certificates\"].map((p: any) => {\n return {\n serialNumber: p[\"serialNumber\"],\n subjectName: p[\"subjectName\"],\n thumbprint: p[\"thumbprint\"],\n createdDate: p[\"createdDate\"],\n expiryDate: p[\"expiryDate\"],\n status: p[\"status\"],\n revocation: !p.revocation\n ? undefined\n : {\n requestedAt:\n p.revocation?.[\"requestedAt\"] !== undefined\n ? new Date(p.revocation?.[\"requestedAt\"])\n : undefined,\n effectiveAt:\n p.revocation?.[\"effectiveAt\"] !== undefined\n ? new Date(p.revocation?.[\"effectiveAt\"])\n : undefined,\n reason: p.revocation?.[\"reason\"],\n remarks: p.revocation?.[\"remarks\"],\n status: p.revocation?.[\"status\"],\n failureReason: p.revocation?.[\"failureReason\"],\n },\n };\n }),\n },\n };\n }),\n nextLink: result.body[\"nextLink\"],\n };\n}\n\n/** List certificate profiles under a trusted signing account. */\nexport function listByCodeSigningAccount(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n options: CertificateProfilesListByCodeSigningAccountOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<CertificateProfile> {\n return buildPagedAsyncIterator(\n context,\n () =>\n _listByCodeSigningAccountSend(\n context,\n subscriptionId,\n resourceGroupName,\n accountName,\n options,\n ),\n _listByCodeSigningAccountDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _revokeCertificateSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n body: RevokeCertificate,\n options: CertificateProfilesRevokeCertificateOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}/revokeCertificate\",\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n )\n .post({\n ...operationOptionsToRequestParameters(options),\n body: {\n serialNumber: body[\"serialNumber\"],\n thumbprint: body[\"thumbprint\"],\n effectiveAt: body[\"effectiveAt\"].toISOString(),\n reason: body[\"reason\"],\n remarks: body[\"remarks\"],\n },\n });\n}\n\nexport async function _revokeCertificateDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"204\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return;\n}\n\n/** Revoke a certificate under a certificate profile. */\nexport async function revokeCertificate(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n body: RevokeCertificate,\n options: CertificateProfilesRevokeCertificateOptionalParams = {\n requestOptions: {},\n },\n): Promise<void> {\n const result = await _revokeCertificateSend(\n context,\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n body,\n options,\n );\n return _revokeCertificateDeserialize(result);\n}\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { CodeSigningAccount, CodeSigningAccountPatch, CheckNameAvailability, CheckNameAvailabilityResult, _CodeSigningAccountListResult } from "../../models/models.js";
|
|
2
|
+
import { CodeSigningContext as Client } from "../index.js";
|
|
3
|
+
import { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client";
|
|
4
|
+
import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
|
|
5
|
+
import { PollerLike, OperationState } from "@azure/core-lro";
|
|
6
|
+
import { CodeSigningAccountsGetOptionalParams, CodeSigningAccountsCreateOptionalParams, CodeSigningAccountsUpdateOptionalParams, CodeSigningAccountsDeleteOptionalParams, CodeSigningAccountsListByResourceGroupOptionalParams, CodeSigningAccountsListBySubscriptionOptionalParams, CodeSigningAccountsCheckNameAvailabilityOptionalParams } from "../../models/options.js";
|
|
7
|
+
export declare function _getSend(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, options?: CodeSigningAccountsGetOptionalParams): StreamableMethod;
|
|
8
|
+
export declare function _getDeserialize(result: PathUncheckedResponse): Promise<CodeSigningAccount>;
|
|
9
|
+
/** Get a trusted Signing Account. */
|
|
10
|
+
export declare function get(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, options?: CodeSigningAccountsGetOptionalParams): Promise<CodeSigningAccount>;
|
|
11
|
+
export declare function _createSend(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, resource: CodeSigningAccount, options?: CodeSigningAccountsCreateOptionalParams): StreamableMethod;
|
|
12
|
+
export declare function _createDeserialize(result: PathUncheckedResponse): Promise<CodeSigningAccount>;
|
|
13
|
+
/** Create a trusted Signing Account. */
|
|
14
|
+
export declare function create(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, resource: CodeSigningAccount, options?: CodeSigningAccountsCreateOptionalParams): PollerLike<OperationState<CodeSigningAccount>, CodeSigningAccount>;
|
|
15
|
+
export declare function _updateSend(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, properties: CodeSigningAccountPatch, options?: CodeSigningAccountsUpdateOptionalParams): StreamableMethod;
|
|
16
|
+
export declare function _updateDeserialize(result: PathUncheckedResponse): Promise<CodeSigningAccount>;
|
|
17
|
+
/** Update a trusted signing account. */
|
|
18
|
+
export declare function update(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, properties: CodeSigningAccountPatch, options?: CodeSigningAccountsUpdateOptionalParams): PollerLike<OperationState<CodeSigningAccount>, CodeSigningAccount>;
|
|
19
|
+
export declare function _$deleteSend(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, options?: CodeSigningAccountsDeleteOptionalParams): StreamableMethod;
|
|
20
|
+
export declare function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void>;
|
|
21
|
+
/** Delete a trusted signing account. */
|
|
22
|
+
/**
|
|
23
|
+
* @fixme delete is a reserved word that cannot be used as an operation name.
|
|
24
|
+
* Please add @clientName("clientName") or @clientName("<JS-Specific-Name>", "javascript")
|
|
25
|
+
* to the operation to override the generated name.
|
|
26
|
+
*/
|
|
27
|
+
export declare function $delete(context: Client, subscriptionId: string, resourceGroupName: string, accountName: string, options?: CodeSigningAccountsDeleteOptionalParams): PollerLike<OperationState<void>, void>;
|
|
28
|
+
export declare function _listByResourceGroupSend(context: Client, subscriptionId: string, resourceGroupName: string, options?: CodeSigningAccountsListByResourceGroupOptionalParams): StreamableMethod;
|
|
29
|
+
export declare function _listByResourceGroupDeserialize(result: PathUncheckedResponse): Promise<_CodeSigningAccountListResult>;
|
|
30
|
+
/** Lists trusted signing accounts within a resource group. */
|
|
31
|
+
export declare function listByResourceGroup(context: Client, subscriptionId: string, resourceGroupName: string, options?: CodeSigningAccountsListByResourceGroupOptionalParams): PagedAsyncIterableIterator<CodeSigningAccount>;
|
|
32
|
+
export declare function _listBySubscriptionSend(context: Client, subscriptionId: string, options?: CodeSigningAccountsListBySubscriptionOptionalParams): StreamableMethod;
|
|
33
|
+
export declare function _listBySubscriptionDeserialize(result: PathUncheckedResponse): Promise<_CodeSigningAccountListResult>;
|
|
34
|
+
/** Lists trusted signing accounts within a subscription. */
|
|
35
|
+
export declare function listBySubscription(context: Client, subscriptionId: string, options?: CodeSigningAccountsListBySubscriptionOptionalParams): PagedAsyncIterableIterator<CodeSigningAccount>;
|
|
36
|
+
export declare function _checkNameAvailabilitySend(context: Client, subscriptionId: string, body: CheckNameAvailability, options?: CodeSigningAccountsCheckNameAvailabilityOptionalParams): StreamableMethod;
|
|
37
|
+
export declare function _checkNameAvailabilityDeserialize(result: PathUncheckedResponse): Promise<CheckNameAvailabilityResult>;
|
|
38
|
+
/** Checks that the trusted signing account name is valid and is not already in use. */
|
|
39
|
+
export declare function checkNameAvailability(context: Client, subscriptionId: string, body: CheckNameAvailability, options?: CodeSigningAccountsCheckNameAvailabilityOptionalParams): Promise<CheckNameAvailabilityResult>;
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|