chaging schemas for front

This commit is contained in:
José Salazar
2025-12-04 17:05:27 -05:00
parent ef88639463
commit cf18fdb16b
9 changed files with 43 additions and 31 deletions

View File

@@ -2,7 +2,7 @@ mutation CreateActivityLog(
$title: String!,
$description: String!,
$activityType: ActivityType!,
$userId: UUID!,
$userId: String!,
$isRead: Boolean
) @auth(level: USER) {
activityLog_insert(
@@ -21,7 +21,7 @@ mutation UpdateActivityLog(
$title: String,
$description: String,
$activityType: ActivityType,
$userId: UUID,
$userId: String,
$isRead: Boolean
) @auth(level: USER) {
activityLog_update(

View File

@@ -23,7 +23,7 @@ query getActivityLogById(
}
query filterActivityLog(
$userId: UUID,
$userId: String,
$activityType: ActivityType,
$isRead: Boolean
) @auth(level: USER) {

View File

@@ -6,16 +6,16 @@ mutation CreateEvent(
$recurrenceType: RecurrenceType,
$recurrenceStartDate: Timestamp,
$recurrenceEndDate: Timestamp,
$scatterDates: String,
$scatterDates: Any,
$multiDayStartDate: Timestamp,
$multiDayEndDate: Timestamp,
$bufferTimeBefore: Float,
$bufferTimeAfter: Float,
$conflictDetectionEnabled: Boolean,
$detectedConflicts: String,
$detectedConflicts: Any,
$businessId: UUID!,
$businessName: String,
$vendorId: UUID,
$vendorId: String,
$vendorName: String,
$hub: String,
$eventLocation: String,
@@ -23,8 +23,8 @@ mutation CreateEvent(
$poReference: String,
$status: EventStatus!,
$date: Timestamp!,
$shifts: String,
$addons: String,
$shifts: Any,
$addons: Any,
$total: Float,
$clientName: String,
$clientEmail: String,
@@ -32,7 +32,7 @@ mutation CreateEvent(
$invoiceId: UUID,
$notes: String,
$requested: Int,
$assignedStaff: String
$assignedStaff: Any
) @auth(level: USER) {
event_insert(
data: {
@@ -84,16 +84,16 @@ mutation UpdateEvent(
$recurrenceType: RecurrenceType,
$recurrenceStartDate: Timestamp,
$recurrenceEndDate: Timestamp,
$scatterDates: String,
$scatterDates: Any,
$multiDayStartDate: Timestamp,
$multiDayEndDate: Timestamp,
$bufferTimeBefore: Float,
$bufferTimeAfter: Float,
$conflictDetectionEnabled: Boolean,
$detectedConflicts: String,
$detectedConflicts: Any,
$businessId: UUID,
$businessName: String,
$vendorId: UUID,
$vendorId: String,
$vendorName: String,
$hub: String,
$eventLocation: String,
@@ -101,8 +101,8 @@ mutation UpdateEvent(
$poReference: String,
$status: EventStatus,
$date: Timestamp,
$shifts: String,
$addons: String,
$shifts: Any,
$addons: Any,
$total: Float,
$clientName: String,
$clientEmail: String,
@@ -110,7 +110,7 @@ mutation UpdateEvent(
$invoiceId: UUID,
$notes: String,
$requested: Int,
$assignedStaff: String
$assignedStaff: Any
) @auth(level: USER) {
event_update(
id: $id,

View File

@@ -1,5 +1,11 @@
query listEvents @auth(level: USER) {
events {
query listEvents (
$orderByDate: OrderDirection
$limit: Int
) @auth(level: USER) {
events(
orderBy: { date: $orderByDate }
limit: $limit
) {
id
eventName
status
@@ -84,7 +90,7 @@ query getEventById(
query filterEvents(
$status: EventStatus,
$businessId: UUID,
$vendorId: UUID,
$vendorId: String,
$isRecurring: Boolean,
$isRapid: Boolean,
$isMultiDay: Boolean,

View File

@@ -1,6 +1,6 @@
mutation CreateTeam(
$teamName: String!,
$ownerId: UUID!,
$ownerId: String!,
$ownerName: String!,
$ownerRole: TeamOwnerRole!,
$favoriteStaff: String,
@@ -21,7 +21,7 @@ mutation CreateTeam(
mutation UpdateTeam(
$id: UUID!,
$teamName: String,
$ownerId: UUID,
$ownerId: String,
$ownerName: String,
$ownerRole: TeamOwnerRole,
$favoriteStaff: String,

View File

@@ -1,5 +1,11 @@
query listTeam @auth(level: USER) {
teams {
query listTeam (
$orderByCreatedDate: OrderDirection
$limit: Int
) @auth(level: USER) {
teams(
orderBy: { createdDate: $orderByCreatedDate }
limit: $limit
) {
id
teamName
ownerId
@@ -26,7 +32,7 @@ query getTeamById(
query filterTeam(
$teamName: String,
$ownerId: UUID,
$ownerId: String,
$ownerRole: TeamOwnerRole
) @auth(level: USER) {
teams(

View File

@@ -13,7 +13,7 @@ type ActivityLog @table(name: "activity_logs") {
title: String!
description: String!
activityType: ActivityType!
userId: UUID! # user_id (FK lógica a User.id)
userId: String! # user_id (FK lógica a User.id)
isRead: Boolean @default(expr: "false")
createdDate: Timestamp @default(expr: "request.time")
updatedDate: Timestamp @default(expr: "request.time")

View File

@@ -33,16 +33,16 @@ type Event @table(name: "events") {
recurrenceType: RecurrenceType
recurrenceStartDate: Timestamp
recurrenceEndDate: Timestamp
scatterDates: String
scatterDates: Any
multiDayStartDate: Timestamp
multiDayEndDate: Timestamp
bufferTimeBefore: Float @default(expr: "0")
bufferTimeAfter: Float @default(expr: "0")
conflictDetectionEnabled: Boolean @default(expr: "true")
detectedConflicts: String
detectedConflicts: Any
businessId: UUID!
businessName: String
vendorId: UUID
vendorId: String
vendorName: String
hub: String
eventLocation: String
@@ -50,8 +50,8 @@ type Event @table(name: "events") {
poReference: String
status: EventStatus!
date: Timestamp!
shifts: String
addons: String
shifts: Any
addons: Any
total: Float
clientName: String
clientEmail: String
@@ -59,7 +59,7 @@ type Event @table(name: "events") {
invoiceId: UUID
notes: String
requested: Int @default(expr: "0")
assignedStaff: String
assignedStaff: Any
createdDate: Timestamp @default(expr: "request.time")
updatedDate: Timestamp @default(expr: "request.time")
createdBy: String @default(expr: "auth.uid")

View File

@@ -11,7 +11,7 @@ enum TeamOwnerRole {
type Team @table(name: "team") {
id: UUID! @default(expr: "uuidV4()")
teamName: String!
ownerId: UUID!
ownerId: String!
ownerName: String!
ownerRole: TeamOwnerRole!
favoriteStaff: String