@orchesty/connector-zendesk 1.0.0
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/CHANGELOG.md +7 -0
- package/LICENSE +190 -0
- package/coverage/clover.xml +241 -0
- package/coverage/coverage-final.json +11 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +161 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov-report/src/Batch/ZendeskCreateWebhookConnector.ts.html +373 -0
- package/coverage/lcov-report/src/Batch/ZendeskDeleteWebhookConnector.ts.html +202 -0
- package/coverage/lcov-report/src/Batch/ZendeskListTicketsBatch.ts.html +337 -0
- package/coverage/lcov-report/src/Batch/ZendeskListUsersBatch.ts.html +247 -0
- package/coverage/lcov-report/src/Batch/index.html +161 -0
- package/coverage/lcov-report/src/Connector/ZendeskCreateTicketConnector.ts.html +319 -0
- package/coverage/lcov-report/src/Connector/ZendeskCreateTriggerConnector.ts.html +226 -0
- package/coverage/lcov-report/src/Connector/ZendeskCreateUserConnector.ts.html +265 -0
- package/coverage/lcov-report/src/Connector/ZendeskDeleteTriggerConnector.ts.html +223 -0
- package/coverage/lcov-report/src/Connector/index.html +161 -0
- package/coverage/lcov-report/src/ZendeskApplication.ts.html +448 -0
- package/coverage/lcov-report/src/index.html +116 -0
- package/coverage/lcov-report/test/dataProvider.ts.html +307 -0
- package/coverage/lcov-report/test/index.html +116 -0
- package/coverage/lcov.info +389 -0
- package/dist/Batch/ZendeskCreateWebhookConnector.d.ts +16 -0
- package/dist/Batch/ZendeskCreateWebhookConnector.js +62 -0
- package/dist/Batch/ZendeskDeleteWebhookConnector.d.ts +7 -0
- package/dist/Batch/ZendeskDeleteWebhookConnector.js +37 -0
- package/dist/Batch/ZendeskListTicketsBatch.d.ts +46 -0
- package/dist/Batch/ZendeskListTicketsBatch.js +27 -0
- package/dist/Batch/ZendeskListUsersBatch.d.ts +11 -0
- package/dist/Batch/ZendeskListUsersBatch.js +27 -0
- package/dist/Connector/ZendeskCreateTicketConnector.d.ts +57 -0
- package/dist/Connector/ZendeskCreateTicketConnector.js +22 -0
- package/dist/Connector/ZendeskCreateTriggerConnector.d.ts +16 -0
- package/dist/Connector/ZendeskCreateTriggerConnector.js +27 -0
- package/dist/Connector/ZendeskCreateUserConnector.d.ts +36 -0
- package/dist/Connector/ZendeskCreateUserConnector.js +23 -0
- package/dist/Connector/ZendeskDeleteTriggerConnector.d.ts +13 -0
- package/dist/Connector/ZendeskDeleteTriggerConnector.js +29 -0
- package/dist/ZendeskApplication.d.ts +27 -0
- package/dist/ZendeskApplication.js +124 -0
- package/dist/package.json +23 -0
- package/dist/types/trigger.types.d.ts +21 -0
- package/dist/types/trigger.types.js +2 -0
- package/dist/types/webhook.types.d.ts +19 -0
- package/dist/types/webhook.types.js +2 -0
- package/jest.config.js +13 -0
- package/package.json +23 -0
- package/src/Batch/ZendeskCreateWebhookConnector.ts +96 -0
- package/src/Batch/ZendeskDeleteWebhookConnector.ts +39 -0
- package/src/Batch/ZendeskListTicketsBatch.ts +84 -0
- package/src/Batch/ZendeskListUsersBatch.ts +54 -0
- package/src/Batch/__tests__/Data/ZendeskListTicketsBatch/1-mock.json +57 -0
- package/src/Batch/__tests__/Data/ZendeskListTicketsBatch/input.json +6 -0
- package/src/Batch/__tests__/Data/ZendeskListTicketsBatch/mock.json +106 -0
- package/src/Batch/__tests__/Data/ZendeskListTicketsBatch/output.json +18 -0
- package/src/Batch/__tests__/Data/ZendeskListTicketsBatch/output1.json +12 -0
- package/src/Batch/__tests__/Data/ZendeskListUsersBatch/input.json +6 -0
- package/src/Batch/__tests__/Data/ZendeskListUsersBatch/mock.json +161 -0
- package/src/Batch/__tests__/Data/ZendeskListUsersBatch/output.json +19 -0
- package/src/Batch/__tests__/ZendeskListTicketsBatch.ts +17 -0
- package/src/Batch/__tests__/ZendeskListUsersBatch.ts +17 -0
- package/src/Connector/ZendeskCreateTicketConnector.ts +78 -0
- package/src/Connector/ZendeskCreateTriggerConnector.ts +47 -0
- package/src/Connector/ZendeskCreateUserConnector.ts +60 -0
- package/src/Connector/ZendeskDeleteTriggerConnector.ts +46 -0
- package/src/Connector/__tests__/Data/ZendeskCreateTicketConnector/input.json +14 -0
- package/src/Connector/__tests__/Data/ZendeskCreateTicketConnector/mock.json +194 -0
- package/src/Connector/__tests__/Data/ZendeskCreateTicketConnector/output.json +194 -0
- package/src/Connector/__tests__/Data/ZendeskCreateTriggerConnector/input.json +11 -0
- package/src/Connector/__tests__/Data/ZendeskCreateTriggerConnector/mock.json +31 -0
- package/src/Connector/__tests__/Data/ZendeskCreateTriggerConnector/output.json +29 -0
- package/src/Connector/__tests__/Data/ZendeskCreateUserConnector/input.json +25 -0
- package/src/Connector/__tests__/Data/ZendeskCreateUserConnector/mock.json +45 -0
- package/src/Connector/__tests__/Data/ZendeskCreateUserConnector/output.json +44 -0
- package/src/Connector/__tests__/ZendeskCreateTicketConnector.ts +17 -0
- package/src/Connector/__tests__/ZendeskCreateTriggerConnector.ts +17 -0
- package/src/Connector/__tests__/ZendeskCreateUserConnector.ts +17 -0
- package/src/ZendeskApplication.ts +121 -0
- package/src/types/trigger.types.ts +19 -0
- package/src/types/webhook.types.ts +20 -0
- package/test/dataProvider.ts +74 -0
- package/tsconfig.json +8 -0
- package/tsconfig.prod.json +13 -0
- package/tsconfig.prod.tsbuildinfo +1 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
+
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
3
|
+
import { ZendeskTrigger } from '../types/trigger.types';
|
|
4
|
+
export declare const ZENDESK_CREATE_TRIGGER = "zendesk-create-trigger-connector";
|
|
5
|
+
export default class ZendeskCreateTriggerConnector extends AConnector {
|
|
6
|
+
getName(): string;
|
|
7
|
+
processAction(dto: ProcessDto<ZendeskCreateTriggerInput>): Promise<ProcessDto<ZendeskCreateTriggerOutput>>;
|
|
8
|
+
protected getData(dto: ProcessDto<ZendeskCreateTriggerInput>): ZendeskCreateTriggerInput;
|
|
9
|
+
protected setResponse(dto: ProcessDto, data: Response): ProcessDto<ZendeskCreateTriggerOutput>;
|
|
10
|
+
}
|
|
11
|
+
interface Response {
|
|
12
|
+
trigger: ZendeskTrigger;
|
|
13
|
+
}
|
|
14
|
+
export type ZendeskCreateTriggerInput = Pick<ZendeskTrigger, 'actions' | 'category_id' | 'conditions' | 'title'>;
|
|
15
|
+
export type ZendeskCreateTriggerOutput = ZendeskTrigger;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ZENDESK_CREATE_TRIGGER = void 0;
|
|
7
|
+
const AConnector_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Connector/AConnector"));
|
|
8
|
+
const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
|
|
9
|
+
exports.ZENDESK_CREATE_TRIGGER = 'zendesk-create-trigger-connector';
|
|
10
|
+
class ZendeskCreateTriggerConnector extends AConnector_1.default {
|
|
11
|
+
getName() {
|
|
12
|
+
return exports.ZENDESK_CREATE_TRIGGER;
|
|
13
|
+
}
|
|
14
|
+
async processAction(dto) {
|
|
15
|
+
const data = this.getData(dto);
|
|
16
|
+
const req = await this.getApplication().getRequestDto(dto, await this.getApplicationInstallFromProcess(dto), HttpMethods_1.HttpMethods.POST, '/triggers', data);
|
|
17
|
+
const resp = await this.getSender().send(req);
|
|
18
|
+
return this.setResponse(dto, resp.getJsonBody());
|
|
19
|
+
}
|
|
20
|
+
getData(dto) {
|
|
21
|
+
return dto.getJsonData();
|
|
22
|
+
}
|
|
23
|
+
setResponse(dto, data) {
|
|
24
|
+
return dto.setNewJsonData(data.trigger);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = ZendeskCreateTriggerConnector;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
+
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
3
|
+
export declare const NAME = "zendesk-create-user-connector";
|
|
4
|
+
export default class ZendeskCreateUserConnector extends AConnector {
|
|
5
|
+
getName(): string;
|
|
6
|
+
processAction(dto: ProcessDto<IInput>): Promise<ProcessDto<IOutput>>;
|
|
7
|
+
}
|
|
8
|
+
export interface IResponse {
|
|
9
|
+
user: IOutput;
|
|
10
|
+
}
|
|
11
|
+
export interface IOutput {
|
|
12
|
+
custom_role_id: number;
|
|
13
|
+
email: string;
|
|
14
|
+
id: number;
|
|
15
|
+
name: string;
|
|
16
|
+
organization_id: number;
|
|
17
|
+
role: string;
|
|
18
|
+
role_type: number;
|
|
19
|
+
}
|
|
20
|
+
export interface IInput {
|
|
21
|
+
user: {
|
|
22
|
+
custom_role_id?: number;
|
|
23
|
+
identities?: [
|
|
24
|
+
{
|
|
25
|
+
type: string;
|
|
26
|
+
value: string;
|
|
27
|
+
}
|
|
28
|
+
];
|
|
29
|
+
organization?: {
|
|
30
|
+
name: string;
|
|
31
|
+
};
|
|
32
|
+
role?: string;
|
|
33
|
+
};
|
|
34
|
+
name: string;
|
|
35
|
+
email: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.NAME = void 0;
|
|
7
|
+
const AConnector_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Connector/AConnector"));
|
|
8
|
+
const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
|
|
9
|
+
exports.NAME = 'zendesk-create-user-connector';
|
|
10
|
+
class ZendeskCreateUserConnector extends AConnector_1.default {
|
|
11
|
+
getName() {
|
|
12
|
+
return exports.NAME;
|
|
13
|
+
}
|
|
14
|
+
async processAction(dto) {
|
|
15
|
+
const body = dto.getJsonData();
|
|
16
|
+
const appInstall = await this.getApplicationInstallFromProcess(dto);
|
|
17
|
+
const req = await this.getApplication().getRequestDto(dto, appInstall, HttpMethods_1.HttpMethods.POST, '/users.json', body);
|
|
18
|
+
const resp = await this.getSender().send(req, [201]);
|
|
19
|
+
const data = resp.getJsonBody();
|
|
20
|
+
return dto.setNewJsonData(data.user);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.default = ZendeskCreateUserConnector;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
+
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
3
|
+
export declare const ZENDESK_DELETE_TRIGGER = "zendesk-delete-trigger-connector";
|
|
4
|
+
export default class ZendeskDeleteTriggerConnector extends AConnector {
|
|
5
|
+
getName(): string;
|
|
6
|
+
processAction(dto: ProcessDto<ZendeskDeleteTriggerInput>): Promise<ProcessDto<ZendeskDeleteTriggerOutput>>;
|
|
7
|
+
protected getData(dto: ProcessDto<ZendeskDeleteTriggerInput>): ZendeskDeleteTriggerInput;
|
|
8
|
+
protected setResponse(dto: ProcessDto<ZendeskDeleteTriggerInput>): ProcessDto<ZendeskDeleteTriggerOutput>;
|
|
9
|
+
}
|
|
10
|
+
export interface ZendeskDeleteTriggerInput {
|
|
11
|
+
id: string | number;
|
|
12
|
+
}
|
|
13
|
+
export type ZendeskDeleteTriggerOutput = ZendeskDeleteTriggerInput;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ZENDESK_DELETE_TRIGGER = void 0;
|
|
7
|
+
const AConnector_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Connector/AConnector"));
|
|
8
|
+
const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
|
|
9
|
+
exports.ZENDESK_DELETE_TRIGGER = 'zendesk-delete-trigger-connector';
|
|
10
|
+
class ZendeskDeleteTriggerConnector extends AConnector_1.default {
|
|
11
|
+
getName() {
|
|
12
|
+
return exports.ZENDESK_DELETE_TRIGGER;
|
|
13
|
+
}
|
|
14
|
+
async processAction(dto) {
|
|
15
|
+
const data = this.getData(dto);
|
|
16
|
+
const req = await this.getApplication().getRequestDto(dto, await this.getApplicationInstallFromProcess(dto), HttpMethods_1.HttpMethods.DELETE, `triggers/${data.id}`, {
|
|
17
|
+
trigger: data,
|
|
18
|
+
});
|
|
19
|
+
await this.getSender().send(req);
|
|
20
|
+
return this.setResponse(dto);
|
|
21
|
+
}
|
|
22
|
+
getData(dto) {
|
|
23
|
+
return dto.getJsonData();
|
|
24
|
+
}
|
|
25
|
+
setResponse(dto) {
|
|
26
|
+
return dto;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.default = ZendeskDeleteTriggerConnector;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ApplicationInstall } from '@orchesty/nodejs-sdk/dist/lib/Application/Database/ApplicationInstall';
|
|
2
|
+
import FormStack from '@orchesty/nodejs-sdk/dist/lib/Application/Model/Form/FormStack';
|
|
3
|
+
import WebhookSubscription from '@orchesty/nodejs-sdk/dist/lib/Application/Model/Webhook/WebhookSubscription';
|
|
4
|
+
import OAuth2Dto from '@orchesty/nodejs-sdk/dist/lib/Authorization/Provider/Dto/OAuth2Dto';
|
|
5
|
+
import AOAuth2Application from '@orchesty/nodejs-sdk/dist/lib/Authorization/Type/OAuth2/AOAuth2Application';
|
|
6
|
+
import RequestDto from '@orchesty/nodejs-sdk/dist/lib/Transport/Curl/RequestDto';
|
|
7
|
+
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
8
|
+
import AProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/AProcessDto';
|
|
9
|
+
export declare const SUBDOMAIN = "subdomain";
|
|
10
|
+
export declare const NAME = "zendesk";
|
|
11
|
+
export default class ZendeskApplication extends AOAuth2Application {
|
|
12
|
+
getDescription(): string;
|
|
13
|
+
getName(): string;
|
|
14
|
+
getPublicName(): string;
|
|
15
|
+
getLogo(): string;
|
|
16
|
+
getRequestDto(dto: AProcessDto, applicationInstall: ApplicationInstall, method: HttpMethods, _url?: string, data?: unknown): Promise<RequestDto> | RequestDto;
|
|
17
|
+
getScopes(applicationInstall: ApplicationInstall): string[];
|
|
18
|
+
getFormStack(): FormStack;
|
|
19
|
+
isAuthorized(applicationInstall: ApplicationInstall): boolean;
|
|
20
|
+
getAuthUrlWithSubdomain(applicationInstall: ApplicationInstall): string;
|
|
21
|
+
getAuthUrl(): string;
|
|
22
|
+
getTokenUrlWithSubdomain(applicationInstall: ApplicationInstall): string;
|
|
23
|
+
getTokenUrl(): string;
|
|
24
|
+
createDto(applicationInstall: ApplicationInstall, redirectUrl?: string): OAuth2Dto;
|
|
25
|
+
getWebhookSubscriptions(): WebhookSubscription[];
|
|
26
|
+
protected getScopesSeparator(): string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.NAME = exports.SUBDOMAIN = void 0;
|
|
40
|
+
const CoreFormsEnum_1 = __importStar(require("@orchesty/nodejs-sdk/dist/lib/Application/Base/CoreFormsEnum"));
|
|
41
|
+
const Field_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Application/Model/Form/Field"));
|
|
42
|
+
const FieldType_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Application/Model/Form/FieldType"));
|
|
43
|
+
const Form_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Application/Model/Form/Form"));
|
|
44
|
+
const FormStack_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Application/Model/Form/FormStack"));
|
|
45
|
+
const OAuth2Dto_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Authorization/Provider/Dto/OAuth2Dto"));
|
|
46
|
+
const ScopeSeparatorEnum_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Authorization/ScopeSeparatorEnum"));
|
|
47
|
+
const AOAuth2Application_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Authorization/Type/OAuth2/AOAuth2Application"));
|
|
48
|
+
const IOAuth2Application_1 = require("@orchesty/nodejs-sdk/dist/lib/Authorization/Type/OAuth2/IOAuth2Application");
|
|
49
|
+
const RequestDto_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Transport/Curl/RequestDto"));
|
|
50
|
+
const Headers_1 = require("@orchesty/nodejs-sdk/dist/lib/Utils/Headers");
|
|
51
|
+
exports.SUBDOMAIN = 'subdomain';
|
|
52
|
+
exports.NAME = 'zendesk';
|
|
53
|
+
class ZendeskApplication extends AOAuth2Application_1.default {
|
|
54
|
+
getDescription() {
|
|
55
|
+
return 'Customer support software that helps companies manage customer problems through a ticketing system';
|
|
56
|
+
}
|
|
57
|
+
getName() {
|
|
58
|
+
return exports.NAME;
|
|
59
|
+
}
|
|
60
|
+
getPublicName() {
|
|
61
|
+
return 'Zendesk';
|
|
62
|
+
}
|
|
63
|
+
getLogo() {
|
|
64
|
+
return 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI1LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IlZyc3R2YV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTAwIDEwMDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiMwMzM2M0Q7fQo8L3N0eWxlPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00Ni4yLDMyLjJ2NTUuNEgwLjNMNDYuMiwzMi4yeiBNNDYuMiwxMi4zYzAsMTIuNy0xMC4zLDIzLTIzLDIzcy0yMy0xMC4zLTIzLTIzTDQ2LjIsMTIuM3ogTTUzLjgsODcuNwoJCWMwLTEyLjcsMTAuMy0yMywyMy0yM3MyMywxMC4zLDIzLDIzSDUzLjh6IE01My44LDY3LjhWMTIuM2g0NS45TDUzLjgsNjcuOHoiLz4KPC9nPgo8L3N2Zz4K';
|
|
65
|
+
}
|
|
66
|
+
getRequestDto(dto, applicationInstall, method, _url, data) {
|
|
67
|
+
const subdomain = applicationInstall.getSettings()[CoreFormsEnum_1.default.AUTHORIZATION_FORM][exports.SUBDOMAIN];
|
|
68
|
+
const url = `https://${subdomain}.zendesk.com/api/v2${_url}`;
|
|
69
|
+
const request = new RequestDto_1.default(url, method, dto);
|
|
70
|
+
request.setHeaders({
|
|
71
|
+
[Headers_1.CommonHeaders.CONTENT_TYPE]: Headers_1.JSON_TYPE,
|
|
72
|
+
[Headers_1.CommonHeaders.ACCEPT]: Headers_1.JSON_TYPE,
|
|
73
|
+
[Headers_1.CommonHeaders.AUTHORIZATION]: `Bearer ${this.getAccessToken(applicationInstall)}`,
|
|
74
|
+
});
|
|
75
|
+
if (data) {
|
|
76
|
+
request.setJsonBody(data);
|
|
77
|
+
}
|
|
78
|
+
return request;
|
|
79
|
+
}
|
|
80
|
+
getScopes(applicationInstall) {
|
|
81
|
+
return ['read', 'write'];
|
|
82
|
+
}
|
|
83
|
+
getFormStack() {
|
|
84
|
+
const form = new Form_1.default(CoreFormsEnum_1.default.AUTHORIZATION_FORM, (0, CoreFormsEnum_1.getFormName)(CoreFormsEnum_1.default.AUTHORIZATION_FORM))
|
|
85
|
+
.addField(new Field_1.default(FieldType_1.default.TEXT, exports.SUBDOMAIN, 'Subdomain', undefined, true))
|
|
86
|
+
.addField(new Field_1.default(FieldType_1.default.TEXT, IOAuth2Application_1.CLIENT_ID, 'Client Id', undefined, true))
|
|
87
|
+
.addField(new Field_1.default(FieldType_1.default.TEXT, IOAuth2Application_1.CLIENT_SECRET, 'Client Secret', undefined, true));
|
|
88
|
+
return new FormStack_1.default().addForm(form);
|
|
89
|
+
}
|
|
90
|
+
isAuthorized(applicationInstall) {
|
|
91
|
+
const authorizationForm = applicationInstall.getSettings()[CoreFormsEnum_1.default.AUTHORIZATION_FORM];
|
|
92
|
+
return super.isAuthorized(applicationInstall)
|
|
93
|
+
&& authorizationForm?.[exports.SUBDOMAIN]
|
|
94
|
+
&& authorizationForm?.[IOAuth2Application_1.CLIENT_ID]
|
|
95
|
+
&& authorizationForm?.[IOAuth2Application_1.CLIENT_SECRET];
|
|
96
|
+
}
|
|
97
|
+
getAuthUrlWithSubdomain(applicationInstall) {
|
|
98
|
+
return `https://${applicationInstall.getSettings()[CoreFormsEnum_1.default.AUTHORIZATION_FORM][exports.SUBDOMAIN]}.zendesk.com/oauth/authorizations/new`;
|
|
99
|
+
}
|
|
100
|
+
getAuthUrl() {
|
|
101
|
+
throw new Error(`Dont use [${this.getAuthUrl.name}] use [${this.getAuthUrlWithSubdomain.bind(this).name}] instead.`);
|
|
102
|
+
}
|
|
103
|
+
getTokenUrlWithSubdomain(applicationInstall) {
|
|
104
|
+
return `https://${applicationInstall.getSettings()[CoreFormsEnum_1.default.AUTHORIZATION_FORM][exports.SUBDOMAIN]}.zendesk.com/oauth/tokens`;
|
|
105
|
+
}
|
|
106
|
+
getTokenUrl() {
|
|
107
|
+
throw new Error(`Dont use [${this.getAuthUrl.name}] use [${this.getTokenUrlWithSubdomain.bind(this).name}] instead.`);
|
|
108
|
+
}
|
|
109
|
+
createDto(applicationInstall, redirectUrl) {
|
|
110
|
+
const dto = new OAuth2Dto_1.default(applicationInstall, this.getAuthUrlWithSubdomain(applicationInstall), this.getTokenUrlWithSubdomain(applicationInstall));
|
|
111
|
+
dto.setCustomAppDependencies(applicationInstall.getUser(), applicationInstall.getName());
|
|
112
|
+
if (redirectUrl) {
|
|
113
|
+
dto.setRedirectUrl(redirectUrl);
|
|
114
|
+
}
|
|
115
|
+
return dto;
|
|
116
|
+
}
|
|
117
|
+
getWebhookSubscriptions() {
|
|
118
|
+
return [];
|
|
119
|
+
}
|
|
120
|
+
getScopesSeparator() {
|
|
121
|
+
return ScopeSeparatorEnum_1.default.SPACE;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.default = ZendeskApplication;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@orchesty/connector-zendesk",
|
|
3
|
+
"description": "",
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
|
|
7
|
+
"repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "rm -rf dist && rm -rf tsconfig.prod.tsbuildinfo && tsc -d -p tsconfig.prod.json && cp package.json ./dist/package.json",
|
|
10
|
+
"test": "jest --coverage --forceExit --passWithNoTests",
|
|
11
|
+
"lint": "eslint src test --fix",
|
|
12
|
+
"lint-ci": "eslint src test"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [],
|
|
15
|
+
"author": "info@hanaboso.com",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@orchesty/nodejs-sdk": "^4.3.6",
|
|
18
|
+
"http-status-codes": "^2.3.0"
|
|
19
|
+
},
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=24"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface ZendeskTrigger {
|
|
2
|
+
actions: {
|
|
3
|
+
field: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}[];
|
|
6
|
+
active: boolean;
|
|
7
|
+
category_id: string;
|
|
8
|
+
conditions: Record<string, {
|
|
9
|
+
field: string;
|
|
10
|
+
operator: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}[]>;
|
|
13
|
+
created_at: string;
|
|
14
|
+
description: string;
|
|
15
|
+
id: number;
|
|
16
|
+
position: number;
|
|
17
|
+
raw_title: string;
|
|
18
|
+
title: string;
|
|
19
|
+
updated_at: string;
|
|
20
|
+
url: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ZendeskWebhook {
|
|
2
|
+
authentication: {
|
|
3
|
+
add_position: string;
|
|
4
|
+
data: Record<string, string>;
|
|
5
|
+
type: string;
|
|
6
|
+
};
|
|
7
|
+
created_at: string;
|
|
8
|
+
created_by: string;
|
|
9
|
+
custom_headers: Record<string, string>;
|
|
10
|
+
endpoint: string;
|
|
11
|
+
http_method: string;
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
request_format: string;
|
|
15
|
+
status: string;
|
|
16
|
+
subscriptions: string[];
|
|
17
|
+
updated_at: string;
|
|
18
|
+
updated_by: string;
|
|
19
|
+
}
|
package/jest.config.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const baseConfig = require('../../jest.config.js');
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
...baseConfig,
|
|
5
|
+
roots: ["<rootDir>/src"],
|
|
6
|
+
setupFiles: ["<rootDir>/../../.jest/testEnvs.ts"],
|
|
7
|
+
setupFilesAfterEnv: ["<rootDir>/../../.jest/testLifecycle.ts"],
|
|
8
|
+
globalSetup: "<rootDir>/../../.jest/globalSetup.ts",
|
|
9
|
+
moduleNameMapper: {
|
|
10
|
+
"^@orchesty/nodejs-connectors/test/(.*)$": "<rootDir>/../../test/$1",
|
|
11
|
+
"^@orchesty/nodejs-connectors/lib/(.*)$": "<rootDir>/../../lib/$1",
|
|
12
|
+
},
|
|
13
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@orchesty/connector-zendesk",
|
|
3
|
+
"description": "",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
|
|
7
|
+
"repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",
|
|
8
|
+
"keywords": [],
|
|
9
|
+
"author": "info@hanaboso.com",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@orchesty/nodejs-sdk": "^4.3.6",
|
|
12
|
+
"http-status-codes": "^2.3.0"
|
|
13
|
+
},
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=24"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "rm -rf dist && rm -rf tsconfig.prod.tsbuildinfo && tsc -d -p tsconfig.prod.json && cp package.json ./dist/package.json",
|
|
19
|
+
"test": "jest --coverage --forceExit --passWithNoTests",
|
|
20
|
+
"lint": "eslint src test --fix",
|
|
21
|
+
"lint-ci": "eslint src test"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import Webhook from '@orchesty/nodejs-sdk/dist/lib/Application/Database/Webhook';
|
|
2
|
+
import WebhookRepository from '@orchesty/nodejs-sdk/dist/lib/Application/Database/WebhookRepository';
|
|
3
|
+
import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
|
|
4
|
+
import TopologyRunner from '@orchesty/nodejs-sdk/dist/lib/Topology/TopologyRunner';
|
|
5
|
+
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
6
|
+
import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
|
|
7
|
+
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
8
|
+
import crypto from 'crypto';
|
|
9
|
+
import { ZendeskWebhook } from '../types/webhook.types';
|
|
10
|
+
import ZendeskApplication from '../ZendeskApplication';
|
|
11
|
+
|
|
12
|
+
export const ZENDESK_CREATE_WEBHOOK = 'zendesk-create-webhook';
|
|
13
|
+
|
|
14
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
15
|
+
/* eslint-disable no-await-in-loop */
|
|
16
|
+
|
|
17
|
+
export default class ZendeskCreateWebhookConnector extends ABatchNode {
|
|
18
|
+
|
|
19
|
+
public getName(): string {
|
|
20
|
+
return ZENDESK_CREATE_WEBHOOK;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public async processAction(
|
|
24
|
+
dto: BatchProcessDto<ZendeskCreateWebhookInput>,
|
|
25
|
+
): Promise<BatchProcessDto> {
|
|
26
|
+
const repo = this.getDbClient().getRepository(Webhook) as WebhookRepository;
|
|
27
|
+
|
|
28
|
+
const app = this.getApplication<ZendeskApplication>();
|
|
29
|
+
const appInstall = await this.getApplicationInstallFromProcess(dto);
|
|
30
|
+
|
|
31
|
+
const registered = await repo.findMany({ users: [appInstall.getUser()], apps: [appInstall.getName()] });
|
|
32
|
+
const all = app.getWebhookSubscriptions().map((sub) => ({
|
|
33
|
+
event: sub.getName(),
|
|
34
|
+
token: this.getRandomToken(),
|
|
35
|
+
node: sub.getNode(),
|
|
36
|
+
name: sub.getName(),
|
|
37
|
+
topology: sub.getTopology(),
|
|
38
|
+
events: JSON.parse(sub.getParameters().events || '[]'),
|
|
39
|
+
}));
|
|
40
|
+
|
|
41
|
+
const unregistered = all.filter((wh) => !registered.find((reg) => reg.getName() === wh.event));
|
|
42
|
+
|
|
43
|
+
for (const toRegister of unregistered) {
|
|
44
|
+
const reqBody = {
|
|
45
|
+
webhook: {
|
|
46
|
+
endpoint: TopologyRunner.getWebhookUrl(
|
|
47
|
+
toRegister.topology,
|
|
48
|
+
toRegister.node,
|
|
49
|
+
toRegister.token,
|
|
50
|
+
),
|
|
51
|
+
http_method: 'POST',
|
|
52
|
+
name: toRegister.name,
|
|
53
|
+
request_format: 'json',
|
|
54
|
+
status: 'active',
|
|
55
|
+
subscriptions: toRegister.events,
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const requestDto = await app.getRequestDto(dto, appInstall, HttpMethods.POST, '/webhooks', reqBody);
|
|
60
|
+
const data = (await this.getSender().send<Response>(requestDto)).getJsonBody();
|
|
61
|
+
|
|
62
|
+
await repo.insert(
|
|
63
|
+
new Webhook()
|
|
64
|
+
.setWebhookId(data.webhook.id)
|
|
65
|
+
.setUser(appInstall.getUser())
|
|
66
|
+
.setNode(toRegister.node)
|
|
67
|
+
.setToken(toRegister.token)
|
|
68
|
+
.setApplication(app.getName())
|
|
69
|
+
.setTopology(toRegister.topology)
|
|
70
|
+
.setName(data.webhook.name),
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return dto;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
protected getData(dto: ProcessDto<ZendeskCreateWebhookInput>): ZendeskCreateWebhookInput {
|
|
78
|
+
return dto.getJsonData();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
protected getRandomToken(): string {
|
|
82
|
+
return crypto.randomBytes(64).toString('hex');
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface Response {
|
|
88
|
+
webhook: ZendeskWebhook;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface ZendeskCreateWebhookInput {
|
|
92
|
+
topology: string;
|
|
93
|
+
node: string;
|
|
94
|
+
name: string;
|
|
95
|
+
events: string[];
|
|
96
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import Webhook from '@orchesty/nodejs-sdk/dist/lib/Application/Database/Webhook';
|
|
2
|
+
import WebhookRepository from '@orchesty/nodejs-sdk/dist/lib/Application/Database/WebhookRepository';
|
|
3
|
+
import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
|
|
4
|
+
import OnRepeatException from '@orchesty/nodejs-sdk/dist/lib/Exception/OnRepeatException';
|
|
5
|
+
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
6
|
+
import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
|
|
7
|
+
import { StatusCodes } from 'http-status-codes';
|
|
8
|
+
|
|
9
|
+
export const ZENDESK_DELETE_WEBHOOK = 'zendesk-delete-webhook';
|
|
10
|
+
|
|
11
|
+
export default class ZendeskDeleteWebhookConnector extends ABatchNode {
|
|
12
|
+
|
|
13
|
+
public getName(): string {
|
|
14
|
+
return ZENDESK_DELETE_WEBHOOK;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public async processAction(dto: BatchProcessDto): Promise<BatchProcessDto> {
|
|
18
|
+
const app = this.getApplication();
|
|
19
|
+
const appInstall = await this.getApplicationInstallFromProcess(dto, null);
|
|
20
|
+
const repo = this.getDbClient().getRepository(Webhook) as WebhookRepository;
|
|
21
|
+
const webhook = await repo.findOne({ users: [appInstall.getUser()], apps: [appInstall.getName()] });
|
|
22
|
+
|
|
23
|
+
if (webhook) {
|
|
24
|
+
const url = `/webhooks/${webhook.getWebhookId()}`;
|
|
25
|
+
const requestDto = await app.getRequestDto(dto, appInstall, HttpMethods.DELETE, url);
|
|
26
|
+
const res = await this.getSender().send(requestDto);
|
|
27
|
+
if (res.getResponseCode() !== StatusCodes.OK && res.getResponseCode() !== StatusCodes.NOT_FOUND) {
|
|
28
|
+
webhook.setUnsubscribeFailed(true);
|
|
29
|
+
await repo.update(webhook);
|
|
30
|
+
throw new OnRepeatException(300, 12, res.getBody());
|
|
31
|
+
}
|
|
32
|
+
await repo.remove(webhook);
|
|
33
|
+
dto.setBatchCursor('1', true);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return dto;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
|
|
2
|
+
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
3
|
+
import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
|
|
4
|
+
|
|
5
|
+
export const NAME = 'zendesk-list-tickets-batch';
|
|
6
|
+
|
|
7
|
+
export default class ZendeskListTicketsBatch extends ABatchNode {
|
|
8
|
+
|
|
9
|
+
public getName(): string {
|
|
10
|
+
return NAME;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public async processAction(dto: BatchProcessDto): Promise<BatchProcessDto> {
|
|
14
|
+
const offset = dto.getBatchCursor('1');
|
|
15
|
+
const appInstall = await this.getApplicationInstallFromProcess(dto);
|
|
16
|
+
const req = await this.getApplication().getRequestDto(
|
|
17
|
+
dto,
|
|
18
|
+
appInstall,
|
|
19
|
+
HttpMethods.GET,
|
|
20
|
+
`/tickets.json?per_page=100&page=${offset}`,
|
|
21
|
+
);
|
|
22
|
+
const resp = await this.getSender().send<IResponse>(req, [200]);
|
|
23
|
+
const response = resp.getJsonBody();
|
|
24
|
+
|
|
25
|
+
dto.setItemList(response.tickets ?? []);
|
|
26
|
+
if (response.next_page !== null) {
|
|
27
|
+
dto.setBatchCursor((Number(offset) + 1).toString());
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return dto;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
36
|
+
interface IResponse {
|
|
37
|
+
tickets: IOutput[];
|
|
38
|
+
next_page: string;
|
|
39
|
+
links: {
|
|
40
|
+
next: string;
|
|
41
|
+
prev: string;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface IOutput {
|
|
46
|
+
assignee_id: number;
|
|
47
|
+
collaborator_ids: number[];
|
|
48
|
+
created_at: string;
|
|
49
|
+
custom_fields: [
|
|
50
|
+
{
|
|
51
|
+
id: number;
|
|
52
|
+
value: string;
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
description: string;
|
|
56
|
+
external_id: string;
|
|
57
|
+
follower_ids: number[];
|
|
58
|
+
group_id: number;
|
|
59
|
+
has_incidents: boolean;
|
|
60
|
+
id: number;
|
|
61
|
+
organization_id: number;
|
|
62
|
+
priority: string;
|
|
63
|
+
problem_id: number;
|
|
64
|
+
raw_subject: string;
|
|
65
|
+
recipient: string;
|
|
66
|
+
requester_id: number;
|
|
67
|
+
satisfaction_rating: {
|
|
68
|
+
comment: string;
|
|
69
|
+
id: number;
|
|
70
|
+
score: string;
|
|
71
|
+
};
|
|
72
|
+
sharing_agreement_ids: number[];
|
|
73
|
+
status: string;
|
|
74
|
+
subject: string;
|
|
75
|
+
submitter_id: number;
|
|
76
|
+
tags: string[];
|
|
77
|
+
type: string;
|
|
78
|
+
updated_at: string;
|
|
79
|
+
url: string;
|
|
80
|
+
via: {
|
|
81
|
+
channel: string;
|
|
82
|
+
};
|
|
83
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
84
|
+
}
|