mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
repository layer added
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { AgendaDataService } from './agenda-data.service';
|
||||||
|
|
||||||
|
describe('AgendaDataService', () => {
|
||||||
|
let service: AgendaDataService;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({});
|
||||||
|
service = TestBed.inject(AgendaDataService);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
expect(service).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class AgendaDataService {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
}
|
||||||
@@ -0,0 +1,166 @@
|
|||||||
|
import { z } from 'zod';
|
||||||
|
|
||||||
|
const AttachCommunicationInputModel = z.object({
|
||||||
|
attachmentId: z.string().uuid(),
|
||||||
|
description: z.string().nullable().optional(),
|
||||||
|
typeSharing: z.number().int(),
|
||||||
|
dateViewExpire: z.string().datetime().nullable().optional(),
|
||||||
|
}).strict();
|
||||||
|
|
||||||
|
const AttachmentInputModel = z.object({
|
||||||
|
sourceId: z.string().nullable().optional(),
|
||||||
|
sourceName: z.string().nullable().optional(),
|
||||||
|
description: z.string().nullable().optional(),
|
||||||
|
applicationId: z.number().int(),
|
||||||
|
}).strict();
|
||||||
|
|
||||||
|
const AttendeeCommunicationInputModel = z.object({
|
||||||
|
attendeeId: z.string().uuid(),
|
||||||
|
message: z.string().nullable().optional(),
|
||||||
|
}).strict();
|
||||||
|
|
||||||
|
const AttendeeExternalInputModel = z.object({
|
||||||
|
name: z.string().min(1),
|
||||||
|
emailAddress: z.string().email().nullable().optional(),
|
||||||
|
message: z.string().nullable().optional(),
|
||||||
|
}).strict();
|
||||||
|
|
||||||
|
const AttendeeInputModel = z.object({
|
||||||
|
name: z.string().min(1),
|
||||||
|
emailAddress: z.string().nullable().optional(),
|
||||||
|
attendeeType: z.enum(["0", "1", "2"]),
|
||||||
|
wxUserId: z.number().int(),
|
||||||
|
}).strict();
|
||||||
|
|
||||||
|
const EAttendeeType = z.enum(["0", "1", "2"]);
|
||||||
|
|
||||||
|
const EEventCategory = z.enum(["1", "2"]);
|
||||||
|
|
||||||
|
const EEventFilterCategory = z.enum(["1", "2", "3"]);
|
||||||
|
|
||||||
|
const EEventFilterStatus = z.enum(["0", "1", "2", "3", "4", "5"]);
|
||||||
|
|
||||||
|
const EEventFilterType = z.enum(["1", "2", "3", "4"]);
|
||||||
|
|
||||||
|
const EEventOwnerType = z.enum(["1", "2", "3"]);
|
||||||
|
|
||||||
|
const EEventStatus = z.enum(["0", "1", "2", "3", "4"]);
|
||||||
|
|
||||||
|
const EEventType = z.enum(["1", "2", "3"]);
|
||||||
|
|
||||||
|
const ERecurringType = z.enum(["0", "1", "2", "3", "4"]);
|
||||||
|
|
||||||
|
const EventAddAttachmentModel = z.object({
|
||||||
|
attachments: z.array(AttachmentInputModel),
|
||||||
|
}).strict();
|
||||||
|
|
||||||
|
const EventAddAttendeeModel = z.object({
|
||||||
|
attendees: z.array(AttendeeInputModel),
|
||||||
|
}).strict();
|
||||||
|
|
||||||
|
const EventCommunicationInputModel = z.object({
|
||||||
|
attachs: z.array(AttachCommunicationInputModel).nullable().optional(),
|
||||||
|
attendees: z.array(AttendeeCommunicationInputModel).nullable().optional(),
|
||||||
|
externalAttendees: z.array(AttendeeExternalInputModel).nullable().optional(),
|
||||||
|
}).strict();
|
||||||
|
|
||||||
|
const EventInputModel = z.object({
|
||||||
|
userId: z.number().int(),
|
||||||
|
ownerType: EEventOwnerType,
|
||||||
|
subject: z.string().min(1),
|
||||||
|
body: z.string().min(1),
|
||||||
|
location: z.string().nullable().optional(),
|
||||||
|
startDate: z.string().datetime(),
|
||||||
|
endDate: z.string().datetime(),
|
||||||
|
type: EEventType,
|
||||||
|
category: EEventCategory,
|
||||||
|
attendees: z.array(AttendeeInputModel).nullable().optional(),
|
||||||
|
attachments: z.array(AttachmentInputModel).nullable().optional(),
|
||||||
|
recurrence: z.object({
|
||||||
|
frequency: ERecurringType,
|
||||||
|
occurrences: z.number().int(),
|
||||||
|
}),
|
||||||
|
organizerId: z.number().int(),
|
||||||
|
isAllDayEvent: z.boolean(),
|
||||||
|
}).strict();
|
||||||
|
|
||||||
|
const EventRecurrenceInputModel = z.object({
|
||||||
|
frequency: ERecurringType,
|
||||||
|
occurrences: z.number().int(),
|
||||||
|
}).strict();
|
||||||
|
|
||||||
|
const EventRemoveAttachmentModel = z.object({
|
||||||
|
attachments: z.array(z.string().uuid()),
|
||||||
|
}).strict();
|
||||||
|
|
||||||
|
const EventRemoveAttendeeModel = z.object({
|
||||||
|
attendees: z.array(z.string().uuid()),
|
||||||
|
}).strict();
|
||||||
|
|
||||||
|
const EventUpdateModel = z.object({
|
||||||
|
subject: z.string().min(1),
|
||||||
|
body: z.string().min(1),
|
||||||
|
location: z.string().min(1),
|
||||||
|
startDate: z.string().datetime(),
|
||||||
|
endDate: z.string().datetime(),
|
||||||
|
isAllDayEvent: z.boolean(),
|
||||||
|
updateAllEvents: z.boolean(),
|
||||||
|
recurrence: z.object({
|
||||||
|
frequency: ERecurringType,
|
||||||
|
occurrences: z.number().int(),
|
||||||
|
}),
|
||||||
|
}).strict();
|
||||||
|
|
||||||
|
const EventUpdateStatusModel = z.object({
|
||||||
|
status: EEventStatus,
|
||||||
|
comment: z.string().nullable().optional(),
|
||||||
|
}).strict();
|
||||||
|
|
||||||
|
const ProblemDetails = z.object({
|
||||||
|
type: z.string().nullable().optional(),
|
||||||
|
title: z.string().nullable().optional(),
|
||||||
|
status: z.number().int().nullable().optional(),
|
||||||
|
detail: z.string().nullable().optional(),
|
||||||
|
instance: z.string().nullable().optional(),
|
||||||
|
}).strict();
|
||||||
|
|
||||||
|
const ResponseSimpleModel = z.object({
|
||||||
|
success: z.boolean(),
|
||||||
|
message: z.string().nullable().optional(),
|
||||||
|
data: z.any().nullable().optional(),
|
||||||
|
}).strict();
|
||||||
|
|
||||||
|
const Bearer = z.object({
|
||||||
|
type: z.literal('http'),
|
||||||
|
description: z.string().optional(),
|
||||||
|
scheme: z.literal('bearer'),
|
||||||
|
}).strict();
|
||||||
|
|
||||||
|
export {
|
||||||
|
AttachCommunicationInputModel,
|
||||||
|
AttachmentInputModel,
|
||||||
|
AttendeeCommunicationInputModel,
|
||||||
|
AttendeeExternalInputModel,
|
||||||
|
AttendeeInputModel,
|
||||||
|
EAttendeeType,
|
||||||
|
EEventCategory,
|
||||||
|
EEventFilterCategory,
|
||||||
|
EEventFilterStatus,
|
||||||
|
EEventFilterType,
|
||||||
|
EEventOwnerType,
|
||||||
|
EEventStatus,
|
||||||
|
EEventType,
|
||||||
|
ERecurringType,
|
||||||
|
EventAddAttachmentModel,
|
||||||
|
EventAddAttendeeModel,
|
||||||
|
EventCommunicationInputModel,
|
||||||
|
EventInputModel,
|
||||||
|
EventRecurrenceInputModel,
|
||||||
|
EventRemoveAttachmentModel,
|
||||||
|
EventRemoveAttendeeModel,
|
||||||
|
EventUpdateModel,
|
||||||
|
EventUpdateStatusModel,
|
||||||
|
ProblemDetails,
|
||||||
|
ResponseSimpleModel,
|
||||||
|
Bearer,
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user