@pushwoosh/rpc-v2-http-api-data 0.2.480 → 0.2.482
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/chat_presets.d.ts +38 -0
- package/data.js +81 -0
- package/package.json +1 -1
- package/whatsapp_presets.d.ts +2 -0
package/chat_presets.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export type chatPresetsService_Create = RpcMethod<CreateChatPresetRequest, Creat
|
|
|
5
5
|
export type chatPresetsService_Update = RpcMethod<UpdateChatPresetRequest, UpdateChatPresetResponse>;
|
|
6
6
|
export type chatPresetsService_Delete = RpcMethod<DeleteChatPresetRequest, DeleteChatPresetResponse>;
|
|
7
7
|
export type chatPresetsService_Clone = RpcMethod<CloneChatPresetRequest, CloneChatPresetResponse>;
|
|
8
|
+
export type chatPresetsService_SubmitForApproval = RpcMethod<SubmitChatPresetForApprovalRequest, SubmitChatPresetForApprovalResponse>;
|
|
9
|
+
export type chatPresetsService_RefreshStatus = RpcMethod<RefreshChatPresetStatusRequest, RefreshChatPresetStatusResponse>;
|
|
8
10
|
export type chatPresetsService_Validate = RpcMethod<ValidateChatPresetRequest, ValidateChatPresetResponse>;
|
|
9
11
|
export interface chatPresetsService {
|
|
10
12
|
/** Lists chat presets of an application: one rich message (cards, carousels, buttons, lists) shared by RCS, WhatsApp, Facebook Messenger and LINE, each with its per-channel compatibility. Use to browse presets or find a code before get, update, clone or delete. */
|
|
@@ -19,6 +21,10 @@ export interface chatPresetsService {
|
|
|
19
21
|
Delete: chatPresetsService_Delete;
|
|
20
22
|
/** Copies a chat preset into a target application as a new preset with its own code. */
|
|
21
23
|
Clone: chatPresetsService_Clone;
|
|
24
|
+
/** Submits the chat preset to Meta as WhatsApp message templates, one per language, for approval. Sends inside the 24h window work without it; outside it only an approved template is sent. Submitting unchanged content again reuses the template already submitted. */
|
|
25
|
+
SubmitForApproval: chatPresetsService_SubmitForApproval;
|
|
26
|
+
/** Asks Meta for the review status of the chat preset's WhatsApp templates and, once one is approved, makes it the template that is sent. */
|
|
27
|
+
RefreshStatus: chatPresetsService_RefreshStatus;
|
|
22
28
|
/** Checks localized rich content against every chat channel without saving it and returns the per-channel compatibility the editor shows. */
|
|
23
29
|
Validate: chatPresetsService_Validate;
|
|
24
30
|
}
|
|
@@ -126,3 +132,35 @@ export type ValidateChatPresetResponse = {
|
|
|
126
132
|
/** Compatibility per channel: "rcs", "whatsapp", "fbmessenger", "line". */
|
|
127
133
|
compat: Record<string, ChannelCompat>;
|
|
128
134
|
};
|
|
135
|
+
/** ProviderTemplate is one template a chat preset has at a provider, e.g. a WhatsApp template under Meta review. */
|
|
136
|
+
export type ProviderTemplate = {
|
|
137
|
+
lang: string;
|
|
138
|
+
/** "meta" for WhatsApp templates. */
|
|
139
|
+
provider: string;
|
|
140
|
+
/** Template name at the provider, e.g. "pw_ab12c_1f2e3d4c". */
|
|
141
|
+
name: string;
|
|
142
|
+
/** "pending", "approved", "rejected", "paused", "disabled", "in_appeal", "flagged", "pending_deletion", "limit_exceeded" or "deleted". */
|
|
143
|
+
status: string;
|
|
144
|
+
/** Why Meta rejected the template, as Meta says it. */
|
|
145
|
+
rejectionReason: string;
|
|
146
|
+
/** Category Meta assigned, which may differ from the one submitted. */
|
|
147
|
+
category: string;
|
|
148
|
+
/** The template that is sent for this language right now. */
|
|
149
|
+
serving: boolean;
|
|
150
|
+
};
|
|
151
|
+
export type SubmitChatPresetForApprovalRequest = {
|
|
152
|
+
/** Chat preset code to submit. */
|
|
153
|
+
code?: string;
|
|
154
|
+
};
|
|
155
|
+
export type SubmitChatPresetForApprovalResponse = {
|
|
156
|
+
preset: ChatPreset;
|
|
157
|
+
templates: ProviderTemplate[];
|
|
158
|
+
};
|
|
159
|
+
export type RefreshChatPresetStatusRequest = {
|
|
160
|
+
/** Chat preset code whose WhatsApp templates to refresh. */
|
|
161
|
+
code?: string;
|
|
162
|
+
};
|
|
163
|
+
export type RefreshChatPresetStatusResponse = {
|
|
164
|
+
preset: ChatPreset;
|
|
165
|
+
templates: ProviderTemplate[];
|
|
166
|
+
};
|
package/data.js
CHANGED
|
@@ -11517,6 +11517,18 @@ export const data = {
|
|
|
11517
11517
|
"method": "post",
|
|
11518
11518
|
"path": "/api/chat_presets:clone"
|
|
11519
11519
|
},
|
|
11520
|
+
"SubmitForApproval": {
|
|
11521
|
+
"request": "pushwoosh.rpc_v2.chat_presets.SubmitChatPresetForApprovalRequest",
|
|
11522
|
+
"response": "pushwoosh.rpc_v2.chat_presets.SubmitChatPresetForApprovalResponse",
|
|
11523
|
+
"method": "post",
|
|
11524
|
+
"path": "/api/chat_presets/{code}:submit"
|
|
11525
|
+
},
|
|
11526
|
+
"RefreshStatus": {
|
|
11527
|
+
"request": "pushwoosh.rpc_v2.chat_presets.RefreshChatPresetStatusRequest",
|
|
11528
|
+
"response": "pushwoosh.rpc_v2.chat_presets.RefreshChatPresetStatusResponse",
|
|
11529
|
+
"method": "post",
|
|
11530
|
+
"path": "/api/chat_presets/{code}:refresh"
|
|
11531
|
+
},
|
|
11520
11532
|
"Validate": {
|
|
11521
11533
|
"request": "pushwoosh.rpc_v2.chat_presets.ValidateChatPresetRequest",
|
|
11522
11534
|
"response": "pushwoosh.rpc_v2.chat_presets.ValidateChatPresetResponse",
|
|
@@ -11764,6 +11776,72 @@ export const data = {
|
|
|
11764
11776
|
}
|
|
11765
11777
|
}
|
|
11766
11778
|
},
|
|
11779
|
+
"pushwoosh.rpc_v2.chat_presets.ProviderTemplate": {
|
|
11780
|
+
"type": "I",
|
|
11781
|
+
"fields": {
|
|
11782
|
+
"lang": {
|
|
11783
|
+
"type": "string"
|
|
11784
|
+
},
|
|
11785
|
+
"provider": {
|
|
11786
|
+
"type": "string"
|
|
11787
|
+
},
|
|
11788
|
+
"name": {
|
|
11789
|
+
"type": "string"
|
|
11790
|
+
},
|
|
11791
|
+
"status": {
|
|
11792
|
+
"type": "string"
|
|
11793
|
+
},
|
|
11794
|
+
"rejectionReason": {
|
|
11795
|
+
"type": "string"
|
|
11796
|
+
},
|
|
11797
|
+
"category": {
|
|
11798
|
+
"type": "string"
|
|
11799
|
+
},
|
|
11800
|
+
"serving": {
|
|
11801
|
+
"type": "boolean"
|
|
11802
|
+
}
|
|
11803
|
+
}
|
|
11804
|
+
},
|
|
11805
|
+
"pushwoosh.rpc_v2.chat_presets.SubmitChatPresetForApprovalRequest": {
|
|
11806
|
+
"type": "I",
|
|
11807
|
+
"fields": {
|
|
11808
|
+
"code": {
|
|
11809
|
+
"type": "string"
|
|
11810
|
+
}
|
|
11811
|
+
}
|
|
11812
|
+
},
|
|
11813
|
+
"pushwoosh.rpc_v2.chat_presets.SubmitChatPresetForApprovalResponse": {
|
|
11814
|
+
"type": "I",
|
|
11815
|
+
"fields": {
|
|
11816
|
+
"preset": {
|
|
11817
|
+
"type": "pushwoosh.rpc_v2.chat_presets.ChatPreset"
|
|
11818
|
+
},
|
|
11819
|
+
"templates": {
|
|
11820
|
+
"type": "pushwoosh.rpc_v2.chat_presets.ProviderTemplate",
|
|
11821
|
+
"array": true
|
|
11822
|
+
}
|
|
11823
|
+
}
|
|
11824
|
+
},
|
|
11825
|
+
"pushwoosh.rpc_v2.chat_presets.RefreshChatPresetStatusRequest": {
|
|
11826
|
+
"type": "I",
|
|
11827
|
+
"fields": {
|
|
11828
|
+
"code": {
|
|
11829
|
+
"type": "string"
|
|
11830
|
+
}
|
|
11831
|
+
}
|
|
11832
|
+
},
|
|
11833
|
+
"pushwoosh.rpc_v2.chat_presets.RefreshChatPresetStatusResponse": {
|
|
11834
|
+
"type": "I",
|
|
11835
|
+
"fields": {
|
|
11836
|
+
"preset": {
|
|
11837
|
+
"type": "pushwoosh.rpc_v2.chat_presets.ChatPreset"
|
|
11838
|
+
},
|
|
11839
|
+
"templates": {
|
|
11840
|
+
"type": "pushwoosh.rpc_v2.chat_presets.ProviderTemplate",
|
|
11841
|
+
"array": true
|
|
11842
|
+
}
|
|
11843
|
+
}
|
|
11844
|
+
},
|
|
11767
11845
|
"pushwoosh.rpc_v2.cloud_pages.CloudPagesService": {
|
|
11768
11846
|
"type": "S",
|
|
11769
11847
|
"key": "cloudPages",
|
|
@@ -40321,6 +40399,9 @@ export const data = {
|
|
|
40321
40399
|
},
|
|
40322
40400
|
"updated": {
|
|
40323
40401
|
"type": "Date"
|
|
40402
|
+
},
|
|
40403
|
+
"managedBy": {
|
|
40404
|
+
"type": "string"
|
|
40324
40405
|
}
|
|
40325
40406
|
}
|
|
40326
40407
|
},
|
package/package.json
CHANGED
package/whatsapp_presets.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ export type WhatsAppPreset = {
|
|
|
19
19
|
properties: WhatsAppPresetProperties;
|
|
20
20
|
created: Date;
|
|
21
21
|
updated: Date;
|
|
22
|
+
/** Code of the chat preset this template was submitted from; empty for templates made in Meta. Output only. */
|
|
23
|
+
managedBy: string;
|
|
22
24
|
};
|
|
23
25
|
export type WhatsAppPresetProperties = {
|
|
24
26
|
contentId: string;
|