@pushwoosh/rpc-v2-http-api-data 0.2.178 → 0.2.180

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.
Files changed (3) hide show
  1. package/data.js +77 -0
  2. package/package.json +1 -1
  3. package/whatsapp.d.ts +34 -0
package/data.js CHANGED
@@ -30182,6 +30182,18 @@ export const data = {
30182
30182
  "response": "pushwoosh.rpc_v2.whatsapp.FetchCatalogResponse",
30183
30183
  "method": "get",
30184
30184
  "path": "/api/whatsapp/catalog"
30185
+ },
30186
+ "GetWelcomeMessage": {
30187
+ "request": "pushwoosh.rpc_v2.whatsapp.GetWelcomeMessageRequest",
30188
+ "response": "pushwoosh.rpc_v2.whatsapp.GetWelcomeMessageResponse",
30189
+ "method": "get",
30190
+ "path": "/api/whatsapp/welcome"
30191
+ },
30192
+ "UpdateWelcomeMessage": {
30193
+ "request": "pushwoosh.rpc_v2.whatsapp.UpdateWelcomeMessageRequest",
30194
+ "response": "pushwoosh.rpc_v2.whatsapp.UpdateWelcomeMessageResponse",
30195
+ "method": "put",
30196
+ "path": "/api/whatsapp/welcome"
30185
30197
  }
30186
30198
  }
30187
30199
  },
@@ -30299,6 +30311,71 @@ export const data = {
30299
30311
  }
30300
30312
  }
30301
30313
  },
