/*! * Copyright Adaptavist 2022 (c) All rights reserved */ import { GetAllUsersRequest, GetAllUsersResponseOK } from "./types/user"; import { GetMyUserRequest, GetMyUserResponseOK } from "./types/user"; import { GetUsersRequest, GetUsersResponseOK } from "./types/user"; import { GetUserRequest, GetUserResponseOK } from "./types/user"; import { GetUsersByGroupRequest, GetUsersByGroupResponseOK } from "./types/user"; import { GetUsersByOrganizationRequest, GetUsersByOrganizationResponseOK } from "./types/user"; import { GetAllOrganizationsRequest, GetAllOrganizationsResponseOK } from "./types/organization"; import { GetOrganizationsByUserRequest, GetOrganizationsByUserResponseOK } from "./types/organization"; import { GetAllGroupsRequest, GetAllGroupsResponseOK } from "./types/group"; import { GetGroupsByUserRequest, GetGroupsByUserResponseOK } from "./types/group"; import { UploadTicketAttachmentResponseOK, UploadTicketAttachmentRequest } from "./types/ticket/attachment"; import { GetTicketCommentsRequest, GetTicketCommentsResponseOK } from "./types/ticket/comment"; import { GetAllTicketsRequest, GetAllTicketsResponseOK } from "./types/ticket"; import { CreateTicketRequest, CreateTicketResponseOK } from "./types/ticket"; import { GetTicketRequest, GetTicketResponseOK } from "./types/ticket"; import { UpdateTicketRequest, UpdateTicketResponseOK } from "./types/ticket"; import { DeleteTicketRequest, DeleteTicketResponseOK } from "./types/ticket"; import { GetTicketsRequest, GetTicketsResponseOK } from "./types/ticket"; import { GetTicketsByOrganizationRequest, GetTicketsByOrganizationResponseOK } from "./types/ticket"; import { GetTicketsByRequestedUserRequest, GetTicketsByRequestedUserResponseOK } from "./types/ticket"; import { GetTicketsByCCdUserRequest, GetTicketsByCCdUserResponseOK } from "./types/ticket"; import { GetTicketsByFollowedUserRequest, GetTicketsByFollowedUserResponseOK } from "./types/ticket"; import { GetTicketsByAssignedUserRequest, GetTicketsByAssignedUserResponseOK } from "./types/ticket"; import { GetRecentTicketsRequest, GetRecentTicketsResponseOK } from "./types/ticket"; import { BaseApiCore, Headers, Response, ErrorStrategyOptionType, PlatformImplementation } from "@managed-api/commons-core"; import { CommonError, AdditionalErrorTypes, ErrorStrategyHandlers, ErrorStrategyOption } from "./errorStrategy"; import { ErrorStrategyBuilder } from "./builders/errorStrategy"; export interface ZenDeskApiCoreOptions extends ErrorStrategyOption { } type GetGlobalErrorStrategy = () => ErrorStrategyOptionType | undefined; export declare abstract class ZenDeskApiCore extends BaseApiCore { private options?; User: UserGroup; Organization: OrganizationGroup; Group: GroupGroup; Ticket: TicketGroup; All: AllGroup; constructor(options?: ZenDeskApiCoreOptions | undefined); setGlobalErrorStrategy(errorStrategy: ErrorStrategyOptionType): void; protected buildResponse(url: string, status: number, statusText: string, headers: Headers, body?: string | ArrayBuffer): Response; private getGlobalErrorStrategy; } declare class AllGroup { private User; private Organization; private Group; private Ticket; constructor(User: UserGroup, Organization: OrganizationGroup, Group: GroupGroup, Ticket: TicketGroup); /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Admins, Agents and Light Agents * Alternative usage: User.getAllUsers * Documentation: https://developer.zendesk.com/api-reference/ticketing/users/users/#list-users * @param options Request options. */ getAllUsers(options?: GetAllUsersRequest): Promise; /** * The endpoint returns [user information](/api-reference/ticketing/users/users/) and an `authenticity_token`. #### Allowed For * Anonymous users #### Authenticity Token Zendesk API calls made by end users from a Zendesk help center must include `authenticity_token` in the `X-CSRF-Token` HTTP header. This helps prevent [cross-site request forgery (CSRF)](https://en.wikipedia.org/wiki/Cross-site_request_forgery) attacks. For an example using an authenticity token, see the AJAX request in the [Upgrading from Templating API v1](https://developer.zendesk.com/documentation/help_center/help-center-templates/v1#jquery) documentation. * Alternative usage: User.getMyUser * Documentation: https://developer.zendesk.com/api-reference/ticketing/users/users/#show-self * @param options Request options. */ getMyUser(options?: GetMyUserRequest): Promise; /** * Accepts a comma-separated list of up to 100 user ids or external ids. #### Allowed For: * Agents * Alternative usage: User.getUsers * Documentation: https://developer.zendesk.com/api-reference/ticketing/users/users/#show-many-users * @param options Request options. */ getUsers(options?: GetUsersRequest): Promise; /** * #### Allowed For * Agents * Alternative usage: User.getUser * Documentation: https://developer.zendesk.com/api-reference/ticketing/users/users/#show-user * @param options Request options. */ getUser(options: GetUserRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents. * Alternative usage: User.getUsersByGroup * Documentation: https://developer.zendesk.com/api-reference/ticketing/groups/group_memberships/#list-memberships * @param options Request options. */ getUsersByGroup(options: GetUsersByGroupRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents and End users. * Alternative usage: User.getUsersByOrganization * Documentation: https://developer.zendesk.com/api-reference/ticketing/organizations/organization_memberships/#list-memberships * @param options Request options. */ getUsersByOrganization(options: GetUsersByOrganizationRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents, with certain restrictions If the agent has a custom agent role that restricts their access to only users in their own organization, a 403 Forbidden error is returned. See [Creating custom agent roles](https://support.zendesk.com/hc/en-us/articles/203662026-Creating-custom-roles-and-assigning-agents#topic_cxn_hig_bd) in Zendesk help. * Alternative usage: Organization.getAllOrganizations * Documentation: https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/#list-organizations * @param options Request options. */ getAllOrganizations(options?: GetAllOrganizationsRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents, with certain restrictions. If the agent has a custom agent role that restricts their access to only users in their own organization, a 403 Forbidden error is returned. See [Creating custom agent roles](https://support.zendesk.com/hc/en-us/articles/4408882153882-Creating-custom-roles-and-assigning-agents#topic_cxn_hig_bd) in Zendesk help. * Alternative usage: Organization.getOrganizationsByUser * Documentation: https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/#list-organizations * @param options Request options. */ getOrganizationsByUser(options: GetOrganizationsByUserRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Admins * Agents * Alternative usage: Group.getAllGroups * Documentation: https://developer.zendesk.com/api-reference/ticketing/groups/groups/#list-groups * @param options Request options. */ getAllGroups(options: GetAllGroupsRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Admins and Agents. * Alternative usage: Group.getGroupsByUser * Documentation: https://developer.zendesk.com/api-reference/ticketing/groups/groups/#list-groups * @param options Request options. */ getGroupsByUser(options: GetGroupsByUserRequest): Promise; /** * List Tickets * Alternative usage: Ticket.getAllTickets * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets * @param options Request options. */ getAllTickets(options?: GetAllTicketsRequest): Promise; /** * Create Ticket * Alternative usage: Ticket.createTicket * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#create-ticket * @param options Request options. */ createTicket(options: CreateTicketRequest): Promise; /** * Returns a number of ticket properties though not the ticket comments. To get the comments, use [List Comments](/api-reference/ticketing/tickets/ticket_comments/#list-comments) #### Allowed For * Agents * Alternative usage: Ticket.getTicket * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#show-ticket * @param options Request options. */ getTicket(options: GetTicketRequest): Promise; /** * Update Ticket * Alternative usage: Ticket.updateTicket * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#update-ticket * @param options Request options. */ updateTicket(options: UpdateTicketRequest): Promise; /** * #### Allowed For * Admins * Agents with permission to delete tickets Agent delete permissions are set in Support. See [Deleting tickets](https://support.zendesk.com/hc/en-us/articles/203690936) in the Support Help Center. #### Ticket deletion rate limit You can delete 400 tickets every 1 minute using this endpoint. The rate limiting mechanism behaves as described in [Rate limits](/api-reference/introduction/rate-limits/) in the API introduction. Zendesk recommends that you obey the Retry-After header values. To delete many tickets, you may use [Bulk Delete Tickets](/api-reference/ticketing/tickets/tickets/#bulk-delete-tickets). * Alternative usage: Ticket.deleteTicket * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#delete-ticket * @param options Request options. */ deleteTicket(options: DeleteTicketRequest): Promise; /** * Accepts a comma-separated list of ticket ids to return. This endpoint will return up to 100 tickets records. #### Allowed For * Agents * Alternative usage: Ticket.getTickets * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#show-multiple-tickets * @param options Request options. */ getTickets(options: GetTicketsRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents. * Alternative usage: Ticket.getTicketsByOrganization * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets * @param options Request options. */ getTicketsByOrganization(options: GetTicketsByOrganizationRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents. * Alternative usage: Ticket.getTicketsByRequestedUser * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets * @param options Request options. */ getTicketsByRequestedUser(options: GetTicketsByRequestedUserRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents. * Alternative usage: Ticket.getTicketsByCCdUser * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets * @param options Request options. */ getTicketsByCCdUser(options: GetTicketsByCCdUserRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents. * Alternative usage: Ticket.getTicketsByFollowedUser * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets * @param options Request options. */ getTicketsByFollowedUser(options: GetTicketsByFollowedUserRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents. * Alternative usage: Ticket.getTicketsByAssignedUser * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets * @param options Request options. */ getTicketsByAssignedUser(options: GetTicketsByAssignedUserRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents. * Alternative usage: Ticket.getRecentTickets * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets * @param options Request options. */ getRecentTickets(options?: GetRecentTicketsRequest): Promise; /** * Uploads an attachment. * Recommended usage: Ticket.Attachment.UploadAttachment * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-attachments/#upload-files * @param options Request options. */ uploadAttachment(options: UploadTicketAttachmentRequest): Promise; /** * Returns the comments added to the ticket. Each comment may include a `content_url` for an attachment or a `recording_url` for a voice comment that points to a file that may be hosted externally. For security reasons, take care not to inadvertently send Zendesk authentication credentials to third parties when attempting to access these files. See [Working with url properties](/documentation/ticketing/managing-tickets/working-with-url-properties). #### Pagination - Cursor pagination (recommended) - Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Sorting By default, comments are sorted by creation date in ascending order. When using cursor pagination, use the following parameter to change the sort order: | Name | Type | Required | Comments | ------ | ------ | -------- | -------- | `sort` | string | no | Possible values are "created_at" (ascending order) or "-created_at" (descending order) When using offset pagination, use the following parameters to change the sort order: | Name | Type | Required | Comments | ------------ | ------ | -------- | -------- | `sort_order` | string | no | One of `asc`, `desc`. Defaults to `asc` #### Allowed For * Agents * Alternative usage: Ticket.Comment.getComments * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/#list-comments * @param options Request options. */ getTicketComments(options: GetTicketCommentsRequest): Promise; } declare class UserGroup { private implementation; private getGlobalErrorStrategy; constructor(implementation: PlatformImplementation, getGlobalErrorStrategy: GetGlobalErrorStrategy); /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Admins, Agents and Light Agents * Documentation: https://developer.zendesk.com/api-reference/ticketing/users/users/#list-users * @param options Request options. */ getAllUsers(options?: GetAllUsersRequest): Promise; /** * The endpoint returns [user information](/api-reference/ticketing/users/users/) and an `authenticity_token`. #### Allowed For * Anonymous users #### Authenticity Token Zendesk API calls made by end users from a Zendesk help center must include `authenticity_token` in the `X-CSRF-Token` HTTP header. This helps prevent [cross-site request forgery (CSRF)](https://en.wikipedia.org/wiki/Cross-site_request_forgery) attacks. For an example using an authenticity token, see the AJAX request in the [Upgrading from Templating API v1](https://developer.zendesk.com/documentation/help_center/help-center-templates/v1#jquery) documentation. * Documentation: https://developer.zendesk.com/api-reference/ticketing/users/users/#show-self * @param options Request options. */ getMyUser(options?: GetMyUserRequest): Promise; /** * Accepts a comma-separated list of up to 100 user ids or external ids. #### Allowed For: * Agents * Documentation: https://developer.zendesk.com/api-reference/ticketing/users/users/#show-many-users * @param options Request options. */ getUsers(options?: GetUsersRequest): Promise; /** * #### Allowed For * Agents * Documentation: https://developer.zendesk.com/api-reference/ticketing/users/users/#show-user * @param options Request options. */ getUser(options: GetUserRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents. * Documentation: https://developer.zendesk.com/api-reference/ticketing/groups/group_memberships/#list-memberships * @param options Request options. */ getUsersByGroup(options: GetUsersByGroupRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents and End users. * Documentation: https://developer.zendesk.com/api-reference/ticketing/organizations/organization_memberships/#list-memberships * @param options Request options. */ getUsersByOrganization(options: GetUsersByOrganizationRequest): Promise; } declare class OrganizationGroup { private implementation; private getGlobalErrorStrategy; constructor(implementation: PlatformImplementation, getGlobalErrorStrategy: GetGlobalErrorStrategy); /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents, with certain restrictions If the agent has a custom agent role that restricts their access to only users in their own organization, a 403 Forbidden error is returned. See [Creating custom agent roles](https://support.zendesk.com/hc/en-us/articles/203662026-Creating-custom-roles-and-assigning-agents#topic_cxn_hig_bd) in Zendesk help. * Documentation: https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/#list-organizations * @param options Request options. */ getAllOrganizations(options?: GetAllOrganizationsRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents, with certain restrictions. If the agent has a custom agent role that restricts their access to only users in their own organization, a 403 Forbidden error is returned. See [Creating custom agent roles](https://support.zendesk.com/hc/en-us/articles/4408882153882-Creating-custom-roles-and-assigning-agents#topic_cxn_hig_bd) in Zendesk help. * Documentation: https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/#list-organizations * @param options Request options. */ getOrganizationsByUser(options: GetOrganizationsByUserRequest): Promise; } declare class GroupGroup { private implementation; private getGlobalErrorStrategy; constructor(implementation: PlatformImplementation, getGlobalErrorStrategy: GetGlobalErrorStrategy); /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Admins * Agents * Documentation: https://developer.zendesk.com/api-reference/ticketing/groups/groups/#list-groups * @param options Request options. */ getAllGroups(options: GetAllGroupsRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Admins and Agents. * Documentation: https://developer.zendesk.com/api-reference/ticketing/groups/groups/#list-groups * @param options Request options. */ getGroupsByUser(options: GetGroupsByUserRequest): Promise; } declare class TicketGroup { private implementation; private getGlobalErrorStrategy; Attachment: TicketAttachmentGroup; Comment: TicketCommentGroup; constructor(implementation: PlatformImplementation, getGlobalErrorStrategy: GetGlobalErrorStrategy); /** * List Tickets * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets * @param options Request options. */ getAllTickets(options?: GetAllTicketsRequest): Promise; /** * Create Ticket * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#create-ticket * @param options Request options. */ createTicket(options: CreateTicketRequest): Promise; /** * Returns a number of ticket properties though not the ticket comments. To get the comments, use [List Comments](/api-reference/ticketing/tickets/ticket_comments/#list-comments) #### Allowed For * Agents * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#show-ticket * @param options Request options. */ getTicket(options: GetTicketRequest): Promise; /** * Update Ticket * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#update-ticket * @param options Request options. */ updateTicket(options: UpdateTicketRequest): Promise; /** * #### Allowed For * Admins * Agents with permission to delete tickets Agent delete permissions are set in Support. See [Deleting tickets](https://support.zendesk.com/hc/en-us/articles/203690936) in the Support Help Center. #### Ticket deletion rate limit You can delete 400 tickets every 1 minute using this endpoint. The rate limiting mechanism behaves as described in [Rate limits](/api-reference/introduction/rate-limits/) in the API introduction. Zendesk recommends that you obey the Retry-After header values. To delete many tickets, you may use [Bulk Delete Tickets](/api-reference/ticketing/tickets/tickets/#bulk-delete-tickets). * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#delete-ticket * @param options Request options. */ deleteTicket(options: DeleteTicketRequest): Promise; /** * Accepts a comma-separated list of ticket ids to return. This endpoint will return up to 100 tickets records. #### Allowed For * Agents * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#show-multiple-tickets * @param options Request options. */ getTickets(options: GetTicketsRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents. * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets * @param options Request options. */ getTicketsByOrganization(options: GetTicketsByOrganizationRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents. * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets * @param options Request options. */ getTicketsByRequestedUser(options: GetTicketsByRequestedUserRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents. * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets * @param options Request options. */ getTicketsByCCdUser(options: GetTicketsByCCdUserRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents. * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets * @param options Request options. */ getTicketsByFollowedUser(options: GetTicketsByFollowedUserRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents. * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets * @param options Request options. */ getTicketsByAssignedUser(options: GetTicketsByAssignedUserRequest): Promise; /** * #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Allowed For * Agents. * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets * @param options Request options. */ getRecentTickets(options?: GetRecentTicketsRequest): Promise; } declare class TicketAttachmentGroup { private implementation; private getGlobalErrorStrategy; constructor(implementation: PlatformImplementation, getGlobalErrorStrategy: GetGlobalErrorStrategy); /** * Uploads a file that can be attached to a ticket comment. It doesn't attach the file to the comment. For details and examples, see [Attaching ticket comments with the API](/documentation/ticketing/using-the-zendesk-api/adding-ticket-attachments-with-the-api). The endpoint has a required `filename` query parameter. The parameter specifies what the file will be named when attached to the ticket comment (to give the agent more context about the file). The parameter does not specify the file on the local system to be uploaded. While the two names can be different, their file extensions must be the same. If they don't match, the agent's browser or file reader could give an error when attempting to open the attachment. The `Content-Type` header must contain a recognized MIME type that correctly describes the type of the uploaded file. Failing to send a recognized, correct type may cause undesired behavior. For example, in-browser audio playback may be interrupted by the browser's security mechanisms for MP3s uploaded with an incorrect type. Adding multiple files to the same upload is handled by splitting requests and passing the API token received from the first request to each subsequent request. The token is valid for 3 days. **Note**: Even if [private attachments](https://support.zendesk.com/hc/en-us/articles/204265396) are enabled in the Zendesk Support instance, uploaded files are visible to any authenticated user at the `content_URL` specified in the [JSON response](#json-format) until the upload token is consumed. Once a file is associated with a ticket or post, visibility is restricted to users with access to the ticket or post with the attachment. #### Allowed For * End users * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-attachments/#upload-files * @param options Request options. */ uploadAttachment(options: UploadTicketAttachmentRequest): Promise; } declare class TicketCommentGroup { private implementation; private getGlobalErrorStrategy; constructor(implementation: PlatformImplementation, getGlobalErrorStrategy: GetGlobalErrorStrategy); /** * Returns the comments added to the ticket. Each comment may include a `content_url` for an attachment or a `recording_url` for a voice comment that points to a file that may be hosted externally. For security reasons, take care not to inadvertently send Zendesk authentication credentials to third parties when attempting to access these files. See [Working with url properties](/documentation/ticketing/managing-tickets/working-with-url-properties). #### Pagination - Cursor pagination (recommended) - Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page. #### Sorting By default, comments are sorted by creation date in ascending order. When using cursor pagination, use the following parameter to change the sort order: | Name | Type | Required | Comments | ------ | ------ | -------- | -------- | `sort` | string | no | Possible values are "created_at" (ascending order) or "-created_at" (descending order) When using offset pagination, use the following parameters to change the sort order: | Name | Type | Required | Comments | ------------ | ------ | -------- | -------- | `sort_order` | string | no | One of `asc`, `desc`. Defaults to `asc` #### Allowed For * Agents * Documentation: https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/#list-comments * @param options Request options. */ getComments(options: GetTicketCommentsRequest): Promise; } export {}; //# sourceMappingURL=index.d.ts.map