@droz-js/sdk 0.1.2
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/README.md +44 -0
- package/package.json +32 -0
- package/src/client/config.d.ts +19 -0
- package/src/client/config.js +68 -0
- package/src/client/http.d.ts +4 -0
- package/src/client/http.js +67 -0
- package/src/client/ws.d.ts +4 -0
- package/src/client/ws.js +72 -0
- package/src/drozbot.d.ts +20 -0
- package/src/drozbot.js +23 -0
- package/src/drozchat-ws.d.ts +18 -0
- package/src/drozchat-ws.js +21 -0
- package/src/drozchat.d.ts +20 -0
- package/src/drozchat.js +23 -0
- package/src/droznexo.d.ts +18 -0
- package/src/droznexo.js +21 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +5 -0
- package/src/nucleus.d.ts +68 -0
- package/src/nucleus.js +21 -0
- package/src/reclameaqui.d.ts +20 -0
- package/src/reclameaqui.js +23 -0
- package/src/sdks/drozbot.d.ts +190 -0
- package/src/sdks/drozbot.js +76 -0
- package/src/sdks/drozchat.d.ts +524 -0
- package/src/sdks/drozchat.js +383 -0
- package/src/sdks/droznexo.d.ts +218 -0
- package/src/sdks/droznexo.js +109 -0
- package/src/sdks/nucleus.d.ts +658 -0
- package/src/sdks/nucleus.js +330 -0
- package/src/sdks/reclameaqui.d.ts +188 -0
- package/src/sdks/reclameaqui.js +75 -0
- package/src/sdks/zendesk.d.ts +205 -0
- package/src/sdks/zendesk.js +76 -0
- package/src/zendesk.d.ts +20 -0
- package/src/zendesk.js +23 -0
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.serviceName = exports.getSdk = exports.OnTicketMessageDocument = exports.OnTicketClosedDocument = exports.OnTicketInProgressMineDocument = exports.OnTicketInQueueDocument = exports.CloseTicketDocument = exports.UnassignTicketDocument = exports.AssignTicketMyselfDocument = exports.AssignTicketDocument = exports.CreateTicketMessageDocument = exports.MarkTicketMessagesAsReadDocument = exports.CreateTicketDocument = exports.ListTicketMessagesDocument = exports.ListTicketsClosedDocument = exports.ListTicketsInProgressMineDocument = exports.ListTicketsInQueueDocument = exports.ListTicketsDocument = exports.GetTicketDocument = exports.GetCustomerDocument = exports.ListCustomersDocument = exports.UpdateCustomerDocument = exports.CreateCustomerDocument = exports.TicketMessageFragmentDoc = exports.TicketFragmentDoc = exports.CustomerFragmentDoc = exports.AgentFragmentDoc = exports.Typenames = exports.TicketStatus = exports.TicketState = exports.TicketPriority = exports.TicketMessageType = exports.SubscriptionAction = void 0;
|
|
5
|
+
var SubscriptionAction;
|
|
6
|
+
(function (SubscriptionAction) {
|
|
7
|
+
SubscriptionAction["Created"] = "CREATED";
|
|
8
|
+
SubscriptionAction["Removed"] = "REMOVED";
|
|
9
|
+
SubscriptionAction["Updated"] = "UPDATED";
|
|
10
|
+
})(SubscriptionAction || (exports.SubscriptionAction = SubscriptionAction = {}));
|
|
11
|
+
var TicketMessageType;
|
|
12
|
+
(function (TicketMessageType) {
|
|
13
|
+
TicketMessageType["Agent"] = "AGENT";
|
|
14
|
+
TicketMessageType["System"] = "SYSTEM";
|
|
15
|
+
TicketMessageType["User"] = "USER";
|
|
16
|
+
})(TicketMessageType || (exports.TicketMessageType = TicketMessageType = {}));
|
|
17
|
+
var TicketPriority;
|
|
18
|
+
(function (TicketPriority) {
|
|
19
|
+
TicketPriority["High"] = "HIGH";
|
|
20
|
+
TicketPriority["Low"] = "LOW";
|
|
21
|
+
TicketPriority["Medium"] = "MEDIUM";
|
|
22
|
+
TicketPriority["Urgent"] = "URGENT";
|
|
23
|
+
})(TicketPriority || (exports.TicketPriority = TicketPriority = {}));
|
|
24
|
+
var TicketState;
|
|
25
|
+
(function (TicketState) {
|
|
26
|
+
TicketState["Closed"] = "CLOSED";
|
|
27
|
+
TicketState["InProgress"] = "IN_PROGRESS";
|
|
28
|
+
TicketState["InQueue"] = "IN_QUEUE";
|
|
29
|
+
})(TicketState || (exports.TicketState = TicketState = {}));
|
|
30
|
+
var TicketStatus;
|
|
31
|
+
(function (TicketStatus) {
|
|
32
|
+
TicketStatus["AwaitingCustomer"] = "AWAITING_CUSTOMER";
|
|
33
|
+
TicketStatus["InProgress"] = "IN_PROGRESS";
|
|
34
|
+
TicketStatus["OnHold"] = "ON_HOLD";
|
|
35
|
+
TicketStatus["Pending"] = "PENDING";
|
|
36
|
+
TicketStatus["Resolved"] = "RESOLVED";
|
|
37
|
+
})(TicketStatus || (exports.TicketStatus = TicketStatus = {}));
|
|
38
|
+
var Typenames;
|
|
39
|
+
(function (Typenames) {
|
|
40
|
+
Typenames["Any"] = "Any";
|
|
41
|
+
Typenames["Customers"] = "Customers";
|
|
42
|
+
Typenames["GraphqlConnections"] = "GraphqlConnections";
|
|
43
|
+
Typenames["GraphqlSubscriptions"] = "GraphqlSubscriptions";
|
|
44
|
+
Typenames["TicketMappings"] = "TicketMappings";
|
|
45
|
+
Typenames["TicketMessages"] = "TicketMessages";
|
|
46
|
+
Typenames["Tickets"] = "Tickets";
|
|
47
|
+
})(Typenames || (exports.Typenames = Typenames = {}));
|
|
48
|
+
exports.AgentFragmentDoc = `
|
|
49
|
+
fragment agent on Agent {
|
|
50
|
+
id
|
|
51
|
+
name
|
|
52
|
+
email
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
exports.CustomerFragmentDoc = `
|
|
56
|
+
fragment customer on Customer {
|
|
57
|
+
id
|
|
58
|
+
name
|
|
59
|
+
email
|
|
60
|
+
createdAt
|
|
61
|
+
updatedAt
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
64
|
+
exports.TicketFragmentDoc = `
|
|
65
|
+
fragment ticket on Ticket {
|
|
66
|
+
id
|
|
67
|
+
state
|
|
68
|
+
status
|
|
69
|
+
priority
|
|
70
|
+
assignee {
|
|
71
|
+
...agent
|
|
72
|
+
}
|
|
73
|
+
customer {
|
|
74
|
+
...customer
|
|
75
|
+
}
|
|
76
|
+
messagesCount
|
|
77
|
+
lastMessage
|
|
78
|
+
lastMessageAt
|
|
79
|
+
unreadMessagesCount
|
|
80
|
+
createdAt
|
|
81
|
+
updatedAt
|
|
82
|
+
}
|
|
83
|
+
`;
|
|
84
|
+
exports.TicketMessageFragmentDoc = `
|
|
85
|
+
fragment ticketMessage on TicketMessage {
|
|
86
|
+
id
|
|
87
|
+
ticketId
|
|
88
|
+
sentBy
|
|
89
|
+
type
|
|
90
|
+
contentType
|
|
91
|
+
body
|
|
92
|
+
createdAt
|
|
93
|
+
updatedAt
|
|
94
|
+
}
|
|
95
|
+
`;
|
|
96
|
+
exports.CreateCustomerDocument = `
|
|
97
|
+
mutation createCustomer($input: CreateCustomerInput!) {
|
|
98
|
+
createCustomer(input: $input) {
|
|
99
|
+
...customer
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
${exports.CustomerFragmentDoc}`;
|
|
103
|
+
exports.UpdateCustomerDocument = `
|
|
104
|
+
mutation updateCustomer($input: UpdateCustomerInput!) {
|
|
105
|
+
updateCustomer(input: $input) {
|
|
106
|
+
...customer
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
${exports.CustomerFragmentDoc}`;
|
|
110
|
+
exports.ListCustomersDocument = `
|
|
111
|
+
query listCustomers($next: Base64) {
|
|
112
|
+
listCustomers(next: $next) {
|
|
113
|
+
pageInfo {
|
|
114
|
+
hasNext
|
|
115
|
+
next
|
|
116
|
+
}
|
|
117
|
+
nodes {
|
|
118
|
+
...customer
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
${exports.CustomerFragmentDoc}`;
|
|
123
|
+
exports.GetCustomerDocument = `
|
|
124
|
+
query getCustomer($id: ID!) {
|
|
125
|
+
getCustomer(id: $id) {
|
|
126
|
+
...customer
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
${exports.CustomerFragmentDoc}`;
|
|
130
|
+
exports.GetTicketDocument = `
|
|
131
|
+
query getTicket($id: ID!) {
|
|
132
|
+
getTicket(id: $id) {
|
|
133
|
+
...ticket
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
${exports.TicketFragmentDoc}
|
|
137
|
+
${exports.AgentFragmentDoc}
|
|
138
|
+
${exports.CustomerFragmentDoc}`;
|
|
139
|
+
exports.ListTicketsDocument = `
|
|
140
|
+
query listTickets($state: TicketState!, $assigneeId: ID, $next: Base64) {
|
|
141
|
+
listTickets(state: $state, assigneeId: $assigneeId, next: $next) {
|
|
142
|
+
nodes {
|
|
143
|
+
...ticket
|
|
144
|
+
}
|
|
145
|
+
pageInfo {
|
|
146
|
+
hasNext
|
|
147
|
+
next
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
${exports.TicketFragmentDoc}
|
|
152
|
+
${exports.AgentFragmentDoc}
|
|
153
|
+
${exports.CustomerFragmentDoc}`;
|
|
154
|
+
exports.ListTicketsInQueueDocument = `
|
|
155
|
+
query listTicketsInQueue($next: Base64) {
|
|
156
|
+
listTicketsInQueue(next: $next) {
|
|
157
|
+
nodes {
|
|
158
|
+
...ticket
|
|
159
|
+
}
|
|
160
|
+
pageInfo {
|
|
161
|
+
hasNext
|
|
162
|
+
next
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
${exports.TicketFragmentDoc}
|
|
167
|
+
${exports.AgentFragmentDoc}
|
|
168
|
+
${exports.CustomerFragmentDoc}`;
|
|
169
|
+
exports.ListTicketsInProgressMineDocument = `
|
|
170
|
+
query listTicketsInProgressMine($next: Base64) {
|
|
171
|
+
listTicketsInProgressMine(next: $next) {
|
|
172
|
+
nodes {
|
|
173
|
+
...ticket
|
|
174
|
+
}
|
|
175
|
+
pageInfo {
|
|
176
|
+
hasNext
|
|
177
|
+
next
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
${exports.TicketFragmentDoc}
|
|
182
|
+
${exports.AgentFragmentDoc}
|
|
183
|
+
${exports.CustomerFragmentDoc}`;
|
|
184
|
+
exports.ListTicketsClosedDocument = `
|
|
185
|
+
query listTicketsClosed($next: Base64) {
|
|
186
|
+
listTicketsClosed(next: $next) {
|
|
187
|
+
nodes {
|
|
188
|
+
...ticket
|
|
189
|
+
}
|
|
190
|
+
pageInfo {
|
|
191
|
+
hasNext
|
|
192
|
+
next
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
${exports.TicketFragmentDoc}
|
|
197
|
+
${exports.AgentFragmentDoc}
|
|
198
|
+
${exports.CustomerFragmentDoc}`;
|
|
199
|
+
exports.ListTicketMessagesDocument = `
|
|
200
|
+
query listTicketMessages($ticketId: ID!, $next: Base64) {
|
|
201
|
+
listTicketMessages(ticketId: $ticketId, next: $next) {
|
|
202
|
+
pageInfo {
|
|
203
|
+
hasNext
|
|
204
|
+
next
|
|
205
|
+
}
|
|
206
|
+
nodes {
|
|
207
|
+
...ticketMessage
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
${exports.TicketMessageFragmentDoc}`;
|
|
212
|
+
exports.CreateTicketDocument = `
|
|
213
|
+
mutation createTicket($input: CreateTicketInput!) {
|
|
214
|
+
createTicket(input: $input) {
|
|
215
|
+
...ticket
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
${exports.TicketFragmentDoc}
|
|
219
|
+
${exports.AgentFragmentDoc}
|
|
220
|
+
${exports.CustomerFragmentDoc}`;
|
|
221
|
+
exports.MarkTicketMessagesAsReadDocument = `
|
|
222
|
+
mutation markTicketMessagesAsRead($input: MarkTicketMessagesAsReadInput!) {
|
|
223
|
+
markTicketMessagesAsRead(input: $input)
|
|
224
|
+
}
|
|
225
|
+
`;
|
|
226
|
+
exports.CreateTicketMessageDocument = `
|
|
227
|
+
mutation createTicketMessage($input: CreateTicketMessageInput!) {
|
|
228
|
+
createTicketMessage(input: $input) {
|
|
229
|
+
...ticketMessage
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
${exports.TicketMessageFragmentDoc}`;
|
|
233
|
+
exports.AssignTicketDocument = `
|
|
234
|
+
mutation assignTicket($input: AssignTicketInput!) {
|
|
235
|
+
assignTicket(input: $input) {
|
|
236
|
+
...ticket
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
${exports.TicketFragmentDoc}
|
|
240
|
+
${exports.AgentFragmentDoc}
|
|
241
|
+
${exports.CustomerFragmentDoc}`;
|
|
242
|
+
exports.AssignTicketMyselfDocument = `
|
|
243
|
+
mutation assignTicketMyself($input: AssignTicketMyselfInput!) {
|
|
244
|
+
assignTicketMyself(input: $input) {
|
|
245
|
+
...ticket
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
${exports.TicketFragmentDoc}
|
|
249
|
+
${exports.AgentFragmentDoc}
|
|
250
|
+
${exports.CustomerFragmentDoc}`;
|
|
251
|
+
exports.UnassignTicketDocument = `
|
|
252
|
+
mutation unassignTicket($input: UnassignTicketInput!) {
|
|
253
|
+
unassignTicket(input: $input) {
|
|
254
|
+
...ticket
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
${exports.TicketFragmentDoc}
|
|
258
|
+
${exports.AgentFragmentDoc}
|
|
259
|
+
${exports.CustomerFragmentDoc}`;
|
|
260
|
+
exports.CloseTicketDocument = `
|
|
261
|
+
mutation closeTicket($input: CloseTicketInput!) {
|
|
262
|
+
closeTicket(input: $input) {
|
|
263
|
+
...ticket
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
${exports.TicketFragmentDoc}
|
|
267
|
+
${exports.AgentFragmentDoc}
|
|
268
|
+
${exports.CustomerFragmentDoc}`;
|
|
269
|
+
exports.OnTicketInQueueDocument = `
|
|
270
|
+
subscription onTicketInQueue {
|
|
271
|
+
onTicketInQueue {
|
|
272
|
+
ticket {
|
|
273
|
+
...ticket
|
|
274
|
+
}
|
|
275
|
+
action
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
${exports.TicketFragmentDoc}
|
|
279
|
+
${exports.AgentFragmentDoc}
|
|
280
|
+
${exports.CustomerFragmentDoc}`;
|
|
281
|
+
exports.OnTicketInProgressMineDocument = `
|
|
282
|
+
subscription onTicketInProgressMine {
|
|
283
|
+
onTicketInProgressMine {
|
|
284
|
+
ticket {
|
|
285
|
+
...ticket
|
|
286
|
+
}
|
|
287
|
+
action
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
${exports.TicketFragmentDoc}
|
|
291
|
+
${exports.AgentFragmentDoc}
|
|
292
|
+
${exports.CustomerFragmentDoc}`;
|
|
293
|
+
exports.OnTicketClosedDocument = `
|
|
294
|
+
subscription onTicketClosed {
|
|
295
|
+
onTicketClosed {
|
|
296
|
+
ticket {
|
|
297
|
+
...ticket
|
|
298
|
+
}
|
|
299
|
+
action
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
${exports.TicketFragmentDoc}
|
|
303
|
+
${exports.AgentFragmentDoc}
|
|
304
|
+
${exports.CustomerFragmentDoc}`;
|
|
305
|
+
exports.OnTicketMessageDocument = `
|
|
306
|
+
subscription onTicketMessage($ticketId: ID!) {
|
|
307
|
+
onTicketMessage(ticketId: $ticketId) {
|
|
308
|
+
message {
|
|
309
|
+
...ticketMessage
|
|
310
|
+
}
|
|
311
|
+
action
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
${exports.TicketMessageFragmentDoc}`;
|
|
315
|
+
function getSdk(requester) {
|
|
316
|
+
return {
|
|
317
|
+
createCustomer(variables, options) {
|
|
318
|
+
return requester(exports.CreateCustomerDocument, variables, options);
|
|
319
|
+
},
|
|
320
|
+
updateCustomer(variables, options) {
|
|
321
|
+
return requester(exports.UpdateCustomerDocument, variables, options);
|
|
322
|
+
},
|
|
323
|
+
listCustomers(variables, options) {
|
|
324
|
+
return requester(exports.ListCustomersDocument, variables, options);
|
|
325
|
+
},
|
|
326
|
+
getCustomer(variables, options) {
|
|
327
|
+
return requester(exports.GetCustomerDocument, variables, options);
|
|
328
|
+
},
|
|
329
|
+
getTicket(variables, options) {
|
|
330
|
+
return requester(exports.GetTicketDocument, variables, options);
|
|
331
|
+
},
|
|
332
|
+
listTickets(variables, options) {
|
|
333
|
+
return requester(exports.ListTicketsDocument, variables, options);
|
|
334
|
+
},
|
|
335
|
+
listTicketsInQueue(variables, options) {
|
|
336
|
+
return requester(exports.ListTicketsInQueueDocument, variables, options);
|
|
337
|
+
},
|
|
338
|
+
listTicketsInProgressMine(variables, options) {
|
|
339
|
+
return requester(exports.ListTicketsInProgressMineDocument, variables, options);
|
|
340
|
+
},
|
|
341
|
+
listTicketsClosed(variables, options) {
|
|
342
|
+
return requester(exports.ListTicketsClosedDocument, variables, options);
|
|
343
|
+
},
|
|
344
|
+
listTicketMessages(variables, options) {
|
|
345
|
+
return requester(exports.ListTicketMessagesDocument, variables, options);
|
|
346
|
+
},
|
|
347
|
+
createTicket(variables, options) {
|
|
348
|
+
return requester(exports.CreateTicketDocument, variables, options);
|
|
349
|
+
},
|
|
350
|
+
markTicketMessagesAsRead(variables, options) {
|
|
351
|
+
return requester(exports.MarkTicketMessagesAsReadDocument, variables, options);
|
|
352
|
+
},
|
|
353
|
+
createTicketMessage(variables, options) {
|
|
354
|
+
return requester(exports.CreateTicketMessageDocument, variables, options);
|
|
355
|
+
},
|
|
356
|
+
assignTicket(variables, options) {
|
|
357
|
+
return requester(exports.AssignTicketDocument, variables, options);
|
|
358
|
+
},
|
|
359
|
+
assignTicketMyself(variables, options) {
|
|
360
|
+
return requester(exports.AssignTicketMyselfDocument, variables, options);
|
|
361
|
+
},
|
|
362
|
+
unassignTicket(variables, options) {
|
|
363
|
+
return requester(exports.UnassignTicketDocument, variables, options);
|
|
364
|
+
},
|
|
365
|
+
closeTicket(variables, options) {
|
|
366
|
+
return requester(exports.CloseTicketDocument, variables, options);
|
|
367
|
+
},
|
|
368
|
+
onTicketInQueue(variables, options) {
|
|
369
|
+
return requester(exports.OnTicketInQueueDocument, variables, options);
|
|
370
|
+
},
|
|
371
|
+
onTicketInProgressMine(variables, options) {
|
|
372
|
+
return requester(exports.OnTicketInProgressMineDocument, variables, options);
|
|
373
|
+
},
|
|
374
|
+
onTicketClosed(variables, options) {
|
|
375
|
+
return requester(exports.OnTicketClosedDocument, variables, options);
|
|
376
|
+
},
|
|
377
|
+
onTicketMessage(variables, options) {
|
|
378
|
+
return requester(exports.OnTicketMessageDocument, variables, options);
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
exports.getSdk = getSdk;
|
|
383
|
+
exports.serviceName = '@droz/drozchat';
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import Observable from 'zen-observable';
|
|
2
|
+
export type Maybe<T> = T;
|
|
3
|
+
export type InputMaybe<T> = T;
|
|
4
|
+
export type Exact<T extends {
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}> = {
|
|
7
|
+
[K in keyof T]: T[K];
|
|
8
|
+
};
|
|
9
|
+
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
10
|
+
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
11
|
+
};
|
|
12
|
+
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
13
|
+
[SubKey in K]: Maybe<T[SubKey]>;
|
|
14
|
+
};
|
|
15
|
+
export type MakeEmpty<T extends {
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
}, K extends keyof T> = {
|
|
18
|
+
[_ in K]?: never;
|
|
19
|
+
};
|
|
20
|
+
export type Incremental<T> = T | {
|
|
21
|
+
[P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
|
|
22
|
+
};
|
|
23
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
24
|
+
export type Scalars = {
|
|
25
|
+
ID: {
|
|
26
|
+
input: string;
|
|
27
|
+
output: string;
|
|
28
|
+
};
|
|
29
|
+
String: {
|
|
30
|
+
input: string;
|
|
31
|
+
output: string;
|
|
32
|
+
};
|
|
33
|
+
Boolean: {
|
|
34
|
+
input: boolean;
|
|
35
|
+
output: boolean;
|
|
36
|
+
};
|
|
37
|
+
Int: {
|
|
38
|
+
input: number;
|
|
39
|
+
output: number;
|
|
40
|
+
};
|
|
41
|
+
Float: {
|
|
42
|
+
input: number;
|
|
43
|
+
output: number;
|
|
44
|
+
};
|
|
45
|
+
Base64: {
|
|
46
|
+
input: object;
|
|
47
|
+
output: string;
|
|
48
|
+
};
|
|
49
|
+
DRN: {
|
|
50
|
+
input: string;
|
|
51
|
+
output: string;
|
|
52
|
+
};
|
|
53
|
+
Date: {
|
|
54
|
+
input: Date;
|
|
55
|
+
output: Date;
|
|
56
|
+
};
|
|
57
|
+
DateTime: {
|
|
58
|
+
input: Date;
|
|
59
|
+
output: Date;
|
|
60
|
+
};
|
|
61
|
+
EmailAddress: {
|
|
62
|
+
input: string;
|
|
63
|
+
output: string;
|
|
64
|
+
};
|
|
65
|
+
JSON: {
|
|
66
|
+
input: any;
|
|
67
|
+
output: any;
|
|
68
|
+
};
|
|
69
|
+
JSONObject: {
|
|
70
|
+
input: any;
|
|
71
|
+
output: any;
|
|
72
|
+
};
|
|
73
|
+
Set: {
|
|
74
|
+
input: any;
|
|
75
|
+
output: any;
|
|
76
|
+
};
|
|
77
|
+
URL: {
|
|
78
|
+
input: string;
|
|
79
|
+
output: string;
|
|
80
|
+
};
|
|
81
|
+
Void: {
|
|
82
|
+
input: void;
|
|
83
|
+
output: void;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
export type Agent = {
|
|
87
|
+
createdAt: Scalars['DateTime']['output'];
|
|
88
|
+
groupIds?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
|
|
89
|
+
groups?: Maybe<Array<AgentGroup>>;
|
|
90
|
+
id: Scalars['ID']['output'];
|
|
91
|
+
name: Scalars['String']['output'];
|
|
92
|
+
updatedAt: Scalars['DateTime']['output'];
|
|
93
|
+
};
|
|
94
|
+
export type AgentGroup = {
|
|
95
|
+
createdAt: Scalars['DateTime']['output'];
|
|
96
|
+
id: Scalars['ID']['output'];
|
|
97
|
+
name: Scalars['String']['output'];
|
|
98
|
+
updatedAt: Scalars['DateTime']['output'];
|
|
99
|
+
};
|
|
100
|
+
export type AgentGroupsConnection = {
|
|
101
|
+
nodes: Array<AgentGroup>;
|
|
102
|
+
pageInfo: PageInfo;
|
|
103
|
+
};
|
|
104
|
+
export type AgentsConnection = {
|
|
105
|
+
nodes: Array<Agent>;
|
|
106
|
+
pageInfo: PageInfo;
|
|
107
|
+
};
|
|
108
|
+
export type CreateAgentGroupInput = {
|
|
109
|
+
name: Scalars['ID']['input'];
|
|
110
|
+
};
|
|
111
|
+
export type CreateAgentInput = {
|
|
112
|
+
groupIds: Array<Scalars['String']['input']>;
|
|
113
|
+
name: Scalars['String']['input'];
|
|
114
|
+
};
|
|
115
|
+
export type Mutation = {
|
|
116
|
+
createAgent: Agent;
|
|
117
|
+
createAgentGroup: AgentGroup;
|
|
118
|
+
version?: Maybe<Scalars['String']['output']>;
|
|
119
|
+
};
|
|
120
|
+
export type MutationCreateAgentArgs = {
|
|
121
|
+
input: CreateAgentInput;
|
|
122
|
+
};
|
|
123
|
+
export type MutationCreateAgentGroupArgs = {
|
|
124
|
+
input: CreateAgentGroupInput;
|
|
125
|
+
};
|
|
126
|
+
export type PageInfo = {
|
|
127
|
+
hasNext: Scalars['Boolean']['output'];
|
|
128
|
+
next?: Maybe<Scalars['Base64']['output']>;
|
|
129
|
+
};
|
|
130
|
+
export type Query = {
|
|
131
|
+
app?: Maybe<Scalars['DRN']['output']>;
|
|
132
|
+
getAgent?: Maybe<Agent>;
|
|
133
|
+
getWsEndpoint?: Maybe<Scalars['String']['output']>;
|
|
134
|
+
listAgentGroups: AgentGroupsConnection;
|
|
135
|
+
listAgents: AgentsConnection;
|
|
136
|
+
version?: Maybe<Scalars['String']['output']>;
|
|
137
|
+
};
|
|
138
|
+
export type QueryGetAgentArgs = {
|
|
139
|
+
id: Scalars['ID']['input'];
|
|
140
|
+
};
|
|
141
|
+
export type QueryListAgentGroupsArgs = {
|
|
142
|
+
next?: InputMaybe<Scalars['Base64']['input']>;
|
|
143
|
+
};
|
|
144
|
+
export type QueryListAgentsArgs = {
|
|
145
|
+
next?: InputMaybe<Scalars['Base64']['input']>;
|
|
146
|
+
};
|
|
147
|
+
export type Subscription = {
|
|
148
|
+
version?: Maybe<Scalars['String']['output']>;
|
|
149
|
+
};
|
|
150
|
+
export declare enum SubscriptionAction {
|
|
151
|
+
Created = "CREATED",
|
|
152
|
+
Removed = "REMOVED",
|
|
153
|
+
Updated = "UPDATED"
|
|
154
|
+
}
|
|
155
|
+
export declare enum Typenames {
|
|
156
|
+
AgentGroups = "AgentGroups",
|
|
157
|
+
Agents = "Agents",
|
|
158
|
+
Any = "Any",
|
|
159
|
+
GraphqlConnections = "GraphqlConnections",
|
|
160
|
+
GraphqlSubscriptions = "GraphqlSubscriptions"
|
|
161
|
+
}
|
|
162
|
+
export type AgentFragment = (Pick<Agent, 'id' | 'name' | 'groupIds' | 'createdAt' | 'updatedAt'> & {
|
|
163
|
+
groups?: Maybe<Array<AgentGroupFragment>>;
|
|
164
|
+
});
|
|
165
|
+
export type AgentGroupFragment = Pick<AgentGroup, 'id' | 'name' | 'createdAt' | 'updatedAt'>;
|
|
166
|
+
export type CreateAgentMutationVariables = Exact<{
|
|
167
|
+
input: CreateAgentInput;
|
|
168
|
+
}>;
|
|
169
|
+
export type CreateAgentMutation = {
|
|
170
|
+
createAgent: AgentFragment;
|
|
171
|
+
};
|
|
172
|
+
export type ListAgentsQueryVariables = Exact<{
|
|
173
|
+
next?: InputMaybe<Scalars['Base64']['input']>;
|
|
174
|
+
}>;
|
|
175
|
+
export type ListAgentsQuery = {
|
|
176
|
+
listAgents: {
|
|
177
|
+
pageInfo: Pick<PageInfo, 'hasNext' | 'next'>;
|
|
178
|
+
nodes: Array<AgentFragment>;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
export type GetAgentQueryVariables = Exact<{
|
|
182
|
+
id: Scalars['ID']['input'];
|
|
183
|
+
}>;
|
|
184
|
+
export type GetAgentQuery = {
|
|
185
|
+
getAgent?: Maybe<AgentFragment>;
|
|
186
|
+
};
|
|
187
|
+
export type CreateAgentGroupMutationVariables = Exact<{
|
|
188
|
+
input: CreateAgentGroupInput;
|
|
189
|
+
}>;
|
|
190
|
+
export type CreateAgentGroupMutation = {
|
|
191
|
+
createAgentGroup: AgentGroupFragment;
|
|
192
|
+
};
|
|
193
|
+
export type ListAgentGroupsQueryVariables = Exact<{
|
|
194
|
+
next?: InputMaybe<Scalars['Base64']['input']>;
|
|
195
|
+
}>;
|
|
196
|
+
export type ListAgentGroupsQuery = {
|
|
197
|
+
listAgentGroups: {
|
|
198
|
+
pageInfo: Pick<PageInfo, 'hasNext' | 'next'>;
|
|
199
|
+
nodes: Array<AgentGroupFragment>;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
export declare const AgentGroupFragmentDoc = "\n fragment agentGroup on AgentGroup {\n id\n name\n createdAt\n updatedAt\n}\n ";
|
|
203
|
+
export declare const AgentFragmentDoc = "\n fragment agent on Agent {\n id\n name\n groupIds\n createdAt\n updatedAt\n groups {\n ...agentGroup\n }\n}\n ";
|
|
204
|
+
export declare const CreateAgentDocument = "\n mutation createAgent($input: CreateAgentInput!) {\n createAgent(input: $input) {\n ...agent\n }\n}\n \n fragment agent on Agent {\n id\n name\n groupIds\n createdAt\n updatedAt\n groups {\n ...agentGroup\n }\n}\n \n\n fragment agentGroup on AgentGroup {\n id\n name\n createdAt\n updatedAt\n}\n ";
|
|
205
|
+
export declare const ListAgentsDocument = "\n query listAgents($next: Base64) {\n listAgents(next: $next) {\n pageInfo {\n hasNext\n next\n }\n nodes {\n ...agent\n }\n }\n}\n \n fragment agent on Agent {\n id\n name\n groupIds\n createdAt\n updatedAt\n groups {\n ...agentGroup\n }\n}\n \n\n fragment agentGroup on AgentGroup {\n id\n name\n createdAt\n updatedAt\n}\n ";
|
|
206
|
+
export declare const GetAgentDocument = "\n query getAgent($id: ID!) {\n getAgent(id: $id) {\n ...agent\n }\n}\n \n fragment agent on Agent {\n id\n name\n groupIds\n createdAt\n updatedAt\n groups {\n ...agentGroup\n }\n}\n \n\n fragment agentGroup on AgentGroup {\n id\n name\n createdAt\n updatedAt\n}\n ";
|
|
207
|
+
export declare const CreateAgentGroupDocument = "\n mutation createAgentGroup($input: CreateAgentGroupInput!) {\n createAgentGroup(input: $input) {\n ...agentGroup\n }\n}\n \n fragment agentGroup on AgentGroup {\n id\n name\n createdAt\n updatedAt\n}\n ";
|
|
208
|
+
export declare const ListAgentGroupsDocument = "\n query listAgentGroups($next: Base64) {\n listAgentGroups(next: $next) {\n pageInfo {\n hasNext\n next\n }\n nodes {\n ...agentGroup\n }\n }\n}\n \n fragment agentGroup on AgentGroup {\n id\n name\n createdAt\n updatedAt\n}\n ";
|
|
209
|
+
export type Requester<C = {}, E = unknown> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | Observable<R>;
|
|
210
|
+
export declare function getSdk<C, E>(requester: Requester<C, E>): {
|
|
211
|
+
createAgent(variables: CreateAgentMutationVariables, options?: C): Promise<CreateAgentMutation>;
|
|
212
|
+
listAgents(variables?: ListAgentsQueryVariables, options?: C): Promise<ListAgentsQuery>;
|
|
213
|
+
getAgent(variables: GetAgentQueryVariables, options?: C): Promise<GetAgentQuery>;
|
|
214
|
+
createAgentGroup(variables: CreateAgentGroupMutationVariables, options?: C): Promise<CreateAgentGroupMutation>;
|
|
215
|
+
listAgentGroups(variables?: ListAgentGroupsQueryVariables, options?: C): Promise<ListAgentGroupsQuery>;
|
|
216
|
+
};
|
|
217
|
+
export type Sdk = ReturnType<typeof getSdk>;
|
|
218
|
+
export declare const serviceName = "@droz/droznexo";
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.serviceName = exports.getSdk = exports.ListAgentGroupsDocument = exports.CreateAgentGroupDocument = exports.GetAgentDocument = exports.ListAgentsDocument = exports.CreateAgentDocument = exports.AgentFragmentDoc = exports.AgentGroupFragmentDoc = exports.Typenames = exports.SubscriptionAction = void 0;
|
|
5
|
+
var SubscriptionAction;
|
|
6
|
+
(function (SubscriptionAction) {
|
|
7
|
+
SubscriptionAction["Created"] = "CREATED";
|
|
8
|
+
SubscriptionAction["Removed"] = "REMOVED";
|
|
9
|
+
SubscriptionAction["Updated"] = "UPDATED";
|
|
10
|
+
})(SubscriptionAction || (exports.SubscriptionAction = SubscriptionAction = {}));
|
|
11
|
+
var Typenames;
|
|
12
|
+
(function (Typenames) {
|
|
13
|
+
Typenames["AgentGroups"] = "AgentGroups";
|
|
14
|
+
Typenames["Agents"] = "Agents";
|
|
15
|
+
Typenames["Any"] = "Any";
|
|
16
|
+
Typenames["GraphqlConnections"] = "GraphqlConnections";
|
|
17
|
+
Typenames["GraphqlSubscriptions"] = "GraphqlSubscriptions";
|
|
18
|
+
})(Typenames || (exports.Typenames = Typenames = {}));
|
|
19
|
+
exports.AgentGroupFragmentDoc = `
|
|
20
|
+
fragment agentGroup on AgentGroup {
|
|
21
|
+
id
|
|
22
|
+
name
|
|
23
|
+
createdAt
|
|
24
|
+
updatedAt
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
exports.AgentFragmentDoc = `
|
|
28
|
+
fragment agent on Agent {
|
|
29
|
+
id
|
|
30
|
+
name
|
|
31
|
+
groupIds
|
|
32
|
+
createdAt
|
|
33
|
+
updatedAt
|
|
34
|
+
groups {
|
|
35
|
+
...agentGroup
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
exports.CreateAgentDocument = `
|
|
40
|
+
mutation createAgent($input: CreateAgentInput!) {
|
|
41
|
+
createAgent(input: $input) {
|
|
42
|
+
...agent
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
${exports.AgentFragmentDoc}
|
|
46
|
+
${exports.AgentGroupFragmentDoc}`;
|
|
47
|
+
exports.ListAgentsDocument = `
|
|
48
|
+
query listAgents($next: Base64) {
|
|
49
|
+
listAgents(next: $next) {
|
|
50
|
+
pageInfo {
|
|
51
|
+
hasNext
|
|
52
|
+
next
|
|
53
|
+
}
|
|
54
|
+
nodes {
|
|
55
|
+
...agent
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
${exports.AgentFragmentDoc}
|
|
60
|
+
${exports.AgentGroupFragmentDoc}`;
|
|
61
|
+
exports.GetAgentDocument = `
|
|
62
|
+
query getAgent($id: ID!) {
|
|
63
|
+
getAgent(id: $id) {
|
|
64
|
+
...agent
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
${exports.AgentFragmentDoc}
|
|
68
|
+
${exports.AgentGroupFragmentDoc}`;
|
|
69
|
+
exports.CreateAgentGroupDocument = `
|
|
70
|
+
mutation createAgentGroup($input: CreateAgentGroupInput!) {
|
|
71
|
+
createAgentGroup(input: $input) {
|
|
72
|
+
...agentGroup
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
${exports.AgentGroupFragmentDoc}`;
|
|
76
|
+
exports.ListAgentGroupsDocument = `
|
|
77
|
+
query listAgentGroups($next: Base64) {
|
|
78
|
+
listAgentGroups(next: $next) {
|
|
79
|
+
pageInfo {
|
|
80
|
+
hasNext
|
|
81
|
+
next
|
|
82
|
+
}
|
|
83
|
+
nodes {
|
|
84
|
+
...agentGroup
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
${exports.AgentGroupFragmentDoc}`;
|
|
89
|
+
function getSdk(requester) {
|
|
90
|
+
return {
|
|
91
|
+
createAgent(variables, options) {
|
|
92
|
+
return requester(exports.CreateAgentDocument, variables, options);
|
|
93
|
+
},
|
|
94
|
+
listAgents(variables, options) {
|
|
95
|
+
return requester(exports.ListAgentsDocument, variables, options);
|
|
96
|
+
},
|
|
97
|
+
getAgent(variables, options) {
|
|
98
|
+
return requester(exports.GetAgentDocument, variables, options);
|
|
99
|
+
},
|
|
100
|
+
createAgentGroup(variables, options) {
|
|
101
|
+
return requester(exports.CreateAgentGroupDocument, variables, options);
|
|
102
|
+
},
|
|
103
|
+
listAgentGroups(variables, options) {
|
|
104
|
+
return requester(exports.ListAgentGroupsDocument, variables, options);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
exports.getSdk = getSdk;
|
|
109
|
+
exports.serviceName = '@droz/droznexo';
|