@droz-js/sdk 0.5.8 → 0.5.10

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.5.8",
4
+ "version": "0.5.10",
5
5
  "private": false,
6
6
  "exports": {
7
7
  ".": "./src/index.js",
@@ -21,4 +21,7 @@ export declare const Casasbahia: new (options?: import("./client/http").HttpClie
21
21
  removeCasasBahiaInstance(variables: import("./sdks/casasbahia").Exact<{
22
22
  input: import("./sdks/casasbahia").RemoveCasasBahiaInstanceInput;
23
23
  }>, options?: unknown): Promise<import("./sdks/casasbahia").RemoveCasasBahiaInstanceMutation>;
24
+ applySolution(variables: import("./sdks/casasbahia").Exact<{
25
+ input: import("./sdks/casasbahia").ApplySolutionInput;
26
+ }>, options?: unknown): Promise<import("./sdks/casasbahia").ApplySolutionMutation>;
24
27
  };
@@ -35,6 +35,7 @@ export declare const DrozChatWs: new () => {
35
35
  }>, options?: unknown): Promise<import("./sdks/drozchat").GetTicketQuery>;
36
36
  listTickets(variables: import("./sdks/drozchat").Exact<{
37
37
  state: import("./sdks/drozchat").TicketState;
38
+ status?: import("./sdks/drozchat").TicketStatus | import("./sdks/drozchat").TicketStatus[];
38
39
  assigneeId?: string;
39
40
  next?: object;
40
41
  }>, options?: unknown): Promise<import("./sdks/drozchat").ListTicketsQuery>;
package/src/drozchat.d.ts CHANGED
@@ -38,6 +38,7 @@ export declare const DrozChat: new (options?: import("./client/http").HttpClient
38
38
  }>, options?: unknown): Promise<import("./sdks/drozchat").GetTicketQuery>;
39
39
  listTickets(variables: import("./sdks/drozchat").Exact<{
40
40
  state: import("./sdks/drozchat").TicketState;
41
+ status?: import("./sdks/drozchat").TicketStatus | import("./sdks/drozchat").TicketStatus[];
41
42
  assigneeId?: string;
42
43
  next?: object;
43
44
  }>, options?: unknown): Promise<import("./sdks/drozchat").ListTicketsQuery>;
@@ -91,6 +91,22 @@ export declare enum AppInstanceStatus {
91
91
  Failing = "Failing",
92
92
  Inactive = "Inactive"
93
93
  }
