Skip to content

Commit

Permalink
PREAPPS-5955: Added Local flag for getMessage, fixed lint errors
Browse files Browse the repository at this point in the history
PREAPPS-5955: Added isLocal flag for getMessagesMetadata query

PREAPPS-5955: Reverted local flag for  metaData

PREAPPS-5955-1: Added isLocal flag for download and get<essage queries
  • Loading branch information
sachinpatel88 authored and silentsakky committed May 14, 2021
1 parent 7b83689 commit 735a8f9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/batch-client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,13 +301,13 @@ export class ZimbraBatchClient {
public origin: string;
public sessionId: any;
public soapPathname: string;
private authToken?: string;
private batchDataLoader: DataLoader<RequestOptions, RequestBody>;
private csrfToken?: string;
private dataLoader: DataLoader<RequestOptions, RequestBody>;
private jwtToken?: string;
private sessionHandler?: SessionHandler;
private userAgent?: {};
private authToken?: string;

constructor(options: ZimbraClientOptions = {}) {
this.sessionHandler = options.sessionHandler;
Expand Down Expand Up @@ -335,7 +335,7 @@ export class ZimbraBatchClient {
cache: false
});

if(options.requestAPI){
if (options.requestAPI) {
setRequestAPI(options.requestAPI);
}
}
Expand Down
9 changes: 5 additions & 4 deletions src/batch-client/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@ export type SessionHandler = {
};

export interface ZimbraClientOptions {
authToken?: string;
csrfToken?: string;
jwtToken?: string;
localStoreClient?: any;
notificationHandler?: NotificationHandler;
requestAPI?: any;
sessionHandler?: SessionHandler;
soapPathname?: string;
userAgent?: UserAgent;
zimbraOrigin?: string;
authToken?: string;
requestAPI?: any;
}

export interface FreeBusyOptions {
Expand Down Expand Up @@ -115,11 +115,11 @@ export interface GetFolderOptions {
path?: string;
uuid?: string;
};
local?: boolean;
needGranteeName?: boolean;
traverseMountpoints?: boolean;
view?: FolderView;
visible?: boolean;
local: boolean;
}

export interface GetDocumentShareURLItemOptions {
Expand Down Expand Up @@ -150,6 +150,7 @@ export interface GetMailItemOptions {
html?: boolean;
id: string;
ids: [String];
isLocal?: boolean;
max?: number;
needExp?: boolean;
}
Expand Down Expand Up @@ -257,12 +258,12 @@ export interface ActionOptions {
folderId?: string;
id?: string;
ids?: Array<string>;
isLocal?: boolean;
name?: string;
op: string;
recursive?: Boolean;
rgb?: string;
tagNames?: string;
isLocal?: boolean;
}

export enum ActionType {
Expand Down
2 changes: 2 additions & 0 deletions src/schema/generated-schema-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3302,6 +3302,7 @@ export type QueryClientInfoArgs = {
export type QueryDownloadMessageArgs = {
id: Scalars['ID'];
isSecure?: Maybe<Scalars['Boolean']>;
isLocal?: Maybe<Scalars['Boolean']>;
};


Expand Down Expand Up @@ -3426,6 +3427,7 @@ export type QueryGetMessageArgs = {
id: Scalars['ID'];
header?: Maybe<Array<Maybe<MailItemHeaderInput>>>;
html?: Maybe<Scalars['Boolean']>;
isLocal?: Maybe<Scalars['Boolean']>;
max?: Maybe<Scalars['Int']>;
needExp?: Maybe<Scalars['Boolean']>;
neuter?: Maybe<Scalars['Boolean']>;
Expand Down
5 changes: 3 additions & 2 deletions src/schema/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -3093,7 +3093,7 @@ type Query {
needExp: Boolean
): AutoCompleteGALResponse
clientInfo(by: String, domain: String): ClientInfoType
downloadMessage(id: ID!, isSecure: Boolean): SMimeMessage
downloadMessage(id: ID!, isSecure: Boolean, isLocal: Boolean): SMimeMessage
downloadAttachment(id: ID!, part: ID!): Attachment
downloadDocument(id: ID!, url: String!): Attachment
discoverRights: DiscoverRights
Expand Down Expand Up @@ -3168,6 +3168,7 @@ type Query {
id: ID!
header: [MailItemHeaderInput]
html: Boolean
isLocal: Boolean
max: Int
needExp: Boolean
neuter: Boolean
Expand All @@ -3176,7 +3177,7 @@ type Query {
read: Boolean
ridZ: String
): MessageInfo
getMessagesMetadata(ids: [ID!]!): [MessageInfo]
getMessagesMetadata(ids: [ID!]!, isLocal: Boolean): [MessageInfo]
getRights(input: GetRightsInput!): RightsResponse
getSMimePublicCerts(
contactAddr: String!
Expand Down

0 comments on commit 735a8f9

Please sign in to comment.