Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return the ID of a created appointment from createAppointment #84

Merged
merged 3 commits into from
Oct 26, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/batch-client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export class ZimbraBatchClient {
...denormalize(CalendarItemCreateModifyRequest)(appointment)
},
accountName: accountName
});
}).then(({ invId }) => ({ inviteId: invId, created: !!invId }));

public createAppointmentException = (
accountName: string,
Expand Down
7 changes: 6 additions & 1 deletion src/schema/generated-schema-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ export interface Mutation {
checkCalendar?: boolean | null;
contactAction?: ActionOpResponse | null;
conversationAction?: boolean | null;
createAppointment?: boolean | null;
createAppointment?: createAppointmentResponse | null;
createAppointmentException?: boolean | null;
createCalendar?: boolean | null;
createContact?: Contact | null;
Expand Down Expand Up @@ -1057,6 +1057,11 @@ export interface ActionOpResponseData {
op: string;
}

export interface createAppointmentResponse {
created?: boolean | null;
inviteId?: string | null;
}

export interface SignatureResponse {
signature?: NameId[] | null;
}
Expand Down
7 changes: 6 additions & 1 deletion src/schema/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2010,6 +2010,11 @@ type SMimeMessage {
content: String
}

type createAppointmentResponse {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of creating new type just for two keys, we should use existing type available for appointments (CalendarItemHitInfo)

created: Boolean
inviteId: String
}

##### End Of SMIME Certificates type #####

type ActionOpResponseData {
Expand Down Expand Up @@ -2159,7 +2164,7 @@ type Mutation {
ids: [ID!]!
op: String!
): Boolean
createAppointment(accountName: String, appointment: CalendarItemInput!): Boolean
createAppointment(accountName: String, appointment: CalendarItemInput!): createAppointmentResponse
createAppointmentException(accountName: String, appointment: CalendarItemInput!): Boolean
createCalendar(name: String!, color: Int!, url: String): Boolean
createContact(contact: CreateContactInput!): Contact
Expand Down