@awell-health/awell-extensions 2.1.211 → 2.1.212
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/dist/extensions/markdown.json +2 -2
- package/dist/extensions/zendesk/v1/actions/updateTicket/config/fields.d.ts +34 -3
- package/dist/extensions/zendesk/v1/actions/updateTicket/config/fields.js +100 -5
- package/dist/extensions/zendesk/v1/actions/updateTicket/config/fields.js.map +1 -1
- package/dist/extensions/zendesk/v1/actions/updateTicket/updateTicket.js +12 -2
- package/dist/extensions/zendesk/v1/actions/updateTicket/updateTicket.js.map +1 -1
- package/dist/extensions/zendesk/v1/client/types.d.ts +6 -0
- package/dist/extensions/zendesk/v1/client/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -232,8 +232,8 @@
|
|
|
232
232
|
"changelog": "# Workramp changelog\n\n## 2024-08-28\n\nCreated the extension."
|
|
233
233
|
},
|
|
234
234
|
"zendesk": {
|
|
235
|
-
"readme": "---\ntitle: Zendesk Support\ndescription: Zendesk Support is a customer service platform that provides ticketing, knowledge base, and customer communication tools.\n---\n\n# Zendesk Support\n\nZendesk Support is a customer service platform that provides ticketing, knowledge base, and customer communication tools.\n\n## Extension settings\n\nTo set up this extension, you will need to provide the following:\n\n1. **Zendesk Subdomain:** your Zendesk subdomain only (e.g., \"company\" for company.zendesk.com)\n2. Credentials, using **one** of the two methods below.\n\n### Authentication with an OAuth client (recommended)\n\nZendesk is [removing API tokens](https://support.zendesk.com/hc/en-us/articles/10840968198042). Accounts created on or after July 28, 2026 cannot create them, no account can create new ones from October 27, 2026, and all API tokens stop working on April 30, 2027. New installs should use an OAuth client:\n\n1. In Zendesk Admin Center, go to **Apps and integrations > APIs > OAuth clients** and click **Add client**.\n2. Give it a name (e.g. \"Awell\"), set **Client kind** to **Confidential**, and leave Redirect URLs empty. Note the **Unique identifier**.\n3. Save and copy the **Secret**. Zendesk shows it only once.\n4. In Awell, fill in **OAuth Client Identifier** and **OAuth Client Secret**.\n\nThe extension exchanges these for short-lived access tokens using the client credentials grant (via the shared extensions-core OAuth client, which caches and refreshes them automatically). API calls are attributed to the Zendesk user who created the OAuth client.\n\n### Authentication with a user email and API token (legacy)\n\nExisting installs can keep using a **User Email** and **API Token** (created under Apps and integrations > APIs > API tokens) until Zendesk deactivates API tokens. Note that Zendesk also deactivates tokens that have not been used for 30 days. When the OAuth settings are filled in, the email and API token are ignored.\n\n## Actions\n\n### Create Ticket\n\nCreates a new support ticket in Zendesk with the specified details.\n\n**Required fields:**\n- Subject: The subject line of the ticket\n- Comment: The initial comment/description for the ticket\n\n**Optional fields:**\n- Group ID: The ID of the group to assign the ticket to\n- Priority: The priority level (urgent, high, normal, or low)\n- External ID: An external identifier to link this ticket to your system\n- Tag: A tag to add to the ticket\n\n**Returns:**\n- Ticket ID: The unique identifier of the created ticket\n- Ticket URL: Direct link to the ticket in Zendesk agent interface\n\n**Note:** a failed request is retried once. If Zendesk created the ticket but the response was lost (for example a timeout), the retry can create a duplicate ticket.\n\n### Get Ticket\n\nRetrieves a support ticket from Zendesk, including the requester's name and email.\n\n**Required fields:**\n- Ticket ID: The unique identifier of the ticket to retrieve\n\n**Returns:**\n- Ticket ID, Ticket URL, Subject, Description (first comment), Status, Priority, Type, Channel\n- Tags (array), External ID\n- Requester ID, Requester Name, Requester Email\n- Assignee ID, Group ID, Organization ID\n- Created At, Updated At\n- Custom Fields (JSON array of `{ id, value }`)\n- Ticket (the full ticket object as JSON)\n\n### Update Ticket\n\nUpdates an existing support ticket in Zendesk.\n\n**Required fields:**\n- Ticket ID: The unique identifier of the ticket to update\n\n**Optional fields:**\n- Comment: A comment to add to the ticket
|
|
236
|
-
"changelog": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\n## [1.2.1] - 2026-10-07\n\n### Fixed\n\n- \"Update Ticket\" rejected the ticket ID with `expected string` when the field was bound to a number data point. The field is numeric in Studio, so it now uses the same `NumericIdSchema` as \"Get Ticket\" and \"Delete Ticket\" and accepts both numbers and numeric strings.\n\n## [1.2.0] - 2026-09-23\n\n### Added\n\n- OAuth client credentials authentication (new optional settings \"OAuth Client Identifier\" and \"OAuth Client Secret\"). Zendesk is removing API tokens: accounts created on or after 2026-07-28 cannot create them and all tokens stop working on 2027-04-30. Access tokens are fetched with the client credentials grant through the extensions-core `OAuthClientCredentials`/`APIClient` classes, which cache them until they expire.\n- Ticket event webhook now falls back to the request body when the ticket cannot be fetched from the Zendesk API (missing or invalid credentials, API unavailable). A ticket that Zendesk reports as not found still responds `404` without starting a care flow. New `ticketFetched` data point indicates which path was taken; the trigger body contract gained optional well-known keys (subject, status, priority, tags, external_id, requester_name, requester_email, ...).\n\n### Changed\n\n- \"User Email\" and \"API Token\" settings are now optional (legacy) and only required when the OAuth settings are empty.\n- The \"Zendesk Subdomain\" setting accepts a pasted host (`company.zendesk.com`, `https://company.zendesk.com/`) and is normalised to the subdomain. Values that are not a single DNS label are rejected, so credentials can only be sent to a `*.zendesk.com` host.\n- API calls now go through the extensions-core `APIClient`, which retries a failed call once after 250ms (and, on a 401, fetches a fresh OAuth token first). **Known limitation:** this also applies to \"Create Ticket\", so a request that Zendesk processed but whose response was lost (for example a timeout) can create a duplicate ticket. Sending a Zendesk `Idempotency-Key` would prevent this and is not done yet.\n\n## [1.1.0] - 2026-09-16\n\n### Added\n\n- Ticket event webhook. Accepts a webhook connected to a Zendesk trigger or automation (JSON body with `ticket_id`) as well as a webhook subscribed to Zendesk ticket events (`zen:event-type:ticket.*`). Fetches the full ticket, including the requester's name and email, and exposes it as data points.\n- Get Ticket action, returning the ticket fields, requester details, tags, custom fields and the full ticket as JSON.\n\n## [1.0.0] - 2025-01-10\n\n### Added\n\n- Initial release of Zendesk Support extension\n- Create Ticket action with OAuth authentication\n- Support for all major ticket fields: subject, comment, group_id, priority, external_id, tags\n"
|
|
235
|
+
"readme": "---\ntitle: Zendesk Support\ndescription: Zendesk Support is a customer service platform that provides ticketing, knowledge base, and customer communication tools.\n---\n\n# Zendesk Support\n\nZendesk Support is a customer service platform that provides ticketing, knowledge base, and customer communication tools.\n\n## Extension settings\n\nTo set up this extension, you will need to provide the following:\n\n1. **Zendesk Subdomain:** your Zendesk subdomain only (e.g., \"company\" for company.zendesk.com)\n2. Credentials, using **one** of the two methods below.\n\n### Authentication with an OAuth client (recommended)\n\nZendesk is [removing API tokens](https://support.zendesk.com/hc/en-us/articles/10840968198042). Accounts created on or after July 28, 2026 cannot create them, no account can create new ones from October 27, 2026, and all API tokens stop working on April 30, 2027. New installs should use an OAuth client:\n\n1. In Zendesk Admin Center, go to **Apps and integrations > APIs > OAuth clients** and click **Add client**.\n2. Give it a name (e.g. \"Awell\"), set **Client kind** to **Confidential**, and leave Redirect URLs empty. Note the **Unique identifier**.\n3. Save and copy the **Secret**. Zendesk shows it only once.\n4. In Awell, fill in **OAuth Client Identifier** and **OAuth Client Secret**.\n\nThe extension exchanges these for short-lived access tokens using the client credentials grant (via the shared extensions-core OAuth client, which caches and refreshes them automatically). API calls are attributed to the Zendesk user who created the OAuth client.\n\n### Authentication with a user email and API token (legacy)\n\nExisting installs can keep using a **User Email** and **API Token** (created under Apps and integrations > APIs > API tokens) until Zendesk deactivates API tokens. Note that Zendesk also deactivates tokens that have not been used for 30 days. When the OAuth settings are filled in, the email and API token are ignored.\n\n## Actions\n\n### Create Ticket\n\nCreates a new support ticket in Zendesk with the specified details.\n\n**Required fields:**\n- Subject: The subject line of the ticket\n- Comment: The initial comment/description for the ticket\n\n**Optional fields:**\n- Group ID: The ID of the group to assign the ticket to\n- Priority: The priority level (urgent, high, normal, or low)\n- External ID: An external identifier to link this ticket to your system\n- Tag: A tag to add to the ticket\n\n**Returns:**\n- Ticket ID: The unique identifier of the created ticket\n- Ticket URL: Direct link to the ticket in Zendesk agent interface\n\n**Note:** a failed request is retried once. If Zendesk created the ticket but the response was lost (for example a timeout), the retry can create a duplicate ticket.\n\n### Get Ticket\n\nRetrieves a support ticket from Zendesk, including the requester's name and email.\n\n**Required fields:**\n- Ticket ID: The unique identifier of the ticket to retrieve\n\n**Returns:**\n- Ticket ID, Ticket URL, Subject, Description (first comment), Status, Priority, Type, Channel\n- Tags (array), External ID\n- Requester ID, Requester Name, Requester Email\n- Assignee ID, Group ID, Organization ID\n- Created At, Updated At\n- Custom Fields (JSON array of `{ id, value }`)\n- Ticket (the full ticket object as JSON)\n\n### Update Ticket\n\nUpdates an existing support ticket in Zendesk.\n\n**Required fields:**\n- Ticket ID: The unique identifier of the ticket to update\n\n**Optional fields:**\n- Comment: A comment to add to the ticket. Multi-line; line breaks and blank lines are preserved, and Markdown is rendered when posted by an agent (which API calls are).\n- Public comment: Whether the requester can see the comment. Defaults to Yes; set to No to post an internal note visible to agents only.\n- Priority: The priority level (urgent, high, normal, or low)\n- Status: The new status (new, open, pending, hold, solved, or closed)\n- Add Tags: Tags to add to the ticket (comma-separated text or a list data point). Existing tags are kept.\n- Remove Tags: Tags to remove from the ticket. Tags that are not present are ignored.\n\nTags are never replaced wholesale, so tags maintained by agents or other systems (e.g. for reporting) are preserved. Zendesk normalises tags on write: spaces become underscores and letters are lowercased, so `Kit Return` is stored as `kit_return`. The same tag cannot be listed in both fields. Note that adding or removing tags can fire Zendesk triggers that react to tag changes.\n\n### Delete Ticket\n\nDeletes a support ticket in Zendesk. This action permanently removes the ticket from your Zendesk instance.\n\n**Required fields:**\n- Ticket ID: The unique identifier of the ticket to delete\n\n**Note:** This action cannot be undone. Deleted tickets are permanently removed from Zendesk.\n\n## Webhooks\n\n### Ticket event\n\nStarts a care flow when Zendesk sends a webhook about a ticket. The webhook only needs the ticket ID: the extension fetches the full ticket from the Zendesk API (using the extension settings) so the data points do not depend on what is included in the request body.\n\nIf the ticket cannot be fetched (credentials missing or invalid, Zendesk API unavailable), the care flow still starts. The data points are then populated from the request body instead, the `ticketFetched` data point is `false`, and an activity event explains why. Including the optional fields in the body below therefore makes the integration resilient.\n\nZendesk lets you connect a webhook in one of two ways. The Ticket event webhook supports both.\n\n#### Option 1: connect the webhook to a trigger or automation (recommended for ticket activity)\n\n1. In Awell, create an incoming webhook of type \"Extension webhook\", select the Zendesk extension and the \"Ticket event\" event. Copy the generated URL.\n2. In Zendesk Admin Center, go to **Apps and integrations > Webhooks > Actions > Create webhook** and choose **Trigger or automation**.\n3. Set the endpoint URL to the Awell webhook URL, request method `POST` and request format `JSON`.\n4. Create (or edit) a trigger under **Objects and rules > Business rules > Triggers**. Set the conditions that should start the care flow (for example, a tag is added or a status changes) and add the action **Notify active webhook**, selecting the webhook created above.\n5. Use the following JSON body. `ticket_id` is required; `event_type` is an optional label that is exposed on the `eventType` data point. The other keys are optional and are used to fill the data points when the ticket cannot be fetched from the API (`tags` may be the space-separated string that `{{ticket.tags}}` renders to). Any additional properties are passed through on the `payload` data point. Avoid `{{ticket.description}}` and comment placeholders in the body: free text with quotes or line breaks produces invalid JSON.\n\n```json\n{\n \"ticket_id\": \"{{ticket.id}}\",\n \"event_type\": \"kit_retrieval_requested\",\n \"subject\": \"{{ticket.title}}\",\n \"status\": \"{{ticket.status}}\",\n \"priority\": \"{{ticket.priority}}\",\n \"tags\": \"{{ticket.tags}}\",\n \"external_id\": \"{{ticket.external_id}}\",\n \"requester_name\": \"{{ticket.requester.name}}\",\n \"requester_email\": \"{{ticket.requester.email}}\",\n \"channel\": \"{{ticket.via}}\",\n \"created_at\": \"{{ticket.created_at_with_timestamp}}\",\n \"updated_at\": \"{{ticket.updated_at_with_timestamp}}\",\n \"ticket_url\": \"{{ticket.url}}\"\n}\n```\n\nTo fire once per ticket, add the condition `Ticket > Ticket` `Is` `Created` to the trigger. Triggers otherwise run on every ticket update.\n\n#### Option 2: subscribe the webhook to Zendesk ticket events\n\nWhen creating the webhook in Zendesk Admin Center, choose **Zendesk events** and subscribe to one or more ticket events (for example `Ticket created` or `Ticket status changed`). Zendesk sends its standard event envelope (`type` starting with `zen:event-type:ticket.`) and the extension reads the ticket ID from `detail.id`. The Zendesk event type is exposed on the `eventType` data point.\n\nNote: a webhook's connection method cannot be changed after it is created, and Zendesk's documentation is not consistent about which accounts can subscribe to ticket events. If ticket events are not available in your account, use option 1.\n\n**Data points:**\n- Event Type: the `event_type` from the trigger body (defaults to `trigger`), or the Zendesk event type\n- Ticket Fetched: `true` when the data points come from the Zendesk API, `false` when they were populated from the request body only\n- Payload: the raw request body as JSON\n- All data points returned by the Get Ticket action (Ticket ID, Ticket URL, Subject, Description, Status, Priority, Type, Channel, Tags, External ID, Requester ID/Name/Email, Assignee ID, Group ID, Organization ID, Created At, Updated At, Custom Fields, Ticket)\n\n**Responses:**\n- `400` when the body contains neither a `ticket_id` nor a Zendesk ticket event\n- `404` when Zendesk reports that the ticket does not exist in the configured account; no care flow is started, because a genuine webhook always refers to an existing ticket\n- `200` otherwise, including when the ticket could not be fetched for another reason (see `ticketFetched`)\n\nThe request body is not verified when the ticket cannot be fetched, so flows that act on requester details should branch on `ticketFetched`. A ticket URL from the body is only passed on when it points at a `*.zendesk.com` host.\n",
|
|
236
|
+
"changelog": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\n## [1.3.0] - 2026-10-16\n\n### Added\n\n- Update Ticket: `Add Tags` and `Remove Tags` fields, mapped to Zendesk's `additional_tags` and `remove_tags`. Existing tags are never replaced wholesale. Both accept comma-separated text or a list data point; a tag listed in both is rejected.\n- Update Ticket: `Public comment` field. Defaults to Yes, matching the previous behaviour; set it to No to post the comment as an internal note visible to agents only.\n\n### Changed\n\n- Update Ticket: the `Comment` field is now multi-line. Blank lines between paragraphs are preserved (Zendesk otherwise collapses them). Comments that are blank after trimming are no longer sent.\n\n## [1.2.1] - 2026-10-07\n\n### Fixed\n\n- \"Update Ticket\" rejected the ticket ID with `expected string` when the field was bound to a number data point. The field is numeric in Studio, so it now uses the same `NumericIdSchema` as \"Get Ticket\" and \"Delete Ticket\" and accepts both numbers and numeric strings.\n\n## [1.2.0] - 2026-09-23\n\n### Added\n\n- OAuth client credentials authentication (new optional settings \"OAuth Client Identifier\" and \"OAuth Client Secret\"). Zendesk is removing API tokens: accounts created on or after 2026-07-28 cannot create them and all tokens stop working on 2027-04-30. Access tokens are fetched with the client credentials grant through the extensions-core `OAuthClientCredentials`/`APIClient` classes, which cache them until they expire.\n- Ticket event webhook now falls back to the request body when the ticket cannot be fetched from the Zendesk API (missing or invalid credentials, API unavailable). A ticket that Zendesk reports as not found still responds `404` without starting a care flow. New `ticketFetched` data point indicates which path was taken; the trigger body contract gained optional well-known keys (subject, status, priority, tags, external_id, requester_name, requester_email, ...).\n\n### Changed\n\n- \"User Email\" and \"API Token\" settings are now optional (legacy) and only required when the OAuth settings are empty.\n- The \"Zendesk Subdomain\" setting accepts a pasted host (`company.zendesk.com`, `https://company.zendesk.com/`) and is normalised to the subdomain. Values that are not a single DNS label are rejected, so credentials can only be sent to a `*.zendesk.com` host.\n- API calls now go through the extensions-core `APIClient`, which retries a failed call once after 250ms (and, on a 401, fetches a fresh OAuth token first). **Known limitation:** this also applies to \"Create Ticket\", so a request that Zendesk processed but whose response was lost (for example a timeout) can create a duplicate ticket. Sending a Zendesk `Idempotency-Key` would prevent this and is not done yet.\n\n## [1.1.0] - 2026-09-16\n\n### Added\n\n- Ticket event webhook. Accepts a webhook connected to a Zendesk trigger or automation (JSON body with `ticket_id`) as well as a webhook subscribed to Zendesk ticket events (`zen:event-type:ticket.*`). Fetches the full ticket, including the requester's name and email, and exposes it as data points.\n- Get Ticket action, returning the ticket fields, requester details, tags, custom fields and the full ticket as JSON.\n\n## [1.0.0] - 2025-01-10\n\n### Added\n\n- Initial release of Zendesk Support extension\n- Create Ticket action with OAuth authentication\n- Support for all major ticket fields: subject, comment, group_id, priority, external_id, tags\n"
|
|
237
237
|
},
|
|
238
238
|
"zendeskSell": {
|
|
239
239
|
"readme": "---\ntitle: Zendesk Sell\ndescription: Zendesk Sell is a customer service and support platform that provides a suite of tools and software for businesses to manage their customer interactions.\n---\n\n# Zendesk Sell\n\nZendesk Sell is a customer service and support platform that provides a suite of tools and software for businesses to manage their customer interactions. It offers a range of customer service solutions, including help desk ticketing systems, customer support and engagement, and self-service options. Zendesk is designed to help companies streamline their customer support processes, improve communication with their customers, and resolve issues more efficiently.\n\n## Extension settings\n\nIn order to set up this extension, you will to authenticate with the Sell API and need an API token. You can visit Zendesk Sales CRM dashboard and go to **Settings > Integration > OAuth** to enable and create an API token. Read more about how to get an access token for the Sell API [here](https://developer.zendesk.com/documentation/sales-crm/first-call/).\n\n## Custom Actions\n\n### Create task\n\nCreates a new task. You can create either a floating task or create a related task and associate it with one of the resource types: Leads, Contacts, Deals.\n\n### Complete task\n\nMarks a task as completed.\n",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { FieldType
|
|
2
|
+
import { FieldType } from '@awell-health/extensions-core';
|
|
3
3
|
export declare const fields: {
|
|
4
4
|
ticket_id: {
|
|
5
5
|
label: string;
|
|
@@ -11,8 +11,14 @@ export declare const fields: {
|
|
|
11
11
|
comment: {
|
|
12
12
|
label: string;
|
|
13
13
|
id: string;
|
|
14
|
-
type: FieldType.
|
|
15
|
-
|
|
14
|
+
type: FieldType.TEXT;
|
|
15
|
+
required: false;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
public: {
|
|
19
|
+
label: string;
|
|
20
|
+
id: string;
|
|
21
|
+
type: FieldType.BOOLEAN;
|
|
16
22
|
required: false;
|
|
17
23
|
description: string;
|
|
18
24
|
};
|
|
@@ -42,10 +48,33 @@ export declare const fields: {
|
|
|
42
48
|
}[];
|
|
43
49
|
};
|
|
44
50
|
};
|
|
51
|
+
add_tags: {
|
|
52
|
+
label: string;
|
|
53
|
+
id: string;
|
|
54
|
+
type: FieldType.STRING_ARRAY;
|
|
55
|
+
required: false;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
remove_tags: {
|
|
59
|
+
label: string;
|
|
60
|
+
id: string;
|
|
61
|
+
type: FieldType.STRING_ARRAY;
|
|
62
|
+
required: false;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
45
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* Zendesk collapses consecutive newlines in a comment body into one, so blank
|
|
68
|
+
* lines between paragraphs disappear. Zendesk's documented workaround is to
|
|
69
|
+
* put a space on the empty line, which is what this does. Single line breaks
|
|
70
|
+
* are preserved as-is.
|
|
71
|
+
* https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/#bodies
|
|
72
|
+
*/
|
|
73
|
+
export declare const preserveBlankLines: (body: string) => string;
|
|
46
74
|
export declare const FieldsValidationSchema: z.ZodObject<{
|
|
47
75
|
ticket_id: z.ZodCoercedNumber<unknown>;
|
|
48
76
|
comment: z.ZodOptional<z.ZodString>;
|
|
77
|
+
public: z.ZodOptional<z.ZodBoolean>;
|
|
49
78
|
priority: z.ZodUnion<readonly [z.ZodOptional<z.ZodEnum<{
|
|
50
79
|
low: "low";
|
|
51
80
|
high: "high";
|
|
@@ -60,4 +89,6 @@ export declare const FieldsValidationSchema: z.ZodObject<{
|
|
|
60
89
|
hold: "hold";
|
|
61
90
|
solved: "solved";
|
|
62
91
|
}>>, z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>]>;
|
|
92
|
+
add_tags: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<string[] | undefined, unknown>>;
|
|
93
|
+
remove_tags: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<string[] | undefined, unknown>>;
|
|
63
94
|
}, z.core.$strip>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FieldsValidationSchema = exports.fields = void 0;
|
|
3
|
+
exports.FieldsValidationSchema = exports.preserveBlankLines = exports.fields = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
6
|
+
const lodash_1 = require("lodash");
|
|
6
7
|
const priorityEnum = zod_1.z.enum(['urgent', 'high', 'normal', 'low']);
|
|
7
8
|
const statusEnum = zod_1.z.enum([
|
|
8
9
|
'new',
|
|
@@ -23,10 +24,16 @@ exports.fields = {
|
|
|
23
24
|
comment: {
|
|
24
25
|
label: 'Comment',
|
|
25
26
|
id: 'comment',
|
|
26
|
-
type: extensions_core_1.FieldType.
|
|
27
|
-
|
|
27
|
+
type: extensions_core_1.FieldType.TEXT,
|
|
28
|
+
required: false,
|
|
29
|
+
description: 'Add a comment to the ticket. Line breaks and blank lines are preserved. Markdown is rendered when the comment is posted by an agent.',
|
|
30
|
+
},
|
|
31
|
+
public: {
|
|
32
|
+
label: 'Public comment',
|
|
33
|
+
id: 'public',
|
|
34
|
+
type: extensions_core_1.FieldType.BOOLEAN,
|
|
28
35
|
required: false,
|
|
29
|
-
description: '
|
|
36
|
+
description: 'Whether the comment is visible to the requester. Defaults to Yes. Set to No to post the comment as an internal note that only agents can see.',
|
|
30
37
|
},
|
|
31
38
|
priority: {
|
|
32
39
|
label: 'Priority',
|
|
@@ -54,11 +61,99 @@ exports.fields = {
|
|
|
54
61
|
})),
|
|
55
62
|
},
|
|
56
63
|
},
|
|
64
|
+
add_tags: {
|
|
65
|
+
label: 'Add Tags',
|
|
66
|
+
id: 'add_tags',
|
|
67
|
+
type: extensions_core_1.FieldType.STRING_ARRAY,
|
|
68
|
+
required: false,
|
|
69
|
+
description: 'Tags to add to the ticket. Existing tags are kept. Enter comma-separated tags or select a list data point. Zendesk normalises tags: spaces become underscores and letters are lowercased.',
|
|
70
|
+
},
|
|
71
|
+
remove_tags: {
|
|
72
|
+
label: 'Remove Tags',
|
|
73
|
+
id: 'remove_tags',
|
|
74
|
+
type: extensions_core_1.FieldType.STRING_ARRAY,
|
|
75
|
+
required: false,
|
|
76
|
+
description: 'Tags to remove from the ticket. Tags not present are ignored. Enter comma-separated tags or select a list data point.',
|
|
77
|
+
},
|
|
57
78
|
};
|
|
58
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Zendesk collapses consecutive newlines in a comment body into one, so blank
|
|
81
|
+
* lines between paragraphs disappear. Zendesk's documented workaround is to
|
|
82
|
+
* put a space on the empty line, which is what this does. Single line breaks
|
|
83
|
+
* are preserved as-is.
|
|
84
|
+
* https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/#bodies
|
|
85
|
+
*/
|
|
86
|
+
const preserveBlankLines = (body) => body.replace(/\r\n/g, '\n').replace(/\n(?=\n)/g, '\n ');
|
|
87
|
+
exports.preserveBlankLines = preserveBlankLines;
|
|
88
|
+
/**
|
|
89
|
+
* Accepts the shapes a STRING_ARRAY field can arrive in: a JSON array string
|
|
90
|
+
* (from a data point), a comma-separated string (typed in Studio), or an
|
|
91
|
+
* actual array. Returns a de-duplicated list of trimmed, non-empty tags, or
|
|
92
|
+
* `undefined` when there is nothing to send so the caller can omit the key.
|
|
93
|
+
*/
|
|
94
|
+
const TagsSchema = zod_1.z
|
|
95
|
+
.unknown()
|
|
96
|
+
.optional()
|
|
97
|
+
.transform((value, ctx) => {
|
|
98
|
+
if ((0, lodash_1.isNil)(value) || (typeof value === 'string' && (0, lodash_1.isEmpty)(value.trim())))
|
|
99
|
+
return undefined;
|
|
100
|
+
let items;
|
|
101
|
+
if (Array.isArray(value)) {
|
|
102
|
+
items = value;
|
|
103
|
+
}
|
|
104
|
+
else if (typeof value === 'string') {
|
|
105
|
+
const trimmed = value.trim();
|
|
106
|
+
if (trimmed.startsWith('[')) {
|
|
107
|
+
try {
|
|
108
|
+
const parsed = JSON.parse(trimmed);
|
|
109
|
+
if (!Array.isArray(parsed)) {
|
|
110
|
+
ctx.addIssue({ code: 'custom', message: 'Tags is not an array' });
|
|
111
|
+
return zod_1.z.NEVER;
|
|
112
|
+
}
|
|
113
|
+
items = parsed;
|
|
114
|
+
}
|
|
115
|
+
catch (_a) {
|
|
116
|
+
ctx.addIssue({
|
|
117
|
+
code: 'custom',
|
|
118
|
+
message: 'Tags is not a valid JSON array',
|
|
119
|
+
});
|
|
120
|
+
return zod_1.z.NEVER;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
items = trimmed.split(',');
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
ctx.addIssue({
|
|
129
|
+
code: 'custom',
|
|
130
|
+
message: 'Tags must be a list of strings or a comma-separated string',
|
|
131
|
+
});
|
|
132
|
+
return zod_1.z.NEVER;
|
|
133
|
+
}
|
|
134
|
+
const tags = (0, lodash_1.uniq)(items.map((item) => String(item).trim()).filter((tag) => tag.length > 0));
|
|
135
|
+
return tags.length === 0 ? undefined : tags;
|
|
136
|
+
});
|
|
137
|
+
exports.FieldsValidationSchema = zod_1.z
|
|
138
|
+
.object({
|
|
59
139
|
ticket_id: extensions_core_1.NumericIdSchema,
|
|
60
140
|
comment: zod_1.z.string().optional(),
|
|
141
|
+
public: zod_1.z.boolean().optional(),
|
|
61
142
|
priority: (0, extensions_core_1.makeStringOptional)(priorityEnum),
|
|
62
143
|
status: (0, extensions_core_1.makeStringOptional)(statusEnum),
|
|
144
|
+
add_tags: TagsSchema,
|
|
145
|
+
remove_tags: TagsSchema,
|
|
146
|
+
})
|
|
147
|
+
.superRefine((value, ctx) => {
|
|
148
|
+
if ((0, lodash_1.isNil)(value.add_tags) || (0, lodash_1.isNil)(value.remove_tags))
|
|
149
|
+
return;
|
|
150
|
+
const both = value.add_tags.filter((tag) => { var _a; return (_a = value.remove_tags) === null || _a === void 0 ? void 0 : _a.includes(tag); });
|
|
151
|
+
if (both.length > 0) {
|
|
152
|
+
ctx.addIssue({
|
|
153
|
+
code: 'custom',
|
|
154
|
+
path: ['remove_tags'],
|
|
155
|
+
message: `The same tag cannot be both added and removed: ${both.join(', ')}`,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
63
158
|
});
|
|
64
159
|
//# sourceMappingURL=fields.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/zendesk/v1/actions/updateTicket/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAqC;AACrC,
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/zendesk/v1/actions/updateTicket/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAqC;AACrC,mEAKsC;AACtC,mCAA6C;AAE7C,MAAM,YAAY,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAA;AAChE,MAAM,UAAU,GAAG,OAAC,CAAC,IAAI,CAAC;IACxB,KAAK;IACL,MAAM;IACN,SAAS;IACT,MAAM;IACN,QAAQ;IACR,QAAQ;CACT,CAAC,CAAA;AAEW,QAAA,MAAM,GAAG;IACpB,SAAS,EAAE;QACT,KAAK,EAAE,WAAW;QAClB,EAAE,EAAE,WAAW;QACf,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,iCAAiC;KAC/C;IACD,OAAO,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,EAAE,EAAE,SAAS;QACb,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,KAAK;QACf,WAAW,EACT,sIAAsI;KACzI;IACD,MAAM,EAAE;QACN,KAAK,EAAE,gBAAgB;QACvB,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,KAAK;QACf,WAAW,EACT,+IAA+I;KAClJ;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,UAAU;QACjB,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,mDAAmD;QAChE,OAAO,EAAE;YACP,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CA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AAA"}
|
|
@@ -5,6 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
6
6
|
const settings_1 = require("../../../settings");
|
|
7
7
|
const config_1 = require("./config");
|
|
8
|
+
const fields_1 = require("./config/fields");
|
|
8
9
|
const client_1 = require("../../client");
|
|
9
10
|
const error_1 = require("../../client/error");
|
|
10
11
|
const lodash_1 = require("lodash");
|
|
@@ -17,7 +18,7 @@ exports.updateTicket = {
|
|
|
17
18
|
previewable: true,
|
|
18
19
|
onEvent: async ({ payload, onComplete, onError, helpers }) => {
|
|
19
20
|
try {
|
|
20
|
-
const { settings, fields: { ticket_id, comment, priority, status }, } = (0, extensions_core_1.validate)({
|
|
21
|
+
const { settings, fields: { ticket_id, comment, public: isPublic, priority, status, add_tags, remove_tags, }, } = (0, extensions_core_1.validate)({
|
|
21
22
|
schema: zod_1.z.object({
|
|
22
23
|
settings: settings_1.SettingsValidationSchema,
|
|
23
24
|
fields: config_1.FieldsValidationSchema,
|
|
@@ -26,9 +27,18 @@ exports.updateTicket = {
|
|
|
26
27
|
});
|
|
27
28
|
const client = (0, client_1.makeAPIClient)(settings);
|
|
28
29
|
const updateData = {
|
|
29
|
-
...(!(0, lodash_1.isNil)(comment) &&
|
|
30
|
+
...(!(0, lodash_1.isNil)(comment) &&
|
|
31
|
+
!(0, lodash_1.isEmpty)(comment.trim()) && {
|
|
32
|
+
comment: {
|
|
33
|
+
body: (0, fields_1.preserveBlankLines)(comment),
|
|
34
|
+
public: isPublic !== null && isPublic !== void 0 ? isPublic : true,
|
|
35
|
+
},
|
|
36
|
+
}),
|
|
30
37
|
...(!(0, lodash_1.isNil)(priority) && { priority }),
|
|
31
38
|
...(!(0, lodash_1.isNil)(status) && { status }),
|
|
39
|
+
// Append / remove only; existing tags are never replaced wholesale.
|
|
40
|
+
...(!(0, lodash_1.isNil)(add_tags) && { additional_tags: add_tags }),
|
|
41
|
+
...(!(0, lodash_1.isNil)(remove_tags) && { remove_tags }),
|
|
32
42
|
};
|
|
33
43
|
helpers.log({ updateData }, 'Updating Zendesk ticket');
|
|
34
44
|
await client.updateTicket(ticket_id.toString(), updateData);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateTicket.js","sourceRoot":"","sources":["../../../../../../extensions/zendesk/v1/actions/updateTicket/updateTicket.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAGvB,mEAAkE;AAClE,gDAA4D;AAC5D,qCAAyD;AACzD,yCAA4C;AAC5C,8CAG2B;AAC3B,
|
|
1
|
+
{"version":3,"file":"updateTicket.js","sourceRoot":"","sources":["../../../../../../extensions/zendesk/v1/actions/updateTicket/updateTicket.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAGvB,mEAAkE;AAClE,gDAA4D;AAC5D,qCAAyD;AACzD,4CAAoD;AAEpD,yCAA4C;AAC5C,8CAG2B;AAC3B,mCAAuC;AAE1B,QAAA,YAAY,GAA2C;IAClE,GAAG,EAAE,cAAc;IACnB,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,+CAA+C;IAC5D,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,EAAiB,EAAE;QAC1E,IAAI,CAAC;YACH,MAAM,EACJ,QAAQ,EACR,MAAM,EAAE,EACN,SAAS,EACT,OAAO,EACP,MAAM,EAAE,QAAQ,EAChB,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,WAAW,GACZ,GACF,GAAG,IAAA,0BAAQ,EAAC;gBACX,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;oBACf,QAAQ,EAAE,mCAAwB;oBAClC,MAAM,EAAE,+BAAsB;iBAC/B,CAAC;gBACF,OAAO;aACR,CAAC,CAAA;YAEF,MAAM,MAAM,GAAG,IAAA,sBAAa,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AAC,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAAA;gBAC/D,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,4BAA4B,YAAY,EAAE,EAAE;4BACxD,KAAK,EAAE;gCACL,QAAQ,EAAE,cAAc;gCACxB,OAAO,EAAE,YAAY;6BACtB;yBACF;qBACF;iBACF,CAAC,CAAA;YACJ,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA"}
|
|
@@ -21,9 +21,15 @@ export interface CreateTicketResponse {
|
|
|
21
21
|
export interface UpdateTicketInput {
|
|
22
22
|
comment?: {
|
|
23
23
|
body: string;
|
|
24
|
+
/** false posts an internal note visible to agents only. */
|
|
25
|
+
public?: boolean;
|
|
24
26
|
};
|
|
25
27
|
priority?: 'urgent' | 'high' | 'normal' | 'low';
|
|
26
28
|
status?: 'new' | 'open' | 'pending' | 'hold' | 'solved' | 'closed';
|
|
29
|
+
/** Tags appended to the ticket's existing tags. Cannot be combined with `tags`. */
|
|
30
|
+
additional_tags?: string[];
|
|
31
|
+
/** Tags removed from the ticket if present. Cannot be combined with `tags`. */
|
|
32
|
+
remove_tags?: string[];
|
|
27
33
|
}
|
|
28
34
|
/**
|
|
29
35
|
* Loose schema for a Zendesk ticket as returned by the Tickets API.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../extensions/zendesk/v1/client/types.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../extensions/zendesk/v1/client/types.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAqCvB;;;;;GAKG;AACU,QAAA,cAAc,GAAG,OAAC;KAC5B,MAAM,CAAC;IACN,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,GAAG,EAAE,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