94
+ export type ApplySolutionInput = {
95
+ incidentId: Scalars['Int']['input'];
96
+ instanceId: Scalars['ID']['input'];
97
+ payload: ApplySolutionPayloadInput;
98
+ };
99
+ export type ApplySolutionPayloadFields = {
100
+ name: Scalars['String']['input'];
101
+ type: Scalars['String']['input'];
102
+ value: Scalars['String']['input'];
103
+ };
104
+ export type ApplySolutionPayloadInput = {
105
+ annotation?: InputMaybe<Scalars['String']['input']>;
106
+ attachments?: InputMaybe<Array<Scalars['String']['input']>>;
107
+ fields: Array<ApplySolutionPayloadFields>;
108
+ solutionId: Scalars['Int']['input'];
109
+ };
94
110
  export type CasasBahiaInstance = {
95
111
  credentialId?: Maybe<Scalars['ID']['output']>;
96
112
  cronJobId?: Maybe<Scalars['ID']['output']>;
@@ -111,11 +127,15 @@ export type CreateCasasBahiaInstanceInput = {
111
127
  type: CasasBahiaInstanceType;
112
128
  };
113
129
  export type Mutation = {
130
+ applySolution?: Maybe<Scalars['Boolean']['output']>;
114
131
  createCasasBahiaInstance?: Maybe<CasasBahiaInstance>;
115
132
  removeCasasBahiaInstance?: Maybe<CasasBahiaInstance>;
116
133
  updateCasasBahiaInstance?: Maybe<CasasBahiaInstance>;
117
134
  version?: Maybe<Scalars['String']['output']>;
118
135
  };
136
+ export type MutationApplySolutionArgs = {
137
+ input: ApplySolutionInput;
138
+ };
119
139
  export type MutationCreateCasasBahiaInstanceArgs = {
120
140
  input: CreateCasasBahiaInstanceInput;
121
141
  };
@@ -185,12 +205,17 @@ export type RemoveCasasBahiaInstanceMutationVariables = Exact<{
185
205
  export type RemoveCasasBahiaInstanceMutation = {
186
206
  removeCasasBahiaInstance?: Maybe<CasasbahiaInstanceFragment>;
187
207
  };
208
+ export type ApplySolutionMutationVariables = Exact<{
209
+ input: ApplySolutionInput;
210
+ }>;
211
+ export type ApplySolutionMutation = Pick<Mutation, 'applySolution'>;
188
212
  export declare const CasasbahiaInstanceFragmentDoc = "\n fragment casasbahiaInstance on CasasBahiaInstance {\n id\n name\n credentialId\n cronJobId\n}\n ";
189
213
  export declare const GetCasasBahiaInstanceDocument = "\n query getCasasBahiaInstance($id: ID!) {\n getCasasBahiaInstance(id: $id) {\n ...casasbahiaInstance\n }\n}\n \n fragment casasbahiaInstance on CasasBahiaInstance {\n id\n name\n credentialId\n cronJobId\n}\n ";
190
214
  export declare const ListCasasBahiaInstancesDocument = "\n query listCasasBahiaInstances {\n listCasasBahiaInstances {\n ...casasbahiaInstance\n }\n}\n \n fragment casasbahiaInstance on CasasBahiaInstance {\n id\n name\n credentialId\n cronJobId\n}\n ";
191
215
  export declare const CreateCasasBahiaInstanceDocument = "\n mutation createCasasBahiaInstance($input: CreateCasasBahiaInstanceInput!) {\n createCasasBahiaInstance(input: $input) {\n ...casasbahiaInstance\n }\n}\n \n fragment casasbahiaInstance on CasasBahiaInstance {\n id\n name\n credentialId\n cronJobId\n}\n ";
192
216
  export declare const UpdateCasasBahiaInstanceDocument = "\n mutation updateCasasBahiaInstance($input: UpdateCasasBahiaInstanceInput!) {\n updateCasasBahiaInstance(input: $input) {\n ...casasbahiaInstance\n }\n}\n \n fragment casasbahiaInstance on CasasBahiaInstance {\n id\n name\n credentialId\n cronJobId\n}\n ";
193
217
  export declare const RemoveCasasBahiaInstanceDocument = "\n mutation removeCasasBahiaInstance($input: RemoveCasasBahiaInstanceInput!) {\n removeCasasBahiaInstance(input: $input) {\n ...casasbahiaInstance\n }\n}\n \n fragment casasbahiaInstance on CasasBahiaInstance {\n id\n name\n credentialId\n cronJobId\n}\n ";
218
+ export declare const ApplySolutionDocument = "\n mutation applySolution($input: ApplySolutionInput!) {\n applySolution(input: $input)\n}\n ";
194
219
  export type Requester<C = {}> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | AsyncIterableIterator<R>;
195
220
  export declare function getSdk<C>(requester: Requester<C>): {
196
221
  getCasasBahiaInstance(variables: GetCasasBahiaInstanceQueryVariables, options?: C): Promise<GetCasasBahiaInstanceQuery>;
@@ -198,6 +223,7 @@ export declare function getSdk<C>(requester: Requester<C>): {
198
223
  createCasasBahiaInstance(variables: CreateCasasBahiaInstanceMutationVariables, options?: C): Promise<CreateCasasBahiaInstanceMutation>;
199
224
  updateCasasBahiaInstance(variables: UpdateCasasBahiaInstanceMutationVariables, options?: C): Promise<UpdateCasasBahiaInstanceMutation>;
200
225
  removeCasasBahiaInstance(variables: RemoveCasasBahiaInstanceMutationVariables, options?: C): Promise<RemoveCasasBahiaInstanceMutation>;
226
+ applySolution(variables: ApplySolutionMutationVariables, options?: C): Promise<ApplySolutionMutation>;
201
227
  };
202
228
  export type Sdk = ReturnType<typeof getSdk>;
203
229
  export declare const serviceName = "@droz/casasbahia";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /* istanbul ignore file */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.serviceName = exports.getSdk = exports.RemoveCasasBahiaInstanceDocument = exports.UpdateCasasBahiaInstanceDocument = exports.CreateCasasBahiaInstanceDocument = exports.ListCasasBahiaInstancesDocument = exports.GetCasasBahiaInstanceDocument = exports.CasasbahiaInstanceFragmentDoc = exports.Typenames = exports.CasasBahiaInstanceType = exports.AppInstanceStatus = void 0;
4
+ exports.serviceName = exports.getSdk = exports.ApplySolutionDocument = exports.RemoveCasasBahiaInstanceDocument = exports.UpdateCasasBahiaInstanceDocument = exports.CreateCasasBahiaInstanceDocument = exports.ListCasasBahiaInstancesDocument = exports.GetCasasBahiaInstanceDocument = exports.CasasbahiaInstanceFragmentDoc = exports.Typenames = exports.CasasBahiaInstanceType = exports.AppInstanceStatus = void 0;
5
5
  var AppInstanceStatus;
6
6
  (function (AppInstanceStatus) {
7
7
  AppInstanceStatus["Active"] = "Active";
@@ -64,6 +64,11 @@ exports.RemoveCasasBahiaInstanceDocument = `
64
64
  }
65
65
  }
66
66
  ${exports.CasasbahiaInstanceFragmentDoc}`;
67
+ exports.ApplySolutionDocument = `
68
+ mutation applySolution($input: ApplySolutionInput!) {
69
+ applySolution(input: $input)
70
+ }
71
+ `;
67
72
  function getSdk(requester) {
68
73
  return {
69
74
  getCasasBahiaInstance(variables, options) {
@@ -80,6 +85,9 @@ function getSdk(requester) {
80
85
  },
81
86
  removeCasasBahiaInstance(variables, options) {
82
87
  return requester(exports.RemoveCasasBahiaInstanceDocument, variables, options);
88
+ },
89
+ applySolution(variables, options) {
90
+ return requester(exports.ApplySolutionDocument, variables, options);
83
91
  }
84
92
  };
85
93
  }
@@ -254,6 +254,7 @@ export type QueryListTicketsArgs = {
254
254
  assigneeId?: InputMaybe<Scalars['ID']['input']>;
255
255
  next?: InputMaybe<Scalars['Base64']['input']>;
256
256
  state: TicketState;
257
+ status?: InputMaybe<Array<TicketStatus>>;
257
258
  };
258
259
  export type QueryListTicketsInProgressMineArgs = {
259
260
  next?: InputMaybe<Scalars['Base64']['input']>;
@@ -484,6 +485,7 @@ export type GetTicketQuery = {
484
485
  };
485
486
  export type ListTicketsQueryVariables = Exact<{
486
487
  state: TicketState;
488
+ status?: InputMaybe<Array<TicketStatus> | TicketStatus>;
487
489
  assigneeId?: InputMaybe<Scalars['ID']['input']>;
488
490
  next?: InputMaybe<Scalars['Base64']['input']>;
489
491
  }>;
@@ -607,7 +609,7 @@ export declare const EnableDrozChatChannelDocument = "\n mutation enableDrozC
607
609
  export declare const AddDrozChatChannelAgentDocument = "\n mutation addDrozChatChannelAgent($input: AddDrozChatChannelAgentInput!) {\n addDrozChatChannelAgent(input: $input) {\n ...drozChatChannel\n }\n}\n \n fragment drozChatChannel on DrozChatChannel {\n id\n name\n agentIds\n createdAt\n updatedAt\n}\n ";
608
610
  export declare const RemoveDrozChatChannelAgentDocument = "\n mutation removeDrozChatChannelAgent($input: RemoveDrozChatChannelAgentInput!) {\n removeDrozChatChannelAgent(input: $input) {\n ...drozChatChannel\n }\n}\n \n fragment drozChatChannel on DrozChatChannel {\n id\n name\n agentIds\n createdAt\n updatedAt\n}\n ";
609
611
  export declare const GetTicketDocument = "\n query getTicket($id: ID!) {\n getTicket(id: $id) {\n ...ticketWithSession\n }\n}\n \n fragment ticketWithSession on Ticket {\n ...ticket\n sessionAttributes {\n ...sessionAttributes\n }\n}\n \n fragment ticket on Ticket {\n channelId\n id\n state\n status\n priority\n externalProviderId\n externalId\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\n }\n triggerApp {\n ...ticketTriggerApp\n }\n channel {\n ...drozChatChannel\n }\n messagesCount\n lastMessage\n lastMessageAt\n unreadMessagesCount\n createdAt\n updatedAt\n}\n \n fragment drozChatAgent on DrozChatAgent {\n id\n name\n}\n \n\n fragment customer on DrozChatCustomer {\n id\n name\n email\n phone\n document\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 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 ";
610
- export declare const ListTicketsDocument = "\n query listTickets($state: TicketState!, $assigneeId: ID, $next: Base64) {\n listTickets(state: $state, assigneeId: $assigneeId, next: $next) {\n nodes {\n ...ticket\n }\n pageInfo {\n hasNext\n next\n }\n }\n}\n \n fragment ticket on Ticket {\n channelId\n id\n state\n status\n priority\n externalProviderId\n externalId\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\n }\n triggerApp {\n ...ticketTriggerApp\n }\n channel {\n ...drozChatChannel\n }\n messagesCount\n lastMessage\n lastMessageAt\n unreadMessagesCount\n createdAt\n updatedAt\n}\n \n fragment drozChatAgent on DrozChatAgent {\n id\n name\n}\n \n\n fragment customer on DrozChatCustomer {\n id\n name\n email\n phone\n document\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 agentIds\n createdAt\n updatedAt\n}\n ";
612
+ export declare const ListTicketsDocument = "\n query listTickets($state: TicketState!, $status: [TicketStatus!], $assigneeId: ID, $next: Base64) {\n listTickets(\n state: $state\n status: $status\n assigneeId: $assigneeId\n next: $next\n ) {\n nodes {\n ...ticket\n }\n pageInfo {\n hasNext\n next\n }\n }\n}\n \n fragment ticket on Ticket {\n channelId\n id\n state\n status\n priority\n externalProviderId\n externalId\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\n }\n triggerApp {\n ...ticketTriggerApp\n }\n channel {\n ...drozChatChannel\n }\n messagesCount\n lastMessage\n lastMessageAt\n unreadMessagesCount\n createdAt\n updatedAt\n}\n \n fragment drozChatAgent on DrozChatAgent {\n id\n name\n}\n \n\n fragment customer on DrozChatCustomer {\n id\n name\n email\n phone\n document\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 agentIds\n createdAt\n updatedAt\n}\n ";
611
613
  export declare const ListTicketsInProgressMineDocument = "\n query listTicketsInProgressMine($next: Base64) {\n listTicketsInProgressMine(next: $next) {\n nodes {\n ...ticket\n }\n pageInfo {\n hasNext\n next\n }\n }\n}\n \n fragment ticket on Ticket {\n channelId\n id\n state\n status\n priority\n externalProviderId\n externalId\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\n }\n triggerApp {\n ...ticketTriggerApp\n }\n channel {\n ...drozChatChannel\n }\n messagesCount\n lastMessage\n lastMessageAt\n unreadMessagesCount\n createdAt\n updatedAt\n}\n \n fragment drozChatAgent on DrozChatAgent {\n id\n name\n}\n \n\n fragment customer on DrozChatCustomer {\n id\n name\n email\n phone\n document\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 agentIds\n createdAt\n updatedAt\n}\n ";
612
614
  export declare const ListTicketMessagesDocument = "\n query listTicketMessages($ticketId: ID!, $channelId: ID!, $next: Base64) {\n listTicketMessages(ticketId: $ticketId, channelId: $channelId, next: $next) {\n pageInfo {\n hasNext\n next\n }\n nodes {\n ...ticketMessage\n }\n }\n}\n \n fragment ticketMessage on TicketMessage {\n id\n ticketId\n from\n to\n channelId\n contentType\n content\n filename\n size\n createdAt\n updatedAt\n}\n ";
613
615
  export declare const CreateTicketDocument = "\n mutation createTicket($input: CreateTicketInput!) {\n createTicket(input: $input) {\n ...ticketWithSession\n }\n}\n \n fragment ticketWithSession on Ticket {\n ...ticket\n sessionAttributes {\n ...sessionAttributes\n }\n}\n \n fragment ticket on Ticket {\n channelId\n id\n state\n status\n priority\n externalProviderId\n externalId\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\n }\n triggerApp {\n ...ticketTriggerApp\n }\n channel {\n ...drozChatChannel\n }\n messagesCount\n lastMessage\n lastMessageAt\n unreadMessagesCount\n createdAt\n updatedAt\n}\n \n fragment drozChatAgent on DrozChatAgent {\n id\n name\n}\n \n\n fragment customer on DrozChatCustomer {\n id\n name\n email\n phone\n document\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 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 ";
@@ -233,8 +233,13 @@ exports.GetTicketDocument = `
233
233
  }
234
234
  ${exports.TicketWithSessionFragmentDoc}`;
235
235
  exports.ListTicketsDocument = `
236
- query listTickets($state: TicketState!, $assigneeId: ID, $next: Base64) {
237
- listTickets(state: $state, assigneeId: $assigneeId, next: $next) {
236
+ query listTickets($state: TicketState!, $status: [TicketStatus!], $assigneeId: ID, $next: Base64) {
237
+ listTickets(
238
+ state: $state
239
+ status: $status
240
+ assigneeId: $assigneeId
241
+ next: $next
242
+ ) {
238
243
  nodes {
239
244
  ...ticket
240
245
  }