-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
codegen setup fix some some some some more ? ?? SOME? ?? ? fix some? SOME ??? more some some test fix some code review! ? fix some clean! fix codegen path ??? ? ?? ? ? added scope ti auditlogmanager scheme publish & check & delete members role CLEAN MORE target project prettier fix resolver schema published lint
- Loading branch information
1 parent
6f41001
commit 005b64a
Showing
42 changed files
with
1,715 additions
and
13 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
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,12 @@ | ||
import { createModule } from 'graphql-modules'; | ||
import { AuditLogManager } from './providers/audit-logs-manager'; | ||
import { resolvers } from './resolvers.generated'; | ||
import { typeDefs } from './module.graphql'; | ||
|
||
export const auditLogsModule = createModule({ | ||
id: 'audit-logs', | ||
dirname: __dirname, | ||
typeDefs, | ||
resolvers, | ||
providers: [AuditLogManager], | ||
}); |
3 changes: 3 additions & 0 deletions
3
packages/services/api/src/modules/audit-logs/module.graphql.mappers.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,3 @@ | ||
import { AuditLogEvent } from './providers/audit-logs-types'; | ||
|
||
export type AuditLogMapper = AuditLogEvent; |
263 changes: 263 additions & 0 deletions
263
packages/services/api/src/modules/audit-logs/module.graphql.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,263 @@ | ||
import { gql } from 'graphql-modules'; | ||
|
||
export const typeDefs = gql` | ||
interface AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
} | ||
type AuditLogUserRecord { | ||
userId: ID! | ||
userEmail: String! | ||
user: User # this one is nullable because it can be deleted! | ||
} | ||
type AuditLogConnection { | ||
nodes: [AuditLog]! | ||
total: Int! | ||
} | ||
type AuditLogFileExport { | ||
id: ID! | ||
url: String! | ||
validUntil: Date! | ||
createdAt: Date! | ||
} | ||
type ExportResultEdge { | ||
node: AuditLogFileExport! | ||
cursor: String! | ||
} | ||
type ExportResultConnection { | ||
edges: [ExportResultEdge!]! | ||
pageInfo: PageInfo! | ||
} | ||
input AuditLogFilter { | ||
startDate: Date | ||
endDate: Date | ||
userId: String | ||
userEmail: String | ||
projectId: String | ||
targetId: String | ||
eventType: String # Filter by __typename if needed | ||
} | ||
extend type Query { | ||
auditLogs( | ||
filter: AuditLogFilter | ||
first: String = "100" | ||
after: String = null | ||
): AuditLogConnection! | ||
auditLogExports(first: String = 100, after: String = null): ExportResultConnection! | ||
} | ||
extend type Mutation { | ||
exportAuditLogsToFile(filter: AuditLogFilter!): AuditLogFileExport! | ||
} | ||
type ModifyAuditLogError implements Error { | ||
message: String! | ||
} | ||
type UserInvitedAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
inviteeId: String! | ||
inviteeEmail: String! | ||
} | ||
type UserJoinedAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
inviteeId: String! | ||
inviteeEmail: String! | ||
} | ||
type UserRemovedAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
removedUserId: String! | ||
removedUserEmail: String! | ||
} | ||
type OrganizationSettingsUpdatedAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
updatedFields: JSON! | ||
} | ||
type OrganizationTransferredAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
newOwnerId: String! | ||
newOwnerEmail: String! | ||
} | ||
type ProjectCreatedAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
projectId: String! | ||
projectName: String! | ||
} | ||
type ProjectSettingsUpdatedAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
projectId: String! | ||
updatedFields: JSON! | ||
} | ||
type ProjectDeletedAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
projectId: String! | ||
projectName: String! | ||
} | ||
type TargetCreatedAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
projectId: String! | ||
targetId: String! | ||
targetName: String! | ||
} | ||
type TargetSettingsUpdatedAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
projectId: String! | ||
targetId: String! | ||
updatedFields: JSON! | ||
} | ||
type TargetDeletedAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
projectId: String! | ||
targetId: String! | ||
targetName: String! | ||
} | ||
type SchemaPolicySettingsUpdatedAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
projectId: String! | ||
updatedFields: JSON! | ||
} | ||
type SchemaCheckedAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
projectId: String! | ||
targetId: String! | ||
schemaSdl: String! | ||
} | ||
type SchemaPublishAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
projectId: String! | ||
targetId: String! | ||
schemaName: String! | ||
} | ||
type SchemaDeletedAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
projectId: String! | ||
targetId: String! | ||
schemaName: String! | ||
} | ||
type RoleCreatedAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
roleId: String! | ||
roleName: String! | ||
} | ||
type RoleAssignedAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
roleId: String! | ||
roleName: String! | ||
userIdAssigned: String! | ||
userEmailAssigned: String! | ||
} | ||
type RoleDeletedAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
roleId: String! | ||
roleName: String! | ||
} | ||
type RoleUpdatedAuditLog implements AuditLog { | ||
id: ID! | ||
eventTime: Date! | ||
user: AuditLogUserRecord! | ||
organizationId: String! | ||
eventType: String! | ||
roleId: String! | ||
roleName: String! | ||
updatedFields: JSON! | ||
} | ||
`; |
Oops, something went wrong.