@@ -22,7 +22,7 @@ export interface Tag {
2222 tag : object ;
2323}
2424
25- export interface CloudService {
25+ export interface CertificationTarget {
2626 id : string ;
2727 name : string ;
2828 description ?: string ;
@@ -33,16 +33,16 @@ export interface CloudService {
3333 updatedAt : string ;
3434}
3535
36- export interface TargetOfEvaluation {
37- cloudServiceId : string ;
36+ export interface AuditScope {
37+ certificationTargetId : string ;
3838 catalogId : string ;
3939 assuranceLevel ?: string ;
4040 controlsInScope ?: Control [ ] ;
4141}
4242
4343export interface ControlInScope {
44- targetOfEvaluationCloudServiceId : string ;
45- targetOfEvaluationCatalogId : string ;
44+ auditScopeCertificationTargetId : string ;
45+ auditScopeCatalogId : string ;
4646 controlId : string ;
4747 controlCategoryName : string ;
4848 controlCategoryCatalogId : string ;
@@ -104,7 +104,7 @@ export interface ListMetricConfigurationsResponse {
104104export interface Certificate {
105105 id : string ;
106106 name : string ;
107- cloudServiceId : string ;
107+ certificationTargetId : string ;
108108 issueDate : string ;
109109 expirationDate : string ;
110110 standard : string ;
@@ -138,12 +138,12 @@ export interface ListAssessmentResultsResponse {
138138 results : AssessmentResult [ ] ;
139139}
140140
141- export interface ListCloudServicesResponse {
142- services : CloudService [ ] ;
141+ export interface ListCertificationTargetsResponse {
142+ targets : CertificationTarget [ ] ;
143143}
144144
145- export interface ListTargetsOfEvaluationResponse {
146- targetOfEvaluation : TargetOfEvaluation [ ] ;
145+ export interface ListAuditScopesResponse {
146+ auditScope : AuditScope [ ] ;
147147}
148148
149149export interface ListControlsInScopeResponse {
@@ -202,12 +202,12 @@ export async function listAssessmentResults(
202202 *
203203 * @returns an array of {@link AssessmentResult}s.
204204 */
205- export async function listCloudServiceAssessmentResults (
205+ export async function listCertificationTargetAssessmentResults (
206206 serviceId : string ,
207207 fetch = window . fetch
208208) : Promise < AssessmentResult [ ] > {
209209 const apiUrl = clouditorize (
210- `/v1/orchestrator/assessment_results?pageSize=1000&filter.cloudServiceId =${ serviceId } &orderBy=timestamp&asc=false`
210+ `/v1/orchestrator/assessment_results?pageSize=1000&filter.certificationTargetId =${ serviceId } &orderBy=timestamp&asc=false`
211211 ) ;
212212
213213 return fetch ( apiUrl , {
@@ -270,7 +270,7 @@ export async function getMetricImplementation(id: string): Promise<MetricImpleme
270270/**
271271 * Retrieves a particular metric configuration from the orchestrator service.
272272 *
273- * @param serviceId the Cloud Service ID
273+ * @param serviceId the Certification Target ID
274274 * @param metricId the metric id
275275 * @returns metric configuration
276276 */
@@ -279,7 +279,7 @@ export async function getMetricConfiguration(
279279 metricId : string
280280) : Promise < MetricConfiguration > {
281281 const apiUrl = clouditorize (
282- `/v1/orchestrator/cloud_services /${ serviceId } /metric_configurations/${ metricId } `
282+ `/v1/orchestrator/certification_targets /${ serviceId } /metric_configurations/${ metricId } `
283283 ) ;
284284
285285 return fetch ( apiUrl , {
@@ -305,7 +305,7 @@ export async function listMetricConfigurations(
305305 serviceId : string ,
306306 skipDefault = false
307307) : Promise < Map < string , MetricConfiguration > > {
308- const apiUrl = clouditorize ( `/v1/orchestrator/cloud_services /${ serviceId } /metric_configurations` ) ;
308+ const apiUrl = clouditorize ( `/v1/orchestrator/certification_targets /${ serviceId } /metric_configurations` ) ;
309309
310310 return fetch ( apiUrl , {
311311 method : 'GET' ,
@@ -329,10 +329,10 @@ export async function listMetricConfigurations(
329329}
330330
331331/**
332- * Creates a new cloud service
332+ * Creates a new certification target
333333 */
334- export async function registerCloudService ( service : CloudService ) : Promise < CloudService > {
335- const apiUrl = clouditorize ( `/v1/orchestrator/cloud_services ` ) ;
334+ export async function registerCertificationTarget ( service : CertificationTarget ) : Promise < CertificationTarget > {
335+ const apiUrl = clouditorize ( `/v1/orchestrator/certification_targets ` ) ;
336336
337337 return fetch ( apiUrl , {
338338 method : 'POST' ,
@@ -343,16 +343,16 @@ export async function registerCloudService(service: CloudService): Promise<Cloud
343343 } )
344344 . then ( throwError )
345345 . then ( ( res ) => res . json ( ) )
346- . then ( ( response : CloudService ) => {
346+ . then ( ( response : CertificationTarget ) => {
347347 return response ;
348348 } ) ;
349349}
350350
351351/**
352- * Removes a cloud service .
352+ * Removes a certification target .
353353 */
354- export async function removeCloudService ( serviceId : string ) : Promise < void > {
355- const apiUrl = clouditorize ( `/v1/orchestrator/cloud_services /${ serviceId } ` ) ;
354+ export async function removeCertificationTarget ( targetId : string ) : Promise < void > {
355+ const apiUrl = clouditorize ( `/v1/orchestrator/certification_targets /${ targetId } ` ) ;
356356
357357 return fetch ( apiUrl , {
358358 method : 'DELETE' ,
@@ -365,12 +365,12 @@ export async function removeCloudService(serviceId: string): Promise<void> {
365365}
366366
367367/**
368- * Retrieves a list of cloud services from the orchestrator service.
368+ * Retrieves a list of certification targets from the orchestrator service.
369369 *
370- * @returns an array of {@link CloudService }s.
370+ * @returns an array of {@link CertificationTarget }s.
371371 */
372- export async function listCloudServices ( fetch = window . fetch ) : Promise < CloudService [ ] > {
373- const apiUrl = clouditorize ( `/v1/orchestrator/cloud_services ` ) ;
372+ export async function listCertificationTargets ( fetch = window . fetch ) : Promise < CertificationTarget [ ] > {
373+ const apiUrl = clouditorize ( `/v1/orchestrator/certification_targets ` ) ;
374374
375375 return fetch ( apiUrl , {
376376 method : 'GET' ,
@@ -380,18 +380,18 @@ export async function listCloudServices(fetch = window.fetch): Promise<CloudServ
380380 } )
381381 . then ( throwError )
382382 . then ( ( res ) => res . json ( ) )
383- . then ( ( response : ListCloudServicesResponse ) => {
384- return response . services ;
383+ . then ( ( response : ListCertificationTargetsResponse ) => {
384+ return response . targets ;
385385 } ) ;
386386}
387387
388388/**
389389 * Creates a new target of evaluation.
390390 */
391- export async function createTargetOfEvaluation (
392- target : TargetOfEvaluation
393- ) : Promise < TargetOfEvaluation > {
394- const apiUrl = clouditorize ( `/v1/orchestrator/toes ` ) ;
391+ export async function createAuditScope (
392+ target : AuditScope
393+ ) : Promise < AuditScope > {
394+ const apiUrl = clouditorize ( `/v1/orchestrator/audit_scopes ` ) ;
395395
396396 return fetch ( apiUrl , {
397397 method : 'POST' ,
@@ -407,11 +407,11 @@ export async function createTargetOfEvaluation(
407407/**
408408 * Removes a target of evaluation.
409409 */
410- export async function removeTargetOfEvaluation (
411- target : TargetOfEvaluation
412- ) : Promise < TargetOfEvaluation > {
410+ export async function removeAuditScope (
411+ target : AuditScope
412+ ) : Promise < AuditScope > {
413413 const apiUrl = clouditorize (
414- `/v1/orchestrator/cloud_services /${ target . cloudServiceId } /toes /${ target . catalogId } `
414+ `/v1/orchestrator/certification_targets /${ target . certificationTargetId } /audit_scopes /${ target . catalogId } `
415415 ) ;
416416
417417 return fetch ( apiUrl , {
@@ -433,7 +433,7 @@ export async function addControlToScope(
433433 fetch = window . fetch
434434) : Promise < ControlInScope > {
435435 const apiUrl = clouditorize (
436- `/v1/orchestrator/cloud_services /${ scope . targetOfEvaluationCloudServiceId } /toes /${ scope . targetOfEvaluationCatalogId } /controls_in_scope`
436+ `/v1/orchestrator/certification_targets /${ scope . auditScopeCertificationTargetId } /audit_scopes /${ scope . auditScopeCatalogId } /controls_in_scope`
437437 ) ;
438438
439439 return fetch ( apiUrl , {
@@ -458,7 +458,7 @@ export async function removeControlFromScope(
458458 fetch = window . fetch
459459) : Promise < ControlInScope > {
460460 const apiUrl = clouditorize (
461- `/v1/orchestrator/cloud_services /${ scope . targetOfEvaluationCloudServiceId } /toes /${ scope . targetOfEvaluationCatalogId } /controls_in_scope/categories/${ scope . controlCategoryName } /controls/${ scope . controlId } `
461+ `/v1/orchestrator/certification_targets /${ scope . auditScopeCertificationTargetId } /audit_scopes /${ scope . auditScopeCatalogId } /controls_in_scope/categories/${ scope . controlCategoryName } /controls/${ scope . controlId } `
462462 ) ;
463463
464464 return fetch ( apiUrl , {
@@ -474,13 +474,13 @@ export async function removeControlFromScope(
474474/**
475475 * Retrieves a list of targets of evaluation from the orchestrator service.
476476 *
477- * @returns an array of {@link TargetOfEvaluation }s.
477+ * @returns an array of {@link AuditScope }s.
478478 */
479- export async function listTargetsOfEvaluation (
479+ export async function listAuditScopes (
480480 serviceId : string ,
481481 fetch = window . fetch
482- ) : Promise < TargetOfEvaluation [ ] > {
483- const apiUrl = clouditorize ( `/v1/orchestrator/cloud_services /${ serviceId } /toes ` ) ;
482+ ) : Promise < AuditScope [ ] > {
483+ const apiUrl = clouditorize ( `/v1/orchestrator/certification_targets /${ serviceId } /audit_scopes ` ) ;
484484
485485 return fetch ( apiUrl , {
486486 method : 'GET' ,
@@ -490,8 +490,8 @@ export async function listTargetsOfEvaluation(
490490 } )
491491 . then ( throwError )
492492 . then ( ( res ) => res . json ( ) )
493- . then ( ( response : ListTargetsOfEvaluationResponse ) => {
494- return response . targetOfEvaluation ;
493+ . then ( ( response : ListAuditScopesResponse ) => {
494+ return response . auditScope ;
495495 } ) ;
496496}
497497
@@ -506,7 +506,7 @@ export async function listControlsInScope(
506506 fetch = window . fetch
507507) : Promise < ControlInScope [ ] > {
508508 const apiUrl = clouditorize (
509- `/v1/orchestrator/cloud_services /${ serviceId } /toes /${ catalogId } /controls_in_scope?pageSize=1500&orderBy=control_id&asc=true`
509+ `/v1/orchestrator/certification_targets /${ serviceId } /audit_scopes /${ catalogId } /controls_in_scope?pageSize=1500&orderBy=control_id&asc=true`
510510 ) ;
511511
512512 return fetch ( apiUrl , {
@@ -605,12 +605,12 @@ export async function listControls(
605605}
606606
607607/**
608- * Retrieve a cloud service from the orchestrator service using its ID.
608+ * Retrieve a certification target from the orchestrator service using its ID.
609609 *
610- * @returns the cloud service
610+ * @returns the certification target
611611 */
612- export async function getCloudService ( id : string , fetch = window . fetch ) : Promise < CloudService > {
613- const apiUrl = clouditorize ( `/v1/orchestrator/cloud_services /${ id } ` ) ;
612+ export async function getCertificationTarget ( id : string , fetch = window . fetch ) : Promise < CertificationTarget > {
613+ const apiUrl = clouditorize ( `/v1/orchestrator/certification_targets /${ id } ` ) ;
614614
615615 return fetch ( apiUrl , {
616616 method : 'GET' ,
@@ -622,11 +622,11 @@ export async function getCloudService(id: string, fetch = window.fetch): Promise
622622 . then ( ( res ) => res . json ( ) ) ;
623623}
624624
625- export async function updateCloudService (
626- service : CloudService ,
625+ export async function updateCertificationTarget (
626+ service : CertificationTarget ,
627627 fetch = window . fetch
628- ) : Promise < CloudService > {
629- const apiUrl = clouditorize ( `/v1/orchestrator/cloud_services /${ service . id } ` ) ;
628+ ) : Promise < CertificationTarget > {
629+ const apiUrl = clouditorize ( `/v1/orchestrator/certification_targets /${ service . id } ` ) ;
630630
631631 return fetch ( apiUrl , {
632632 method : 'PUT' ,
@@ -637,17 +637,17 @@ export async function updateCloudService(
637637 } )
638638 . then ( throwError )
639639 . then ( ( res ) => res . json ( ) )
640- . then ( ( response : CloudService ) => {
640+ . then ( ( response : CertificationTarget ) => {
641641 return response ;
642642 } ) ;
643643}
644644
645645export async function updateControlInScope (
646646 scope : ControlInScope ,
647647 fetch = window . fetch
648- ) : Promise < CloudService > {
648+ ) : Promise < CertificationTarget > {
649649 const apiUrl = clouditorize (
650- `/v1/orchestrator/cloud_services /${ scope . targetOfEvaluationCloudServiceId } /toes /${ scope . targetOfEvaluationCatalogId } /controls_in_scope/categories/${ scope . controlCategoryName } /controls/${ scope . controlId } `
650+ `/v1/orchestrator/certification_targets /${ scope . auditScopeCertificationTargetId } /audit_scopes /${ scope . auditScopeCatalogId } /controls_in_scope/categories/${ scope . controlCategoryName } /controls/${ scope . controlId } `
651651 ) ;
652652
653653 return fetch ( apiUrl , {
@@ -659,7 +659,7 @@ export async function updateControlInScope(
659659 } )
660660 . then ( throwError )
661661 . then ( ( res ) => res . json ( ) )
662- . then ( ( response : CloudService ) => {
662+ . then ( ( response : CertificationTarget ) => {
663663 return response ;
664664 } ) ;
665665}
0 commit comments