@droz-js/sdk 0.2.15 → 0.2.17
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 +4 -3
- package/src/client/config.js +2 -2
- package/src/client/helpers.d.ts +10 -1
- package/src/client/helpers.js +22 -7
- package/src/client/http.js +1 -1
- package/src/client/ws.js +3 -2
- package/src/drozchat-ws.d.ts +0 -9
- package/src/drozchat.d.ts +0 -9
- package/src/droznexo.d.ts +11 -14
- package/src/nucleus.d.ts +13 -2
- package/src/sdks/chatwidget.d.ts +10 -8
- package/src/sdks/chatwidget.js +2 -0
- package/src/sdks/drozbot.d.ts +10 -8
- package/src/sdks/drozbot.js +2 -0
- package/src/sdks/drozchat.d.ts +28 -83
- package/src/sdks/drozchat.js +2 -44
- package/src/sdks/drozcommons.d.ts +1 -1
- package/src/sdks/droznexo.d.ts +74 -84
- package/src/sdks/droznexo.js +64 -67
- package/src/sdks/mercadolivre.d.ts +10 -8
- package/src/sdks/mercadolivre.js +2 -0
- package/src/sdks/nucleus.d.ts +101 -27
- package/src/sdks/nucleus.js +53 -11
- package/src/sdks/reclameaqui.d.ts +10 -8
- package/src/sdks/reclameaqui.js +2 -0
- package/src/sdks/zendesk.d.ts +10 -8
- package/src/sdks/zendesk.js +2 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@droz-js/sdk",
|
|
3
3
|
"description": "Droz SDK",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.17",
|
|
5
5
|
"private": false,
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./src/index.js",
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
"clean": "npx rimraf src/*.js src/*.d.ts src/**/*.js src/**/*.d.ts",
|
|
14
14
|
"prebuild": "npm run clean",
|
|
15
15
|
"build": "tsc --project tsconfig-build.json",
|
|
16
|
-
"prepublishOnly": "npm run build"
|
|
16
|
+
"prepublishOnly": "npm run build",
|
|
17
|
+
"postpublish": "npm run clean"
|
|
17
18
|
},
|
|
18
19
|
"dependencies": {
|
|
19
20
|
"graphql": "^16.8.1",
|
|
20
|
-
"graphql-ws": "^5.14.
|
|
21
|
+
"graphql-ws": "^5.14.2",
|
|
21
22
|
"inbatches": "^0.0.10"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
package/src/client/config.js
CHANGED
|
@@ -22,7 +22,7 @@ class TenantConfig {
|
|
|
22
22
|
}
|
|
23
23
|
return instance.endpoint;
|
|
24
24
|
}
|
|
25
|
-
throw new
|
|
25
|
+
throw new helpers_1.SdkConfigurationError(`Tenant "${this.tenant}" endpoint for service "${serviceId}" and type "${type}" not found`);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
@@ -73,7 +73,7 @@ class DrozSdk {
|
|
|
73
73
|
const instances = json.instances ?? [];
|
|
74
74
|
// validate it's a valid tenant
|
|
75
75
|
if (instances.length === 0) {
|
|
76
|
-
throw new
|
|
76
|
+
throw new helpers_1.SdkConfigurationError(`Invalid tenant '${tenant}', no instances found on service discovery`);
|
|
77
77
|
}
|
|
78
78
|
// create tenant config and cache it
|
|
79
79
|
return new TenantConfig(tenant, instances);
|
package/src/client/helpers.d.ts
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
import type { ExecutionResult } from 'graphql';
|
|
1
|
+
import type { ExecutionResult, GraphQLError } from 'graphql';
|
|
2
2
|
export declare const serviceDiscoveryEndpoint = "https://root.droz.services";
|
|
3
3
|
export type AuthorizationProvider = string | (() => Promise<string>) | (() => string);
|
|
4
4
|
export type Requester<C = {}> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | AsyncIterableIterator<R>;
|
|
5
5
|
export type GetSdk<Sdk> = (requester: Requester<Sdk>) => Sdk;
|
|
6
|
+
export declare class SdkError extends Error {
|
|
7
|
+
statusCode?: number;
|
|
8
|
+
errorCode?: string;
|
|
9
|
+
errors?: ReadonlyArray<GraphQLError>;
|
|
10
|
+
constructor(errors: ReadonlyArray<GraphQLError>);
|
|
11
|
+
}
|
|
12
|
+
export declare class SdkConfigurationError extends Error {
|
|
13
|
+
constructor(message: string);
|
|
14
|
+
}
|
|
6
15
|
export declare function toAuthorizationProvider(type?: string, ...values: string[]): AuthorizationProvider;
|
|
7
16
|
export declare function resolveAuthorization(provider?: AuthorizationProvider): Promise<string>;
|
|
8
17
|
export declare function mapGraphqlResponse<T>(response: ExecutionResult<T> | Error): T;
|
package/src/client/helpers.js
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mapAsyncIterableGraphqlResponse = exports.mapGraphqlResponse = exports.resolveAuthorization = exports.toAuthorizationProvider = exports.serviceDiscoveryEndpoint = void 0;
|
|
3
|
+
exports.mapAsyncIterableGraphqlResponse = exports.mapGraphqlResponse = exports.resolveAuthorization = exports.toAuthorizationProvider = exports.SdkConfigurationError = exports.SdkError = exports.serviceDiscoveryEndpoint = void 0;
|
|
4
4
|
exports.serviceDiscoveryEndpoint = 'https://root.droz.services';
|
|
5
|
+
class SdkError extends Error {
|
|
6
|
+
statusCode;
|
|
7
|
+
errorCode;
|
|
8
|
+
errors;
|
|
9
|
+
constructor(errors) {
|
|
10
|
+
const { message, extensions } = errors[0];
|
|
11
|
+
super(message);
|
|
12
|
+
this.errors = errors;
|
|
13
|
+
this.statusCode = extensions.statusCode;
|
|
14
|
+
this.errorCode = extensions.errorCode;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.SdkError = SdkError;
|
|
18
|
+
class SdkConfigurationError extends Error {
|
|
19
|
+
constructor(message) {
|
|
20
|
+
super(message);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.SdkConfigurationError = SdkConfigurationError;
|
|
5
24
|
function toAuthorizationProvider(type, ...values) {
|
|
6
25
|
// this means it is unsetting the authorization token
|
|
7
26
|
if (!type)
|
|
@@ -15,11 +34,7 @@ function toAuthorizationProvider(type, ...values) {
|
|
|
15
34
|
if (type == 'Bearer') {
|
|
16
35
|
return `Bearer ${values[0]}`;
|
|
17
36
|
}
|
|
18
|
-
|
|
19
|
-
if (type == 'Mock') {
|
|
20
|
-
return `Mock ${values[0]}`;
|
|
21
|
-
}
|
|
22
|
-
throw new Error(`Invalid authentication type '${type}'`);
|
|
37
|
+
throw new SdkConfigurationError(`Invalid authentication type '${type}'`);
|
|
23
38
|
}
|
|
24
39
|
exports.toAuthorizationProvider = toAuthorizationProvider;
|
|
25
40
|
async function resolveAuthorization(provider) {
|
|
@@ -35,7 +50,7 @@ function mapGraphqlResponse(response) {
|
|
|
35
50
|
if (response && 'stack' in response && 'message' in response)
|
|
36
51
|
throw response;
|
|
37
52
|
if ('errors' in response)
|
|
38
|
-
throw new
|
|
53
|
+
throw new SdkError(response.errors);
|
|
39
54
|
if ('data' in response)
|
|
40
55
|
return response.data;
|
|
41
56
|
}
|
package/src/client/http.js
CHANGED
|
@@ -98,7 +98,7 @@ class HttpRequester {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
__decorate([
|
|
101
|
-
(0, inbatches_1.InBatches)({ maxBatchSize:
|
|
101
|
+
(0, inbatches_1.InBatches)({ maxBatchSize: 20 }),
|
|
102
102
|
__metadata("design:type", Function),
|
|
103
103
|
__metadata("design:paramtypes", [Object]),
|
|
104
104
|
__metadata("design:returntype", Promise)
|
package/src/client/ws.js
CHANGED
|
@@ -32,8 +32,9 @@ class WsRequester {
|
|
|
32
32
|
return this.requester.bind(this);
|
|
33
33
|
}
|
|
34
34
|
requester(query, variables) {
|
|
35
|
-
if (!this.client)
|
|
36
|
-
throw new
|
|
35
|
+
if (!this.client) {
|
|
36
|
+
throw new helpers_1.SdkConfigurationError('ws client not connected, you must call await client.connect(); first');
|
|
37
|
+
}
|
|
37
38
|
const isSubscription = query.trim().startsWith('subscription ');
|
|
38
39
|
const operation = { query, variables };
|
|
39
40
|
const iterable = this.client.iterate(operation);
|
package/src/drozchat-ws.d.ts
CHANGED
|
@@ -3,15 +3,6 @@ export declare const DrozChatWs: new () => {
|
|
|
3
3
|
readonly ws: any;
|
|
4
4
|
connect(): Promise<void>;
|
|
5
5
|
} & {
|
|
6
|
-
createDrozChatAgent(variables: import("./sdks/drozchat").Exact<{
|
|
7
|
-
input: import("./sdks/drozchat").CreateDrozChatAgentInput;
|
|
8
|
-
}>, options?: unknown): Promise<import("./sdks/drozchat").CreateDrozChatAgentMutation>;
|
|
9
|
-
listDrozChatAgents(variables?: import("./sdks/drozchat").Exact<{
|
|
10
|
-
next?: object;
|
|
11
|
-
}>, options?: unknown): Promise<import("./sdks/drozchat").ListDrozChatAgentsQuery>;
|
|
12
|
-
getDrozChatAgent(variables: import("./sdks/drozchat").Exact<{
|
|
13
|
-
id: string;
|
|
14
|
-
}>, options?: unknown): Promise<import("./sdks/drozchat").GetDrozChatAgentQuery>;
|
|
15
6
|
getTicket(variables: import("./sdks/drozchat").Exact<{
|
|
16
7
|
id: string;
|
|
17
8
|
}>, options?: unknown): Promise<import("./sdks/drozchat").GetTicketQuery>;
|
package/src/drozchat.d.ts
CHANGED
|
@@ -5,15 +5,6 @@ export declare const DrozChat: new (options?: import("./client/http").HttpClient
|
|
|
5
5
|
withAuthorization(authorization: import("./client/helpers").AuthorizationProvider): any;
|
|
6
6
|
withCustomHeaders(headers: () => Record<string, string>): any;
|
|
7
7
|
} & {
|
|
8
|
-
createDrozChatAgent(variables: import("./sdks/drozchat").Exact<{
|
|
9
|
-
input: import("./sdks/drozchat").CreateDrozChatAgentInput;
|
|
10
|
-
}>, options?: unknown): Promise<import("./sdks/drozchat").CreateDrozChatAgentMutation>;
|
|
11
|
-
listDrozChatAgents(variables?: import("./sdks/drozchat").Exact<{
|
|
12
|
-
next?: object;
|
|
13
|
-
}>, options?: unknown): Promise<import("./sdks/drozchat").ListDrozChatAgentsQuery>;
|
|
14
|
-
getDrozChatAgent(variables: import("./sdks/drozchat").Exact<{
|
|
15
|
-
id: string;
|
|
16
|
-
}>, options?: unknown): Promise<import("./sdks/drozchat").GetDrozChatAgentQuery>;
|
|
17
8
|
getTicket(variables: import("./sdks/drozchat").Exact<{
|
|
18
9
|
id: string;
|
|
19
10
|
}>, options?: unknown): Promise<import("./sdks/drozchat").GetTicketQuery>;
|
package/src/droznexo.d.ts
CHANGED
|
@@ -5,19 +5,16 @@ export declare const DrozNexo: new (options?: import("./client/http").HttpClient
|
|
|
5
5
|
withAuthorization(authorization: import("./client/helpers").AuthorizationProvider): any;
|
|
6
6
|
withCustomHeaders(headers: () => Record<string, string>): any;
|
|
7
7
|
} & {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}>, options?: unknown): Promise<import("./sdks/droznexo").
|
|
11
|
-
|
|
8
|
+
listDrozNexoSuggestions(variables?: import("./sdks/droznexo").Exact<{
|
|
9
|
+
[key: string]: never;
|
|
10
|
+
}>, options?: unknown): Promise<import("./sdks/droznexo").ListDrozNexoSuggestionsQuery>;
|
|
11
|
+
listDrozNexoConnections(variables?: import("./sdks/droznexo").Exact<{
|
|
12
12
|
next?: object;
|
|
13
|
-
}>, options?: unknown): Promise<import("./sdks/droznexo").
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}>, options?: unknown): Promise<import("./sdks/droznexo").
|
|
17
|
-
|
|
18
|
-
input: import("./sdks/droznexo").
|
|
19
|
-
}>, options?: unknown): Promise<import("./sdks/droznexo").
|
|
20
|
-
listDrozNexoAgentGroups(variables?: import("./sdks/droznexo").Exact<{
|
|
21
|
-
next?: object;
|
|
22
|
-
}>, options?: unknown): Promise<import("./sdks/droznexo").ListDrozNexoAgentGroupsQuery>;
|
|
13
|
+
}>, options?: unknown): Promise<import("./sdks/droznexo").ListDrozNexoConnectionsQuery>;
|
|
14
|
+
createDrozNexoConnection(variables: import("./sdks/droznexo").Exact<{
|
|
15
|
+
input: import("./sdks/droznexo").CreateDrozNexoConnectionInput;
|
|
16
|
+
}>, options?: unknown): Promise<import("./sdks/droznexo").CreateDrozNexoConnectionMutation>;
|
|
17
|
+
removeDrozNexoConnection(variables: import("./sdks/droznexo").Exact<{
|
|
18
|
+
input: import("./sdks/droznexo").RemoveDrozNexoConnectionInput;
|
|
19
|
+
}>, options?: unknown): Promise<import("./sdks/droznexo").RemoveDrozNexoConnectionMutation>;
|
|
23
20
|
};
|
package/src/nucleus.d.ts
CHANGED
|
@@ -5,6 +5,9 @@ export declare const Nucleus: new (options?: import("./client/http").HttpClientO
|
|
|
5
5
|
withAuthorization(authorization: import("./client/helpers").AuthorizationProvider): any;
|
|
6
6
|
withCustomHeaders(headers: () => Record<string, string>): any;
|
|
7
7
|
} & {
|
|
8
|
+
getMe(variables?: import("./sdks/nucleus").Exact<{
|
|
9
|
+
[key: string]: never;
|
|
10
|
+
}>, options?: unknown): Promise<import("./sdks/nucleus").GetMeQuery>;
|
|
8
11
|
getAgent(variables: import("./sdks/nucleus").Exact<{
|
|
9
12
|
id: string;
|
|
10
13
|
}>, options?: unknown): Promise<import("./sdks/nucleus").GetAgentQuery>;
|
|
@@ -20,6 +23,12 @@ export declare const Nucleus: new (options?: import("./client/http").HttpClientO
|
|
|
20
23
|
removeAgent(variables: import("./sdks/nucleus").Exact<{
|
|
21
24
|
input: import("./sdks/nucleus").RemoveAgentInput;
|
|
22
25
|
}>, options?: unknown): Promise<import("./sdks/nucleus").RemoveAgentMutation>;
|
|
26
|
+
addRoleToAgent(variables: import("./sdks/nucleus").Exact<{
|
|
27
|
+
input: import("./sdks/nucleus").AddRoleToAgentInput;
|
|
28
|
+
}>, options?: unknown): Promise<import("./sdks/nucleus").AddRoleToAgentMutation>;
|
|
29
|
+
removeRoleFromAgent(variables: import("./sdks/nucleus").Exact<{
|
|
30
|
+
input: import("./sdks/nucleus").RemoveRoleFromAgentInput;
|
|
31
|
+
}>, options?: unknown): Promise<import("./sdks/nucleus").RemoveRoleFromAgentMutation>;
|
|
23
32
|
getApp(variables: import("./sdks/nucleus").Exact<{
|
|
24
33
|
appId: string;
|
|
25
34
|
withInstances?: boolean;
|
|
@@ -110,10 +119,12 @@ export declare const Nucleus: new (options?: import("./client/http").HttpClientO
|
|
|
110
119
|
versionId: string;
|
|
111
120
|
}>, options?: unknown): Promise<import("./sdks/nucleus").GetStateMachineQuery>;
|
|
112
121
|
listLiveStateMachineConfigs(variables?: import("./sdks/nucleus").Exact<{
|
|
113
|
-
|
|
122
|
+
createdByAppId?: string;
|
|
123
|
+
next?: object;
|
|
114
124
|
}>, options?: unknown): Promise<import("./sdks/nucleus").ListLiveStateMachineConfigsQuery>;
|
|
115
125
|
listDraftStateMachineConfigs(variables?: import("./sdks/nucleus").Exact<{
|
|
116
|
-
|
|
126
|
+
createdByAppId?: string;
|
|
127
|
+
next?: object;
|
|
117
128
|
}>, options?: unknown): Promise<import("./sdks/nucleus").ListDraftStateMachineConfigsQuery>;
|
|
118
129
|
listStateMachineConfigVersions(variables: import("./sdks/nucleus").Exact<{
|
|
119
130
|
id: string;
|
package/src/sdks/chatwidget.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export type Scalars = {
|
|
|
74
74
|
output: string;
|
|
75
75
|
};
|
|
76
76
|
Set: {
|
|
77
|
-
input:
|
|
77
|
+
input: any;
|
|
78
78
|
output: any[];
|
|
79
79
|
};
|
|
80
80
|
URL: {
|
|
@@ -92,8 +92,10 @@ export declare enum AppInstanceStatus {
|
|
|
92
92
|
Inactive = "Inactive"
|
|
93
93
|
}
|
|
94
94
|
export type ChatWidget = {
|
|
95
|
+
createdAt: Scalars['DateTime']['output'];
|
|
95
96
|
id: Scalars['ID']['output'];
|
|
96
97
|
name: Scalars['String']['output'];
|
|
98
|
+
updatedAt: Scalars['DateTime']['output'];
|
|
97
99
|
};
|
|
98
100
|
export type ChatWidgetMessage = {
|
|
99
101
|
id: Scalars['ID']['output'];
|
|
@@ -184,7 +186,7 @@ export type UpdateChatWidgetInput = {
|
|
|
184
186
|
id: Scalars['ID']['input'];
|
|
185
187
|
name: Scalars['String']['input'];
|
|
186
188
|
};
|
|
187
|
-
export type ChatWidgetFragment = Pick<ChatWidget, 'id' | 'name'>;
|
|
189
|
+
export type ChatWidgetFragment = Pick<ChatWidget, 'id' | 'name' | 'createdAt' | 'updatedAt'>;
|
|
188
190
|
export type ChatWidgetMessageFragment = (Pick<ChatWidgetMessage, 'id'> & {
|
|
189
191
|
payload: Array<Pick<ChatWidgetMessagePayload, 'contentType' | 'content' | 'filename'>>;
|
|
190
192
|
});
|
|
@@ -234,13 +236,13 @@ export type OnChatWidgetMessageSubscriptionVariables = Exact<{
|
|
|
234
236
|
export type OnChatWidgetMessageSubscription = {
|
|
235
237
|
onChatWidgetMessage: ChatWidgetMessageFragment;
|
|
236
238
|
};
|
|
237
|
-
export declare const ChatWidgetFragmentDoc = "\n fragment chatWidget on ChatWidget {\n id\n name\n}\n ";
|
|
239
|
+
export declare const ChatWidgetFragmentDoc = "\n fragment chatWidget on ChatWidget {\n id\n name\n createdAt\n updatedAt\n}\n ";
|
|
238
240
|
export declare const ChatWidgetMessageFragmentDoc = "\n fragment chatWidgetMessage on ChatWidgetMessage {\n id\n payload {\n contentType\n content\n filename\n }\n}\n ";
|
|
239
|
-
export declare const GetChatWidgetDocument = "\n query getChatWidget($id: ID!) {\n getChatWidget(id: $id) {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n}\n ";
|
|
240
|
-
export declare const ListChatWidgetsDocument = "\n query listChatWidgets {\n listChatWidgets {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n}\n ";
|
|
241
|
-
export declare const CreateChatWidgetDocument = "\n mutation createChatWidget($input: CreateChatWidgetInput!) {\n createChatWidget(input: $input) {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n}\n ";
|
|
242
|
-
export declare const UpdateChatWidgetDocument = "\n mutation updateChatWidget($input: UpdateChatWidgetInput!) {\n updateChatWidget(input: $input) {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n}\n ";
|
|
243
|
-
export declare const RemoveChatWidgetDocument = "\n mutation removeChatWidget($input: RemoveChatWidgetInput!) {\n removeChatWidget(input: $input) {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n}\n ";
|
|
241
|
+
export declare const GetChatWidgetDocument = "\n query getChatWidget($id: ID!) {\n getChatWidget(id: $id) {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n createdAt\n updatedAt\n}\n ";
|
|
242
|
+
export declare const ListChatWidgetsDocument = "\n query listChatWidgets {\n listChatWidgets {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n createdAt\n updatedAt\n}\n ";
|
|
243
|
+
export declare const CreateChatWidgetDocument = "\n mutation createChatWidget($input: CreateChatWidgetInput!) {\n createChatWidget(input: $input) {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n createdAt\n updatedAt\n}\n ";
|
|
244
|
+
export declare const UpdateChatWidgetDocument = "\n mutation updateChatWidget($input: UpdateChatWidgetInput!) {\n updateChatWidget(input: $input) {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n createdAt\n updatedAt\n}\n ";
|
|
245
|
+
export declare const RemoveChatWidgetDocument = "\n mutation removeChatWidget($input: RemoveChatWidgetInput!) {\n removeChatWidget(input: $input) {\n ...chatWidget\n }\n}\n \n fragment chatWidget on ChatWidget {\n id\n name\n createdAt\n updatedAt\n}\n ";
|
|
244
246
|
export declare const StartChatWidgetSessionDocument = "\n mutation startChatWidgetSession($input: StartChatWidgetSessionInput!) {\n startChatWidgetSession(input: $input) {\n id\n }\n}\n ";
|
|
245
247
|
export declare const SendMessageToChatWidgetDocument = "\n mutation sendMessageToChatWidget($input: SendMessageToChatWidgetInput!) {\n sendMessageToChatWidget(input: $input)\n}\n ";
|
|
246
248
|
export declare const OnChatWidgetMessageDocument = "\n subscription onChatWidgetMessage($sessionId: ID!) {\n onChatWidgetMessage(sessionId: $sessionId) {\n ...chatWidgetMessage\n }\n}\n \n fragment chatWidgetMessage on ChatWidgetMessage {\n id\n payload {\n contentType\n content\n filename\n }\n}\n ";
|
package/src/sdks/chatwidget.js
CHANGED
package/src/sdks/drozbot.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export type Scalars = {
|
|
|
74
74
|
output: string;
|
|
75
75
|
};
|
|
76
76
|
Set: {
|
|
77
|
-
input:
|
|
77
|
+
input: any;
|
|
78
78
|
output: any[];
|
|
79
79
|
};
|
|
80
80
|
URL: {
|
|
@@ -114,10 +114,12 @@ export type CreateDrozBotTicketProfileInput = {
|
|
|
114
114
|
phone?: InputMaybe<Scalars['PhoneNumber']['input']>;
|
|
115
115
|
};
|
|
116
116
|
export type DrozBotInstance = {
|
|
117
|
+
createdAt: Scalars['DateTime']['output'];
|
|
117
118
|
credentialsId: Scalars['ID']['output'];
|
|
118
119
|
id: Scalars['ID']['output'];
|
|
119
120
|
isTest?: Maybe<Scalars['Boolean']['output']>;
|
|
120
121
|
name: Scalars['String']['output'];
|
|
122
|
+
updatedAt: Scalars['DateTime']['output'];
|
|
121
123
|
};
|
|
122
124
|
export type DrozBotTicket = {
|
|
123
125
|
id: Scalars['ID']['output'];
|
|
@@ -180,7 +182,7 @@ export type UpdateDrozBotInstanceInput = {
|
|
|
180
182
|
isTest?: InputMaybe<Scalars['Boolean']['input']>;
|
|
181
183
|
name?: InputMaybe<Scalars['String']['input']>;
|
|
182
184
|
};
|
|
183
|
-
export type DrozbotFragment = Pick<DrozBotInstance, 'id' | 'name' | 'credentialsId' | 'isTest'>;
|
|
185
|
+
export type DrozbotFragment = Pick<DrozBotInstance, 'id' | 'name' | 'credentialsId' | 'isTest' | 'createdAt' | 'updatedAt'>;
|
|
184
186
|
export type GetDrozBotInstanceQueryVariables = Exact<{
|
|
185
187
|
id: Scalars['ID']['input'];
|
|
186
188
|
}>;
|
|
@@ -223,12 +225,12 @@ export type CreateDrozBotTicketCommentMutationVariables = Exact<{
|
|
|
223
225
|
export type CreateDrozBotTicketCommentMutation = {
|
|
224
226
|
createDrozBotTicketComment: Pick<DrozBotTicketComment, 'id' | 'ticketId'>;
|
|
225
227
|
};
|
|
226
|
-
export declare const DrozbotFragmentDoc = "\n fragment drozbot on DrozBotInstance {\n id\n name\n credentialsId\n isTest\n}\n ";
|
|
227
|
-
export declare const GetDrozBotInstanceDocument = "\n query getDrozBotInstance($id: ID!) {\n getDrozBotInstance(id: $id) {\n ...drozbot\n }\n}\n \n fragment drozbot on DrozBotInstance {\n id\n name\n credentialsId\n isTest\n}\n ";
|
|
228
|
-
export declare const ListDrozBotInstancesDocument = "\n query listDrozBotInstances {\n listDrozBotInstances {\n ...drozbot\n }\n}\n \n fragment drozbot on DrozBotInstance {\n id\n name\n credentialsId\n isTest\n}\n ";
|
|
229
|
-
export declare const CreateDrozBotInstanceDocument = "\n mutation createDrozBotInstance($input: CreateDrozBotInstanceInput!) {\n createDrozBotInstance(input: $input) {\n ...drozbot\n }\n}\n \n fragment drozbot on DrozBotInstance {\n id\n name\n credentialsId\n isTest\n}\n ";
|
|
230
|
-
export declare const UpdateDrozBotInstanceDocument = "\n mutation updateDrozBotInstance($input: UpdateDrozBotInstanceInput!) {\n updateDrozBotInstance(input: $input) {\n ...drozbot\n }\n}\n \n fragment drozbot on DrozBotInstance {\n id\n name\n credentialsId\n isTest\n}\n ";
|
|
231
|
-
export declare const RemoveDrozBotInstanceDocument = "\n mutation removeDrozBotInstance($input: RemoveDrozBotInstanceInput!) {\n removeDrozBotInstance(input: $input) {\n ...drozbot\n }\n}\n \n fragment drozbot on DrozBotInstance {\n id\n name\n credentialsId\n isTest\n}\n ";
|
|
228
|
+
export declare const DrozbotFragmentDoc = "\n fragment drozbot on DrozBotInstance {\n id\n name\n credentialsId\n isTest\n createdAt\n updatedAt\n}\n ";
|
|
229
|
+
export declare const GetDrozBotInstanceDocument = "\n query getDrozBotInstance($id: ID!) {\n getDrozBotInstance(id: $id) {\n ...drozbot\n }\n}\n \n fragment drozbot on DrozBotInstance {\n id\n name\n credentialsId\n isTest\n createdAt\n updatedAt\n}\n ";
|
|
230
|
+
export declare const ListDrozBotInstancesDocument = "\n query listDrozBotInstances {\n listDrozBotInstances {\n ...drozbot\n }\n}\n \n fragment drozbot on DrozBotInstance {\n id\n name\n credentialsId\n isTest\n createdAt\n updatedAt\n}\n ";
|
|
231
|
+
export declare const CreateDrozBotInstanceDocument = "\n mutation createDrozBotInstance($input: CreateDrozBotInstanceInput!) {\n createDrozBotInstance(input: $input) {\n ...drozbot\n }\n}\n \n fragment drozbot on DrozBotInstance {\n id\n name\n credentialsId\n isTest\n createdAt\n updatedAt\n}\n ";
|
|
232
|
+
export declare const UpdateDrozBotInstanceDocument = "\n mutation updateDrozBotInstance($input: UpdateDrozBotInstanceInput!) {\n updateDrozBotInstance(input: $input) {\n ...drozbot\n }\n}\n \n fragment drozbot on DrozBotInstance {\n id\n name\n credentialsId\n isTest\n createdAt\n updatedAt\n}\n ";
|
|
233
|
+
export declare const RemoveDrozBotInstanceDocument = "\n mutation removeDrozBotInstance($input: RemoveDrozBotInstanceInput!) {\n removeDrozBotInstance(input: $input) {\n ...drozbot\n }\n}\n \n fragment drozbot on DrozBotInstance {\n id\n name\n credentialsId\n isTest\n createdAt\n updatedAt\n}\n ";
|
|
232
234
|
export declare const CreateDrozBotTicketDocument = "\n mutation createDrozBotTicket($input: CreateDrozBotTicketInput!) {\n createDrozBotTicket(input: $input) {\n id\n instanceId\n }\n}\n ";
|
|
233
235
|
export declare const CreateDrozBotTicketCommentDocument = "\n mutation createDrozBotTicketComment($input: CreateDrozBotTicketCommentInput!) {\n createDrozBotTicketComment(input: $input) {\n id\n ticketId\n }\n}\n ";
|
|
234
236
|
export type Requester<C = {}, E = unknown> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | AsyncIterableIterator<R>;
|
package/src/sdks/drozbot.js
CHANGED
package/src/sdks/drozchat.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export type Scalars = {
|
|
|
74
74
|
output: string;
|
|
75
75
|
};
|
|
76
76
|
Set: {
|
|
77
|
-
input:
|
|
77
|
+
input: any;
|
|
78
78
|
output: any[];
|
|
79
79
|
};
|
|
80
80
|
URL: {
|
|
@@ -101,10 +101,6 @@ export type AssignTicketMyselfInput = {
|
|
|
101
101
|
export type CloseTicketInput = {
|
|
102
102
|
ticketId: Scalars['ID']['input'];
|
|
103
103
|
};
|
|
104
|
-
export type CreateDrozChatAgentInput = {
|
|
105
|
-
email: Scalars['EmailAddress']['input'];
|
|
106
|
-
name: Scalars['String']['input'];
|
|
107
|
-
};
|
|
108
104
|
export type CreateTicketInput = {
|
|
109
105
|
customerId: Scalars['ID']['input'];
|
|
110
106
|
subject: Scalars['String']['input'];
|
|
@@ -116,19 +112,18 @@ export type CreateTicketMessageInput = {
|
|
|
116
112
|
type: TicketMessageType;
|
|
117
113
|
};
|
|
118
114
|
export type DrozChatAgent = {
|
|
119
|
-
createdAt: Scalars['
|
|
120
|
-
email: Scalars['EmailAddress']['output'];
|
|
121
|
-
extension?: Maybe<DrozChatAgentExtension>;
|
|
115
|
+
createdAt: Scalars['String']['output'];
|
|
122
116
|
id: Scalars['ID']['output'];
|
|
123
117
|
name: Scalars['String']['output'];
|
|
124
|
-
updatedAt: Scalars['
|
|
118
|
+
updatedAt: Scalars['String']['output'];
|
|
125
119
|
};
|
|
126
|
-
export type
|
|
120
|
+
export type DrozChatCustomer = {
|
|
121
|
+
createdAt: Scalars['String']['output'];
|
|
122
|
+
email: Scalars['String']['output'];
|
|
127
123
|
id: Scalars['ID']['output'];
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
pageInfo: PageInfo;
|
|
124
|
+
name: Scalars['String']['output'];
|
|
125
|
+
phone?: Maybe<Scalars['String']['output']>;
|
|
126
|
+
updatedAt: Scalars['String']['output'];
|
|
132
127
|
};
|
|
133
128
|
export type MarkTicketMessagesAsReadInput = {
|
|
134
129
|
ticketId: Scalars['ID']['input'];
|
|
@@ -137,7 +132,6 @@ export type Mutation = {
|
|
|
137
132
|
assignTicket: Ticket;
|
|
138
133
|
assignTicketMyself: Ticket;
|
|
139
134
|
closeTicket: Ticket;
|
|
140
|
-
createDrozChatAgent: DrozChatAgent;
|
|
141
135
|
createTicket: Ticket;
|
|
142
136
|
createTicketMessage: TicketMessage;
|
|
143
137
|
markTicketMessagesAsRead?: Maybe<Scalars['Void']['output']>;
|
|
@@ -153,9 +147,6 @@ export type MutationAssignTicketMyselfArgs = {
|
|
|
153
147
|
export type MutationCloseTicketArgs = {
|
|
154
148
|
input: CloseTicketInput;
|
|
155
149
|
};
|
|
156
|
-
export type MutationCreateDrozChatAgentArgs = {
|
|
157
|
-
input: CreateDrozChatAgentInput;
|
|
158
|
-
};
|
|
159
150
|
export type MutationCreateTicketArgs = {
|
|
160
151
|
input: CreateTicketInput;
|
|
161
152
|
};
|
|
@@ -174,11 +165,9 @@ export type PageInfo = {
|
|
|
174
165
|
};
|
|
175
166
|
export type Query = {
|
|
176
167
|
app?: Maybe<Scalars['DRN']['output']>;
|
|
177
|
-
getDrozChatAgent?: Maybe<DrozChatAgent>;
|
|
178
168
|
getHttpEndpoint?: Maybe<Scalars['String']['output']>;
|
|
179
169
|
getTicket?: Maybe<Ticket>;
|
|
180
170
|
getWsEndpoint?: Maybe<Scalars['String']['output']>;
|
|
181
|
-
listDrozChatAgents: DrozChatAgentsConnection;
|
|
182
171
|
listTicketMessages: TicketMessagesConnection;
|
|
183
172
|
listTickets: TicketsConnection;
|
|
184
173
|
listTicketsClosed: TicketsConnection;
|
|
@@ -187,15 +176,9 @@ export type Query = {
|
|
|
187
176
|
listTicketsInQueue: TicketsConnection;
|
|
188
177
|
version?: Maybe<Scalars['String']['output']>;
|
|
189
178
|
};
|
|
190
|
-
export type QueryGetDrozChatAgentArgs = {
|
|
191
|
-
id: Scalars['ID']['input'];
|
|
192
|
-
};
|
|
193
179
|
export type QueryGetTicketArgs = {
|
|
194
180
|
id: Scalars['ID']['input'];
|
|
195
181
|
};
|
|
196
|
-
export type QueryListDrozChatAgentsArgs = {
|
|
197
|
-
next?: InputMaybe<Scalars['Base64']['input']>;
|
|
198
|
-
};
|
|
199
182
|
export type QueryListTicketMessagesArgs = {
|
|
200
183
|
next?: InputMaybe<Scalars['Base64']['input']>;
|
|
201
184
|
ticketId: Scalars['ID']['input'];
|
|
@@ -237,7 +220,7 @@ export type Ticket = {
|
|
|
237
220
|
assigneeId?: Maybe<Scalars['ID']['output']>;
|
|
238
221
|
channel?: Maybe<TicketChannel>;
|
|
239
222
|
createdAt: Scalars['DateTime']['output'];
|
|
240
|
-
customer:
|
|
223
|
+
customer: DrozChatCustomer;
|
|
241
224
|
customerId: Scalars['ID']['output'];
|
|
242
225
|
id: Scalars['ID']['output'];
|
|
243
226
|
lastMessage?: Maybe<Scalars['String']['output']>;
|
|
@@ -257,14 +240,6 @@ export type TicketChannel = {
|
|
|
257
240
|
drn?: Maybe<Scalars['DRN']['output']>;
|
|
258
241
|
name?: Maybe<Scalars['String']['output']>;
|
|
259
242
|
};
|
|
260
|
-
export type TicketCustomer = {
|
|
261
|
-
createdAt: Scalars['String']['output'];
|
|
262
|
-
email: Scalars['String']['output'];
|
|
263
|
-
id: Scalars['ID']['output'];
|
|
264
|
-
name: Scalars['String']['output'];
|
|
265
|
-
phone?: Maybe<Scalars['String']['output']>;
|
|
266
|
-
updatedAt: Scalars['String']['output'];
|
|
267
|
-
};
|
|
268
243
|
export type TicketMessage = {
|
|
269
244
|
body: Scalars['String']['output'];
|
|
270
245
|
contentType: Scalars['String']['output'];
|
|
@@ -316,7 +291,6 @@ export type TicketsConnection = {
|
|
|
316
291
|
};
|
|
317
292
|
export declare enum Typenames {
|
|
318
293
|
Any = "Any",
|
|
319
|
-
DrozChatAgentExtension = "DrozChatAgentExtension",
|
|
320
294
|
GraphqlConnections = "GraphqlConnections",
|
|
321
295
|
GraphqlSubscriptions = "GraphqlSubscriptions",
|
|
322
296
|
TicketMappings = "TicketMappings",
|
|
@@ -326,31 +300,8 @@ export declare enum Typenames {
|
|
|
326
300
|
export type UnassignTicketInput = {
|
|
327
301
|
ticketId: Scalars['ID']['input'];
|
|
328
302
|
};
|
|
329
|
-
export type
|
|
330
|
-
|
|
331
|
-
});
|
|
332
|
-
export type CreateDrozChatAgentMutationVariables = Exact<{
|
|
333
|
-
input: CreateDrozChatAgentInput;
|
|
334
|
-
}>;
|
|
335
|
-
export type CreateDrozChatAgentMutation = {
|
|
336
|
-
createDrozChatAgent: DrozChatAgentFragment;
|
|
337
|
-
};
|
|
338
|
-
export type ListDrozChatAgentsQueryVariables = Exact<{
|
|
339
|
-
next?: InputMaybe<Scalars['Base64']['input']>;
|
|
340
|
-
}>;
|
|
341
|
-
export type ListDrozChatAgentsQuery = {
|
|
342
|
-
listDrozChatAgents: {
|
|
343
|
-
pageInfo: Pick<PageInfo, 'hasNext' | 'next'>;
|
|
344
|
-
nodes: Array<DrozChatAgentFragment>;
|
|
345
|
-
};
|
|
346
|
-
};
|
|
347
|
-
export type GetDrozChatAgentQueryVariables = Exact<{
|
|
348
|
-
id: Scalars['ID']['input'];
|
|
349
|
-
}>;
|
|
350
|
-
export type GetDrozChatAgentQuery = {
|
|
351
|
-
getDrozChatAgent?: Maybe<DrozChatAgentFragment>;
|
|
352
|
-
};
|
|
353
|
-
export type CustomerFragment = Pick<TicketCustomer, 'id' | 'name' | 'email' | 'phone' | 'createdAt' | 'updatedAt'>;
|
|
303
|
+
export type CustomerFragment = Pick<DrozChatCustomer, 'id' | 'name' | 'email' | 'phone' | 'createdAt' | 'updatedAt'>;
|
|
304
|
+
export type DrozChatAgentFragment = Pick<DrozChatAgent, 'id' | 'name'>;
|
|
354
305
|
export type DrozChatChannelFragment = Pick<TicketChannel, 'drn' | 'name' | 'appId' | 'appName'>;
|
|
355
306
|
export type TicketFragment = (Pick<Ticket, 'id' | 'state' | 'status' | 'priority' | 'messagesCount' | 'lastMessage' | 'lastMessageAt' | 'unreadMessagesCount' | 'createdAt' | 'updatedAt'> & {
|
|
356
307
|
assignee?: Maybe<DrozChatAgentFragment>;
|
|
@@ -484,36 +435,30 @@ export type OnTicketMessageSubscription = {
|
|
|
484
435
|
message: TicketMessageFragment;
|
|
485
436
|
});
|
|
486
437
|
};
|
|
487
|
-
export declare const DrozChatAgentFragmentDoc = "\n fragment drozChatAgent on DrozChatAgent {\n id\n name\n
|
|
488
|
-
export declare const CustomerFragmentDoc = "\n fragment customer on
|
|
438
|
+
export declare const DrozChatAgentFragmentDoc = "\n fragment drozChatAgent on DrozChatAgent {\n id\n name\n}\n ";
|
|
439
|
+
export declare const CustomerFragmentDoc = "\n fragment customer on DrozChatCustomer {\n id\n name\n email\n phone\n createdAt\n updatedAt\n}\n ";
|
|
489
440
|
export declare const DrozChatChannelFragmentDoc = "\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
490
|
-
export declare const TicketFragmentDoc = "\n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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
|
|
441
|
+
export declare const TicketFragmentDoc = "\n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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 createdAt\n updatedAt\n}\n \n\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
491
442
|
export declare const TicketMessageFragmentDoc = "\n fragment ticketMessage on TicketMessage {\n id\n ticketId\n sentBy\n type\n contentType\n body\n createdAt\n updatedAt\n}\n ";
|
|
492
|
-
export declare const
|
|
493
|
-
export declare const
|
|
494
|
-
export declare const
|
|
495
|
-
export declare const
|
|
496
|
-
export declare const
|
|
497
|
-
export declare const ListTicketsInQueueDocument = "\n query listTicketsInQueue($next: Base64) {\n listTicketsInQueue(next: $next) {\n nodes {\n ...ticket\n }\n pageInfo {\n hasNext\n next\n }\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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 createdAt\n updatedAt\n extension {\n id\n }\n}\n \n\n fragment customer on TicketCustomer {\n id\n name\n email\n phone\n createdAt\n updatedAt\n}\n \n\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
498
|
-
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 id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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 createdAt\n updatedAt\n extension {\n id\n }\n}\n \n\n fragment customer on TicketCustomer {\n id\n name\n email\n phone\n createdAt\n updatedAt\n}\n \n\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
499
|
-
export declare const ListTicketsClosedDocument = "\n query listTicketsClosed($next: Base64) {\n listTicketsClosed(next: $next) {\n nodes {\n ...ticket\n }\n pageInfo {\n hasNext\n next\n }\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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 createdAt\n updatedAt\n extension {\n id\n }\n}\n \n\n fragment customer on TicketCustomer {\n id\n name\n email\n phone\n createdAt\n updatedAt\n}\n \n\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
443
|
+
export declare const GetTicketDocument = "\n query getTicket($id: ID!) {\n getTicket(id: $id) {\n ...ticket\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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 createdAt\n updatedAt\n}\n \n\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
444
|
+
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 id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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 createdAt\n updatedAt\n}\n \n\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
445
|
+
export declare const ListTicketsInQueueDocument = "\n query listTicketsInQueue($next: Base64) {\n listTicketsInQueue(next: $next) {\n nodes {\n ...ticket\n }\n pageInfo {\n hasNext\n next\n }\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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 createdAt\n updatedAt\n}\n \n\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
446
|
+
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 id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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 createdAt\n updatedAt\n}\n \n\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
447
|
+
export declare const ListTicketsClosedDocument = "\n query listTicketsClosed($next: Base64) {\n listTicketsClosed(next: $next) {\n nodes {\n ...ticket\n }\n pageInfo {\n hasNext\n next\n }\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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 createdAt\n updatedAt\n}\n \n\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
500
448
|
export declare const ListTicketMessagesDocument = "\n query listTicketMessages($ticketId: ID!, $next: Base64) {\n listTicketMessages(ticketId: $ticketId, 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 sentBy\n type\n contentType\n body\n createdAt\n updatedAt\n}\n ";
|
|
501
|
-
export declare const CreateTicketDocument = "\n mutation createTicket($input: CreateTicketInput!) {\n createTicket(input: $input) {\n ...ticket\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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
|
|
449
|
+
export declare const CreateTicketDocument = "\n mutation createTicket($input: CreateTicketInput!) {\n createTicket(input: $input) {\n ...ticket\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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 createdAt\n updatedAt\n}\n \n\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
502
450
|
export declare const MarkTicketMessagesAsReadDocument = "\n mutation markTicketMessagesAsRead($input: MarkTicketMessagesAsReadInput!) {\n markTicketMessagesAsRead(input: $input)\n}\n ";
|
|
503
451
|
export declare const CreateTicketMessageDocument = "\n mutation createTicketMessage($input: CreateTicketMessageInput!) {\n createTicketMessage(input: $input) {\n ...ticketMessage\n }\n}\n \n fragment ticketMessage on TicketMessage {\n id\n ticketId\n sentBy\n type\n contentType\n body\n createdAt\n updatedAt\n}\n ";
|
|
504
|
-
export declare const AssignTicketDocument = "\n mutation assignTicket($input: AssignTicketInput!) {\n assignTicket(input: $input) {\n ...ticket\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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
|
|
505
|
-
export declare const AssignTicketMyselfDocument = "\n mutation assignTicketMyself($input: AssignTicketMyselfInput!) {\n assignTicketMyself(input: $input) {\n ...ticket\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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
|
|
506
|
-
export declare const UnassignTicketDocument = "\n mutation unassignTicket($input: UnassignTicketInput!) {\n unassignTicket(input: $input) {\n ...ticket\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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
|
|
507
|
-
export declare const CloseTicketDocument = "\n mutation closeTicket($input: CloseTicketInput!) {\n closeTicket(input: $input) {\n ...ticket\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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
|
|
508
|
-
export declare const OnTicketInQueueDocument = "\n subscription onTicketInQueue {\n onTicketInQueue {\n ticket {\n ...ticket\n }\n action\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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
|
|
509
|
-
export declare const OnTicketInProgressMineDocument = "\n subscription onTicketInProgressMine {\n onTicketInProgressMine {\n ticket {\n ...ticket\n }\n action\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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
|
|
510
|
-
export declare const OnTicketClosedDocument = "\n subscription onTicketClosed {\n onTicketClosed {\n ticket {\n ...ticket\n }\n action\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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
|
|
452
|
+
export declare const AssignTicketDocument = "\n mutation assignTicket($input: AssignTicketInput!) {\n assignTicket(input: $input) {\n ...ticket\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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 createdAt\n updatedAt\n}\n \n\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
453
|
+
export declare const AssignTicketMyselfDocument = "\n mutation assignTicketMyself($input: AssignTicketMyselfInput!) {\n assignTicketMyself(input: $input) {\n ...ticket\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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 createdAt\n updatedAt\n}\n \n\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
454
|
+
export declare const UnassignTicketDocument = "\n mutation unassignTicket($input: UnassignTicketInput!) {\n unassignTicket(input: $input) {\n ...ticket\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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 createdAt\n updatedAt\n}\n \n\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
455
|
+
export declare const CloseTicketDocument = "\n mutation closeTicket($input: CloseTicketInput!) {\n closeTicket(input: $input) {\n ...ticket\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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 createdAt\n updatedAt\n}\n \n\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
456
|
+
export declare const OnTicketInQueueDocument = "\n subscription onTicketInQueue {\n onTicketInQueue {\n ticket {\n ...ticket\n }\n action\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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 createdAt\n updatedAt\n}\n \n\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
457
|
+
export declare const OnTicketInProgressMineDocument = "\n subscription onTicketInProgressMine {\n onTicketInProgressMine {\n ticket {\n ...ticket\n }\n action\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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 createdAt\n updatedAt\n}\n \n\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
458
|
+
export declare const OnTicketClosedDocument = "\n subscription onTicketClosed {\n onTicketClosed {\n ticket {\n ...ticket\n }\n action\n }\n}\n \n fragment ticket on Ticket {\n id\n state\n status\n priority\n assignee {\n ...drozChatAgent\n }\n customer {\n ...customer\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 createdAt\n updatedAt\n}\n \n\n fragment drozChatChannel on TicketChannel {\n drn\n name\n appId\n appName\n}\n ";
|
|
511
459
|
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 sentBy\n type\n contentType\n body\n createdAt\n updatedAt\n}\n ";
|
|
512
460
|
export type Requester<C = {}, E = unknown> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | AsyncIterableIterator<R>;
|
|
513
461
|
export declare function getSdk<C, E>(requester: Requester<C, E>): {
|
|
514
|
-
createDrozChatAgent(variables: CreateDrozChatAgentMutationVariables, options?: C): Promise<CreateDrozChatAgentMutation>;
|
|
515
|
-
listDrozChatAgents(variables?: ListDrozChatAgentsQueryVariables, options?: C): Promise<ListDrozChatAgentsQuery>;
|
|
516
|
-
getDrozChatAgent(variables: GetDrozChatAgentQueryVariables, options?: C): Promise<GetDrozChatAgentQuery>;
|
|
517
462
|
getTicket(variables: GetTicketQueryVariables, options?: C): Promise<GetTicketQuery>;
|
|
518
463
|
listTickets(variables: ListTicketsQueryVariables, options?: C): Promise<ListTicketsQuery>;
|
|
519
464
|
listTicketsInQueue(variables?: ListTicketsInQueueQueryVariables, options?: C): Promise<ListTicketsInQueueQuery>;
|