@geekapps/post-fastify 0.1.5 → 0.1.6
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 +12 -5
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/types.ts +13 -1
package/dist/index.d.ts
CHANGED
|
@@ -202,6 +202,16 @@ interface AreaCode {
|
|
|
202
202
|
state: string;
|
|
203
203
|
available: boolean;
|
|
204
204
|
}
|
|
205
|
+
interface TemplateVariable {
|
|
206
|
+
name: string;
|
|
207
|
+
value: string;
|
|
208
|
+
}
|
|
209
|
+
interface TemplateVariables {
|
|
210
|
+
header?: TemplateVariable[];
|
|
211
|
+
body?: TemplateVariable[];
|
|
212
|
+
footer?: TemplateVariable[];
|
|
213
|
+
buttons?: Record<number, TemplateVariable[]>;
|
|
214
|
+
}
|
|
205
215
|
interface SendMessageInput {
|
|
206
216
|
type: MessageType;
|
|
207
217
|
to: string;
|
|
@@ -211,10 +221,7 @@ interface SendMessageInput {
|
|
|
211
221
|
template?: string;
|
|
212
222
|
subject?: string;
|
|
213
223
|
body?: string;
|
|
214
|
-
variables?:
|
|
215
|
-
name: string;
|
|
216
|
-
value: string;
|
|
217
|
-
}>;
|
|
224
|
+
variables?: TemplateVariable[] | TemplateVariables;
|
|
218
225
|
}
|
|
219
226
|
interface CreateTemplateInput {
|
|
220
227
|
name: string;
|
|
@@ -545,4 +552,4 @@ declare module "fastify" {
|
|
|
545
552
|
}
|
|
546
553
|
declare const _default: FastifyPluginAsync<PostPluginOptions>;
|
|
547
554
|
|
|
548
|
-
export { type AreaCode, type AvailablePlan, 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 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 RegisterWhatsappNumberInput, type RotateSecretResult, type SaveDraftInput, type SendMessageInput, type SendMessageResult, type SmtpConfig, SmtpResource, type StatisticsParams, StatisticsResource, type StatisticsResult, type SyncWhatsappTemplatesResult, TemplatesResource, type UpdatePlanInput, type UpdateTemplateInput, type UpdateWebhookInput, type UpdateWhatsappProfileInput, type UpdateWhatsappTemplateInput, type UpsertSmtpConfigInput, type WabaStatus, type WebhookDelivery, type WebhookEvent, WebhooksResource, type WhatsappNumber, type WhatsappNumberProfile, type WhatsappNumberStatus, WhatsappNumbersResource, type WhatsappTemplate, type WhatsappTemplateCategory, type WhatsappTemplateStatus, WhatsappTemplatesResource, _default as postPlugin };
|
|
555
|
+
export { type AreaCode, type AvailablePlan, 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 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 RegisterWhatsappNumberInput, type RotateSecretResult, type SaveDraftInput, type SendMessageInput, type SendMessageResult, type SmtpConfig, SmtpResource, type StatisticsParams, StatisticsResource, type StatisticsResult, type SyncWhatsappTemplatesResult, type TemplateVariable, type TemplateVariables, TemplatesResource, type UpdatePlanInput, type UpdateTemplateInput, type UpdateWebhookInput, type UpdateWhatsappProfileInput, type UpdateWhatsappTemplateInput, type UpsertSmtpConfigInput, type WabaStatus, type WebhookDelivery, type WebhookEvent, WebhooksResource, type WhatsappNumber, type WhatsappNumberProfile, type WhatsappNumberStatus, WhatsappNumbersResource, type WhatsappTemplate, type WhatsappTemplateCategory, type WhatsappTemplateStatus, WhatsappTemplatesResource, _default as postPlugin };
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/types.ts
CHANGED
|
@@ -239,6 +239,18 @@ export interface AreaCode {
|
|
|
239
239
|
|
|
240
240
|
// ─── Request types ────────────────────────────────────────────────────────────
|
|
241
241
|
|
|
242
|
+
export interface TemplateVariable {
|
|
243
|
+
name: string;
|
|
244
|
+
value: string;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface TemplateVariables {
|
|
248
|
+
header?: TemplateVariable[];
|
|
249
|
+
body?: TemplateVariable[];
|
|
250
|
+
footer?: TemplateVariable[];
|
|
251
|
+
buttons?: Record<number, TemplateVariable[]>;
|
|
252
|
+
}
|
|
253
|
+
|
|
242
254
|
export interface SendMessageInput {
|
|
243
255
|
type: MessageType;
|
|
244
256
|
to: string;
|
|
@@ -248,7 +260,7 @@ export interface SendMessageInput {
|
|
|
248
260
|
template?: string;
|
|
249
261
|
subject?: string;
|
|
250
262
|
body?: string;
|
|
251
|
-
variables?:
|
|
263
|
+
variables?: TemplateVariable[] | TemplateVariables;
|
|
252
264
|
}
|
|
253
265
|
|
|
254
266
|
export interface CreateTemplateInput {
|