{"version":3,"file":"transactionalSMS.cjs","sources":["../../../../src/resources/classes/transactionalSMS.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { OystehrClientRequest, TransactionalSMSSendParams, TransactionalSMSSendResponse } from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class TransactionalSMS extends SDKResource {\n  constructor(config: OystehrConfig) {\n    super(config);\n  }\n  #baseUrlThunk(): string {\n    return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n  }\n  /**\n   * Send an SMS to any phone number. Oystehr's [Transactional SMS](https://docs.oystehr.com/oystehr/services/messaging/transactional-sms/) feature makes it easy to send a text message to your [Users](https://docs.oystehr.com/oystehr/services/app/users/) with a single API call. You can use this feature to send appointment reminders, prescription refill reminders, discharge information, and more.\n   *\n   * Access Policy Requirements:\n   * Action: `Messaging:SendTransactionalSMS`\n   * Access Policy Resource: `Messaging:TransactionalSMS`\n   * Action: `FHIR:Create`\n   * Access Policy Resource: `FHIR:Communication`\n   * Action: `FHIR:Update`\n   * Access Policy Resource: `FHIR:Communication`\n   *\n   * You also need Read access for the resource to which you are sending a message. For example:\n   * Action: `FHIR:Read`\n   * Access Policy Resource: `FHIR:Patient`\n   */\n  send(params: TransactionalSMSSendParams, request?: OystehrClientRequest): Promise<TransactionalSMSSendResponse> {\n    return this.request('/messaging/transactional-sms/send', 'post', this.#baseUrlThunk.bind(this))(params, request);\n  }\n}\n"],"names":["SDKResource"],"mappings":";;;;AAAA;AAMM,MAAO,gBAAiB,SAAQA,kBAAW,CAAA;AAC/C,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;KACf;IACD,aAAa,GAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,eAAe,CAAC,IAAI,mCAAmC,CAAC;KACvF;AACD;;;;;;;;;;;;;;AAcG;IACH,IAAI,CAAC,MAAkC,EAAE,OAA8B,EAAA;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,mCAAmC,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClH;AACF;;;;"}