@azure/arm-trustedsigning 1.0.0-beta.1 → 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 +17 -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.d.ts.map +1 -1
- package/dist/browser/api/codeSigningContext.js +15 -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.d.ts.map +1 -1
- package/dist/commonjs/api/codeSigningContext.js +15 -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.d.ts.map +1 -1
- package/dist/esm/api/codeSigningContext.js +15 -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.d.ts.map +1 -1
- package/dist/react-native/api/codeSigningContext.js +15 -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 +46 -61
- /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
|
@@ -24,10 +24,9 @@ const pollingHelpers_js_1 = require("../../static-helpers/pollingHelpers.js");
|
|
|
24
24
|
function _getSend(context, subscriptionId, resourceGroupName, accountName, profileName, options = { requestOptions: {} }) {
|
|
25
25
|
return context
|
|
26
26
|
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}", subscriptionId, resourceGroupName, accountName, profileName)
|
|
27
|
-
.get(
|
|
27
|
+
.get({ ...(0, core_client_1.operationOptionsToRequestParameters)(options) });
|
|
28
28
|
}
|
|
29
29
|
async function _getDeserialize(result) {
|
|
30
|
-
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;
|
|
31
30
|
const expectedStatuses = ["200"];
|
|
32
31
|
if (!expectedStatuses.includes(result.status)) {
|
|
33
32
|
throw (0, core_client_1.createRestError)(result);
|
|
@@ -39,42 +38,41 @@ async function _getDeserialize(result) {
|
|
|
39
38
|
systemData: !result.body.systemData
|
|
40
39
|
? undefined
|
|
41
40
|
: {
|
|
42
|
-
createdBy:
|
|
43
|
-
createdByType:
|
|
44
|
-
createdAt:
|
|
45
|
-
? new Date(
|
|
41
|
+
createdBy: result.body.systemData?.["createdBy"],
|
|
42
|
+
createdByType: result.body.systemData?.["createdByType"],
|
|
43
|
+
createdAt: result.body.systemData?.["createdAt"] !== undefined
|
|
44
|
+
? new Date(result.body.systemData?.["createdAt"])
|
|
46
45
|
: undefined,
|
|
47
|
-
lastModifiedBy:
|
|
48
|
-
lastModifiedByType:
|
|
49
|
-
lastModifiedAt:
|
|
50
|
-
? new Date(
|
|
46
|
+
lastModifiedBy: result.body.systemData?.["lastModifiedBy"],
|
|
47
|
+
lastModifiedByType: result.body.systemData?.["lastModifiedByType"],
|
|
48
|
+
lastModifiedAt: result.body.systemData?.["lastModifiedAt"] !== undefined
|
|
49
|
+
? new Date(result.body.systemData?.["lastModifiedAt"])
|
|
51
50
|
: undefined,
|
|
52
51
|
},
|
|
53
52
|
properties: !result.body.properties
|
|
54
53
|
? undefined
|
|
55
54
|
: {
|
|
56
|
-
profileType:
|
|
57
|
-
commonName:
|
|
58
|
-
organization:
|
|
59
|
-
organizationUnit:
|
|
60
|
-
streetAddress:
|
|
61
|
-
includeStreetAddress:
|
|
62
|
-
city:
|
|
63
|
-
includeCity:
|
|
64
|
-
state:
|
|
65
|
-
includeState:
|
|
66
|
-
country:
|
|
67
|
-
includeCountry:
|
|
68
|
-
postalCode:
|
|
69
|
-
includePostalCode:
|
|
70
|
-
enhancedKeyUsage:
|
|
71
|
-
identityValidationId:
|
|
72
|
-
provisioningState:
|
|
73
|
-
status:
|
|
74
|
-
certificates:
|
|
75
|
-
?
|
|
76
|
-
:
|
|
77
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
55
|
+
profileType: result.body.properties?.["profileType"],
|
|
56
|
+
commonName: result.body.properties?.["commonName"],
|
|
57
|
+
organization: result.body.properties?.["organization"],
|
|
58
|
+
organizationUnit: result.body.properties?.["organizationUnit"],
|
|
59
|
+
streetAddress: result.body.properties?.["streetAddress"],
|
|
60
|
+
includeStreetAddress: result.body.properties?.["includeStreetAddress"],
|
|
61
|
+
city: result.body.properties?.["city"],
|
|
62
|
+
includeCity: result.body.properties?.["includeCity"],
|
|
63
|
+
state: result.body.properties?.["state"],
|
|
64
|
+
includeState: result.body.properties?.["includeState"],
|
|
65
|
+
country: result.body.properties?.["country"],
|
|
66
|
+
includeCountry: result.body.properties?.["includeCountry"],
|
|
67
|
+
postalCode: result.body.properties?.["postalCode"],
|
|
68
|
+
includePostalCode: result.body.properties?.["includePostalCode"],
|
|
69
|
+
enhancedKeyUsage: result.body.properties?.["enhancedKeyUsage"],
|
|
70
|
+
identityValidationId: result.body.properties?.["identityValidationId"],
|
|
71
|
+
provisioningState: result.body.properties?.["provisioningState"],
|
|
72
|
+
status: result.body.properties?.["status"],
|
|
73
|
+
certificates: result.body.properties?.["certificates"] === undefined
|
|
74
|
+
? result.body.properties?.["certificates"]
|
|
75
|
+
: result.body.properties?.["certificates"].map((p) => {
|
|
78
76
|
return {
|
|
79
77
|
serialNumber: p["serialNumber"],
|
|
80
78
|
subjectName: p["subjectName"],
|
|
@@ -85,16 +83,16 @@ async function _getDeserialize(result) {
|
|
|
85
83
|
revocation: !p.revocation
|
|
86
84
|
? undefined
|
|
87
85
|
: {
|
|
88
|
-
requestedAt:
|
|
89
|
-
? new Date(
|
|
86
|
+
requestedAt: p.revocation?.["requestedAt"] !== undefined
|
|
87
|
+
? new Date(p.revocation?.["requestedAt"])
|
|
90
88
|
: undefined,
|
|
91
|
-
effectiveAt:
|
|
92
|
-
? new Date(
|
|
89
|
+
effectiveAt: p.revocation?.["effectiveAt"] !== undefined
|
|
90
|
+
? new Date(p.revocation?.["effectiveAt"])
|
|
93
91
|
: undefined,
|
|
94
|
-
reason:
|
|
95
|
-
remarks:
|
|
96
|
-
status:
|
|
97
|
-
failureReason:
|
|
92
|
+
reason: p.revocation?.["reason"],
|
|
93
|
+
remarks: p.revocation?.["remarks"],
|
|
94
|
+
status: p.revocation?.["status"],
|
|
95
|
+
failureReason: p.revocation?.["failureReason"],
|
|
98
96
|
},
|
|
99
97
|
};
|
|
100
98
|
}),
|
|
@@ -109,14 +107,16 @@ async function get(context, subscriptionId, resourceGroupName, accountName, prof
|
|
|
109
107
|
function _createSend(context, subscriptionId, resourceGroupName, accountName, profileName, resource, options = { requestOptions: {} }) {
|
|
110
108
|
return context
|
|
111
109
|
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}", subscriptionId, resourceGroupName, accountName, profileName)
|
|
112
|
-
.put(
|
|
110
|
+
.put({
|
|
111
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
112
|
+
body: {
|
|
113
113
|
properties: !resource.properties
|
|
114
114
|
? resource.properties
|
|
115
115
|
: (0, models_js_1.certificateProfilePropertiesSerializer)(resource.properties),
|
|
116
|
-
}
|
|
116
|
+
},
|
|
117
|
+
});
|
|
117
118
|
}
|
|
118
119
|
async function _createDeserialize(result) {
|
|
119
|
-
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;
|
|
120
120
|
const expectedStatuses = ["200", "201"];
|
|
121
121
|
if (!expectedStatuses.includes(result.status)) {
|
|
122
122
|
throw (0, core_client_1.createRestError)(result);
|
|
@@ -128,42 +128,41 @@ async function _createDeserialize(result) {
|
|
|
128
128
|
systemData: !result.body.systemData
|
|
129
129
|
? undefined
|
|
130
130
|
: {
|
|
131
|
-
createdBy:
|
|
132
|
-
createdByType:
|
|
133
|
-
createdAt:
|
|
134
|
-
? new Date(
|
|
131
|
+
createdBy: result.body.systemData?.["createdBy"],
|
|
132
|
+
createdByType: result.body.systemData?.["createdByType"],
|
|
133
|
+
createdAt: result.body.systemData?.["createdAt"] !== undefined
|
|
134
|
+
? new Date(result.body.systemData?.["createdAt"])
|
|
135
135
|
: undefined,
|
|
136
|
-
lastModifiedBy:
|
|
137
|
-
lastModifiedByType:
|
|
138
|
-
lastModifiedAt:
|
|
139
|
-
? new Date(
|
|
136
|
+
lastModifiedBy: result.body.systemData?.["lastModifiedBy"],
|
|
137
|
+
lastModifiedByType: result.body.systemData?.["lastModifiedByType"],
|
|
138
|
+
lastModifiedAt: result.body.systemData?.["lastModifiedAt"] !== undefined
|
|
139
|
+
? new Date(result.body.systemData?.["lastModifiedAt"])
|
|
140
140
|
: undefined,
|
|
141
141
|
},
|
|
142
142
|
properties: !result.body.properties
|
|
143
143
|
? undefined
|
|
144
144
|
: {
|
|
145
|
-
profileType:
|
|
146
|
-
commonName:
|
|
147
|
-
organization:
|
|
148
|
-
organizationUnit:
|
|
149
|
-
streetAddress:
|
|
150
|
-
includeStreetAddress:
|
|
151
|
-
city:
|
|
152
|
-
includeCity:
|
|
153
|
-
state:
|
|
154
|
-
includeState:
|
|
155
|
-
country:
|
|
156
|
-
includeCountry:
|
|
157
|
-
postalCode:
|
|
158
|
-
includePostalCode:
|
|
159
|
-
enhancedKeyUsage:
|
|
160
|
-
identityValidationId:
|
|
161
|
-
provisioningState:
|
|
162
|
-
status:
|
|
163
|
-
certificates:
|
|
164
|
-
?
|
|
165
|
-
:
|
|
166
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
145
|
+
profileType: result.body.properties?.["profileType"],
|
|
146
|
+
commonName: result.body.properties?.["commonName"],
|
|
147
|
+
organization: result.body.properties?.["organization"],
|
|
148
|
+
organizationUnit: result.body.properties?.["organizationUnit"],
|
|
149
|
+
streetAddress: result.body.properties?.["streetAddress"],
|
|
150
|
+
includeStreetAddress: result.body.properties?.["includeStreetAddress"],
|
|
151
|
+
city: result.body.properties?.["city"],
|
|
152
|
+
includeCity: result.body.properties?.["includeCity"],
|
|
153
|
+
state: result.body.properties?.["state"],
|
|
154
|
+
includeState: result.body.properties?.["includeState"],
|
|
155
|
+
country: result.body.properties?.["country"],
|
|
156
|
+
includeCountry: result.body.properties?.["includeCountry"],
|
|
157
|
+
postalCode: result.body.properties?.["postalCode"],
|
|
158
|
+
includePostalCode: result.body.properties?.["includePostalCode"],
|
|
159
|
+
enhancedKeyUsage: result.body.properties?.["enhancedKeyUsage"],
|
|
160
|
+
identityValidationId: result.body.properties?.["identityValidationId"],
|
|
161
|
+
provisioningState: result.body.properties?.["provisioningState"],
|
|
162
|
+
status: result.body.properties?.["status"],
|
|
163
|
+
certificates: result.body.properties?.["certificates"] === undefined
|
|
164
|
+
? result.body.properties?.["certificates"]
|
|
165
|
+
: result.body.properties?.["certificates"].map((p) => {
|
|
167
166
|
return {
|
|
168
167
|
serialNumber: p["serialNumber"],
|
|
169
168
|
subjectName: p["subjectName"],
|
|
@@ -174,16 +173,16 @@ async function _createDeserialize(result) {
|
|
|
174
173
|
revocation: !p.revocation
|
|
175
174
|
? undefined
|
|
176
175
|
: {
|
|
177
|
-
requestedAt:
|
|
178
|
-
? new Date(
|
|
176
|
+
requestedAt: p.revocation?.["requestedAt"] !== undefined
|
|
177
|
+
? new Date(p.revocation?.["requestedAt"])
|
|
179
178
|
: undefined,
|
|
180
|
-
effectiveAt:
|
|
181
|
-
? new Date(
|
|
179
|
+
effectiveAt: p.revocation?.["effectiveAt"] !== undefined
|
|
180
|
+
? new Date(p.revocation?.["effectiveAt"])
|
|
182
181
|
: undefined,
|
|
183
|
-
reason:
|
|
184
|
-
remarks:
|
|
185
|
-
status:
|
|
186
|
-
failureReason:
|
|
182
|
+
reason: p.revocation?.["reason"],
|
|
183
|
+
remarks: p.revocation?.["remarks"],
|
|
184
|
+
status: p.revocation?.["status"],
|
|
185
|
+
failureReason: p.revocation?.["failureReason"],
|
|
187
186
|
},
|
|
188
187
|
};
|
|
189
188
|
}),
|
|
@@ -193,8 +192,8 @@ async function _createDeserialize(result) {
|
|
|
193
192
|
/** Create a certificate profile. */
|
|
194
193
|
function create(context, subscriptionId, resourceGroupName, accountName, profileName, resource, options = { requestOptions: {} }) {
|
|
195
194
|
return (0, pollingHelpers_js_1.getLongRunningPoller)(context, _createDeserialize, ["200", "201"], {
|
|
196
|
-
updateIntervalInMs: options
|
|
197
|
-
abortSignal: options
|
|
195
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
196
|
+
abortSignal: options?.abortSignal,
|
|
198
197
|
getInitialResponse: () => _createSend(context, subscriptionId, resourceGroupName, accountName, profileName, resource, options),
|
|
199
198
|
resourceLocationConfig: "azure-async-operation",
|
|
200
199
|
});
|
|
@@ -202,7 +201,7 @@ function create(context, subscriptionId, resourceGroupName, accountName, profile
|
|
|
202
201
|
function _$deleteSend(context, subscriptionId, resourceGroupName, accountName, profileName, options = { requestOptions: {} }) {
|
|
203
202
|
return context
|
|
204
203
|
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}", subscriptionId, resourceGroupName, accountName, profileName)
|
|
205
|
-
.delete(
|
|
204
|
+
.delete({ ...(0, core_client_1.operationOptionsToRequestParameters)(options) });
|
|
206
205
|
}
|
|
207
206
|
async function _$deleteDeserialize(result) {
|
|
208
207
|
const expectedStatuses = ["202", "204", "200"];
|
|
@@ -219,8 +218,8 @@ async function _$deleteDeserialize(result) {
|
|
|
219
218
|
*/
|
|
220
219
|
function $delete(context, subscriptionId, resourceGroupName, accountName, profileName, options = { requestOptions: {} }) {
|
|
221
220
|
return (0, pollingHelpers_js_1.getLongRunningPoller)(context, _$deleteDeserialize, ["202", "204", "200"], {
|
|
222
|
-
updateIntervalInMs: options
|
|
223
|
-
abortSignal: options
|
|
221
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
222
|
+
abortSignal: options?.abortSignal,
|
|
224
223
|
getInitialResponse: () => _$deleteSend(context, subscriptionId, resourceGroupName, accountName, profileName, options),
|
|
225
224
|
resourceLocationConfig: "location",
|
|
226
225
|
});
|
|
@@ -230,7 +229,7 @@ function _listByCodeSigningAccountSend(context, subscriptionId, resourceGroupNam
|
|
|
230
229
|
}) {
|
|
231
230
|
return context
|
|
232
231
|
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles", subscriptionId, resourceGroupName, accountName)
|
|
233
|
-
.get(
|
|
232
|
+
.get({ ...(0, core_client_1.operationOptionsToRequestParameters)(options) });
|
|
234
233
|
}
|
|
235
234
|
async function _listByCodeSigningAccountDeserialize(result) {
|
|
236
235
|
const expectedStatuses = ["200"];
|
|
@@ -239,7 +238,6 @@ async function _listByCodeSigningAccountDeserialize(result) {
|
|
|
239
238
|
}
|
|
240
239
|
return {
|
|
241
240
|
value: result.body["value"].map((p) => {
|
|
242
|
-
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;
|
|
243
241
|
return {
|
|
244
242
|
id: p["id"],
|
|
245
243
|
name: p["name"],
|
|
@@ -247,42 +245,41 @@ async function _listByCodeSigningAccountDeserialize(result) {
|
|
|
247
245
|
systemData: !p.systemData
|
|
248
246
|
? undefined
|
|
249
247
|
: {
|
|
250
|
-
createdBy:
|
|
251
|
-
createdByType:
|
|
252
|
-
createdAt:
|
|
253
|
-
? new Date(
|
|
248
|
+
createdBy: p.systemData?.["createdBy"],
|
|
249
|
+
createdByType: p.systemData?.["createdByType"],
|
|
250
|
+
createdAt: p.systemData?.["createdAt"] !== undefined
|
|
251
|
+
? new Date(p.systemData?.["createdAt"])
|
|
254
252
|
: undefined,
|
|
255
|
-
lastModifiedBy:
|
|
256
|
-
lastModifiedByType:
|
|
257
|
-
lastModifiedAt:
|
|
258
|
-
? new Date(
|
|
253
|
+
lastModifiedBy: p.systemData?.["lastModifiedBy"],
|
|
254
|
+
lastModifiedByType: p.systemData?.["lastModifiedByType"],
|
|
255
|
+
lastModifiedAt: p.systemData?.["lastModifiedAt"] !== undefined
|
|
256
|
+
? new Date(p.systemData?.["lastModifiedAt"])
|
|
259
257
|
: undefined,
|
|
260
258
|
},
|
|
261
259
|
properties: !p.properties
|
|
262
260
|
? undefined
|
|
263
261
|
: {
|
|
264
|
-
profileType:
|
|
265
|
-
commonName:
|
|
266
|
-
organization:
|
|
267
|
-
organizationUnit:
|
|
268
|
-
streetAddress:
|
|
269
|
-
includeStreetAddress:
|
|
270
|
-
city:
|
|
271
|
-
includeCity:
|
|
272
|
-
state:
|
|
273
|
-
includeState:
|
|
274
|
-
country:
|
|
275
|
-
includeCountry:
|
|
276
|
-
postalCode:
|
|
277
|
-
includePostalCode:
|
|
278
|
-
enhancedKeyUsage:
|
|
279
|
-
identityValidationId:
|
|
280
|
-
provisioningState:
|
|
281
|
-
status:
|
|
282
|
-
certificates:
|
|
283
|
-
?
|
|
284
|
-
:
|
|
285
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
262
|
+
profileType: p.properties?.["profileType"],
|
|
263
|
+
commonName: p.properties?.["commonName"],
|
|
264
|
+
organization: p.properties?.["organization"],
|
|
265
|
+
organizationUnit: p.properties?.["organizationUnit"],
|
|
266
|
+
streetAddress: p.properties?.["streetAddress"],
|
|
267
|
+
includeStreetAddress: p.properties?.["includeStreetAddress"],
|
|
268
|
+
city: p.properties?.["city"],
|
|
269
|
+
includeCity: p.properties?.["includeCity"],
|
|
270
|
+
state: p.properties?.["state"],
|
|
271
|
+
includeState: p.properties?.["includeState"],
|
|
272
|
+
country: p.properties?.["country"],
|
|
273
|
+
includeCountry: p.properties?.["includeCountry"],
|
|
274
|
+
postalCode: p.properties?.["postalCode"],
|
|
275
|
+
includePostalCode: p.properties?.["includePostalCode"],
|
|
276
|
+
enhancedKeyUsage: p.properties?.["enhancedKeyUsage"],
|
|
277
|
+
identityValidationId: p.properties?.["identityValidationId"],
|
|
278
|
+
provisioningState: p.properties?.["provisioningState"],
|
|
279
|
+
status: p.properties?.["status"],
|
|
280
|
+
certificates: p.properties?.["certificates"] === undefined
|
|
281
|
+
? p.properties?.["certificates"]
|
|
282
|
+
: p.properties?.["certificates"].map((p) => {
|
|
286
283
|
return {
|
|
287
284
|
serialNumber: p["serialNumber"],
|
|
288
285
|
subjectName: p["subjectName"],
|
|
@@ -293,16 +290,16 @@ async function _listByCodeSigningAccountDeserialize(result) {
|
|
|
293
290
|
revocation: !p.revocation
|
|
294
291
|
? undefined
|
|
295
292
|
: {
|
|
296
|
-
requestedAt:
|
|
297
|
-
? new Date(
|
|
293
|
+
requestedAt: p.revocation?.["requestedAt"] !== undefined
|
|
294
|
+
? new Date(p.revocation?.["requestedAt"])
|
|
298
295
|
: undefined,
|
|
299
|
-
effectiveAt:
|
|
300
|
-
? new Date(
|
|
296
|
+
effectiveAt: p.revocation?.["effectiveAt"] !== undefined
|
|
297
|
+
? new Date(p.revocation?.["effectiveAt"])
|
|
301
298
|
: undefined,
|
|
302
|
-
reason:
|
|
303
|
-
remarks:
|
|
304
|
-
status:
|
|
305
|
-
failureReason:
|
|
299
|
+
reason: p.revocation?.["reason"],
|
|
300
|
+
remarks: p.revocation?.["remarks"],
|
|
301
|
+
status: p.revocation?.["status"],
|
|
302
|
+
failureReason: p.revocation?.["failureReason"],
|
|
306
303
|
},
|
|
307
304
|
};
|
|
308
305
|
}),
|
|
@@ -323,13 +320,16 @@ function _revokeCertificateSend(context, subscriptionId, resourceGroupName, acco
|
|
|
323
320
|
}) {
|
|
324
321
|
return context
|
|
325
322
|
.path("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}/revokeCertificate", subscriptionId, resourceGroupName, accountName, profileName)
|
|
326
|
-
.post(
|
|
323
|
+
.post({
|
|
324
|
+
...(0, core_client_1.operationOptionsToRequestParameters)(options),
|
|
325
|
+
body: {
|
|
327
326
|
serialNumber: body["serialNumber"],
|
|
328
327
|
thumbprint: body["thumbprint"],
|
|
329
328
|
effectiveAt: body["effectiveAt"].toISOString(),
|
|
330
329
|
reason: body["reason"],
|
|
331
330
|
remarks: body["remarks"],
|
|
332
|
-
}
|
|
331
|
+
},
|
|
332
|
+
});
|
|
333
333
|
}
|
|
334
334
|
async function _revokeCertificateDeserialize(result) {
|
|
335
335
|
const expectedStatuses = ["204"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/certificateProfiles/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA6BlC,4BAiBC;AAED,0CA8EC;AAGD,kBAiBC;AAED,kCAyBC;AAED,gDAgFC;AAGD,wBAwBC;AAED,oCAiBC;AAED,kDAOC;AAQD,0BAeC;AAED,sEAiBC;AAED,oFAqFC;AAGD,4DAuBC;AAED,wDA6BC;AAED,sEAOC;AAGD,8CAqBC;AA/gBD,sDAKgC;AAEhC,yDAKiC;AACjC,4EAG+C;AAC/C,8EAA8E;AAU9E,SAAgB,QAAQ,CACtB,OAAe,EAC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;SACzB,IACD,CAAC;AACP,CAAC;AAEM,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,IAAA,6BAAe,EAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,OAAO;AACT,CAAC;AAED,wDAAwD;AACjD,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"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/certificateProfiles/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA6BlC,4BAiBC;AAED,0CA8EC;AAGD,kBAiBC;AAED,kCAyBC;AAED,gDAgFC;AAGD,wBAwBC;AAED,oCAiBC;AAED,kDAOC;AAQD,0BAeC;AAED,sEAiBC;AAED,oFAqFC;AAGD,4DAuBC;AAED,wDA6BC;AAED,sEAOC;AAGD,8CAqBC;AA/gBD,sDAKgC;AAEhC,yDAKiC;AACjC,4EAG+C;AAC/C,8EAA8E;AAU9E,SAAgB,QAAQ,CACtB,OAAe,EACf,cAAsB,EACtB,iBAAyB,EACzB,WAAmB,EACnB,WAAmB,EACnB,UAAgD,EAAE,cAAc,EAAE,EAAE,EAAE;IAEtE,OAAO,OAAO;SACX,IAAI,CACH,wKAAwK,EACxK,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,WAAW,CACZ;SACA,GAAG,CAAC,EAAE,GAAG,IAAA,iDAAmC,EAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAC9D,CAAC;AAEM,KAAK,UAAU,eAAe,CAAC,MAA6B;IACjE,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAA,6BAAe,EAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;QACrB,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;QACzB,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;QACzB,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I,CAAC;QACJ,GAAG,IAAA,iDAAmC,EAAC,OAAO,CAAC;QAC/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;KACF,CAAC,CAAC;AACP,CAAC;AAEM,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,IAAA,6BAAe,EAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,OAAO;AACT,CAAC;AAED,wDAAwD;AACjD,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"]}
|