@azure/arm-trustedsigning 1.0.0-beta.2 → 1.0.0-beta.3
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 +11 -1
- package/LICENSE +4 -4
- package/README.md +24 -16
- package/dist/browser/api/certificateProfiles/index.js +128 -128
- package/dist/browser/api/certificateProfiles/index.js.map +1 -1
- package/dist/browser/api/codeSigningAccounts/index.js +82 -78
- package/dist/browser/api/codeSigningAccounts/index.js.map +1 -1
- package/dist/browser/api/codeSigningContext.js +12 -9
- package/dist/browser/api/codeSigningContext.js.map +1 -1
- package/dist/browser/api/operations/index.js +5 -6
- package/dist/browser/api/operations/index.js.map +1 -1
- package/dist/browser/classic/certificateProfiles/index.js +3 -1
- package/dist/browser/classic/certificateProfiles/index.js.map +1 -1
- package/dist/browser/classic/codeSigningAccounts/index.js +3 -1
- package/dist/browser/classic/codeSigningAccounts/index.js.map +1 -1
- package/dist/browser/classic/operations/index.js +3 -1
- package/dist/browser/classic/operations/index.js.map +1 -1
- package/dist/browser/codeSigningClient.js +14 -3
- package/dist/browser/codeSigningClient.js.map +1 -1
- package/dist/browser/restorePollerHelpers.js +11 -13
- package/dist/browser/restorePollerHelpers.js.map +1 -1
- package/dist/browser/static-helpers/pagingHelpers.js +31 -50
- package/dist/browser/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/browser/static-helpers/pollingHelpers.js +14 -11
- package/dist/browser/static-helpers/pollingHelpers.js.map +1 -1
- package/dist/commonjs/api/certificateProfiles/index.js +128 -128
- package/dist/commonjs/api/certificateProfiles/index.js.map +1 -1
- package/dist/commonjs/api/codeSigningAccounts/index.js +82 -78
- package/dist/commonjs/api/codeSigningAccounts/index.js.map +1 -1
- package/dist/commonjs/api/codeSigningContext.js +12 -9
- package/dist/commonjs/api/codeSigningContext.js.map +1 -1
- package/dist/commonjs/api/operations/index.js +5 -6
- package/dist/commonjs/api/operations/index.js.map +1 -1
- package/dist/commonjs/classic/certificateProfiles/index.js +3 -1
- package/dist/commonjs/classic/certificateProfiles/index.js.map +1 -1
- package/dist/commonjs/classic/codeSigningAccounts/index.js +3 -1
- package/dist/commonjs/classic/codeSigningAccounts/index.js.map +1 -1
- package/dist/commonjs/classic/operations/index.js +3 -1
- package/dist/commonjs/classic/operations/index.js.map +1 -1
- package/dist/commonjs/codeSigningClient.js +14 -3
- package/dist/commonjs/codeSigningClient.js.map +1 -1
- package/dist/commonjs/restorePollerHelpers.js +11 -13
- package/dist/commonjs/restorePollerHelpers.js.map +1 -1
- package/dist/commonjs/static-helpers/pagingHelpers.js +31 -50
- package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/commonjs/static-helpers/pollingHelpers.js +14 -11
- package/dist/commonjs/static-helpers/pollingHelpers.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/api/certificateProfiles/index.js +128 -128
- package/dist/esm/api/certificateProfiles/index.js.map +1 -1
- package/dist/esm/api/codeSigningAccounts/index.js +82 -78
- package/dist/esm/api/codeSigningAccounts/index.js.map +1 -1
- package/dist/esm/api/codeSigningContext.js +12 -9
- package/dist/esm/api/codeSigningContext.js.map +1 -1
- package/dist/esm/api/operations/index.js +5 -6
- package/dist/esm/api/operations/index.js.map +1 -1
- package/dist/esm/classic/certificateProfiles/index.js +3 -1
- package/dist/esm/classic/certificateProfiles/index.js.map +1 -1
- package/dist/esm/classic/codeSigningAccounts/index.js +3 -1
- package/dist/esm/classic/codeSigningAccounts/index.js.map +1 -1
- package/dist/esm/classic/operations/index.js +3 -1
- package/dist/esm/classic/operations/index.js.map +1 -1
- package/dist/esm/codeSigningClient.js +14 -3
- package/dist/esm/codeSigningClient.js.map +1 -1
- package/dist/esm/restorePollerHelpers.js +11 -13
- package/dist/esm/restorePollerHelpers.js.map +1 -1
- package/dist/esm/static-helpers/pagingHelpers.js +31 -50
- package/dist/esm/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/esm/static-helpers/pollingHelpers.js +14 -11
- package/dist/esm/static-helpers/pollingHelpers.js.map +1 -1
- package/dist/react-native/api/certificateProfiles/index.js +128 -128
- package/dist/react-native/api/certificateProfiles/index.js.map +1 -1
- package/dist/react-native/api/codeSigningAccounts/index.js +82 -78
- package/dist/react-native/api/codeSigningAccounts/index.js.map +1 -1
- package/dist/react-native/api/codeSigningContext.js +12 -9
- package/dist/react-native/api/codeSigningContext.js.map +1 -1
- package/dist/react-native/api/operations/index.js +5 -6
- package/dist/react-native/api/operations/index.js.map +1 -1
- package/dist/react-native/classic/certificateProfiles/index.js +3 -1
- package/dist/react-native/classic/certificateProfiles/index.js.map +1 -1
- package/dist/react-native/classic/codeSigningAccounts/index.js +3 -1
- package/dist/react-native/classic/codeSigningAccounts/index.js.map +1 -1
- package/dist/react-native/classic/operations/index.js +3 -1
- package/dist/react-native/classic/operations/index.js.map +1 -1
- package/dist/react-native/codeSigningClient.js +14 -3
- package/dist/react-native/codeSigningClient.js.map +1 -1
- package/dist/react-native/restorePollerHelpers.js +11 -13
- package/dist/react-native/restorePollerHelpers.js.map +1 -1
- package/dist/react-native/static-helpers/pagingHelpers.js +31 -50
- package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/react-native/static-helpers/pollingHelpers.js +14 -11
- package/dist/react-native/static-helpers/pollingHelpers.js.map +1 -1
- package/package.json +45 -47
- /package/review/{arm-trustedsigning-models.api.md → arm-trustedsigning-models-node.api.md} +0 -0
- /package/review/{arm-trustedsigning.api.md → arm-trustedsigning-node.api.md} +0 -0
package/CHANGELOG.md
CHANGED
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
Copyright (c) Microsoft Corporation.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
MIT License
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -12,10 +12,10 @@ furnished to do so, subject to the following conditions:
|
|
|
12
12
|
The above copyright notice and this permission notice shall be included in all
|
|
13
13
|
copies or substantial portions of the Software.
|
|
14
14
|
|
|
15
|
-
THE SOFTWARE IS PROVIDED
|
|
15
|
+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
16
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
17
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
|
|
|
5
5
|
Code Signing resource provider api.
|
|
6
6
|
|
|
7
7
|
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-trustedsigning) |
|
|
8
|
-
[API reference documentation](https://
|
|
8
|
+
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-trustedsigning?view=azure-node-preview) |
|
|
9
9
|
|
|
10
10
|
## Getting started
|
|
11
11
|
|
|
@@ -44,26 +44,34 @@ npm install @azure/identity
|
|
|
44
44
|
You will also need to **register a new AAD application and grant access to Azure CodeSigningManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
|
|
45
45
|
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
|
|
46
46
|
|
|
47
|
-
For more information about how to create an Azure AD Application check out [this guide](https://
|
|
47
|
+
For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client.
|
|
50
|
+
|
|
51
|
+
```ts snippet:ReadmeSampleCreateClient_Node
|
|
52
|
+
import { CodeSigningClient } from "@azure/arm-trustedsigning";
|
|
53
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
53
54
|
|
|
54
55
|
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
55
56
|
const client = new CodeSigningClient(new DefaultAzureCredential(), subscriptionId);
|
|
56
|
-
|
|
57
|
-
// For client-side applications running in the browser, use this code instead:
|
|
58
|
-
// const credential = new InteractiveBrowserCredential({
|
|
59
|
-
// tenantId: "<YOUR_TENANT_ID>",
|
|
60
|
-
// clientId: "<YOUR_CLIENT_ID>"
|
|
61
|
-
// });
|
|
62
|
-
// const client = new CodeSigningClient(credential, subscriptionId);
|
|
63
57
|
```
|
|
64
58
|
|
|
59
|
+
For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate.
|
|
60
|
+
|
|
61
|
+
```ts snippet:ReadmeSampleCreateClient_Browser
|
|
62
|
+
import { InteractiveBrowserCredential } from "@azure/identity";
|
|
63
|
+
import { CodeSigningClient } from "@azure/arm-trustedsigning";
|
|
64
|
+
|
|
65
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
66
|
+
const credential = new InteractiveBrowserCredential({
|
|
67
|
+
tenantId: "<YOUR_TENANT_ID>",
|
|
68
|
+
clientId: "<YOUR_CLIENT_ID>",
|
|
69
|
+
});
|
|
70
|
+
const client = new CodeSigningClient(credential, subscriptionId);
|
|
71
|
+
```
|
|
65
72
|
|
|
66
73
|
### JavaScript Bundle
|
|
74
|
+
|
|
67
75
|
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
|
|
68
76
|
|
|
69
77
|
## Key concepts
|
|
@@ -78,14 +86,14 @@ To use this client library in the browser, first you need to use a bundler. For
|
|
|
78
86
|
|
|
79
87
|
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
|
|
80
88
|
|
|
81
|
-
```
|
|
82
|
-
|
|
89
|
+
```ts snippet:SetLogLevel
|
|
90
|
+
import { setLogLevel } from "@azure/logger";
|
|
91
|
+
|
|
83
92
|
setLogLevel("info");
|
|
84
93
|
```
|
|
85
94
|
|
|
86
95
|
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
|
|
87
96
|
|
|
88
|
-
|
|
89
97
|
## Contributing
|
|
90
98
|
|
|
91
99
|
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
|
|
@@ -7,10 +7,9 @@ import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js";
|
|
|
7
7
|
export function _getSend(context, subscriptionId, resourceGroupName, accountName, profileName, options = { requestOptions: {} }) {
|
|
8
8
|
return context
|
|
9
9
|
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}", subscriptionId, resourceGroupName, accountName, profileName)
|
|
10
|
-
.get(
|
|
10
|
+
.get({ ...operationOptionsToRequestParameters(options) });
|
|
11
11
|
}
|
|
12
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
13
|
const expectedStatuses = ["200"];
|
|
15
14
|
if (!expectedStatuses.includes(result.status)) {
|
|
16
15
|
throw createRestError(result);
|
|
@@ -22,42 +21,41 @@ export async function _getDeserialize(result) {
|
|
|
22
21
|
systemData: !result.body.systemData
|
|
23
22
|
? undefined
|
|
24
23
|
: {
|
|
25
|
-
createdBy:
|
|
26
|
-
createdByType:
|
|
27
|
-
createdAt:
|
|
28
|
-
? new Date(
|
|
24
|
+
createdBy: result.body.systemData?.["createdBy"],
|
|
25
|
+
createdByType: result.body.systemData?.["createdByType"],
|
|
26
|
+
createdAt: result.body.systemData?.["createdAt"] !== undefined
|
|
27
|
+
? new Date(result.body.systemData?.["createdAt"])
|
|
29
28
|
: undefined,
|
|
30
|
-
lastModifiedBy:
|
|
31
|
-
lastModifiedByType:
|
|
32
|
-
lastModifiedAt:
|
|
33
|
-
? new Date(
|
|
29
|
+
lastModifiedBy: result.body.systemData?.["lastModifiedBy"],
|
|
30
|
+
lastModifiedByType: result.body.systemData?.["lastModifiedByType"],
|
|
31
|
+
lastModifiedAt: result.body.systemData?.["lastModifiedAt"] !== undefined
|
|
32
|
+
? new Date(result.body.systemData?.["lastModifiedAt"])
|
|
34
33
|
: undefined,
|
|
35
34
|
},
|
|
36
35
|
properties: !result.body.properties
|
|
37
36
|
? undefined
|
|
38
37
|
: {
|
|
39
|
-
profileType:
|
|
40
|
-
commonName:
|
|
41
|
-
organization:
|
|
42
|
-
organizationUnit:
|
|
43
|
-
streetAddress:
|
|
44
|
-
includeStreetAddress:
|
|
45
|
-
city:
|
|
46
|
-
includeCity:
|
|
47
|
-
state:
|
|
48
|
-
includeState:
|
|
49
|
-
country:
|
|
50
|
-
includeCountry:
|
|
51
|
-
postalCode:
|
|
52
|
-
includePostalCode:
|
|
53
|
-
enhancedKeyUsage:
|
|
54
|
-
identityValidationId:
|
|
55
|
-
provisioningState:
|
|
56
|
-
status:
|
|
57
|
-
certificates:
|
|
58
|
-
?
|
|
59
|
-
:
|
|
60
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
38
|
+
profileType: result.body.properties?.["profileType"],
|
|
39
|
+
commonName: result.body.properties?.["commonName"],
|
|
40
|
+
organization: result.body.properties?.["organization"],
|
|
41
|
+
organizationUnit: result.body.properties?.["organizationUnit"],
|
|
42
|
+
streetAddress: result.body.properties?.["streetAddress"],
|
|
43
|
+
includeStreetAddress: result.body.properties?.["includeStreetAddress"],
|
|
44
|
+
city: result.body.properties?.["city"],
|
|
45
|
+
includeCity: result.body.properties?.["includeCity"],
|
|
46
|
+
state: result.body.properties?.["state"],
|
|
47
|
+
includeState: result.body.properties?.["includeState"],
|
|
48
|
+
country: result.body.properties?.["country"],
|
|
49
|
+
includeCountry: result.body.properties?.["includeCountry"],
|
|
50
|
+
postalCode: result.body.properties?.["postalCode"],
|
|
51
|
+
includePostalCode: result.body.properties?.["includePostalCode"],
|
|
52
|
+
enhancedKeyUsage: result.body.properties?.["enhancedKeyUsage"],
|
|
53
|
+
identityValidationId: result.body.properties?.["identityValidationId"],
|
|
54
|
+
provisioningState: result.body.properties?.["provisioningState"],
|
|
55
|
+
status: result.body.properties?.["status"],
|
|
56
|
+
certificates: result.body.properties?.["certificates"] === undefined
|
|
57
|
+
? result.body.properties?.["certificates"]
|
|
58
|
+
: result.body.properties?.["certificates"].map((p) => {
|
|
61
59
|
return {
|
|
62
60
|
serialNumber: p["serialNumber"],
|
|
63
61
|
subjectName: p["subjectName"],
|
|
@@ -68,16 +66,16 @@ export async function _getDeserialize(result) {
|
|
|
68
66
|
revocation: !p.revocation
|
|
69
67
|
? undefined
|
|
70
68
|
: {
|
|
71
|
-
requestedAt:
|
|
72
|
-
? new Date(
|
|
69
|
+
requestedAt: p.revocation?.["requestedAt"] !== undefined
|
|
70
|
+
? new Date(p.revocation?.["requestedAt"])
|
|
73
71
|
: undefined,
|
|
74
|
-
effectiveAt:
|
|
75
|
-
? new Date(
|
|
72
|
+
effectiveAt: p.revocation?.["effectiveAt"] !== undefined
|
|
73
|
+
? new Date(p.revocation?.["effectiveAt"])
|
|
76
74
|
: undefined,
|
|
77
|
-
reason:
|
|
78
|
-
remarks:
|
|
79
|
-
status:
|
|
80
|
-
failureReason:
|
|
75
|
+
reason: p.revocation?.["reason"],
|
|
76
|
+
remarks: p.revocation?.["remarks"],
|
|
77
|
+
status: p.revocation?.["status"],
|
|
78
|
+
failureReason: p.revocation?.["failureReason"],
|
|
81
79
|
},
|
|
82
80
|
};
|
|
83
81
|
}),
|
|
@@ -92,14 +90,16 @@ export async function get(context, subscriptionId, resourceGroupName, accountNam
|
|
|
92
90
|
export function _createSend(context, subscriptionId, resourceGroupName, accountName, profileName, resource, options = { requestOptions: {} }) {
|
|
93
91
|
return context
|
|
94
92
|
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}", subscriptionId, resourceGroupName, accountName, profileName)
|
|
95
|
-
.put(
|
|
93
|
+
.put({
|
|
94
|
+
...operationOptionsToRequestParameters(options),
|
|
95
|
+
body: {
|
|
96
96
|
properties: !resource.properties
|
|
97
97
|
? resource.properties
|
|
98
98
|
: certificateProfilePropertiesSerializer(resource.properties),
|
|
99
|
-
}
|
|
99
|
+
},
|
|
100
|
+
});
|
|
100
101
|
}
|
|
101
102
|
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
103
|
const expectedStatuses = ["200", "201"];
|
|
104
104
|
if (!expectedStatuses.includes(result.status)) {
|
|
105
105
|
throw createRestError(result);
|
|
@@ -111,42 +111,41 @@ export async function _createDeserialize(result) {
|
|
|
111
111
|
systemData: !result.body.systemData
|
|
112
112
|
? undefined
|
|
113
113
|
: {
|
|
114
|
-
createdBy:
|
|
115
|
-
createdByType:
|
|
116
|
-
createdAt:
|
|
117
|
-
? new Date(
|
|
114
|
+
createdBy: result.body.systemData?.["createdBy"],
|
|
115
|
+
createdByType: result.body.systemData?.["createdByType"],
|
|
116
|
+
createdAt: result.body.systemData?.["createdAt"] !== undefined
|
|
117
|
+
? new Date(result.body.systemData?.["createdAt"])
|
|
118
118
|
: undefined,
|
|
119
|
-
lastModifiedBy:
|
|
120
|
-
lastModifiedByType:
|
|
121
|
-
lastModifiedAt:
|
|
122
|
-
? new Date(
|
|
119
|
+
lastModifiedBy: result.body.systemData?.["lastModifiedBy"],
|
|
120
|
+
lastModifiedByType: result.body.systemData?.["lastModifiedByType"],
|
|
121
|
+
lastModifiedAt: result.body.systemData?.["lastModifiedAt"] !== undefined
|
|
122
|
+
? new Date(result.body.systemData?.["lastModifiedAt"])
|
|
123
123
|
: undefined,
|
|
124
124
|
},
|
|
125
125
|
properties: !result.body.properties
|
|
126
126
|
? undefined
|
|
127
127
|
: {
|
|
128
|
-
profileType:
|
|
129
|
-
commonName:
|
|
130
|
-
organization:
|
|
131
|
-
organizationUnit:
|
|
132
|
-
streetAddress:
|
|
133
|
-
includeStreetAddress:
|
|
134
|
-
city:
|
|
135
|
-
includeCity:
|
|
136
|
-
state:
|
|
137
|
-
includeState:
|
|
138
|
-
country:
|
|
139
|
-
includeCountry:
|
|
140
|
-
postalCode:
|
|
141
|
-
includePostalCode:
|
|
142
|
-
enhancedKeyUsage:
|
|
143
|
-
identityValidationId:
|
|
144
|
-
provisioningState:
|
|
145
|
-
status:
|
|
146
|
-
certificates:
|
|
147
|
-
?
|
|
148
|
-
:
|
|
149
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
128
|
+
profileType: result.body.properties?.["profileType"],
|
|
129
|
+
commonName: result.body.properties?.["commonName"],
|
|
130
|
+
organization: result.body.properties?.["organization"],
|
|
131
|
+
organizationUnit: result.body.properties?.["organizationUnit"],
|
|
132
|
+
streetAddress: result.body.properties?.["streetAddress"],
|
|
133
|
+
includeStreetAddress: result.body.properties?.["includeStreetAddress"],
|
|
134
|
+
city: result.body.properties?.["city"],
|
|
135
|
+
includeCity: result.body.properties?.["includeCity"],
|
|
136
|
+
state: result.body.properties?.["state"],
|
|
137
|
+
includeState: result.body.properties?.["includeState"],
|
|
138
|
+
country: result.body.properties?.["country"],
|
|
139
|
+
includeCountry: result.body.properties?.["includeCountry"],
|
|
140
|
+
postalCode: result.body.properties?.["postalCode"],
|
|
141
|
+
includePostalCode: result.body.properties?.["includePostalCode"],
|
|
142
|
+
enhancedKeyUsage: result.body.properties?.["enhancedKeyUsage"],
|
|
143
|
+
identityValidationId: result.body.properties?.["identityValidationId"],
|
|
144
|
+
provisioningState: result.body.properties?.["provisioningState"],
|
|
145
|
+
status: result.body.properties?.["status"],
|
|
146
|
+
certificates: result.body.properties?.["certificates"] === undefined
|
|
147
|
+
? result.body.properties?.["certificates"]
|
|
148
|
+
: result.body.properties?.["certificates"].map((p) => {
|
|
150
149
|
return {
|
|
151
150
|
serialNumber: p["serialNumber"],
|
|
152
151
|
subjectName: p["subjectName"],
|
|
@@ -157,16 +156,16 @@ export async function _createDeserialize(result) {
|
|
|
157
156
|
revocation: !p.revocation
|
|
158
157
|
? undefined
|
|
159
158
|
: {
|
|
160
|
-
requestedAt:
|
|
161
|
-
? new Date(
|
|
159
|
+
requestedAt: p.revocation?.["requestedAt"] !== undefined
|
|
160
|
+
? new Date(p.revocation?.["requestedAt"])
|
|
162
161
|
: undefined,
|
|
163
|
-
effectiveAt:
|
|
164
|
-
? new Date(
|
|
162
|
+
effectiveAt: p.revocation?.["effectiveAt"] !== undefined
|
|
163
|
+
? new Date(p.revocation?.["effectiveAt"])
|
|
165
164
|
: undefined,
|
|
166
|
-
reason:
|
|
167
|
-
remarks:
|
|
168
|
-
status:
|
|
169
|
-
failureReason:
|
|
165
|
+
reason: p.revocation?.["reason"],
|
|
166
|
+
remarks: p.revocation?.["remarks"],
|
|
167
|
+
status: p.revocation?.["status"],
|
|
168
|
+
failureReason: p.revocation?.["failureReason"],
|
|
170
169
|
},
|
|
171
170
|
};
|
|
172
171
|
}),
|
|
@@ -176,8 +175,8 @@ export async function _createDeserialize(result) {
|
|
|
176
175
|
/** Create a certificate profile. */
|
|
177
176
|
export function create(context, subscriptionId, resourceGroupName, accountName, profileName, resource, options = { requestOptions: {} }) {
|
|
178
177
|
return getLongRunningPoller(context, _createDeserialize, ["200", "201"], {
|
|
179
|
-
updateIntervalInMs: options
|
|
180
|
-
abortSignal: options
|
|
178
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
179
|
+
abortSignal: options?.abortSignal,
|
|
181
180
|
getInitialResponse: () => _createSend(context, subscriptionId, resourceGroupName, accountName, profileName, resource, options),
|
|
182
181
|
resourceLocationConfig: "azure-async-operation",
|
|
183
182
|
});
|
|
@@ -185,7 +184,7 @@ export function create(context, subscriptionId, resourceGroupName, accountName,
|
|
|
185
184
|
export function _$deleteSend(context, subscriptionId, resourceGroupName, accountName, profileName, options = { requestOptions: {} }) {
|
|
186
185
|
return context
|
|
187
186
|
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}", subscriptionId, resourceGroupName, accountName, profileName)
|
|
188
|
-
.delete(
|
|
187
|
+
.delete({ ...operationOptionsToRequestParameters(options) });
|
|
189
188
|
}
|
|
190
189
|
export async function _$deleteDeserialize(result) {
|
|
191
190
|
const expectedStatuses = ["202", "204", "200"];
|
|
@@ -202,8 +201,8 @@ export async function _$deleteDeserialize(result) {
|
|
|
202
201
|
*/
|
|
203
202
|
export function $delete(context, subscriptionId, resourceGroupName, accountName, profileName, options = { requestOptions: {} }) {
|
|
204
203
|
return getLongRunningPoller(context, _$deleteDeserialize, ["202", "204", "200"], {
|
|
205
|
-
updateIntervalInMs: options
|
|
206
|
-
abortSignal: options
|
|
204
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
205
|
+
abortSignal: options?.abortSignal,
|
|
207
206
|
getInitialResponse: () => _$deleteSend(context, subscriptionId, resourceGroupName, accountName, profileName, options),
|
|
208
207
|
resourceLocationConfig: "location",
|
|
209
208
|
});
|
|
@@ -213,7 +212,7 @@ export function _listByCodeSigningAccountSend(context, subscriptionId, resourceG
|
|
|
213
212
|
}) {
|
|
214
213
|
return context
|
|
215
214
|
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles", subscriptionId, resourceGroupName, accountName)
|
|
216
|
-
.get(
|
|
215
|
+
.get({ ...operationOptionsToRequestParameters(options) });
|
|
217
216
|
}
|
|
218
217
|
export async function _listByCodeSigningAccountDeserialize(result) {
|
|
219
218
|
const expectedStatuses = ["200"];
|
|
@@ -222,7 +221,6 @@ export async function _listByCodeSigningAccountDeserialize(result) {
|
|
|
222
221
|
}
|
|
223
222
|
return {
|
|
224
223
|
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
224
|
return {
|
|
227
225
|
id: p["id"],
|
|
228
226
|
name: p["name"],
|
|
@@ -230,42 +228,41 @@ export async function _listByCodeSigningAccountDeserialize(result) {
|
|
|
230
228
|
systemData: !p.systemData
|
|
231
229
|
? undefined
|
|
232
230
|
: {
|
|
233
|
-
createdBy:
|
|
234
|
-
createdByType:
|
|
235
|
-
createdAt:
|
|
236
|
-
? new Date(
|
|
231
|
+
createdBy: p.systemData?.["createdBy"],
|
|
232
|
+
createdByType: p.systemData?.["createdByType"],
|
|
233
|
+
createdAt: p.systemData?.["createdAt"] !== undefined
|
|
234
|
+
? new Date(p.systemData?.["createdAt"])
|
|
237
235
|
: undefined,
|
|
238
|
-
lastModifiedBy:
|
|
239
|
-
lastModifiedByType:
|
|
240
|
-
lastModifiedAt:
|
|
241
|
-
? new Date(
|
|
236
|
+
lastModifiedBy: p.systemData?.["lastModifiedBy"],
|
|
237
|
+
lastModifiedByType: p.systemData?.["lastModifiedByType"],
|
|
238
|
+
lastModifiedAt: p.systemData?.["lastModifiedAt"] !== undefined
|
|
239
|
+
? new Date(p.systemData?.["lastModifiedAt"])
|
|
242
240
|
: undefined,
|
|
243
241
|
},
|
|
244
242
|
properties: !p.properties
|
|
245
243
|
? undefined
|
|
246
244
|
: {
|
|
247
|
-
profileType:
|
|
248
|
-
commonName:
|
|
249
|
-
organization:
|
|
250
|
-
organizationUnit:
|
|
251
|
-
streetAddress:
|
|
252
|
-
includeStreetAddress:
|
|
253
|
-
city:
|
|
254
|
-
includeCity:
|
|
255
|
-
state:
|
|
256
|
-
includeState:
|
|
257
|
-
country:
|
|
258
|
-
includeCountry:
|
|
259
|
-
postalCode:
|
|
260
|
-
includePostalCode:
|
|
261
|
-
enhancedKeyUsage:
|
|
262
|
-
identityValidationId:
|
|
263
|
-
provisioningState:
|
|
264
|
-
status:
|
|
265
|
-
certificates:
|
|
266
|
-
?
|
|
267
|
-
:
|
|
268
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
245
|
+
profileType: p.properties?.["profileType"],
|
|
246
|
+
commonName: p.properties?.["commonName"],
|
|
247
|
+
organization: p.properties?.["organization"],
|
|
248
|
+
organizationUnit: p.properties?.["organizationUnit"],
|
|
249
|
+
streetAddress: p.properties?.["streetAddress"],
|
|
250
|
+
includeStreetAddress: p.properties?.["includeStreetAddress"],
|
|
251
|
+
city: p.properties?.["city"],
|
|
252
|
+
includeCity: p.properties?.["includeCity"],
|
|
253
|
+
state: p.properties?.["state"],
|
|
254
|
+
includeState: p.properties?.["includeState"],
|
|
255
|
+
country: p.properties?.["country"],
|
|
256
|
+
includeCountry: p.properties?.["includeCountry"],
|
|
257
|
+
postalCode: p.properties?.["postalCode"],
|
|
258
|
+
includePostalCode: p.properties?.["includePostalCode"],
|
|
259
|
+
enhancedKeyUsage: p.properties?.["enhancedKeyUsage"],
|
|
260
|
+
identityValidationId: p.properties?.["identityValidationId"],
|
|
261
|
+
provisioningState: p.properties?.["provisioningState"],
|
|
262
|
+
status: p.properties?.["status"],
|
|
263
|
+
certificates: p.properties?.["certificates"] === undefined
|
|
264
|
+
? p.properties?.["certificates"]
|
|
265
|
+
: p.properties?.["certificates"].map((p) => {
|
|
269
266
|
return {
|
|
270
267
|
serialNumber: p["serialNumber"],
|
|
271
268
|
subjectName: p["subjectName"],
|
|
@@ -276,16 +273,16 @@ export async function _listByCodeSigningAccountDeserialize(result) {
|
|
|
276
273
|
revocation: !p.revocation
|
|
277
274
|
? undefined
|
|
278
275
|
: {
|
|
279
|
-
requestedAt:
|
|
280
|
-
? new Date(
|
|
276
|
+
requestedAt: p.revocation?.["requestedAt"] !== undefined
|
|
277
|
+
? new Date(p.revocation?.["requestedAt"])
|
|
281
278
|
: undefined,
|
|
282
|
-
effectiveAt:
|
|
283
|
-
? new Date(
|
|
279
|
+
effectiveAt: p.revocation?.["effectiveAt"] !== undefined
|
|
280
|
+
? new Date(p.revocation?.["effectiveAt"])
|
|
284
281
|
: undefined,
|
|
285
|
-
reason:
|
|
286
|
-
remarks:
|
|
287
|
-
status:
|
|
288
|
-
failureReason:
|
|
282
|
+
reason: p.revocation?.["reason"],
|
|
283
|
+
remarks: p.revocation?.["remarks"],
|
|
284
|
+
status: p.revocation?.["status"],
|
|
285
|
+
failureReason: p.revocation?.["failureReason"],
|
|
289
286
|
},
|
|
290
287
|
};
|
|
291
288
|
}),
|
|
@@ -306,13 +303,16 @@ export function _revokeCertificateSend(context, subscriptionId, resourceGroupNam
|
|
|
306
303
|
}) {
|
|
307
304
|
return context
|
|
308
305
|
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}/revokeCertificate", subscriptionId, resourceGroupName, accountName, profileName)
|
|
309
|
-
.post(
|
|
306
|
+
.post({
|
|
307
|
+
...operationOptionsToRequestParameters(options),
|
|
308
|
+
body: {
|
|
310
309
|
serialNumber: body["serialNumber"],
|
|
311
310
|
thumbprint: body["thumbprint"],
|
|
312
311
|
effectiveAt: body["effectiveAt"].toISOString(),
|
|
313
312
|
reason: body["reason"],
|
|
314
313
|
remarks: body["remarks"],
|
|
315
|
-
}
|
|
314
|
+
},
|
|
315
|
+
});
|
|
316
316
|
}
|
|
317
317
|
export async function _revokeCertificateDeserialize(result) {
|
|
318
318
|
const expectedStatuses = ["204"];
|