@c8y/client 1022.9.6 → 1022.13.0
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/lib/cjs/src/trusted-certificates/TrustedCertificateService.d.ts +15 -1
- package/lib/cjs/src/trusted-certificates/TrustedCertificateService.d.ts.map +1 -1
- package/lib/cjs/src/trusted-certificates/TrustedCertificateService.js +27 -3
- package/lib/cjs/src/trusted-certificates/TrustedCertificateService.js.map +1 -1
- package/lib/esm2015/src/trusted-certificates/TrustedCertificateService.d.ts +15 -1
- package/lib/esm2015/src/trusted-certificates/TrustedCertificateService.d.ts.map +1 -1
- package/lib/esm2015/src/trusted-certificates/TrustedCertificateService.js +29 -3
- package/lib/esm2015/src/trusted-certificates/TrustedCertificateService.js.map +1 -1
- package/lib/src/trusted-certificates/TrustedCertificateService.d.ts +15 -1
- package/lib/src/trusted-certificates/TrustedCertificateService.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ export declare class TrustedCertificateService extends Service<ITrustedCertifica
|
|
|
7
7
|
protected get baseUrl(): string;
|
|
8
8
|
protected listUrl: string;
|
|
9
9
|
protected proofOfPossessionUrl: string;
|
|
10
|
-
protected
|
|
10
|
+
protected certificateAuthorityUrl: string;
|
|
11
11
|
protected propertyName: string;
|
|
12
12
|
/**
|
|
13
13
|
* Gets a list of trusted certificates.
|
|
@@ -156,6 +156,20 @@ export declare class TrustedCertificateService extends Service<ITrustedCertifica
|
|
|
156
156
|
* ```
|
|
157
157
|
*/
|
|
158
158
|
generateCertificateAuthority(): Promise<IResult<ITrustedCertificate>>;
|
|
159
|
+
/**
|
|
160
|
+
* Renews the certificate authority for the tenant.
|
|
161
|
+
*
|
|
162
|
+
* @returns The renewed certificate authority object (wrapped in [[IResult]]).
|
|
163
|
+
*
|
|
164
|
+
* **Example**
|
|
165
|
+
* ```typescript
|
|
166
|
+
* (async () => {
|
|
167
|
+
* const { data, res } = await trustedCertificateService.renewCertificateAuthority();
|
|
168
|
+
* const renewedCertificateAuthority = data;
|
|
169
|
+
* })();
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
renewCertificateAuthority(): Promise<IResult<ITrustedCertificate>>;
|
|
159
173
|
protected getDetailUrl(entityOrId: string | ITrustedCertificate): string;
|
|
160
174
|
protected getEntityId(entityOrId: string | ITrustedCertificate): string;
|
|
161
175
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrustedCertificateService.d.ts","sourceRoot":"","sources":["../../../../src/trusted-certificates/TrustedCertificateService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,OAAO,CAAC,mBAAmB,CAAC;IACzE,SAAS,KAAK,OAAO,WAEpB;IACD,SAAS,CAAC,OAAO,SAA0B;IAC3C,SAAS,CAAC,oBAAoB,SAA8B;IAC5D,SAAS,CAAC
|
|
1
|
+
{"version":3,"file":"TrustedCertificateService.d.ts","sourceRoot":"","sources":["../../../../src/trusted-certificates/TrustedCertificateService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,OAAO,CAAC,mBAAmB,CAAC;IACzE,SAAS,KAAK,OAAO,WAEpB;IACD,SAAS,CAAC,OAAO,SAA0B;IAC3C,SAAS,CAAC,oBAAoB,SAA8B;IAC5D,SAAS,CAAC,uBAAuB,SAA2B;IAC5D,SAAS,CAAC,YAAY,SAAkB;IAExC;;;;;;;;;;;;OAYG;IACG,IAAI,CAAC,MAAM,GAAE,MAAW;IAI9B;;;;;;;;;;;;;;;;OAgBG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,mBAAmB;IAIrD;;;;;;;;;;;;;;;;OAgBG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,mBAAmB;IAIrD;;;;;;;;;;;;;;;;;;OAkBG;IACG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC;IAIjD;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC;IAIjD;;;;;;;;;;;;;;;;;OAiBG;IACG,6BAA6B,CACjC,UAAU,EAAE,MAAM,GAAG,mBAAmB,GACvC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IASxC;;;;;;;;;;;;;;;;;;;OAmBG;IACG,4BAA4B,CAChC,UAAU,EAAE,MAAM,GAAG,mBAAmB,EACxC,uCAAuC,EAAE,MAAM,GAC9C,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAUxC;;;;;;;;;;;;;OAaG;IACG,4BAA4B,IAAI,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAa3E;;;;;;;;;;;;OAYG;IACG,yBAAyB,IAAI,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAYxE,SAAS,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,mBAAmB,GAAG,MAAM;IAKxE,SAAS,CAAC,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,mBAAmB,GAAG,MAAM;CASxE"}
|
|
@@ -10,7 +10,7 @@ class TrustedCertificateService extends core_1.Service {
|
|
|
10
10
|
super(...arguments);
|
|
11
11
|
this.listUrl = 'trusted-certificates';
|
|
12
12
|
this.proofOfPossessionUrl = 'trusted-certificates-pop';
|
|
13
|
-
this.
|
|
13
|
+
this.certificateAuthorityUrl = 'certificate-authority';
|
|
14
14
|
this.propertyName = 'certificates';
|
|
15
15
|
}
|
|
16
16
|
get baseUrl() {
|
|
@@ -190,10 +190,34 @@ class TrustedCertificateService extends core_1.Service {
|
|
|
190
190
|
async generateCertificateAuthority() {
|
|
191
191
|
const method = 'POST';
|
|
192
192
|
const headers = { 'content-type': 'application/json', Accept: 'application/json' };
|
|
193
|
-
const url =
|
|
193
|
+
const url = this.certificateAuthorityUrl;
|
|
194
194
|
const res = await this.client.fetch(url, { headers, method });
|
|
195
195
|
const data = await res.json();
|
|
196
|
-
if (res.status
|
|
196
|
+
if (res.status >= 400) {
|
|
197
|
+
throw { res, data };
|
|
198
|
+
}
|
|
199
|
+
return { res, data };
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Renews the certificate authority for the tenant.
|
|
203
|
+
*
|
|
204
|
+
* @returns The renewed certificate authority object (wrapped in [[IResult]]).
|
|
205
|
+
*
|
|
206
|
+
* **Example**
|
|
207
|
+
* ```typescript
|
|
208
|
+
* (async () => {
|
|
209
|
+
* const { data, res } = await trustedCertificateService.renewCertificateAuthority();
|
|
210
|
+
* const renewedCertificateAuthority = data;
|
|
211
|
+
* })();
|
|
212
|
+
* ```
|
|
213
|
+
*/
|
|
214
|
+
async renewCertificateAuthority() {
|
|
215
|
+
const method = 'POST';
|
|
216
|
+
const headers = { 'content-type': 'application/json', Accept: 'application/json' };
|
|
217
|
+
const url = `${this.certificateAuthorityUrl}/renew`;
|
|
218
|
+
const res = await this.client.fetch(url, { headers, method });
|
|
219
|
+
const data = await res.json();
|
|
220
|
+
if (res.status >= 400) {
|
|
197
221
|
throw { res, data };
|
|
198
222
|
}
|
|
199
223
|
return { res, data };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrustedCertificateService.js","sourceRoot":"","sources":["../../../../src/trusted-certificates/TrustedCertificateService.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAG3C;;GAEG;AACH,MAAa,yBAA0B,SAAQ,cAA4B;IAA3E;;QAIY,YAAO,GAAG,sBAAsB,CAAC;QACjC,yBAAoB,GAAG,0BAA0B,CAAC;QAClD,
|
|
1
|
+
{"version":3,"file":"TrustedCertificateService.js","sourceRoot":"","sources":["../../../../src/trusted-certificates/TrustedCertificateService.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAG3C;;GAEG;AACH,MAAa,yBAA0B,SAAQ,cAA4B;IAA3E;;QAIY,YAAO,GAAG,sBAAsB,CAAC;QACjC,yBAAoB,GAAG,0BAA0B,CAAC;QAClD,4BAAuB,GAAG,uBAAuB,CAAC;QAClD,iBAAY,GAAG,cAAc,CAAC;IA6O1C,CAAC;IAnPC,IAAc,OAAO;QACnB,OAAO,mBAAmB,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IACjD,CAAC;IAMD;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,IAAI,CAAC,SAAiB,EAAE;QAC5B,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,MAAM,CAAC,UAAwC;QACnD,OAAO,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,MAAM,CAAC,UAAwC;QACnD,OAAO,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,MAAM,CAAC,MAAoC;QAC/C,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,KAAK,CAAC,MAAM,CAAC,MAAoC;QAC/C,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,6BAA6B,CACjC,UAAwC;QAExC,MAAM,MAAM,GAAG,MAAM,CAAC;QACtB,MAAM,OAAO,GAAG,EAAE,cAAc,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AI,UAAU,CAAC,WAAW,EAAE,CAAC;YAC7D,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,EAAE,GAAG,UAAoB,CAAC;QAC5B,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AApPD,8DAoPC"}
|
|
@@ -7,7 +7,7 @@ export declare class TrustedCertificateService extends Service<ITrustedCertifica
|
|
|
7
7
|
protected get baseUrl(): string;
|
|
8
8
|
protected listUrl: string;
|
|
9
9
|
protected proofOfPossessionUrl: string;
|
|
10
|
-
protected
|
|
10
|
+
protected certificateAuthorityUrl: string;
|
|
11
11
|
protected propertyName: string;
|
|
12
12
|
/**
|
|
13
13
|
* Gets a list of trusted certificates.
|
|
@@ -156,6 +156,20 @@ export declare class TrustedCertificateService extends Service<ITrustedCertifica
|
|
|
156
156
|
* ```
|
|
157
157
|
*/
|
|
158
158
|
generateCertificateAuthority(): Promise<IResult<ITrustedCertificate>>;
|
|
159
|
+
/**
|
|
160
|
+
* Renews the certificate authority for the tenant.
|
|
161
|
+
*
|
|
162
|
+
* @returns The renewed certificate authority object (wrapped in [[IResult]]).
|
|
163
|
+
*
|
|
164
|
+
* **Example**
|
|
165
|
+
* ```typescript
|
|
166
|
+
* (async () => {
|
|
167
|
+
* const { data, res } = await trustedCertificateService.renewCertificateAuthority();
|
|
168
|
+
* const renewedCertificateAuthority = data;
|
|
169
|
+
* })();
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
renewCertificateAuthority(): Promise<IResult<ITrustedCertificate>>;
|
|
159
173
|
protected getDetailUrl(entityOrId: string | ITrustedCertificate): string;
|
|
160
174
|
protected getEntityId(entityOrId: string | ITrustedCertificate): string;
|
|
161
175
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrustedCertificateService.d.ts","sourceRoot":"","sources":["../../../../src/trusted-certificates/TrustedCertificateService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,OAAO,CAAC,mBAAmB,CAAC;IACzE,SAAS,KAAK,OAAO,WAEpB;IACD,SAAS,CAAC,OAAO,SAA0B;IAC3C,SAAS,CAAC,oBAAoB,SAA8B;IAC5D,SAAS,CAAC
|
|
1
|
+
{"version":3,"file":"TrustedCertificateService.d.ts","sourceRoot":"","sources":["../../../../src/trusted-certificates/TrustedCertificateService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,OAAO,CAAC,mBAAmB,CAAC;IACzE,SAAS,KAAK,OAAO,WAEpB;IACD,SAAS,CAAC,OAAO,SAA0B;IAC3C,SAAS,CAAC,oBAAoB,SAA8B;IAC5D,SAAS,CAAC,uBAAuB,SAA2B;IAC5D,SAAS,CAAC,YAAY,SAAkB;IAExC;;;;;;;;;;;;OAYG;IACG,IAAI,CAAC,MAAM,GAAE,MAAW;IAI9B;;;;;;;;;;;;;;;;OAgBG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,mBAAmB;IAIrD;;;;;;;;;;;;;;;;OAgBG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,mBAAmB;IAIrD;;;;;;;;;;;;;;;;;;OAkBG;IACG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC;IAIjD;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC;IAIjD;;;;;;;;;;;;;;;;;OAiBG;IACG,6BAA6B,CACjC,UAAU,EAAE,MAAM,GAAG,mBAAmB,GACvC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IASxC;;;;;;;;;;;;;;;;;;;OAmBG;IACG,4BAA4B,CAChC,UAAU,EAAE,MAAM,GAAG,mBAAmB,EACxC,uCAAuC,EAAE,MAAM,GAC9C,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAUxC;;;;;;;;;;;;;OAaG;IACG,4BAA4B,IAAI,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAa3E;;;;;;;;;;;;OAYG;IACG,yBAAyB,IAAI,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAYxE,SAAS,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,mBAAmB,GAAG,MAAM;IAKxE,SAAS,CAAC,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,mBAAmB,GAAG,MAAM;CASxE"}
|
|
@@ -8,7 +8,7 @@ export class TrustedCertificateService extends Service {
|
|
|
8
8
|
super(...arguments);
|
|
9
9
|
this.listUrl = 'trusted-certificates';
|
|
10
10
|
this.proofOfPossessionUrl = 'trusted-certificates-pop';
|
|
11
|
-
this.
|
|
11
|
+
this.certificateAuthorityUrl = 'certificate-authority';
|
|
12
12
|
this.propertyName = 'certificates';
|
|
13
13
|
}
|
|
14
14
|
get baseUrl() {
|
|
@@ -218,10 +218,36 @@ export class TrustedCertificateService extends Service {
|
|
|
218
218
|
return __awaiter(this, void 0, void 0, function* () {
|
|
219
219
|
const method = 'POST';
|
|
220
220
|
const headers = { 'content-type': 'application/json', Accept: 'application/json' };
|
|
221
|
-
const url =
|
|
221
|
+
const url = this.certificateAuthorityUrl;
|
|
222
222
|
const res = yield this.client.fetch(url, { headers, method });
|
|
223
223
|
const data = yield res.json();
|
|
224
|
-
if (res.status
|
|
224
|
+
if (res.status >= 400) {
|
|
225
|
+
throw { res, data };
|
|
226
|
+
}
|
|
227
|
+
return { res, data };
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Renews the certificate authority for the tenant.
|
|
232
|
+
*
|
|
233
|
+
* @returns The renewed certificate authority object (wrapped in [[IResult]]).
|
|
234
|
+
*
|
|
235
|
+
* **Example**
|
|
236
|
+
* ```typescript
|
|
237
|
+
* (async () => {
|
|
238
|
+
* const { data, res } = await trustedCertificateService.renewCertificateAuthority();
|
|
239
|
+
* const renewedCertificateAuthority = data;
|
|
240
|
+
* })();
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
243
|
+
renewCertificateAuthority() {
|
|
244
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
245
|
+
const method = 'POST';
|
|
246
|
+
const headers = { 'content-type': 'application/json', Accept: 'application/json' };
|
|
247
|
+
const url = `${this.certificateAuthorityUrl}/renew`;
|
|
248
|
+
const res = yield this.client.fetch(url, { headers, method });
|
|
249
|
+
const data = yield res.json();
|
|
250
|
+
if (res.status >= 400) {
|
|
225
251
|
throw { res, data };
|
|
226
252
|
}
|
|
227
253
|
return { res, data };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrustedCertificateService.js","sourceRoot":"","sources":["../../../../src/trusted-certificates/TrustedCertificateService.ts"],"names":[],"mappings":";AAAA,OAAO,EAAW,OAAO,EAAE,MAAM,SAAS,CAAC;AAG3C;;GAEG;AACH,MAAM,OAAO,yBAA0B,SAAQ,OAA4B;IAA3E;;QAIY,YAAO,GAAG,sBAAsB,CAAC;QACjC,yBAAoB,GAAG,0BAA0B,CAAC;QAClD,
|
|
1
|
+
{"version":3,"file":"TrustedCertificateService.js","sourceRoot":"","sources":["../../../../src/trusted-certificates/TrustedCertificateService.ts"],"names":[],"mappings":";AAAA,OAAO,EAAW,OAAO,EAAE,MAAM,SAAS,CAAC;AAG3C;;GAEG;AACH,MAAM,OAAO,yBAA0B,SAAQ,OAA4B;IAA3E;;QAIY,YAAO,GAAG,sBAAsB,CAAC;QACjC,yBAAoB,GAAG,0BAA0B,CAAC;QAClD,4BAAuB,GAAG,uB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G,EAAE,IAAI,EAAE,CAAC;QACvB,CAAC;KAAA;IAED;;;;;;;;;;;;OAYG;IACG,yBAAyB;;YAC7B,MAAM,MAAM,GAAG,MAAM,CAAC;YACtB,MAAM,OAAO,GAAG,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;YACnF,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,uBAAuB,QAAQ,CAAC;YACpD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;YAC9D,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;YAC9B,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;gBACtB,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;YACtB,CAAC;YACD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;QACvB,CAAC;KAAA;IAES,YAAY,CAAC,UAAwC;QAC7D,MAAM,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QACxC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,EAAE,EAAE,CAAC;IACjC,CAAC;IAES,WAAW,CAAC,UAAwC;QAC5D,IAAI,EAAU,CAAC;QACf,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,CAAC,WAAW,EAAE,CAAC;YAC7D,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,EAAE,GAAG,UAAoB,CAAC;QAC5B,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;CACF"}
|
|
@@ -7,7 +7,7 @@ export declare class TrustedCertificateService extends Service<ITrustedCertifica
|
|
|
7
7
|
protected get baseUrl(): string;
|
|
8
8
|
protected listUrl: string;
|
|
9
9
|
protected proofOfPossessionUrl: string;
|
|
10
|
-
protected
|
|
10
|
+
protected certificateAuthorityUrl: string;
|
|
11
11
|
protected propertyName: string;
|
|
12
12
|
/**
|
|
13
13
|
* Gets a list of trusted certificates.
|
|
@@ -156,6 +156,20 @@ export declare class TrustedCertificateService extends Service<ITrustedCertifica
|
|
|
156
156
|
* ```
|
|
157
157
|
*/
|
|
158
158
|
generateCertificateAuthority(): Promise<IResult<ITrustedCertificate>>;
|
|
159
|
+
/**
|
|
160
|
+
* Renews the certificate authority for the tenant.
|
|
161
|
+
*
|
|
162
|
+
* @returns The renewed certificate authority object (wrapped in [[IResult]]).
|
|
163
|
+
*
|
|
164
|
+
* **Example**
|
|
165
|
+
* ```typescript
|
|
166
|
+
* (async () => {
|
|
167
|
+
* const { data, res } = await trustedCertificateService.renewCertificateAuthority();
|
|
168
|
+
* const renewedCertificateAuthority = data;
|
|
169
|
+
* })();
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
renewCertificateAuthority(): Promise<IResult<ITrustedCertificate>>;
|
|
159
173
|
protected getDetailUrl(entityOrId: string | ITrustedCertificate): string;
|
|
160
174
|
protected getEntityId(entityOrId: string | ITrustedCertificate): string;
|
|
161
175
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrustedCertificateService.d.ts","sourceRoot":"","sources":["../../../src/trusted-certificates/TrustedCertificateService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,OAAO,CAAC,mBAAmB,CAAC;IACzE,SAAS,KAAK,OAAO,WAEpB;IACD,SAAS,CAAC,OAAO,SAA0B;IAC3C,SAAS,CAAC,oBAAoB,SAA8B;IAC5D,SAAS,CAAC
|
|
1
|
+
{"version":3,"file":"TrustedCertificateService.d.ts","sourceRoot":"","sources":["../../../src/trusted-certificates/TrustedCertific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