@droz-js/sdk 0.9.49 → 0.9.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@droz-js/sdk",
3
3
  "description": "Droz SDK",
4
- "version": "0.9.49",
4
+ "version": "0.9.50",
5
5
  "private": false,
6
6
  "exports": {
7
7
  ".": "./src/index.js",
@@ -115,6 +115,30 @@ declare const DrozChatWs_base: new () => {
115
115
  onTicketMessage(variables: import("./sdks/drozchat").Exact<{
116
116
  ticketId: import("./sdks/drozchat").Scalars["ID"]["input"];
117
117
  }>, options?: unknown): AsyncIterableIterator<import("./sdks/drozchat").OnTicketMessageSubscription>;
118
+ getView(variables: import("./sdks/drozchat").Exact<{
119
+ id: import("./sdks/drozchat").Scalars["ID"]["input"];
120
+ }>, options?: unknown): Promise<import("./sdks/drozchat").GetViewQuery>;
121
+ listViews(variables?: import("./sdks/drozchat").Exact<{
122
+ [key: string]: never;
123
+ }>, options?: unknown): Promise<import("./sdks/drozchat").ListViewsQuery>;
124
+ listViewsByChannel(variables: import("./sdks/drozchat").Exact<{
125
+ channelId: import("./sdks/drozchat").Scalars["ID"]["input"];
126
+ }>, options?: unknown): Promise<import("./sdks/drozchat").ListViewsByChannelQuery>;
127
+ listTicketsByView(variables: import("./sdks/drozchat").Exact<{
128
+ id: import("./sdks/drozchat").Scalars["ID"]["input"];
129
+ }>, options?: unknown): Promise<import("./sdks/drozchat").ListTicketsByViewQuery>;
130
+ createView(variables: import("./sdks/drozchat").Exact<{
131
+ input: import("./sdks/drozchat").CreateViewInput;
132
+ }>, options?: unknown): Promise<import("./sdks/drozchat").CreateViewMutation>;
133
+ cloneView(variables: import("./sdks/drozchat").Exact<{
134
+ input: import("./sdks/drozchat").CloneViewInput;
135
+ }>, options?: unknown): Promise<import("./sdks/drozchat").CloneViewMutation>;
136
+ updateView(variables: import("./sdks/drozchat").Exact<{
137
+ input: import("./sdks/drozchat").UpdateViewInput;
138
+ }>, options?: unknown): Promise<import("./sdks/drozchat").UpdateViewMutation>;
139
+ deleteView(variables: import("./sdks/drozchat").Exact<{
140
+ input: import("./sdks/drozchat").DeleteViewInput;
141
+ }>, options?: unknown): Promise<import("./sdks/drozchat").DeleteViewMutation>;
118
142
  };
119
143
  export declare class DrozChatWs extends DrozChatWs_base {
120
144
  }
package/src/drozchat.d.ts CHANGED
@@ -118,6 +118,30 @@ declare const DrozChat_base: new (options?: import("./client/http").HttpClientOp
118
118
  onTicketMessage(variables: import("./sdks/drozchat").Exact<{
119
119
  ticketId: import("./sdks/drozchat").Scalars["ID"]["input"];
120
120
  }>, options?: unknown): AsyncIterableIterator<import("./sdks/drozchat").OnTicketMessageSubscription>;
121
+ getView(variables: import("./sdks/drozchat").Exact<{
122
+ id: import("./sdks/drozchat").Scalars["ID"]["input"];
123
+ }>, options?: unknown): Promise<import("./sdks/drozchat").GetViewQuery>;
124
+ listViews(variables?: import("./sdks/drozchat").Exact<{
125
+ [key: string]: never;
126
+ }>, options?: unknown): Promise<import("./sdks/drozchat").ListViewsQuery>;
127
+ listViewsByChannel(variables: import("./sdks/drozchat").Exact<{
128
+ channelId: import("./sdks/drozchat").Scalars["ID"]["input"];
129
+ }>, options?: unknown): Promise<import("./sdks/drozchat").ListViewsByChannelQuery>;
130
+ listTicketsByView(variables: import("./sdks/drozchat").Exact<{
131
+ id: import("./sdks/drozchat").Scalars["ID"]["input"];
132
+ }>, options?: unknown): Promise<import("./sdks/drozchat").ListTicketsByViewQuery>;
133
+ createView(variables: import("./sdks/drozchat").Exact<{
134
+ input: import("./sdks/drozchat").CreateViewInput;
135
+ }>, options?: unknown): Promise<import("./sdks/drozchat").CreateViewMutation>;
136
+ cloneView(variables: import("./sdks/drozchat").Exact<{
137
+ input: import("./sdks/drozchat").CloneViewInput;
138
+ }>, options?: unknown): Promise<import("./sdks/drozchat").CloneViewMutation>;
139
+ updateView(variables: import("./sdks/drozchat").Exact<{
140
+ input: import("./sdks/drozchat").UpdateViewInput;
141
+ }>, options?: unknown): Promise<import("./sdks/drozchat").UpdateViewMutation>;
142
+ deleteView(variables: import("./sdks/drozchat").Exact<{
143
+ input: import("./sdks/drozchat").DeleteViewInput;
144
+ }>, options?: unknown): Promise<import("./sdks/drozchat").DeleteViewMutation>;
121
145
  };
122
146
  export declare class DrozChat extends DrozChat_base {
123
147
  }
@@ -176,6 +176,10 @@ export type ChannelSearchResultsFacetValue = {
176
176
  count: Scalars['Float']['output'];
177
177
  value: Scalars['String']['output'];
178
178
  };
179
+ export type CloneViewInput = {
180
+ channelId: Scalars['ID']['input'];
181
+ id: Scalars['ID']['input'];
182
+ };
179
183
  export type CloseTicketInput = {
180
184
  ticketId: Scalars['ID']['input'];
181
185
  };
@@ -203,9 +207,17 @@ export type CreateTicketMessageInput = {
203
207
  export type CreateTicketTagInput = {
204
208
  tags: Array<Scalars['Tag']['input']>;
205
209
  };
210
+ export type CreateViewInput = {
211
+ channelId: Scalars['ID']['input'];
212
+ filters: TicketSearchFilterInput;
213
+ name: Scalars['String']['input'];
214
+ };
206
215
  export type DeleteTicketTagInput = {
207
216
  tags: Array<Scalars['String']['input']>;
208
217
  };
218
+ export type DeleteViewInput = {
219
+ id: Scalars['ID']['input'];
220
+ };
209
221
  export type DisableDrozChatChannelInput = {
210
222
  id: Scalars['ID']['input'];
211
223
  };
@@ -263,13 +275,16 @@ export type Mutation = {
263
275
  addTagsToTicket: Ticket;
264
276
  assignTicket: Ticket;
265
277
  assignTicketMyself: Ticket;
278
+ cloneView: View;
266
279
  closeTicket: Ticket;
267
280
  createDrozChatChannel?: Maybe<DrozChatChannel>;
268
281
  createTags: Array<TicketTag>;
269
282
  createTicket: Ticket;
270
283
  createTicketMessage: TicketMessage;
271
284
  createTicketMessageForStorage: TicketMessage;
285
+ createView: View;
272
286
  deleteTags: Array<Maybe<TicketTag>>;
287
+ deleteView: View;
273
288
  disableDrozChatChannel?: Maybe<DrozChatChannel>;
274
289
  enableDrozChatChannel?: Maybe<DrozChatChannel>;
275
290
  generateAnalyticsToken?: Maybe<AnalyticsToken>;
@@ -280,6 +295,7 @@ export type Mutation = {
280
295
  unassignTicket: Ticket;
281
296
  updateDrozChatChannel?: Maybe<DrozChatChannel>;
282
297
  updateTicket: Ticket;
298
+ updateView: View;
283
299
  version?: Maybe<Scalars['String']['output']>;
284
300
  };
285
301
  export type MutationAddDrozChatChannelAgentArgs = {
@@ -294,6 +310,9 @@ export type MutationAssignTicketArgs = {
294
310
  export type MutationAssignTicketMyselfArgs = {
295
311
  input: AssignTicketMyselfInput;
296
312
  };
313
+ export type MutationCloneViewArgs = {
314
+ input: CloneViewInput;
315
+ };
297
316
  export type MutationCloseTicketArgs = {
298
317
  input: CloseTicketInput;
299
318
  };
@@ -312,9 +331,15 @@ export type MutationCreateTicketMessageArgs = {
312
331
  export type MutationCreateTicketMessageForStorageArgs = {
313
332
  input: CreateTicketMessageForStorageInput;
314
333
  };
334
+ export type MutationCreateViewArgs = {
335
+ input: CreateViewInput;
336
+ };
315
337
  export type MutationDeleteTagsArgs = {
316
338
  input: DeleteTicketTagInput;
317
339
  };
340
+ export type MutationDeleteViewArgs = {
341
+ input: DeleteViewInput;
342
+ };
318
343
  export type MutationDisableDrozChatChannelArgs = {
319
344
  input: DisableDrozChatChannelInput;
320
345
  };
@@ -342,6 +367,9 @@ export type MutationUpdateDrozChatChannelArgs = {
342
367
  export type MutationUpdateTicketArgs = {
343
368
  input: UpdateTicketInput;
344
369
  };
370
+ export type MutationUpdateViewArgs = {
371
+ input: UpdateViewInput;
372
+ };
345
373
  export type NumberMatcher = {
346
374
  btw?: Maybe<Array<Scalars['Number']['output']>>;
347
375
  eq?: Maybe<Scalars['Number']['output']>;
@@ -369,6 +397,7 @@ export type Query = {
369
397
  getDrozChatChannel?: Maybe<DrozChatChannel>;
370
398
  getHttpEndpoint?: Maybe<Scalars['String']['output']>;
371
399
  getTicket?: Maybe<Ticket>;
400
+ getView?: Maybe<View>;
372
401
  getWsEndpoint?: Maybe<Scalars['String']['output']>;
373
402
  listDrozChatAgentChannels: Array<DrozChatChannel>;
374
403
  listDrozChatChannels: Array<DrozChatChannel>;
@@ -376,7 +405,10 @@ export type Query = {
376
405
  listTicketInternalNotes: TicketMessagesConnection;
377
406
  listTicketMessages: TicketMessagesConnection;
378
407
  listTickets: TicketsConnection;
408
+ listTicketsByView: Array<Ticket>;
379
409
  listTicketsInProgressMine: TicketsConnection;
410
+ listViews: Array<View>;
411
+ listViewsByChannel: Array<View>;
380
412
  searchTickets?: Maybe<TicketsSearchResults>;
381
413
  version?: Maybe<Scalars['String']['output']>;
382
414
  };
@@ -386,6 +418,9 @@ export type QueryGetDrozChatChannelArgs = {
386
418
  export type QueryGetTicketArgs = {
387
419
  id: Scalars['ID']['input'];
388
420
  };
421
+ export type QueryGetViewArgs = {
422
+ id: Scalars['ID']['input'];
423
+ };
389
424
  export type QueryListDrozChatAgentChannelsArgs = {
390
425
  agentId: Scalars['ID']['input'];
391
426
  };
@@ -407,9 +442,15 @@ export type QueryListTicketsArgs = {
407
442
  state: TicketState;
408
443
  status?: InputMaybe<Array<TicketStatus>>;
409
444
  };
445
+ export type QueryListTicketsByViewArgs = {
446
+ id: Scalars['ID']['input'];
447
+ };
410
448
  export type QueryListTicketsInProgressMineArgs = {
411
449
  next?: InputMaybe<Scalars['Base64']['input']>;
412
450
  };
451
+ export type QueryListViewsByChannelArgs = {
452
+ channelId: Scalars['ID']['input'];
453
+ };
413
454
  export type QuerySearchTicketsArgs = {
414
455
  filters?: InputMaybe<Array<TicketSearchFilterInput>>;
415
456
  page?: InputMaybe<Scalars['Number']['input']>;
@@ -561,6 +602,19 @@ export declare enum TicketPriority {
561
602
  Medium = "MEDIUM",
562
603
  Urgent = "URGENT"
563
604
  }
605
+ export type TicketSearchFilter = {
606
+ AND?: Maybe<Array<TicketSearchFilter>>;
607
+ OR?: Maybe<Array<TicketSearchFilter>>;
608
+ assigneeId?: Maybe<StringMatcher>;
609
+ channelId?: Maybe<StringMatcher>;
610
+ createdAt?: Maybe<NumberMatcher>;
611
+ customerId?: Maybe<StringMatcher>;
612
+ priority?: Maybe<StringMatcher>;
613
+ protocol?: Maybe<StringMatcher>;
614
+ state?: Maybe<StringMatcher>;
615
+ status?: Maybe<StringMatcher>;
616
+ tags?: Maybe<StringMatcher>;
617
+ };
564
618
  export type TicketSearchFilterInput = {
565
619
  AND?: InputMaybe<Array<TicketSearchFilterInput>>;
566
620
  OR?: InputMaybe<Array<TicketSearchFilterInput>>;
@@ -662,7 +716,8 @@ export declare enum Typenames {
662
716
  Tags = "Tags",
663
717
  TicketMappings = "TicketMappings",
664
718
  TicketMessages = "TicketMessages",
665
- Tickets = "Tickets"
719
+ Tickets = "Tickets",
720
+ Views = "Views"
666
721
  }
667
722
  export type UnassignTicketInput = {
668
723
  ticketId: Scalars['ID']['input'];
@@ -677,6 +732,20 @@ export type UpdateTicketInput = {
677
732
  priority?: InputMaybe<TicketPriority>;
678
733
  subject?: InputMaybe<Scalars['String']['input']>;
679
734
  };
735
+ export type UpdateViewInput = {
736
+ channelId?: InputMaybe<Scalars['ID']['input']>;
737
+ filters?: InputMaybe<TicketSearchFilterInput>;
738
+ id: Scalars['ID']['input'];
739
+ name?: InputMaybe<Scalars['String']['input']>;
740
+ };
741
+ export type View = {
742
+ channelId: Scalars['ID']['output'];
743
+ createdAt: Scalars['DateTime']['output'];
744
+ filters: Scalars['JSONObject']['output'];
745
+ id: Scalars['ID']['output'];
746
+ name: Scalars['String']['output'];
747
+ updatedAt: Scalars['DateTime']['output'];
748
+ };
680
749
  export type GenerateAnalyticsTokenMutationVariables = Exact<{
681
750
  [key: string]: never;
682
751
  }>;
@@ -956,6 +1025,55 @@ export type OnTicketMessageSubscription = {
956
1025
  message: TicketMessageFragment;
957
1026
  });
958
1027
  };
1028
+ export type ViewFragment = Pick<View, 'id' | 'name' | 'channelId' | 'filters' | 'createdAt' | 'updatedAt'>;
1029
+ export type GetViewQueryVariables = Exact<{
1030
+ id: Scalars['ID']['input'];
1031
+ }>;
1032
+ export type GetViewQuery = {
1033
+ getView?: Maybe<ViewFragment>;
1034
+ };
1035
+ export type ListViewsQueryVariables = Exact<{
1036
+ [key: string]: never;
1037
+ }>;
1038
+ export type ListViewsQuery = {
1039
+ listViews: Array<ViewFragment>;
1040
+ };
1041
+ export type ListViewsByChannelQueryVariables = Exact<{
1042
+ channelId: Scalars['ID']['input'];
1043
+ }>;
1044
+ export type ListViewsByChannelQuery = {
1045
+ listViewsByChannel: Array<ViewFragment>;
1046
+ };
1047
+ export type ListTicketsByViewQueryVariables = Exact<{
1048
+ id: Scalars['ID']['input'];
1049
+ }>;
1050
+ export type ListTicketsByViewQuery = {
1051
+ listTicketsByView: Array<TicketFragment>;
1052
+ };
1053
+ export type CreateViewMutationVariables = Exact<{
1054
+ input: CreateViewInput;
1055
+ }>;
1056
+ export type CreateViewMutation = {
1057
+ createView: ViewFragment;
1058
+ };
1059
+ export type CloneViewMutationVariables = Exact<{
1060
+ input: CloneViewInput;
1061
+ }>;
1062
+ export type CloneViewMutation = {
1063
+ cloneView: ViewFragment;
1064
+ };
1065
+ export type UpdateViewMutationVariables = Exact<{
1066
+ input: UpdateViewInput;
1067
+ }>;
1068
+ export type UpdateViewMutation = {
1069
+ updateView: ViewFragment;
1070
+ };
1071
+ export type DeleteViewMutationVariables = Exact<{
1072
+ input: DeleteViewInput;
1073
+ }>;
1074
+ export type DeleteViewMutation = {
1075
+ deleteView: ViewFragment;
1076
+ };
959
1077
  export declare const DrozChatAgentFragmentDoc = "\n fragment drozChatAgent on DrozChatAgent {\n id\n name\n}\n ";
960
1078
  export declare const TagFragmentDoc = "\n fragment tag on TicketTag {\n name\n createdBy {\n ...drozChatAgent\n }\n createdAt\n updatedAt\n}\n ";
961
1079
  export declare const CustomerFragmentDoc = "\n fragment customer on DrozChatCustomer {\n id\n name\n alternateName\n email\n phone\n document\n externalId\n emails\n phones\n documents\n externalIds\n createdAt\n updatedAt\n}\n ";
@@ -967,6 +1085,7 @@ export declare const TicketWithSessionFragmentDoc = "\n fragment ticketWithSe
967
1085
  export declare const DrozChatUserFragmentDoc = "\n fragment drozChatUser on DrozChatUser {\n ... on DrozChatAgent {\n id\n name\n }\n ... on DrozChatCustomer {\n id\n name\n }\n}\n ";
968
1086
  export declare const TicketMessageFragmentDoc = "\n fragment ticketMessage on TicketMessage {\n id\n ticketId\n from\n to\n sender {\n ...drozChatUser\n }\n channelId\n contentType\n content\n filename\n size\n type\n createdAt\n updatedAt\n}\n ";
969
1087
  export declare const FacetsFragmentDoc = "\n fragment facets on TicketsSearchResultsFacet {\n ... on SearchResultsFacet {\n name\n values {\n value\n count\n }\n stats {\n min\n max\n }\n }\n ... on AgentSearchResultsFacet {\n name\n values {\n value\n agent {\n id\n name\n }\n count\n }\n stats {\n min\n max\n }\n }\n ... on ChannelSearchResultsFacet {\n name\n values {\n value\n channel {\n id\n name\n }\n count\n }\n stats {\n min\n max\n }\n }\n}\n ";
1088
+ export declare const ViewFragmentDoc = "\n fragment view on View {\n id\n name\n channelId\n filters\n createdAt\n updatedAt\n}\n ";
970
1089
  export declare const GenerateAnalyticsTokenDocument = "\n mutation generateAnalyticsToken {\n generateAnalyticsToken {\n token\n }\n}\n ";
971
1090
  export declare const GetDrozChatChannelDocument = "\n query getDrozChatChannel($id: ID!) {\n getDrozChatChannel(id: $id) {\n ...drozChatChannel\n }\n}\n \n fragment drozChatChannel on DrozChatChannel {\n id\n name\n drn\n agentIds\n createdAt\n updatedAt\n}\n ";
972
1091
  export declare const ListDrozChatChannelsDocument = "\n query listDrozChatChannels {\n listDrozChatChannels {\n ...drozChatChannel\n }\n}\n \n fragment drozChatChannel on DrozChatChannel {\n id\n name\n drn\n agentIds\n createdAt\n updatedAt\n}\n ";
@@ -1001,6 +1120,14 @@ export declare const TransferTicketToChannelDocument = "\n mutation transferT
1001
1120
  export declare const OnTicketInProgressMineDocument = "\n subscription onTicketInProgressMine {\n onTicketInProgressMine {\n ticket {\n ...ticketWithSession\n }\n action\n }\n}\n \n fragment ticketWithSession on Ticket {\n ...ticket\n sessionAttributes {\n ...sessionAttributes\n }\n}\n \n\n fragment ticket on Ticket {\n channelId\n id\n subject\n state\n status\n priority\n tags\n externalProviderId\n externalId\n protocol\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\n }\n triggerApp {\n ...ticketTriggerApp\n }\n channel {\n ...drozChatChannel\n }\n createdAt\n updatedAt\n assignedAt\n closedAt\n lastMessageAt\n firstAgentResponseAt\n timeToFirstAgentResponseInMs\n timeToCloseInMs\n messagesCount\n lastMessage\n unreadMessagesCount\n}\n \n\n fragment drozChatAgent on DrozChatAgent {\n id\n name\n}\n \n\n fragment customer on DrozChatCustomer {\n id\n name\n alternateName\n email\n phone\n document\n externalId\n emails\n phones\n documents\n externalIds\n createdAt\n updatedAt\n}\n \n\n fragment ticketTriggerApp on TicketTriggerApp {\n drn\n name\n appId\n appName\n appColor\n channels {\n id\n main\n readonly\n hidden\n sources\n unreadMessagesCount\n }\n}\n \n\n fragment drozChatChannel on DrozChatChannel {\n id\n name\n drn\n agentIds\n createdAt\n updatedAt\n}\n \n\n fragment sessionAttributes on TicketSessionAttributes {\n organization\n source\n order\n products\n review\n tags\n}\n ";
1002
1121
  export declare const OnTicketByStateDocument = "\n subscription onTicketByState($state: TicketState!) {\n onTicketByState(state: $state) {\n ticket {\n ...ticketWithSession\n }\n action\n }\n}\n \n fragment ticketWithSession on Ticket {\n ...ticket\n sessionAttributes {\n ...sessionAttributes\n }\n}\n \n\n fragment ticket on Ticket {\n channelId\n id\n subject\n state\n status\n priority\n tags\n externalProviderId\n externalId\n protocol\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\n }\n triggerApp {\n ...ticketTriggerApp\n }\n channel {\n ...drozChatChannel\n }\n createdAt\n updatedAt\n assignedAt\n closedAt\n lastMessageAt\n firstAgentResponseAt\n timeToFirstAgentResponseInMs\n timeToCloseInMs\n messagesCount\n lastMessage\n unreadMessagesCount\n}\n \n\n fragment drozChatAgent on DrozChatAgent {\n id\n name\n}\n \n\n fragment customer on DrozChatCustomer {\n id\n name\n alternateName\n email\n phone\n document\n externalId\n emails\n phones\n documents\n externalIds\n createdAt\n updatedAt\n}\n \n\n fragment ticketTriggerApp on TicketTriggerApp {\n drn\n name\n appId\n appName\n appColor\n channels {\n id\n main\n readonly\n hidden\n sources\n unreadMessagesCount\n }\n}\n \n\n fragment drozChatChannel on DrozChatChannel {\n id\n name\n drn\n agentIds\n createdAt\n updatedAt\n}\n \n\n fragment sessionAttributes on TicketSessionAttributes {\n organization\n source\n order\n products\n review\n tags\n}\n ";
1003
1122
  export declare const OnTicketMessageDocument = "\n subscription onTicketMessage($ticketId: ID!) {\n onTicketMessage(ticketId: $ticketId) {\n message {\n ...ticketMessage\n }\n action\n }\n}\n \n fragment ticketMessage on TicketMessage {\n id\n ticketId\n from\n to\n sender {\n ...drozChatUser\n }\n channelId\n contentType\n content\n filename\n size\n type\n createdAt\n updatedAt\n}\n \n\n fragment drozChatUser on DrozChatUser {\n ... on DrozChatAgent {\n id\n name\n }\n ... on DrozChatCustomer {\n id\n name\n }\n}\n ";
1123
+ export declare const GetViewDocument = "\n query getView($id: ID!) {\n getView(id: $id) {\n ...view\n }\n}\n \n fragment view on View {\n id\n name\n channelId\n filters\n createdAt\n updatedAt\n}\n ";
1124
+ export declare const ListViewsDocument = "\n query listViews {\n listViews {\n ...view\n }\n}\n \n fragment view on View {\n id\n name\n channelId\n filters\n createdAt\n updatedAt\n}\n ";
1125
+ export declare const ListViewsByChannelDocument = "\n query listViewsByChannel($channelId: ID!) {\n listViewsByChannel(channelId: $channelId) {\n ...view\n }\n}\n \n fragment view on View {\n id\n name\n channelId\n filters\n createdAt\n updatedAt\n}\n ";
1126
+ export declare const ListTicketsByViewDocument = "\n query listTicketsByView($id: ID!) {\n listTicketsByView(id: $id) {\n ...ticket\n }\n}\n \n fragment ticket on Ticket {\n channelId\n id\n subject\n state\n status\n priority\n tags\n externalProviderId\n externalId\n protocol\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\n }\n triggerApp {\n ...ticketTriggerApp\n }\n channel {\n ...drozChatChannel\n }\n createdAt\n updatedAt\n assignedAt\n closedAt\n lastMessageAt\n firstAgentResponseAt\n timeToFirstAgentResponseInMs\n timeToCloseInMs\n messagesCount\n lastMessage\n unreadMessagesCount\n}\n \n\n fragment drozChatAgent on DrozChatAgent {\n id\n name\n}\n \n\n fragment customer on DrozChatCustomer {\n id\n name\n alternateName\n email\n phone\n document\n externalId\n emails\n phones\n documents\n externalIds\n createdAt\n updatedAt\n}\n \n\n fragment ticketTriggerApp on TicketTriggerApp {\n drn\n name\n appId\n appName\n appColor\n channels {\n id\n main\n readonly\n hidden\n sources\n unreadMessagesCount\n }\n}\n \n\n fragment drozChatChannel on DrozChatChannel {\n id\n name\n drn\n agentIds\n createdAt\n updatedAt\n}\n ";
1127
+ export declare const CreateViewDocument = "\n mutation createView($input: CreateViewInput!) {\n createView(input: $input) {\n ...view\n }\n}\n \n fragment view on View {\n id\n name\n channelId\n filters\n createdAt\n updatedAt\n}\n ";
1128
+ export declare const CloneViewDocument = "\n mutation cloneView($input: CloneViewInput!) {\n cloneView(input: $input) {\n ...view\n }\n}\n \n fragment view on View {\n id\n name\n channelId\n filters\n createdAt\n updatedAt\n}\n ";
1129
+ export declare const UpdateViewDocument = "\n mutation updateView($input: UpdateViewInput!) {\n updateView(input: $input) {\n ...view\n }\n}\n \n fragment view on View {\n id\n name\n channelId\n filters\n createdAt\n updatedAt\n}\n ";
1130
+ export declare const DeleteViewDocument = "\n mutation deleteView($input: DeleteViewInput!) {\n deleteView(input: $input) {\n ...view\n }\n}\n \n fragment view on View {\n id\n name\n channelId\n filters\n createdAt\n updatedAt\n}\n ";
1004
1131
  export type Requester<C = {}> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | AsyncIterableIterator<R>;
1005
1132
  export declare function getSdk<C>(requester: Requester<C>): {
1006
1133
  generateAnalyticsToken(variables?: GenerateAnalyticsTokenMutationVariables, options?: C): Promise<GenerateAnalyticsTokenMutation>;
@@ -1037,6 +1164,14 @@ export declare function getSdk<C>(requester: Requester<C>): {
1037
1164
  onTicketInProgressMine(variables?: OnTicketInProgressMineSubscriptionVariables, options?: C): AsyncIterableIterator<OnTicketInProgressMineSubscription>;
1038
1165
  onTicketByState(variables: OnTicketByStateSubscriptionVariables, options?: C): AsyncIterableIterator<OnTicketByStateSubscription>;
1039
1166
  onTicketMessage(variables: OnTicketMessageSubscriptionVariables, options?: C): AsyncIterableIterator<OnTicketMessageSubscription>;
1167
+ getView(variables: GetViewQueryVariables, options?: C): Promise<GetViewQuery>;
1168
+ listViews(variables?: ListViewsQueryVariables, options?: C): Promise<ListViewsQuery>;
1169
+ listViewsByChannel(variables: ListViewsByChannelQueryVariables, options?: C): Promise<ListViewsByChannelQuery>;
1170
+ listTicketsByView(variables: ListTicketsByViewQueryVariables, options?: C): Promise<ListTicketsByViewQuery>;
1171
+ createView(variables: CreateViewMutationVariables, options?: C): Promise<CreateViewMutation>;
1172
+ cloneView(variables: CloneViewMutationVariables, options?: C): Promise<CloneViewMutation>;
1173
+ updateView(variables: UpdateViewMutationVariables, options?: C): Promise<UpdateViewMutation>;
1174
+ deleteView(variables: DeleteViewMutationVariables, options?: C): Promise<DeleteViewMutation>;
1040
1175
  };
1041
1176
  export type Sdk = ReturnType<typeof getSdk>;
1042
1177
  export declare const serviceName = "@droz/drozchat";
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /* istanbul ignore file */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.AddTagsToTicketDocument = exports.CloseTicketDocument = exports.UnassignTicketDocument = exports.AssignTicketMyselfDocument = exports.AssignTicketDocument = exports.CreateTicketMessageForStorageDocument = exports.CreateTicketMessageDocument = exports.MarkTicketMessagesAsReadDocument = exports.UpdateTicketDocument = exports.CreateTicketDocument = exports.SearchTicketsDocument = exports.ListTicketInternalNotesDocument = exports.ListTicketMessagesDocument = exports.ListTicketsInProgressMineDocument = exports.ListTicketsDocument = exports.GetTicketDocument = exports.DeleteTagsDocument = exports.CreateTagsDocument = exports.ListTagsDocument = exports.RemoveDrozChatChannelAgentDocument = exports.AddDrozChatChannelAgentDocument = exports.EnableDrozChatChannelDocument = exports.DisableDrozChatChannelDocument = exports.UpdateDrozChatChannelDocument = exports.CreateDrozChatChannelDocument = exports.ListDrozChatAgentChannelsDocument = exports.ListDrozChatChannelsDocument = exports.GetDrozChatChannelDocument = exports.GenerateAnalyticsTokenDocument = exports.FacetsFragmentDoc = exports.TicketMessageFragmentDoc = exports.DrozChatUserFragmentDoc = exports.TicketWithSessionFragmentDoc = exports.SessionAttributesFragmentDoc = exports.TicketFragmentDoc = exports.DrozChatChannelFragmentDoc = exports.TicketTriggerAppFragmentDoc = exports.CustomerFragmentDoc = exports.TagFragmentDoc = exports.DrozChatAgentFragmentDoc = exports.Typenames = exports.TicketStatus = exports.TicketState = exports.TicketSearchSortBy = exports.TicketPriority = exports.TicketMessageType = exports.TicketMessageRecipient = exports.SubscriptionAction = exports.Can = exports.AppInstanceStatus = void 0;
5
- exports.serviceName = exports.OnTicketMessageDocument = exports.OnTicketByStateDocument = exports.OnTicketInProgressMineDocument = exports.TransferTicketToChannelDocument = exports.RemoveTagsFromTicketDocument = void 0;
4
+ exports.CloseTicketDocument = exports.UnassignTicketDocument = exports.AssignTicketMyselfDocument = exports.AssignTicketDocument = exports.CreateTicketMessageForStorageDocument = exports.CreateTicketMessageDocument = exports.MarkTicketMessagesAsReadDocument = exports.UpdateTicketDocument = exports.CreateTicketDocument = exports.SearchTicketsDocument = exports.ListTicketInternalNotesDocument = exports.ListTicketMessagesDocument = exports.ListTicketsInProgressMineDocument = exports.ListTicketsDocument = exports.GetTicketDocument = exports.DeleteTagsDocument = exports.CreateTagsDocument = exports.ListTagsDocument = exports.RemoveDrozChatChannelAgentDocument = exports.AddDrozChatChannelAgentDocument = exports.EnableDrozChatChannelDocument = exports.DisableDrozChatChannelDocument = exports.UpdateDrozChatChannelDocument = exports.CreateDrozChatChannelDocument = exports.ListDrozChatAgentChannelsDocument = exports.ListDrozChatChannelsDocument = exports.GetDrozChatChannelDocument = exports.GenerateAnalyticsTokenDocument = exports.ViewFragmentDoc = exports.FacetsFragmentDoc = exports.TicketMessageFragmentDoc = exports.DrozChatUserFragmentDoc = exports.TicketWithSessionFragmentDoc = exports.SessionAttributesFragmentDoc = exports.TicketFragmentDoc = exports.DrozChatChannelFragmentDoc = exports.TicketTriggerAppFragmentDoc = exports.CustomerFragmentDoc = exports.TagFragmentDoc = exports.DrozChatAgentFragmentDoc = exports.Typenames = exports.TicketStatus = exports.TicketState = exports.TicketSearchSortBy = exports.TicketPriority = exports.TicketMessageType = exports.TicketMessageRecipient = exports.SubscriptionAction = exports.Can = exports.AppInstanceStatus = void 0;
5
+ exports.serviceName = exports.DeleteViewDocument = exports.UpdateViewDocument = exports.CloneViewDocument = exports.CreateViewDocument = exports.ListTicketsByViewDocument = exports.ListViewsByChannelDocument = exports.ListViewsDocument = exports.GetViewDocument = exports.OnTicketMessageDocument = exports.OnTicketByStateDocument = exports.OnTicketInProgressMineDocument = exports.TransferTicketToChannelDocument = exports.RemoveTagsFromTicketDocument = exports.AddTagsToTicketDocument = void 0;
6
6
  exports.getSdk = getSdk;
7
7
  var AppInstanceStatus;
8
8
  (function (AppInstanceStatus) {
@@ -80,6 +80,7 @@ var Typenames;
80
80
  Typenames["TicketMappings"] = "TicketMappings";
81
81
  Typenames["TicketMessages"] = "TicketMessages";
82
82
  Typenames["Tickets"] = "Tickets";
83
+ Typenames["Views"] = "Views";
83
84
  })(Typenames || (exports.Typenames = Typenames = {}));
84
85
  exports.DrozChatAgentFragmentDoc = `
85
86
  fragment drozChatAgent on DrozChatAgent {
@@ -272,6 +273,16 @@ exports.FacetsFragmentDoc = `
272
273
  }
273
274
  }
274
275
  `;
276
+ exports.ViewFragmentDoc = `
277
+ fragment view on View {
278
+ id
279
+ name
280
+ channelId
281
+ filters
282
+ createdAt
283
+ updatedAt
284
+ }
285
+ `;
275
286
  exports.GenerateAnalyticsTokenDocument = `
276
287
  mutation generateAnalyticsToken {
277
288
  generateAnalyticsToken {
@@ -664,6 +675,66 @@ exports.OnTicketMessageDocument = `
664
675
  }
665
676
  ${exports.TicketMessageFragmentDoc}
666
677
  ${exports.DrozChatUserFragmentDoc}`;
678
+ exports.GetViewDocument = `
679
+ query getView($id: ID!) {
680
+ getView(id: $id) {
681
+ ...view
682
+ }
683
+ }
684
+ ${exports.ViewFragmentDoc}`;
685
+ exports.ListViewsDocument = `
686
+ query listViews {
687
+ listViews {
688
+ ...view
689
+ }
690
+ }
691
+ ${exports.ViewFragmentDoc}`;
692
+ exports.ListViewsByChannelDocument = `
693
+ query listViewsByChannel($channelId: ID!) {
694
+ listViewsByChannel(channelId: $channelId) {
695
+ ...view
696
+ }
697
+ }
698
+ ${exports.ViewFragmentDoc}`;
699
+ exports.ListTicketsByViewDocument = `
700
+ query listTicketsByView($id: ID!) {
701
+ listTicketsByView(id: $id) {
702
+ ...ticket
703
+ }
704
+ }
705
+ ${exports.TicketFragmentDoc}
706
+ ${exports.DrozChatAgentFragmentDoc}
707
+ ${exports.CustomerFragmentDoc}
708
+ ${exports.TicketTriggerAppFragmentDoc}
709
+ ${exports.DrozChatChannelFragmentDoc}`;
710
+ exports.CreateViewDocument = `
711
+ mutation createView($input: CreateViewInput!) {
712
+ createView(input: $input) {
713
+ ...view
714
+ }
715
+ }
716
+ ${exports.ViewFragmentDoc}`;
717
+ exports.CloneViewDocument = `
718
+ mutation cloneView($input: CloneViewInput!) {
719
+ cloneView(input: $input) {
720
+ ...view
721
+ }
722
+ }
723
+ ${exports.ViewFragmentDoc}`;
724
+ exports.UpdateViewDocument = `
725
+ mutation updateView($input: UpdateViewInput!) {
726
+ updateView(input: $input) {
727
+ ...view
728
+ }
729
+ }
730
+ ${exports.ViewFragmentDoc}`;
731
+ exports.DeleteViewDocument = `
732
+ mutation deleteView($input: DeleteViewInput!) {
733
+ deleteView(input: $input) {
734
+ ...view
735
+ }
736
+ }
737
+ ${exports.ViewFragmentDoc}`;
667
738
  function getSdk(requester) {
668
739
  return {
669
740
  generateAnalyticsToken(variables, options) {
@@ -767,6 +838,30 @@ function getSdk(requester) {
767
838
  },
768
839
  onTicketMessage(variables, options) {
769
840
  return requester(exports.OnTicketMessageDocument, variables, options);
841
+ },
842
+ getView(variables, options) {
843
+ return requester(exports.GetViewDocument, variables, options);
844
+ },
845
+ listViews(variables, options) {
846
+ return requester(exports.ListViewsDocument, variables, options);
847
+ },
848
+ listViewsByChannel(variables, options) {
849
+ return requester(exports.ListViewsByChannelDocument, variables, options);
850
+ },
851
+ listTicketsByView(variables, options) {
852
+ return requester(exports.ListTicketsByViewDocument, variables, options);
853
+ },
854
+ createView(variables, options) {
855
+ return requester(exports.CreateViewDocument, variables, options);
856
+ },
857
+ cloneView(variables, options) {
858
+ return requester(exports.CloneViewDocument, variables, options);
859
+ },
860
+ updateView(variables, options) {
861
+ return requester(exports.UpdateViewDocument, variables, options);
862
+ },
863
+ deleteView(variables, options) {
864
+ return requester(exports.DeleteViewDocument, variables, options);
770
865
  }
771
866
  };
772
867
  }