30314
+ "pushwoosh.rpc_v2.whatsapp.WelcomeMessage": {
30315
+ "type": "I",
30316
+ "fields": {
30317
+ "enabled": {
30318
+ "type": "boolean"
30319
+ },
30320
+ "localizedContent": {
30321
+ "type": "string",
30322
+ "mapKeyType": "string"
30323
+ },
30324
+ "localizedAttachment": {
30325
+ "type": "string",
30326
+ "mapKeyType": "string"
30327
+ },
30328
+ "updated": {
30329
+ "type": "Date"
30330
+ },
30331
+ "campaignCode": {
30332
+ "type": "string"
30333
+ }
30334
+ }
30335
+ },
30336
+ "pushwoosh.rpc_v2.whatsapp.GetWelcomeMessageRequest": {
30337
+ "type": "I",
30338
+ "fields": {
30339
+ "application": {
30340
+ "type": "string"
30341
+ }
30342
+ }
30343
+ },
30344
+ "pushwoosh.rpc_v2.whatsapp.GetWelcomeMessageResponse": {
30345
+ "type": "I",
30346
+ "fields": {
30347
+ "welcomeMessage": {
30348
+ "type": "pushwoosh.rpc_v2.whatsapp.WelcomeMessage"
30349
+ }
30350
+ }
30351
+ },
30352
+ "pushwoosh.rpc_v2.whatsapp.UpdateWelcomeMessageRequest": {
30353
+ "type": "I",
30354
+ "fields": {
30355
+ "application": {
30356
+ "type": "string"
30357
+ },
30358
+ "enabled": {
30359
+ "type": "boolean"
30360
+ },
30361
+ "localizedContent": {
30362
+ "type": "string",
30363
+ "mapKeyType": "string"
30364
+ },
30365
+ "localizedAttachment": {
30366
+ "type": "string",
30367
+ "mapKeyType": "string"
30368
+ }
30369
+ }
30370
+ },
30371
+ "pushwoosh.rpc_v2.whatsapp.UpdateWelcomeMessageResponse": {
30372
+ "type": "I",
30373
+ "fields": {
30374
+ "welcomeMessage": {
30375
+ "type": "pushwoosh.rpc_v2.whatsapp.WelcomeMessage"
30376
+ }
30377
+ }
30378
+ },
30302
30379
  "pushwoosh.rpc_v2.whatsapp_presets.WhatsAppPresetsService": {
30303
30380
  "type": "S",
30304
30381
  "key": "whatsAppPresets",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.178",
3
+ "version": "0.2.180",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
package/whatsapp.d.ts CHANGED
@@ -3,6 +3,8 @@ export type WhatsAppService_RegisterWABA = RpcMethod<RegisterWABARequest, Regist
3
3
  export type WhatsAppService_RegisterWABATwilio = RpcMethod<RegisterWABATwilioRequest, RegisterWABATwilioResponse>;
4
4
  export type WhatsAppService_AuthResponseCode = RpcMethod<AuthResponseCodeRequest, AuthResponseCodeResponse>;
5
5
  export type WhatsAppService_FetchCatalog = RpcMethod<FetchCatalogRequest, FetchCatalogResponse>;
6
+ export type WhatsAppService_GetWelcomeMessage = RpcMethod<GetWelcomeMessageRequest, GetWelcomeMessageResponse>;
7
+ export type WhatsAppService_UpdateWelcomeMessage = RpcMethod<UpdateWelcomeMessageRequest, UpdateWelcomeMessageResponse>;
6
8
  export interface WhatsAppService {
7
9
  /** Connects a WhatsApp Business Account to an application code via Meta Cloud API, storing the WABA and phone-number IDs, subscribing the number to Pushwoosh webhooks and registering it with Meta. Use for direct Meta onboarding; use connect_whatsapp_account_twilio for Twilio-routed senders. */
8
10
  RegisterWABA: WhatsAppService_RegisterWABA;
@@ -12,6 +14,10 @@ export interface WhatsAppService {
12
14
  AuthResponseCode: WhatsAppService_AuthResponseCode;
13
15
  /** Returns the WhatsApp Business catalog and its products for an application code by querying Meta. Use to list products available for WhatsApp product messages; a WABA has at most one catalog. */
14
16
  FetchCatalog: WhatsAppService_FetchCatalog;
17
+ /** Returns the WhatsApp welcome message of an application: the text sent in reply to the first message of a new conversation, its localizations, attachment links and whether it is switched on. */
18
+ GetWelcomeMessage: WhatsAppService_GetWelcomeMessage;
19
+ /** Creates or updates the WhatsApp welcome message of an application. Sending it enables reporting: every greeting is reported under a service campaign created on the first save. */
20
+ UpdateWelcomeMessage: WhatsAppService_UpdateWelcomeMessage;
15
21
  }
16
22
  export type RegisterWABARequest = {
17
23
  /** application code */
@@ -62,3 +68,31 @@ export type Product = {
62
68
  price: string;
63
69
  brand: string;
64
70
  };
71
+ export type WelcomeMessage = {
72
+ enabled: boolean;
73
+ /** text map {"default": "Hi!", "de": "Hallo!"}; the locale a device gets is picked by its Language tag */
74
+ localizedContent: Record<string, string>;
75
+ /** attachment link map {"default": "https://...jpg"}; the text of the same locale is sent as the media caption */
76
+ localizedAttachment: Record<string, string>;
77
+ updated: Date;
78
+ /** Campaign every greeting is reported under; the Message statistics screen takes it to show them together. */
79
+ campaignCode: string;
80
+ };
81
+ export type GetWelcomeMessageRequest = {
82
+ /** application code */
83
+ application?: string;
84
+ };
85
+ export type GetWelcomeMessageResponse = {
86
+ /** absent when the application has no welcome message yet */
87
+ welcomeMessage: WelcomeMessage;
88
+ };
89
+ export type UpdateWelcomeMessageRequest = {
90
+ /** application code */
91
+ application?: string;
92
+ enabled?: boolean;
93
+ localizedContent?: Record<string, string>;
94
+ localizedAttachment?: Record<string, string>;
95
+ };
96
+ export type UpdateWelcomeMessageResponse = {
97
+ welcomeMessage: WelcomeMessage;
98
+ };