-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8cffdcb
commit 51f5a77
Showing
7 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/services/api/src/modules/audit-logs/resolvers/AppDeploymentCreatedAuditLog.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { resolveRecordAuditLog } from '../helpers'; | ||
import type { AppDeploymentCreatedAuditLogResolvers } from './../../../__generated__/types.next'; | ||
|
||
/* | ||
* Note: This object type is generated because "AppDeploymentCreatedAuditLogMapper" is declared. This is to ensure runtime safety. | ||
* | ||
* When a mapper is used, it is possible to hit runtime errors in some scenarios: | ||
* - given a field name, the schema type's field type does not match mapper's field type | ||
* - or a schema type's field does not exist in the mapper's fields | ||
* | ||
* If you want to skip this file generation, remove the mapper or update the pattern in the `resolverGeneration.object` config. | ||
*/ | ||
export const AppDeploymentCreatedAuditLog: AppDeploymentCreatedAuditLogResolvers = { | ||
__isTypeOf: e => e.event_action === 'APP_DEPLOYMENT_CREATED', | ||
eventTime: e => new Date(e.event_time).toISOString(), | ||
deploymentId: e => e.metadata.appDeploymentCreatedAuditLogSchema.deploymentId, | ||
deploymentName: e => e.metadata.appDeploymentCreatedAuditLogSchema.deploymentName, | ||
deploymentVersion: e => e.metadata.appDeploymentCreatedAuditLogSchema.deploymentVersion, | ||
record: (e, _, { injector }) => resolveRecordAuditLog(e, injector), | ||
}; |
19 changes: 19 additions & 0 deletions
19
packages/services/api/src/modules/audit-logs/resolvers/AppDeploymentPublishedAuditLog.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { resolveRecordAuditLog } from '../helpers'; | ||
import type { AppDeploymentPublishedAuditLogResolvers } from './../../../__generated__/types.next'; | ||
|
||
/* | ||
* Note: This object type is generated because "AppDeploymentPublishedAuditLogMapper" is declared. This is to ensure runtime safety. | ||
* | ||
* When a mapper is used, it is possible to hit runtime errors in some scenarios: | ||
* - given a field name, the schema type's field type does not match mapper's field type | ||
* - or a schema type's field does not exist in the mapper's fields | ||
* | ||
* If you want to skip this file generation, remove the mapper or update the pattern in the `resolverGeneration.object` config. | ||
*/ | ||
export const AppDeploymentPublishedAuditLog: AppDeploymentPublishedAuditLogResolvers = { | ||
__isTypeOf: e => e.event_action === 'APP_DEPLOYMENT_PUBLISHED', | ||
eventTime: e => new Date(e.event_time).toISOString(), | ||
deploymentId: e => e.metadata.appDeploymentCreatedAuditLogSchema.deploymentId, | ||
deploymentVersion: e => e.metadata.appDeploymentCreatedAuditLogSchema.deploymentVersion, | ||
record: (e, _, { injector }) => resolveRecordAuditLog(e, injector), | ||
}; |
19 changes: 19 additions & 0 deletions
19
packages/services/api/src/modules/audit-logs/resolvers/AppDeploymentUpdatedAuditLog.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { resolveRecordAuditLog } from '../helpers'; | ||
import type { AppDeploymentUpdatedAuditLogResolvers } from './../../../__generated__/types.next'; | ||
|
||
/* | ||
* Note: This object type is generated because "AppDeploymentUpdatedAuditLogMapper" is declared. This is to ensure runtime safety. | ||
* | ||
* When a mapper is used, it is possible to hit runtime errors in some scenarios: | ||
* - given a field name, the schema type's field type does not match mapper's field type | ||
* - or a schema type's field does not exist in the mapper's fields | ||
* | ||
* If you want to skip this file generation, remove the mapper or update the pattern in the `resolverGeneration.object` config. | ||
*/ | ||
export const AppDeploymentUpdatedAuditLog: AppDeploymentUpdatedAuditLogResolvers = { | ||
__isTypeOf: e => e.event_action === 'APP_DEPLOYMENT_UPDATED', | ||
eventTime: e => new Date(e.event_time).toISOString(), | ||
deploymentId: e => e.metadata.appDeploymentCreatedAuditLogSchema.deploymentId, | ||
updatedFields: e => e.metadata.appDeploymentUpdatedAuditLogSchema.updatedFields, | ||
record: (e, _, { injector }) => resolveRecordAuditLog(e, injector), | ||
}; |
20 changes: 20 additions & 0 deletions
20
packages/services/api/src/modules/audit-logs/resolvers/ServiceDeletedAuditLog.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { resolveRecordAuditLog } from '../helpers'; | ||
import type { ServiceDeletedAuditLogResolvers } from './../../../__generated__/types.next'; | ||
|
||
/* | ||
* Note: This object type is generated because "ServiceDeletedAuditLogMapper" is declared. This is to ensure runtime safety. | ||
* | ||
* When a mapper is used, it is possible to hit runtime errors in some scenarios: | ||
* - given a field name, the schema type's field type does not match mapper's field type | ||
* - or a schema type's field does not exist in the mapper's fields | ||
* | ||
* If you want to skip this file generation, remove the mapper or update the pattern in the `resolverGeneration.object` config. | ||
*/ | ||
export const ServiceDeletedAuditLog: ServiceDeletedAuditLogResolvers = { | ||
__isTypeOf: e => e.event_action === 'SERVICE_DELETED', | ||
eventTime: e => new Date(e.event_time).toISOString(), | ||
projectId: e => e.metadata.serviceDeletedAuditLogSchema.projectId, | ||
serviceName: e => e.metadata.serviceDeletedAuditLogSchema.serviceName, | ||
targetId: e => e.metadata.serviceDeletedAuditLogSchema.targetId, | ||
record: (e, _, { injector }) => resolveRecordAuditLog(e, injector), | ||
}; |