/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { supportCreateTicket } from "../funcs/supportCreateTicket.js"; import { supportGetTicket } from "../funcs/supportGetTicket.js"; import { supportListTicketMessages } from "../funcs/supportListTicketMessages.js"; import { supportListTickets } from "../funcs/supportListTickets.js"; import { supportUpdateTicket } from "../funcs/supportUpdateTicket.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Support extends ClientSDK { /** * Create a support ticket for a Moov account. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/tickets.write` scope. * * If you're creating the ticket on behalf of another account, then you'll need to * specify the `/accounts/{partnerAccountID}/tickets.write` and `/accounts/{accountID}/profile.read` scopes. */ async createTicket( request: operations.CreateTicketRequest, options?: RequestOptions, ): Promise { return unwrapAsync(supportCreateTicket( this, request, options, )); } /** * List all the support tickets created under a Moov account. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/tickets.read` scope. * * If you're listing another account's tickets, then you'll need to * specify the `/accounts/{partnerAccountID}/tickets.read` and `/accounts/{accountID}/profile.read` scopes. */ async listTickets( request: operations.ListTicketsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(supportListTickets( this, request, options, )); } /** * Retrieve a support ticket by ID. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/tickets.read` scope. * * If you're retrieving another account's ticket, then you'll need to * specify the `/accounts/{partnerAccountID}/tickets.read` and `/accounts/{accountID}/profile.read` scopes. */ async getTicket( request: operations.GetTicketRequest, options?: RequestOptions, ): Promise { return unwrapAsync(supportGetTicket( this, request, options, )); } /** * Updates a support ticket. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/tickets.write` scope. * * If you're updating the ticket on behalf of another account, then you'll need to * specify the `/accounts/{partnerAccountID}/tickets.write` and `/accounts/{accountID}/profile.read` scopes. */ async updateTicket( request: operations.UpdateTicketRequest, options?: RequestOptions, ): Promise { return unwrapAsync(supportUpdateTicket( this, request, options, )); } /** * List all the messages for a support ticket. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/tickets.read` scope. * * If you're listing another account's messages, then you'll need to * specify the `/accounts/{partnerAccountID}/tickets.read` and `/accounts/{accountID}/profile.read` scopes. */ async listTicketMessages( request: operations.ListTicketMessagesRequest, options?: RequestOptions, ): Promise { return unwrapAsync(supportListTicketMessages( this, request, options, )); } }