@geekapps/post-fastify 0.1.14 → 0.1.15

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/index.d.ts CHANGED
@@ -212,6 +212,15 @@ interface TemplateVariables {
212
212
  footer?: TemplateVariable[];
213
213
  buttons?: TemplateVariable[];
214
214
  }
215
+ interface EmailAttachment {
216
+ filename: string;
217
+ /** Conteúdo do arquivo em base64. Informe `content` ou `url`. */
218
+ content?: string;
219
+ /** URL pública (http/https) do arquivo. Informe `content` ou `url`. */
220
+ url?: string;
221
+ /** Ex.: "application/pdf". Se omitido, é inferido pelo nome do arquivo. */
222
+ contentType?: string;
223
+ }
215
224
  interface SendMessageInput {
216
225
  type: MessageType;
217
226
  to: string;
@@ -222,6 +231,8 @@ interface SendMessageInput {
222
231
  subject?: string;
223
232
  body?: string;
224
233
  variables?: TemplateVariable[] | TemplateVariables;
234
+ /** Apenas para `type: "email"`. Máx. 10 arquivos / 25MB no total. */
235
+ attachments?: EmailAttachment[];
225
236
  }
226
237
  interface CreateTemplateInput {
227
238
  name: string;
@@ -887,4 +898,4 @@ declare function verifyWebhookSignature(rawBody: string, signatureHeader: string
887
898
  /** Verifies the signature and parses the payload; throws if invalid. */
888
899
  declare function constructWebhookEvent(rawBody: string, signatureHeader: string | null | undefined, secret: string): PostWebhookPayload;
889
900
 
890
- export { type AreaCode, type AvailablePlan, type CallActionResult, type CallAnswerInput, type CallConnectWebhookData, type CallPermissionStatus, type CallStatusWebhookData, type CallTargetInput, type CallTerminateWebhookData, type CallingSettings, type CallingStatus, type ConnectCallInput, type ConnectCallResult, type ConnectWabaInput, type ConnectWhatsappNumberInput, type CreateDomainInput, type CreateDomainResult, type CreateTemplateInput, type CreateWebhookInput, type CreateWhatsappTemplateInput, type DnsRecord, type DomainStatus, type DomainType, DomainsResource, HistoryResource, type ListHistoryParams, type ManagedNumber, type ManagedNumberStatus, ManagedNumbersResource, type MessageLog, type MessageLogDetail, type MessagePresenceInput, type MessagePresenceResult, type MessageReceivedWebhookData, type MessageStatus, type MessageTemplate, type MessageType, MessagesResource, type OrgDomain, type OrgPlan, type OrgUsage, type OrgWaba, type OrgWebhook, type OrgWebhookWithSecret, type PaginatedResult, type PhoneNumberStatusResult, type PlanTier, PlansResource, type PlansResult, PostApiError, PostClient, type PostPluginOptions, type PostWebhookPayload, type RegisterWhatsappNumberInput, type RequestCallPermissionInput, type RequestCallPermissionResult, type RotateSecretResult, type SaveDraftInput, type SendMessageInput, type SendMessageResult, type SendWhatsappMessageInput, type SendWhatsappMessageResult, type SmtpConfig, SmtpResource, type StatisticsParams, StatisticsResource, type StatisticsResult, type SyncWhatsappTemplatesResult, type TemplateVariable, type TemplateVariables, TemplatesResource, type UpdateCallingSettingsInput, type UpdatePlanInput, type UpdateTemplateInput, type UpdateWebhookInput, type UpdateWhatsappProfileInput, type UpdateWhatsappTemplateInput, type UploadWhatsappMediaInput, type UploadWhatsappMediaResult, type UpsertSmtpConfigInput, type WabaStatus, type WebhookDelivery, type WebhookEvent, type WebhookSdpSession, WebhooksResource, WhatsappCallsResource, type WhatsappContactCard, type WhatsappInteractive, type WhatsappInteractiveButtons, type WhatsappInteractiveCtaUrl, type WhatsappInteractiveList, type WhatsappInteractiveLocationRequest, type WhatsappMediaDownload, type WhatsappMediaInfo, type WhatsappMediaRef, type WhatsappMessage, WhatsappMessagesResource, type WhatsappNumber, type WhatsappNumberProfile, type WhatsappNumberStatus, WhatsappNumbersResource, type WhatsappTemplate, type WhatsappTemplateCategory, type WhatsappTemplateStatus, WhatsappTemplatesResource, constructWebhookEvent, _default as postPlugin, verifyWebhookSignature };
901
+ export { type AreaCode, type AvailablePlan, type CallActionResult, type CallAnswerInput, type CallConnectWebhookData, type CallPermissionStatus, type CallStatusWebhookData, type CallTargetInput, type CallTerminateWebhookData, type CallingSettings, type CallingStatus, type ConnectCallInput, type ConnectCallResult, type ConnectWabaInput, type ConnectWhatsappNumberInput, type CreateDomainInput, type CreateDomainResult, type CreateTemplateInput, type CreateWebhookInput, type CreateWhatsappTemplateInput, type DnsRecord, type DomainStatus, type DomainType, DomainsResource, type EmailAttachment, HistoryResource, type ListHistoryParams, type ManagedNumber, type ManagedNumberStatus, ManagedNumbersResource, type MessageLog, type MessageLogDetail, type MessagePresenceInput, type MessagePresenceResult, type MessageReceivedWebhookData, type MessageStatus, type MessageTemplate, type MessageType, MessagesResource, type OrgDomain, type OrgPlan, type OrgUsage, type OrgWaba, type OrgWebhook, type OrgWebhookWithSecret, type PaginatedResult, type PhoneNumberStatusResult, type PlanTier, PlansResource, type PlansResult, PostApiError, PostClient, type PostPluginOptions, type PostWebhookPayload, type RegisterWhatsappNumberInput, type RequestCallPermissionInput, type RequestCallPermissionResult, type RotateSecretResult, type SaveDraftInput, type SendMessageInput, type SendMessageResult, type SendWhatsappMessageInput, type SendWhatsappMessageResult, type SmtpConfig, SmtpResource, type StatisticsParams, StatisticsResource, type StatisticsResult, type SyncWhatsappTemplatesResult, type TemplateVariable, type TemplateVariables, TemplatesResource, type UpdateCallingSettingsInput, type UpdatePlanInput, type UpdateTemplateInput, type UpdateWebhookInput, type UpdateWhatsappProfileInput, type UpdateWhatsappTemplateInput, type UploadWhatsappMediaInput, type UploadWhatsappMediaResult, type UpsertSmtpConfigInput, type WabaStatus, type WebhookDelivery, type WebhookEvent, type WebhookSdpSession, WebhooksResource, WhatsappCallsResource, type WhatsappContactCard, type WhatsappInteractive, type WhatsappInteractiveButtons, type WhatsappInteractiveCtaUrl, type WhatsappInteractiveList, type WhatsappInteractiveLocationRequest, type WhatsappMediaDownload, type WhatsappMediaInfo, type WhatsappMediaRef, type WhatsappMessage, WhatsappMessagesResource, type WhatsappNumber, type WhatsappNumberProfile, type WhatsappNumberStatus, WhatsappNumbersResource, type WhatsappTemplate, type WhatsappTemplateCategory, type WhatsappTemplateStatus, WhatsappTemplatesResource, constructWebhookEvent, _default as postPlugin, verifyWebhookSignature };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geekapps/post-fastify",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "Geekapps Post SDK for Fastify",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -71,6 +71,7 @@ export type {
71
71
  RotateSecretResult,
72
72
  SaveDraftInput,
73
73
  SendMessageInput,
74
+ EmailAttachment,
74
75
  MessagePresenceInput,
75
76
  WhatsappMediaRef,
76
77
  WhatsappContactCard,
package/src/types.ts CHANGED
@@ -256,6 +256,16 @@ export interface TemplateVariables {
256
256
  buttons?: TemplateVariable[];
257
257
  }
258
258
 
259
+ export interface EmailAttachment {
260
+ filename: string;
261
+ /** Conteúdo do arquivo em base64. Informe `content` ou `url`. */
262
+ content?: string;
263
+ /** URL pública (http/https) do arquivo. Informe `content` ou `url`. */
264
+ url?: string;
265
+ /** Ex.: "application/pdf". Se omitido, é inferido pelo nome do arquivo. */
266
+ contentType?: string;
267
+ }
268
+
259
269
  export interface SendMessageInput {
260
270
  type: MessageType;
261
271
  to: string;
@@ -266,6 +276,8 @@ export interface SendMessageInput {
266
276
  subject?: string;
267
277
  body?: string;
268
278
  variables?: TemplateVariable[] | TemplateVariables;
279
+ /** Apenas para `type: "email"`. Máx. 10 arquivos / 25MB no total. */
280
+ attachments?: EmailAttachment[];
269
281
  }
270
282
 
271
283
  export interface CreateTemplateInput {