@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
|
@@ -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"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/certificateProfiles/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,sCAAsC,GAIvC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAEL,mCAAmC,EAEnC,eAAe,GAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAU9E,MAAM,UAAU,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,mBAAM,mCAAmC,CAAC,OAAO,CAAC,EAAG,CAAC;AAC9D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAA6B;;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AACxD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAAe,EACf,cAAsB,EACtB,iBAAyB,EACzB,WAAmB,EACnB,WAAmB,EACnB,IAAuB,EACvB,UAA8D;IAC5D,cAAc,EAAE,EAAE;CACnB;IAED,MAAM,MAAM,GAAG,MAAM,sBAAsB,CACzC,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,IAAI,EACJ,OAAO,CACR,CAAC;IACF,OAAO,6BAA6B,CAAC,MAAM,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n certificateProfilePropertiesSerializer,\n CertificateProfile,\n RevokeCertificate,\n _CertificateProfileListResult,\n} from \"../../models/models.js\";\nimport { CodeSigningContext as Client } from \"../index.js\";\nimport {\n StreamableMethod,\n operationOptionsToRequestParameters,\n PathUncheckedResponse,\n createRestError,\n} from \"@azure-rest/core-client\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { getLongRunningPoller } from \"../../static-helpers/pollingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\nimport {\n CertificateProfilesGetOptionalParams,\n CertificateProfilesCreateOptionalParams,\n CertificateProfilesDeleteOptionalParams,\n CertificateProfilesListByCodeSigningAccountOptionalParams,\n CertificateProfilesRevokeCertificateOptionalParams,\n} from \"../../models/options.js\";\n\nexport function _getSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options: CertificateProfilesGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}\",\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n )\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _getDeserialize(result: PathUncheckedResponse): Promise<CertificateProfile> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n id: result.body[\"id\"],\n name: result.body[\"name\"],\n type: result.body[\"type\"],\n systemData: !result.body.systemData\n ? undefined\n : {\n createdBy: result.body.systemData?.[\"createdBy\"],\n createdByType: result.body.systemData?.[\"createdByType\"],\n createdAt:\n result.body.systemData?.[\"createdAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: result.body.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: result.body.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n result.body.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !result.body.properties\n ? undefined\n : {\n profileType: result.body.properties?.[\"profileType\"],\n commonName: result.body.properties?.[\"commonName\"],\n organization: result.body.properties?.[\"organization\"],\n organizationUnit: result.body.properties?.[\"organizationUnit\"],\n streetAddress: result.body.properties?.[\"streetAddress\"],\n includeStreetAddress: result.body.properties?.[\"includeStreetAddress\"],\n city: result.body.properties?.[\"city\"],\n includeCity: result.body.properties?.[\"includeCity\"],\n state: result.body.properties?.[\"state\"],\n includeState: result.body.properties?.[\"includeState\"],\n country: result.body.properties?.[\"country\"],\n includeCountry: result.body.properties?.[\"includeCountry\"],\n postalCode: result.body.properties?.[\"postalCode\"],\n includePostalCode: result.body.properties?.[\"includePostalCode\"],\n enhancedKeyUsage: result.body.properties?.[\"enhancedKeyUsage\"],\n identityValidationId: result.body.properties?.[\"identityValidationId\"],\n provisioningState: result.body.properties?.[\"provisioningState\"],\n status: result.body.properties?.[\"status\"],\n certificates:\n result.body.properties?.[\"certificates\"] === undefined\n ? result.body.properties?.[\"certificates\"]\n : result.body.properties?.[\"certificates\"].map((p: any) => {\n return {\n serialNumber: p[\"serialNumber\"],\n subjectName: p[\"subjectName\"],\n thumbprint: p[\"thumbprint\"],\n createdDate: p[\"createdDate\"],\n expiryDate: p[\"expiryDate\"],\n status: p[\"status\"],\n revocation: !p.revocation\n ? undefined\n : {\n requestedAt:\n p.revocation?.[\"requestedAt\"] !== undefined\n ? new Date(p.revocation?.[\"requestedAt\"])\n : undefined,\n effectiveAt:\n p.revocation?.[\"effectiveAt\"] !== undefined\n ? new Date(p.revocation?.[\"effectiveAt\"])\n : undefined,\n reason: p.revocation?.[\"reason\"],\n remarks: p.revocation?.[\"remarks\"],\n status: p.revocation?.[\"status\"],\n failureReason: p.revocation?.[\"failureReason\"],\n },\n };\n }),\n },\n };\n}\n\n/** Get details of a certificate profile. */\nexport async function get(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options: CertificateProfilesGetOptionalParams = { requestOptions: {} },\n): Promise<CertificateProfile> {\n const result = await _getSend(\n context,\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n options,\n );\n return _getDeserialize(result);\n}\n\nexport function _createSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n resource: CertificateProfile,\n options: CertificateProfilesCreateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}\",\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n )\n .put({\n ...operationOptionsToRequestParameters(options),\n body: {\n properties: !resource.properties\n ? resource.properties\n : certificateProfilePropertiesSerializer(resource.properties),\n },\n });\n}\n\nexport async function _createDeserialize(\n result: PathUncheckedResponse,\n): Promise<CertificateProfile> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n id: result.body[\"id\"],\n name: result.body[\"name\"],\n type: result.body[\"type\"],\n systemData: !result.body.systemData\n ? undefined\n : {\n createdBy: result.body.systemData?.[\"createdBy\"],\n createdByType: result.body.systemData?.[\"createdByType\"],\n createdAt:\n result.body.systemData?.[\"createdAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: result.body.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: result.body.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n result.body.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !result.body.properties\n ? undefined\n : {\n profileType: result.body.properties?.[\"profileType\"],\n commonName: result.body.properties?.[\"commonName\"],\n organization: result.body.properties?.[\"organization\"],\n organizationUnit: result.body.properties?.[\"organizationUnit\"],\n streetAddress: result.body.properties?.[\"streetAddress\"],\n includeStreetAddress: result.body.properties?.[\"includeStreetAddress\"],\n city: result.body.properties?.[\"city\"],\n includeCity: result.body.properties?.[\"includeCity\"],\n state: result.body.properties?.[\"state\"],\n includeState: result.body.properties?.[\"includeState\"],\n country: result.body.properties?.[\"country\"],\n includeCountry: result.body.properties?.[\"includeCountry\"],\n postalCode: result.body.properties?.[\"postalCode\"],\n includePostalCode: result.body.properties?.[\"includePostalCode\"],\n enhancedKeyUsage: result.body.properties?.[\"enhancedKeyUsage\"],\n identityValidationId: result.body.properties?.[\"identityValidationId\"],\n provisioningState: result.body.properties?.[\"provisioningState\"],\n status: result.body.properties?.[\"status\"],\n certificates:\n result.body.properties?.[\"certificates\"] === undefined\n ? result.body.properties?.[\"certificates\"]\n : result.body.properties?.[\"certificates\"].map((p: any) => {\n return {\n serialNumber: p[\"serialNumber\"],\n subjectName: p[\"subjectName\"],\n thumbprint: p[\"thumbprint\"],\n createdDate: p[\"createdDate\"],\n expiryDate: p[\"expiryDate\"],\n status: p[\"status\"],\n revocation: !p.revocation\n ? undefined\n : {\n requestedAt:\n p.revocation?.[\"requestedAt\"] !== undefined\n ? new Date(p.revocation?.[\"requestedAt\"])\n : undefined,\n effectiveAt:\n p.revocation?.[\"effectiveAt\"] !== undefined\n ? new Date(p.revocation?.[\"effectiveAt\"])\n : undefined,\n reason: p.revocation?.[\"reason\"],\n remarks: p.revocation?.[\"remarks\"],\n status: p.revocation?.[\"status\"],\n failureReason: p.revocation?.[\"failureReason\"],\n },\n };\n }),\n },\n };\n}\n\n/** Create a certificate profile. */\nexport function create(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n resource: CertificateProfile,\n options: CertificateProfilesCreateOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<CertificateProfile>, CertificateProfile> {\n return getLongRunningPoller(context, _createDeserialize, [\"200\", \"201\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _createSend(\n context,\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n resource,\n options,\n ),\n resourceLocationConfig: \"azure-async-operation\",\n }) as PollerLike<OperationState<CertificateProfile>, CertificateProfile>;\n}\n\nexport function _$deleteSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options: CertificateProfilesDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}\",\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n )\n .delete({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"202\", \"204\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return;\n}\n\n/** Delete a certificate profile. */\n/**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\nexport function $delete(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options: CertificateProfilesDeleteOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<void>, void> {\n return getLongRunningPoller(context, _$deleteDeserialize, [\"202\", \"204\", \"200\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _$deleteSend(context, subscriptionId, resourceGroupName, accountName, profileName, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<void>, void>;\n}\n\nexport function _listByCodeSigningAccountSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n options: CertificateProfilesListByCodeSigningAccountOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles\",\n subscriptionId,\n resourceGroupName,\n accountName,\n )\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _listByCodeSigningAccountDeserialize(\n result: PathUncheckedResponse,\n): Promise<_CertificateProfileListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n value: result.body[\"value\"].map((p: any) => {\n return {\n id: p[\"id\"],\n name: p[\"name\"],\n type: p[\"type\"],\n systemData: !p.systemData\n ? undefined\n : {\n createdBy: p.systemData?.[\"createdBy\"],\n createdByType: p.systemData?.[\"createdByType\"],\n createdAt:\n p.systemData?.[\"createdAt\"] !== undefined\n ? new Date(p.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: p.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: p.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n p.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(p.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !p.properties\n ? undefined\n : {\n profileType: p.properties?.[\"profileType\"],\n commonName: p.properties?.[\"commonName\"],\n organization: p.properties?.[\"organization\"],\n organizationUnit: p.properties?.[\"organizationUnit\"],\n streetAddress: p.properties?.[\"streetAddress\"],\n includeStreetAddress: p.properties?.[\"includeStreetAddress\"],\n city: p.properties?.[\"city\"],\n includeCity: p.properties?.[\"includeCity\"],\n state: p.properties?.[\"state\"],\n includeState: p.properties?.[\"includeState\"],\n country: p.properties?.[\"country\"],\n includeCountry: p.properties?.[\"includeCountry\"],\n postalCode: p.properties?.[\"postalCode\"],\n includePostalCode: p.properties?.[\"includePostalCode\"],\n enhancedKeyUsage: p.properties?.[\"enhancedKeyUsage\"],\n identityValidationId: p.properties?.[\"identityValidationId\"],\n provisioningState: p.properties?.[\"provisioningState\"],\n status: p.properties?.[\"status\"],\n certificates:\n p.properties?.[\"certificates\"] === undefined\n ? p.properties?.[\"certificates\"]\n : p.properties?.[\"certificates\"].map((p: any) => {\n return {\n serialNumber: p[\"serialNumber\"],\n subjectName: p[\"subjectName\"],\n thumbprint: p[\"thumbprint\"],\n createdDate: p[\"createdDate\"],\n expiryDate: p[\"expiryDate\"],\n status: p[\"status\"],\n revocation: !p.revocation\n ? undefined\n : {\n requestedAt:\n p.revocation?.[\"requestedAt\"] !== undefined\n ? new Date(p.revocation?.[\"requestedAt\"])\n : undefined,\n effectiveAt:\n p.revocation?.[\"effectiveAt\"] !== undefined\n ? new Date(p.revocation?.[\"effectiveAt\"])\n : undefined,\n reason: p.revocation?.[\"reason\"],\n remarks: p.revocation?.[\"remarks\"],\n status: p.revocation?.[\"status\"],\n failureReason: p.revocation?.[\"failureReason\"],\n },\n };\n }),\n },\n };\n }),\n nextLink: result.body[\"nextLink\"],\n };\n}\n\n/** List certificate profiles under a trusted signing account. */\nexport function listByCodeSigningAccount(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n options: CertificateProfilesListByCodeSigningAccountOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<CertificateProfile> {\n return buildPagedAsyncIterator(\n context,\n () =>\n _listByCodeSigningAccountSend(\n context,\n subscriptionId,\n resourceGroupName,\n accountName,\n options,\n ),\n _listByCodeSigningAccountDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _revokeCertificateSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n body: RevokeCertificate,\n options: CertificateProfilesRevokeCertificateOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}/revokeCertificate\",\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n )\n .post({\n ...operationOptionsToRequestParameters(options),\n body: {\n serialNumber: body[\"serialNumber\"],\n thumbprint: body[\"thumbprint\"],\n effectiveAt: body[\"effectiveAt\"].toISOString(),\n reason: body[\"reason\"],\n remarks: body[\"remarks\"],\n },\n });\n}\n\nexport async function _revokeCertificateDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"204\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return;\n}\n\n/** Revoke a certificate under a certificate profile. */\nexport async function revokeCertificate(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n body: RevokeCertificate,\n options: CertificateProfilesRevokeCertificateOptionalParams = {\n requestOptions: {},\n },\n): Promise<void> {\n const result = await _revokeCertificateSend(\n context,\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n body,\n options,\n );\n return _revokeCertificateDeserialize(result);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/certificateProfiles/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,sCAAsC,GAIvC,MAAM,wBAAwB,CAAC;A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AAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,6BAA6B,CAAC,MAA6B;IAC/E,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,eAAe,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,OAAO;AACT,CAAC;AAED,wDAAwD;AACxD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAAe,EACf,cAAsB,EACtB,iBAAyB,EACzB,WAAmB,EACnB,WAAmB,EACnB,IAAuB,EACvB,UAA8D;IAC5D,cAAc,EAAE,EAAE;CACnB;IAED,MAAM,MAAM,GAAG,MAAM,sBAAsB,CACzC,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,IAAI,EACJ,OAAO,CACR,CAAC;IACF,OAAO,6BAA6B,CAAC,MAAM,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n certificateProfilePropertiesSerializer,\n CertificateProfile,\n RevokeCertificate,\n _CertificateProfileListResult,\n} from \"../../models/models.js\";\nimport { CodeSigningContext as Client } from \"../index.js\";\nimport {\n StreamableMethod,\n operationOptionsToRequestParameters,\n PathUncheckedResponse,\n createRestError,\n} from \"@azure-rest/core-client\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { getLongRunningPoller } from \"../../static-helpers/pollingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\nimport {\n CertificateProfilesGetOptionalParams,\n CertificateProfilesCreateOptionalParams,\n CertificateProfilesDeleteOptionalParams,\n CertificateProfilesListByCodeSigningAccountOptionalParams,\n CertificateProfilesRevokeCertificateOptionalParams,\n} from \"../../models/options.js\";\n\nexport function _getSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options: CertificateProfilesGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}\",\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n )\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _getDeserialize(result: PathUncheckedResponse): Promise<CertificateProfile> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n id: result.body[\"id\"],\n name: result.body[\"name\"],\n type: result.body[\"type\"],\n systemData: !result.body.systemData\n ? undefined\n : {\n createdBy: result.body.systemData?.[\"createdBy\"],\n createdByType: result.body.systemData?.[\"createdByType\"],\n createdAt:\n result.body.systemData?.[\"createdAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: result.body.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: result.body.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n result.body.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !result.body.properties\n ? undefined\n : {\n profileType: result.body.properties?.[\"profileType\"],\n commonName: result.body.properties?.[\"commonName\"],\n organization: result.body.properties?.[\"organization\"],\n organizationUnit: result.body.properties?.[\"organizationUnit\"],\n streetAddress: result.body.properties?.[\"streetAddress\"],\n includeStreetAddress: result.body.properties?.[\"includeStreetAddress\"],\n city: result.body.properties?.[\"city\"],\n includeCity: result.body.properties?.[\"includeCity\"],\n state: result.body.properties?.[\"state\"],\n includeState: result.body.properties?.[\"includeState\"],\n country: result.body.properties?.[\"country\"],\n includeCountry: result.body.properties?.[\"includeCountry\"],\n postalCode: result.body.properties?.[\"postalCode\"],\n includePostalCode: result.body.properties?.[\"includePostalCode\"],\n enhancedKeyUsage: result.body.properties?.[\"enhancedKeyUsage\"],\n identityValidationId: result.body.properties?.[\"identityValidationId\"],\n provisioningState: result.body.properties?.[\"provisioningState\"],\n status: result.body.properties?.[\"status\"],\n certificates:\n result.body.properties?.[\"certificates\"] === undefined\n ? result.body.properties?.[\"certificates\"]\n : result.body.properties?.[\"certificates\"].map((p: any) => {\n return {\n serialNumber: p[\"serialNumber\"],\n subjectName: p[\"subjectName\"],\n thumbprint: p[\"thumbprint\"],\n createdDate: p[\"createdDate\"],\n expiryDate: p[\"expiryDate\"],\n status: p[\"status\"],\n revocation: !p.revocation\n ? undefined\n : {\n requestedAt:\n p.revocation?.[\"requestedAt\"] !== undefined\n ? new Date(p.revocation?.[\"requestedAt\"])\n : undefined,\n effectiveAt:\n p.revocation?.[\"effectiveAt\"] !== undefined\n ? new Date(p.revocation?.[\"effectiveAt\"])\n : undefined,\n reason: p.revocation?.[\"reason\"],\n remarks: p.revocation?.[\"remarks\"],\n status: p.revocation?.[\"status\"],\n failureReason: p.revocation?.[\"failureReason\"],\n },\n };\n }),\n },\n };\n}\n\n/** Get details of a certificate profile. */\nexport async function get(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options: CertificateProfilesGetOptionalParams = { requestOptions: {} },\n): Promise<CertificateProfile> {\n const result = await _getSend(\n context,\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n options,\n );\n return _getDeserialize(result);\n}\n\nexport function _createSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n resource: CertificateProfile,\n options: CertificateProfilesCreateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}\",\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n )\n .put({\n ...operationOptionsToRequestParameters(options),\n body: {\n properties: !resource.properties\n ? resource.properties\n : certificateProfilePropertiesSerializer(resource.properties),\n },\n });\n}\n\nexport async function _createDeserialize(\n result: PathUncheckedResponse,\n): Promise<CertificateProfile> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n id: result.body[\"id\"],\n name: result.body[\"name\"],\n type: result.body[\"type\"],\n systemData: !result.body.systemData\n ? undefined\n : {\n createdBy: result.body.systemData?.[\"createdBy\"],\n createdByType: result.body.systemData?.[\"createdByType\"],\n createdAt:\n result.body.systemData?.[\"createdAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: result.body.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: result.body.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n result.body.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !result.body.properties\n ? undefined\n : {\n profileType: result.body.properties?.[\"profileType\"],\n commonName: result.body.properties?.[\"commonName\"],\n organization: result.body.properties?.[\"organization\"],\n organizationUnit: result.body.properties?.[\"organizationUnit\"],\n streetAddress: result.body.properties?.[\"streetAddress\"],\n includeStreetAddress: result.body.properties?.[\"includeStreetAddress\"],\n city: result.body.properties?.[\"city\"],\n includeCity: result.body.properties?.[\"includeCity\"],\n state: result.body.properties?.[\"state\"],\n includeState: result.body.properties?.[\"includeState\"],\n country: result.body.properties?.[\"country\"],\n includeCountry: result.body.properties?.[\"includeCountry\"],\n postalCode: result.body.properties?.[\"postalCode\"],\n includePostalCode: result.body.properties?.[\"includePostalCode\"],\n enhancedKeyUsage: result.body.properties?.[\"enhancedKeyUsage\"],\n identityValidationId: result.body.properties?.[\"identityValidationId\"],\n provisioningState: result.body.properties?.[\"provisioningState\"],\n status: result.body.properties?.[\"status\"],\n certificates:\n result.body.properties?.[\"certificates\"] === undefined\n ? result.body.properties?.[\"certificates\"]\n : result.body.properties?.[\"certificates\"].map((p: any) => {\n return {\n serialNumber: p[\"serialNumber\"],\n subjectName: p[\"subjectName\"],\n thumbprint: p[\"thumbprint\"],\n createdDate: p[\"createdDate\"],\n expiryDate: p[\"expiryDate\"],\n status: p[\"status\"],\n revocation: !p.revocation\n ? undefined\n : {\n requestedAt:\n p.revocation?.[\"requestedAt\"] !== undefined\n ? new Date(p.revocation?.[\"requestedAt\"])\n : undefined,\n effectiveAt:\n p.revocation?.[\"effectiveAt\"] !== undefined\n ? new Date(p.revocation?.[\"effectiveAt\"])\n : undefined,\n reason: p.revocation?.[\"reason\"],\n remarks: p.revocation?.[\"remarks\"],\n status: p.revocation?.[\"status\"],\n failureReason: p.revocation?.[\"failureReason\"],\n },\n };\n }),\n },\n };\n}\n\n/** Create a certificate profile. */\nexport function create(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n resource: CertificateProfile,\n options: CertificateProfilesCreateOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<CertificateProfile>, CertificateProfile> {\n return getLongRunningPoller(context, _createDeserialize, [\"200\", \"201\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _createSend(\n context,\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n resource,\n options,\n ),\n resourceLocationConfig: \"azure-async-operation\",\n }) as PollerLike<OperationState<CertificateProfile>, CertificateProfile>;\n}\n\nexport function _$deleteSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options: CertificateProfilesDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}\",\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n )\n .delete({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"202\", \"204\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return;\n}\n\n/** Delete a certificate profile. */\n/**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\nexport function $delete(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options: CertificateProfilesDeleteOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<void>, void> {\n return getLongRunningPoller(context, _$deleteDeserialize, [\"202\", \"204\", \"200\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _$deleteSend(context, subscriptionId, resourceGroupName, accountName, profileName, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<void>, void>;\n}\n\nexport function _listByCodeSigningAccountSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n options: CertificateProfilesListByCodeSigningAccountOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles\",\n subscriptionId,\n resourceGroupName,\n accountName,\n )\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _listByCodeSigningAccountDeserialize(\n result: PathUncheckedResponse,\n): Promise<_CertificateProfileListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n value: result.body[\"value\"].map((p: any) => {\n return {\n id: p[\"id\"],\n name: p[\"name\"],\n type: p[\"type\"],\n systemData: !p.systemData\n ? undefined\n : {\n createdBy: p.systemData?.[\"createdBy\"],\n createdByType: p.systemData?.[\"createdByType\"],\n createdAt:\n p.systemData?.[\"createdAt\"] !== undefined\n ? new Date(p.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: p.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: p.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n p.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(p.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !p.properties\n ? undefined\n : {\n profileType: p.properties?.[\"profileType\"],\n commonName: p.properties?.[\"commonName\"],\n organization: p.properties?.[\"organization\"],\n organizationUnit: p.properties?.[\"organizationUnit\"],\n streetAddress: p.properties?.[\"streetAddress\"],\n includeStreetAddress: p.properties?.[\"includeStreetAddress\"],\n city: p.properties?.[\"city\"],\n includeCity: p.properties?.[\"includeCity\"],\n state: p.properties?.[\"state\"],\n includeState: p.properties?.[\"includeState\"],\n country: p.properties?.[\"country\"],\n includeCountry: p.properties?.[\"includeCountry\"],\n postalCode: p.properties?.[\"postalCode\"],\n includePostalCode: p.properties?.[\"includePostalCode\"],\n enhancedKeyUsage: p.properties?.[\"enhancedKeyUsage\"],\n identityValidationId: p.properties?.[\"identityValidationId\"],\n provisioningState: p.properties?.[\"provisioningState\"],\n status: p.properties?.[\"status\"],\n certificates:\n p.properties?.[\"certificates\"] === undefined\n ? p.properties?.[\"certificates\"]\n : p.properties?.[\"certificates\"].map((p: any) => {\n return {\n serialNumber: p[\"serialNumber\"],\n subjectName: p[\"subjectName\"],\n thumbprint: p[\"thumbprint\"],\n createdDate: p[\"createdDate\"],\n expiryDate: p[\"expiryDate\"],\n status: p[\"status\"],\n revocation: !p.revocation\n ? undefined\n : {\n requestedAt:\n p.revocation?.[\"requestedAt\"] !== undefined\n ? new Date(p.revocation?.[\"requestedAt\"])\n : undefined,\n effectiveAt:\n p.revocation?.[\"effectiveAt\"] !== undefined\n ? new Date(p.revocation?.[\"effectiveAt\"])\n : undefined,\n reason: p.revocation?.[\"reason\"],\n remarks: p.revocation?.[\"remarks\"],\n status: p.revocation?.[\"status\"],\n failureReason: p.revocation?.[\"failureReason\"],\n },\n };\n }),\n },\n };\n }),\n nextLink: result.body[\"nextLink\"],\n };\n}\n\n/** List certificate profiles under a trusted signing account. */\nexport function listByCodeSigningAccount(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n options: CertificateProfilesListByCodeSigningAccountOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<CertificateProfile> {\n return buildPagedAsyncIterator(\n context,\n () =>\n _listByCodeSigningAccountSend(\n context,\n subscriptionId,\n resourceGroupName,\n accountName,\n options,\n ),\n _listByCodeSigningAccountDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _revokeCertificateSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n body: RevokeCertificate,\n options: CertificateProfilesRevokeCertificateOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}/revokeCertificate\",\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n )\n .post({\n ...operationOptionsToRequestParameters(options),\n body: {\n serialNumber: body[\"serialNumber\"],\n thumbprint: body[\"thumbprint\"],\n effectiveAt: body[\"effectiveAt\"].toISOString(),\n reason: body[\"reason\"],\n remarks: body[\"remarks\"],\n },\n });\n}\n\nexport async function _revokeCertificateDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"204\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return;\n}\n\n/** Revoke a certificate under a certificate profile. */\nexport async function revokeCertificate(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n body: RevokeCertificate,\n options: CertificateProfilesRevokeCertificateOptionalParams = {\n requestOptions: {},\n },\n): Promise<void> {\n const result = await _revokeCertificateSend(\n context,\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n body,\n options,\n );\n return _revokeCertificateDeserialize(result);\n}\n"]}
|