@estebanforge/pi-zendesk-me 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.
@@ -0,0 +1,92 @@
1
+ import { Type, type Static } from "typebox";
2
+ import type {
3
+ AgentToolResult,
4
+ ToolDefinition,
5
+ } from "@earendil-works/pi-coding-agent";
6
+ import { zdGet } from "../api";
7
+ import { toToolResult, errorText, type ZendeskDetails } from "../result";
8
+ import {
9
+ buildSideLoadMaps,
10
+ formatDate,
11
+ orgName,
12
+ stripHtml,
13
+ truncate,
14
+ userName,
15
+ } from "../format";
16
+ import type { ZdTicketResponse } from "../types";
17
+ import { parseTicketRef, TICKET_REF_EXAMPLE } from "../url";
18
+ import {
19
+ GET_TICKET_DESCRIPTION,
20
+ GET_TICKET_INCLUDE_DESCRIPTION,
21
+ GET_TICKET_PARAM,
22
+ GET_TICKET_TITLE,
23
+ } from "../prompts";
24
+
25
+ const Params = Type.Object({
26
+ ticket: Type.String({ description: GET_TICKET_PARAM }),
27
+ include: Type.Optional(
28
+ Type.Array(Type.String(), {
29
+ description: GET_TICKET_INCLUDE_DESCRIPTION,
30
+ }),
31
+ ),
32
+ });
33
+
34
+ export const getTicketTool: ToolDefinition<
35
+ typeof Params,
36
+ ZendeskDetails
37
+ > = {
38
+ name: "zendesk_get_ticket",
39
+ label: GET_TICKET_TITLE,
40
+ description: GET_TICKET_DESCRIPTION,
41
+ parameters: Params,
42
+ async execute(
43
+ _toolCallId: string,
44
+ params: Static<typeof Params>,
45
+ ): Promise<AgentToolResult<ZendeskDetails>> {
46
+ const id = parseTicketRef(params.ticket);
47
+ if (id === null) {
48
+ return toToolResult(
49
+ `Invalid ticket reference: ${JSON.stringify(params.ticket)}. ` +
50
+ `Pass ${TICKET_REF_EXAMPLE}.`,
51
+ );
52
+ }
53
+
54
+ try {
55
+ const include = params.include ?? ["users", "organizations"];
56
+ const resp = await zdGet<ZdTicketResponse>(`tickets/${id}.json`, {
57
+ query: { include: include.join(",") },
58
+ });
59
+ const t = resp.ticket;
60
+ const maps = buildSideLoadMaps(resp.users, resp.organizations);
61
+
62
+ const lines: string[] = [
63
+ `Ticket #${t.id} - [${t.status}] ${t.subject ?? "(no subject)"}`,
64
+ "",
65
+ `Type: ${t.type ?? "none"}`,
66
+ `Priority: ${t.priority ?? "normal"}`,
67
+ `Requester: ${userName(maps, t.requester_id)}`,
68
+ `Assignee: ${userName(maps, t.assignee_id)}`,
69
+ `Organization: ${orgName(maps, t.organization_id)}`,
70
+ `Created: ${formatDate(t.created_at)}`,
71
+ `Updated: ${formatDate(t.updated_at)}`,
72
+ `Due: ${formatDate(t.due_at)}`,
73
+ `Tags: ${t.tags?.length ? t.tags.join(", ") : "none"}`,
74
+ ];
75
+
76
+ const description = stripHtml(t.description);
77
+ if (description) {
78
+ lines.push("", "Description:", truncate(description, 2000));
79
+ }
80
+ lines.push(
81
+ "",
82
+ "Use zendesk_get_comments for the full thread; " +
83
+ "zendesk_get_user / zendesk_get_organization for more detail on any " +
84
+ "person or org above.",
85
+ );
86
+
87
+ return toToolResult(lines.join("\n"));
88
+ } catch (err) {
89
+ return toToolResult(errorText(err));
90
+ }
91
+ },
92
+ };
@@ -0,0 +1,53 @@
1
+ import { Type, type Static } from "typebox";
2
+ import type {
3
+ AgentToolResult,
4
+ ToolDefinition,
5
+ } from "@earendil-works/pi-coding-agent";
6
+ import { zdGet } from "../api";
7
+ import { toToolResult, errorText, type ZendeskDetails } from "../result";
8
+ import { formatDate } from "../format";
9
+ import type { ZdUserResponse } from "../types";
10
+ import {
11
+ GET_USER_DESCRIPTION,
12
+ GET_USER_PARAM,
13
+ GET_USER_TITLE,
14
+ } from "../prompts";
15
+
16
+ const Params = Type.Object({
17
+ user: Type.Number({ description: GET_USER_PARAM }),
18
+ });
19
+
20
+ export const getUserTool: ToolDefinition<typeof Params, ZendeskDetails> = {
21
+ name: "zendesk_get_user",
22
+ label: GET_USER_TITLE,
23
+ description: GET_USER_DESCRIPTION,
24
+ parameters: Params,
25
+ async execute(
26
+ _toolCallId: string,
27
+ params: Static<typeof Params>,
28
+ ): Promise<AgentToolResult<ZendeskDetails>> {
29
+ try {
30
+ const resp = await zdGet<ZdUserResponse>(
31
+ `users/${params.user}.json`,
32
+ );
33
+ const u = resp.user;
34
+ const lines = [
35
+ `User #${u.id} - ${u.name}`,
36
+ "",
37
+ `Email: ${u.email ?? "none"}`,
38
+ `Role: ${u.role}`,
39
+ `Active: ${u.active ? "yes" : "no"}`,
40
+ `Organization: ${u.organization_id ? `#${u.organization_id}` : "none"}`,
41
+ `Time zone: ${u.time_zone ?? "unknown"}`,
42
+ `Created: ${formatDate(u.created_at)}`,
43
+ `Updated: ${formatDate(u.updated_at)}`,
44
+ ];
45
+ if (u.details) lines.push("", `Details: ${u.details}`);
46
+ if (u.notes) lines.push("", `Notes: ${u.notes}`);
47
+ if (u.tags?.length) lines.push("", `Tags: ${u.tags.join(", ")}`);
48
+ return toToolResult(lines.join("\n"));
49
+ } catch (err) {
50
+ return toToolResult(errorText(err));
51
+ }
52
+ },
53
+ };
@@ -0,0 +1,81 @@
1
+ import { Type, type Static } from "typebox";
2
+ import type {
3
+ AgentToolResult,
4
+ ToolDefinition,
5
+ } from "@earendil-works/pi-coding-agent";
6
+ import { zdGet } from "../api";
7
+ import { toToolResult, errorText, type ZendeskDetails } from "../result";
8
+ import { buildSideLoadMaps, formatTicketLine } from "../format";
9
+ import type { ZdViewExecuteResponse, ZdViewResponse } from "../types";
10
+ import { parseViewRef, VIEW_REF_EXAMPLE } from "../url";
11
+ import {
12
+ GET_VIEW_DESCRIPTION,
13
+ GET_VIEW_LIMIT_DESCRIPTION,
14
+ GET_VIEW_PARAM,
15
+ GET_VIEW_TITLE,
16
+ } from "../prompts";
17
+
18
+ const Params = Type.Object({
19
+ view: Type.String({ description: GET_VIEW_PARAM }),
20
+ limit: Type.Optional(
21
+ Type.Number({
22
+ description: GET_VIEW_LIMIT_DESCRIPTION,
23
+ minimum: 1,
24
+ maximum: 100,
25
+ }),
26
+ ),
27
+ });
28
+
29
+ export const getViewTool: ToolDefinition<typeof Params, ZendeskDetails> = {
30
+ name: "zendesk_get_view",
31
+ label: GET_VIEW_TITLE,
32
+ description: GET_VIEW_DESCRIPTION,
33
+ parameters: Params,
34
+ async execute(
35
+ _toolCallId: string,
36
+ params: Static<typeof Params>,
37
+ ): Promise<AgentToolResult<ZendeskDetails>> {
38
+ const id = parseViewRef(params.view);
39
+ if (id === null) {
40
+ return toToolResult(
41
+ `Invalid view reference: ${JSON.stringify(params.view)}. ` +
42
+ `Pass ${VIEW_REF_EXAMPLE}.`,
43
+ );
44
+ }
45
+
46
+ try {
47
+ const limit = params.limit ?? 25;
48
+ const viewResp = await zdGet<ZdViewResponse>(`views/${id}.json`);
49
+ const execResp = await zdGet<ZdViewExecuteResponse>(
50
+ `views/${id}/execute.json`,
51
+ {
52
+ query: {
53
+ per_page: limit,
54
+ include: "users,organizations",
55
+ },
56
+ },
57
+ );
58
+
59
+ const title = viewResp.view.title ?? "(untitled view)";
60
+ const rows = execResp.rows ?? [];
61
+ const count = execResp.count ?? rows.length;
62
+ const maps = buildSideLoadMaps(execResp.users, execResp.organizations);
63
+
64
+ const lines = [
65
+ `View #${id} - ${title}`,
66
+ `${count} matching ticket${count === 1 ? "" : "s"}` +
67
+ (execResp.next_page
68
+ ? ` (showing first ${rows.length} - raise limit or narrow the view to refine)`
69
+ : ""),
70
+ "",
71
+ ...(rows.length
72
+ ? rows.map((row) => formatTicketLine(row.ticket, maps))
73
+ : ["(no matching tickets)"]),
74
+ ];
75
+
76
+ return toToolResult(lines.join("\n"));
77
+ } catch (err) {
78
+ return toToolResult(errorText(err));
79
+ }
80
+ },
81
+ };
@@ -0,0 +1,94 @@
1
+ import { Type, type Static } from "typebox";
2
+ import type {
3
+ AgentToolResult,
4
+ ToolDefinition,
5
+ } from "@earendil-works/pi-coding-agent";
6
+ import { zdGet } from "../api";
7
+ import { toToolResult, errorText, type ZendeskDetails } from "../result";
8
+ import { buildSideLoadMaps, formatDate, formatTicketLine } from "../format";
9
+ import type { ZdSearchResponse } from "../types";
10
+ import {
11
+ SEARCH_ALL_TYPES_DESCRIPTION,
12
+ SEARCH_DESCRIPTION,
13
+ SEARCH_LIMIT_DESCRIPTION,
14
+ SEARCH_QUERY_DESCRIPTION,
15
+ SEARCH_TITLE,
16
+ } from "../prompts";
17
+
18
+ const Params = Type.Object({
19
+ query: Type.String({ description: SEARCH_QUERY_DESCRIPTION }),
20
+ limit: Type.Optional(
21
+ Type.Number({
22
+ description: SEARCH_LIMIT_DESCRIPTION,
23
+ minimum: 1,
24
+ maximum: 100,
25
+ }),
26
+ ),
27
+ all_types: Type.Optional(
28
+ Type.Boolean({
29
+ description: SEARCH_ALL_TYPES_DESCRIPTION,
30
+ }),
31
+ ),
32
+ });
33
+
34
+ // Agents overwhelmingly mean "find tickets". Prepend type:ticket unless the
35
+ // query already pins a type (covers type:ticket and type:organization etc.).
36
+ function effectiveQuery(query: string, allTypes: boolean): string {
37
+ if (allTypes || /(^|\s)type:/.test(query)) return query;
38
+ return `type:ticket ${query}`;
39
+ }
40
+
41
+ export const searchTool: ToolDefinition<typeof Params, ZendeskDetails> = {
42
+ name: "zendesk_search",
43
+ label: SEARCH_TITLE,
44
+ description: SEARCH_DESCRIPTION,
45
+ parameters: Params,
46
+ async execute(
47
+ _toolCallId: string,
48
+ params: Static<typeof Params>,
49
+ ): Promise<AgentToolResult<ZendeskDetails>> {
50
+ try {
51
+ const query = effectiveQuery(params.query, params.all_types ?? false);
52
+ const resp = await zdGet<ZdSearchResponse>("search.json", {
53
+ query: { query, per_page: params.limit ?? 25 },
54
+ });
55
+
56
+ const results = resp.results ?? [];
57
+ if (!results.length) {
58
+ return toToolResult(`No results for: ${query}`);
59
+ }
60
+
61
+ const maps = buildSideLoadMaps();
62
+ const lines = [
63
+ `${resp.count} result${resp.count === 1 ? "" : "s"} for: ${query}` +
64
+ (resp.next_page
65
+ ? ` (showing first ${results.length} - narrow the query to refine)`
66
+ : ""),
67
+ "",
68
+ ...results.map((r) => {
69
+ if (r.result_type === "ticket") {
70
+ return formatTicketLine(r, maps);
71
+ }
72
+ if (r.result_type === "user") {
73
+ return `user result #${r.id} - use zendesk_get_user for details`;
74
+ }
75
+ if (r.result_type === "organization") {
76
+ return `organization result #${r.id} - use zendesk_get_organization for details`;
77
+ }
78
+ return `${r.result_type} result (unrendered)`;
79
+ }),
80
+ "",
81
+ "Dates (UTC):",
82
+ ...results
83
+ .filter((r) => r.result_type === "ticket")
84
+ .map((r) => `#${r.id}: created ${formatDate(r.created_at)}`),
85
+ ];
86
+
87
+ return toToolResult(lines.join("\n"));
88
+ } catch (err) {
89
+ return toToolResult(errorText(err));
90
+ }
91
+ },
92
+ };
93
+
94
+ export { effectiveQuery };
package/lib/types.ts ADDED
@@ -0,0 +1,135 @@
1
+ // Zendesk Support API v2 types. Only the fields this extension renders; the
2
+ // API returns more and we ignore the rest.
3
+
4
+ export const TICKET_STATUSES = [
5
+ "new",
6
+ "open",
7
+ "pending",
8
+ "hold",
9
+ "solved",
10
+ "closed",
11
+ ] as const;
12
+ export type ZdTicketStatus = (typeof TICKET_STATUSES)[number];
13
+
14
+ export interface ZdTicket {
15
+ id: number;
16
+ subject: string | null;
17
+ /** First comment body (HTML). Present on the single-ticket record, not on search results. */
18
+ description?: string | null;
19
+ status: ZdTicketStatus;
20
+ priority: "urgent" | "high" | "normal" | "low" | null;
21
+ type: string | null;
22
+ requester_id: number;
23
+ submitter_id: number;
24
+ assignee_id: number | null;
25
+ organization_id: number | null;
26
+ group_id: number | null;
27
+ tags?: string[];
28
+ created_at: string;
29
+ updated_at: string;
30
+ due_at?: string | null;
31
+ url?: string;
32
+ }
33
+
34
+ export interface ZdComment {
35
+ id: number;
36
+ /** May contain HTML. */
37
+ body: string | null;
38
+ html_body?: string | null;
39
+ plain_body?: string | null;
40
+ /** False means internal note. */
41
+ public: boolean;
42
+ author_id: number;
43
+ created_at: string;
44
+ attachments?: ZdAttachment[];
45
+ via?: { channel?: string; source?: unknown };
46
+ }
47
+
48
+ export interface ZdAttachment {
49
+ id: number;
50
+ file_name: string;
51
+ content_url?: string;
52
+ size?: number;
53
+ content_type?: string;
54
+ inline?: boolean;
55
+ }
56
+
57
+ export interface ZdUser {
58
+ id: number;
59
+ name: string;
60
+ email?: string | null;
61
+ active: boolean;
62
+ role: string;
63
+ locale?: string;
64
+ time_zone?: string;
65
+ created_at?: string;
66
+ updated_at?: string;
67
+ organization_id?: number | null;
68
+ details?: string | null;
69
+ notes?: string | null;
70
+ tags?: string[];
71
+ }
72
+
73
+ export interface ZdOrganization {
74
+ id: number;
75
+ name: string;
76
+ domain_names?: string[];
77
+ details?: string | null;
78
+ notes?: string | null;
79
+ tags?: string[];
80
+ created_at?: string;
81
+ updated_at?: string;
82
+ }
83
+
84
+ // Side-loaded records ride at the top level of a response:
85
+ // GET /api/v2/tickets/7942.json?include=users,organizations
86
+ // => { ticket: {...}, users: [...], organizations: [...] }
87
+ export interface ZdSideLoads {
88
+ users?: ZdUser[];
89
+ organizations?: ZdOrganization[];
90
+ groups?: Array<{ id: number; name: string }>;
91
+ }
92
+
93
+ export interface ZdTicketResponse extends ZdSideLoads {
94
+ ticket: ZdTicket;
95
+ }
96
+
97
+ export interface ZdCommentsResponse extends ZdSideLoads {
98
+ comments: ZdComment[];
99
+ }
100
+
101
+ export interface ZdSearchResponse {
102
+ results: Array<ZdTicket & { result_type: string }>;
103
+ count: number;
104
+ next_page: string | null;
105
+ previous_page: string | null;
106
+ }
107
+
108
+ export interface ZdUserResponse {
109
+ user: ZdUser;
110
+ }
111
+
112
+ export interface ZdOrgResponse {
113
+ organization: ZdOrganization;
114
+ }
115
+
116
+ export interface ZdView {
117
+ id: number;
118
+ title?: string;
119
+ active?: boolean;
120
+ }
121
+
122
+ export interface ZdViewResponse {
123
+ view: ZdView;
124
+ }
125
+
126
+ export interface ZdViewExecuteRow {
127
+ ticket: ZdTicket;
128
+ }
129
+
130
+ export interface ZdViewExecuteResponse extends ZdSideLoads {
131
+ rows: ZdViewExecuteRow[];
132
+ count?: number;
133
+ next_page?: string | null;
134
+ previous_page?: string | null;
135
+ }
package/lib/url.ts ADDED
@@ -0,0 +1,27 @@
1
+ // Ticket reference parsing. The agent (and Esteban) habitually copy full
2
+ // agent-UI URLs like https://{subdomain}.zendesk.com/agent/tickets/7942 - accept
3
+ // those directly instead of forcing id extraction by hand.
4
+
5
+ /** Accepts a numeric id, or any URL containing /tickets/<digits>. */
6
+ export function parseTicketRef(input: string): number | null {
7
+ const trimmed = input.trim();
8
+ if (/^\d+$/.test(trimmed)) return Number(trimmed);
9
+ const match = trimmed.match(/\/tickets\/(\d+)/);
10
+ return match ? Number(match[1]) : null;
11
+ }
12
+
13
+ /** View/filter ref: bare id, /agent/filters/<id>, or /views/<id>. */
14
+ export function parseViewRef(input: string): number | null {
15
+ const trimmed = input.trim();
16
+ if (/^\d+$/.test(trimmed)) return Number(trimmed);
17
+ const match = trimmed.match(/\/(?:filters|views)\/(\d+)/);
18
+ return match ? Number(match[1]) : null;
19
+ }
20
+
21
+ export const TICKET_REF_EXAMPLE =
22
+ 'a numeric ticket id ("7942") or a full agent URL ' +
23
+ '("https://{subdomain}.zendesk.com/agent/tickets/7942")';
24
+
25
+ export const VIEW_REF_EXAMPLE =
26
+ 'a numeric view id ("20824934716439") or a full agent URL ' +
27
+ '("https://{subdomain}.zendesk.com/agent/filters/20824934716439")';
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@estebanforge/pi-zendesk-me",
3
+ "version": "1.0.0",
4
+ "description": "Zendesk Support read tools for Pi. Adds 7 LLM-callable tools (zendesk_*) that query the Zendesk Support API v2 over HTTPS: fetch a ticket (by id or agent URL), read the comment thread, search tickets, look up users and organizations, download attachments for viewing, and list tickets in a saved view (filter). OAuth client-credentials auth via ZENDESK_SUBDOMAIN / ZENDESK_CLIENT_ID / ZENDESK_CLIENT_SECRET - no API tokens (deprecated by Zendesk), no MCP server install.",
5
+ "keywords": [
6
+ "pi-package",
7
+ "pi-extension",
8
+ "zendesk",
9
+ "support",
10
+ "tickets",
11
+ "rest-api",
12
+ "coding-agent"
13
+ ],
14
+ "license": "MIT",
15
+ "author": {
16
+ "name": "EstebanForge",
17
+ "email": "esteban@attitude.cl",
18
+ "url": "https://actitud.xyz"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/EstebanForge/pi-zendesk-me.git"
23
+ },
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "type": "module",
28
+ "scripts": {
29
+ "test": "vitest run",
30
+ "test:watch": "vitest",
31
+ "typecheck": "tsc --noEmit",
32
+ "prepublishOnly": "npm run typecheck && npm test"
33
+ },
34
+ "files": [
35
+ "extensions",
36
+ "lib",
37
+ "tests",
38
+ "vitest.config.ts",
39
+ "README.md"
40
+ ],
41
+ "pi": {
42
+ "extensions": [
43
+ "./extensions"
44
+ ]
45
+ },
46
+ "peerDependencies": {
47
+ "@earendil-works/pi-coding-agent": "*",
48
+ "typebox": "*"
49
+ },
50
+ "peerDependenciesMeta": {
51
+ "@earendil-works/pi-coding-agent": {
52
+ "optional": true
53
+ },
54
+ "typebox": {
55
+ "optional": true
56
+ }
57
+ },
58
+ "devDependencies": {
59
+ "@earendil-works/pi-coding-agent": "^0.84.0",
60
+ "@types/node": "^22.0.0",
61
+ "typebox": "^1.3.4",
62
+ "typescript": "^5.8.0",
63
+ "vitest": "^4.1.7"
64
+ }
65
+ }
@@ -0,0 +1,72 @@
1
+ import { vi } from "vitest";
2
+ import type { AgentToolResult } from "@earendil-works/pi-coding-agent";
3
+
4
+ // ToolDefinition.execute has a 5-arg signature (toolCallId, params, signal,
5
+ // onUpdate, ctx) per @earendil-works/pi-coding-agent. Our tools only consume
6
+ // the first two; the other three are required by the type but ignored at
7
+ // runtime. This helper lets tests pass 2 args while satisfying the 5-arg
8
+ // contract, same as pi-slack-me's tests/_helpers.ts. `any` matches what pi's
9
+ // runtime does.
10
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11
+ type AnyExecute = (...args: any[]) => Promise<AgentToolResult<unknown>>;
12
+
13
+ export function invoke<P>(
14
+ tool: { execute: AnyExecute },
15
+ params: P,
16
+ ): Promise<AgentToolResult<unknown>> {
17
+ const fn = tool.execute as unknown as (
18
+ a: string,
19
+ b: P,
20
+ ) => Promise<AgentToolResult<unknown>>;
21
+ return fn("call-id", params);
22
+ }
23
+
24
+ // First text block of a tool result, typed for assertions.
25
+ export function firstText(result: AgentToolResult<unknown>): string {
26
+ const block = result.content[0] as { type: string; text: string };
27
+ return block.text;
28
+ }
29
+
30
+ // Set the three required env vars. Auth reads env at call time, so stubEnv is
31
+ // enough; tests that need missing vars override with empty strings.
32
+ export function stubZendeskEnv(): void {
33
+ vi.stubEnv("ZENDESK_SUBDOMAIN", "{subdomain}");
34
+ vi.stubEnv("ZENDESK_CLIENT_ID", "test-client-id");
35
+ vi.stubEnv("ZENDESK_CLIENT_SECRET", "test-client-secret");
36
+ }
37
+
38
+ export function jsonResponse(
39
+ body: unknown,
40
+ status = 200,
41
+ headers?: Record<string, string>,
42
+ ): Response {
43
+ return new Response(JSON.stringify(body), {
44
+ status,
45
+ headers: { "Content-Type": "application/json", ...headers },
46
+ });
47
+ }
48
+
49
+ // Replace global fetch with a vi.fn dispatching through `handler`. The mock
50
+ // receives (url: string, init?: RequestInit) and may be async.
51
+ export function fetchMock(
52
+ handler: (url: string, init?: RequestInit) => Response | Promise<Response>,
53
+ ): ReturnType<typeof vi.fn> {
54
+ const mock = vi.fn(async (url: unknown, init?: unknown) =>
55
+ handler(String(url), init as RequestInit | undefined),
56
+ );
57
+ vi.stubGlobal("fetch", mock as unknown as typeof fetch);
58
+ return mock;
59
+ }
60
+
61
+ // Standard OAuth token endpoint success response. Most api/tool tests need a
62
+ // token before the request under test fires.
63
+ export const TOKEN_OK = {
64
+ access_token: "test-access-token",
65
+ token_type: "bearer",
66
+ scope: "tickets:read users:read organizations:read",
67
+ expires_in: 1800,
68
+ };
69
+
70
+ export function isTokenRequest(url: string): boolean {
71
+ return url === "https://{subdomain}.zendesk.com/oauth/tokens";
72
+ }