@pushwoosh/rpc-v2-http-api-data 0.2.459 → 0.2.462
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/data.js +329 -2
- package/email_subscription_pages.d.ts +87 -0
- package/email_subscription_pages.js +3 -0
- package/index.d.ts +4 -0
- package/package.json +1 -1
- package/pushwoosh_aibuilder_v1.d.ts +73 -2
- package/sdk_integrator.d.ts +21 -0
- package/sdk_integrator.js +3 -0
package/data.js
CHANGED
|
@@ -2959,6 +2959,27 @@ export const data = {
|
|
|
2959
2959
|
}
|
|
2960
2960
|
}
|
|
2961
2961
|
},
|
|
2962
|
+
"pushwoosh.aibuilder.v1.SubscriptionAction": {
|
|
2963
|
+
"type": "E",
|
|
2964
|
+
"values": [
|
|
2965
|
+
"SUBSCRIPTION_ACTION_UNSPECIFIED",
|
|
2966
|
+
"SUBSCRIPTION_ACTION_CONFIRM_UNSUBSCRIBE",
|
|
2967
|
+
"SUBSCRIPTION_ACTION_UNSUBSCRIBE_ALL",
|
|
2968
|
+
"SUBSCRIPTION_ACTION_SAVE_PREFERENCES",
|
|
2969
|
+
"SUBSCRIPTION_ACTION_RESUBSCRIBE",
|
|
2970
|
+
"SUBSCRIPTION_ACTION_MANAGE_PREFERENCES",
|
|
2971
|
+
"SUBSCRIPTION_ACTION_SURVEY_SEND",
|
|
2972
|
+
"SUBSCRIPTION_ACTION_SURVEY_SKIP"
|
|
2973
|
+
]
|
|
2974
|
+
},
|
|
2975
|
+
"pushwoosh.aibuilder.v1.ButtonActionSubscription": {
|
|
2976
|
+
"type": "I",
|
|
2977
|
+
"fields": {
|
|
2978
|
+
"action": {
|
|
2979
|
+
"type": "pushwoosh.aibuilder.v1.SubscriptionAction"
|
|
2980
|
+
}
|
|
2981
|
+
}
|
|
2982
|
+
},
|
|
2962
2983
|
"pushwoosh.aibuilder.v1.ButtonAction": {
|
|
2963
2984
|
"type": "I",
|
|
2964
2985
|
"fields": {
|
|
@@ -2967,13 +2988,17 @@ export const data = {
|
|
|
2967
2988
|
},
|
|
2968
2989
|
"js": {
|
|
2969
2990
|
"type": "pushwoosh.aibuilder.v1.ButtonActionJs"
|
|
2991
|
+
},
|
|
2992
|
+
"subscription": {
|
|
2993
|
+
"type": "pushwoosh.aibuilder.v1.ButtonActionSubscription"
|
|
2970
2994
|
}
|
|
2971
2995
|
},
|
|
2972
2996
|
"oneofs": {
|
|
2973
2997
|
"action": {
|
|
2974
2998
|
"oneof": [
|
|
2975
2999
|
"href",
|
|
2976
|
-
"js"
|
|
3000
|
+
"js",
|
|
3001
|
+
"subscription"
|
|
2977
3002
|
]
|
|
2978
3003
|
}
|
|
2979
3004
|
}
|
|
@@ -3182,6 +3207,84 @@ export const data = {
|
|
|
3182
3207
|
}
|
|
3183
3208
|
}
|
|
3184
3209
|
},
|
|
3210
|
+
"pushwoosh.aibuilder.v1.EmailCategories": {
|
|
3211
|
+
"type": "I",
|
|
3212
|
+
"fields": {
|
|
3213
|
+
"updatedText": {
|
|
3214
|
+
"type": "string"
|
|
3215
|
+
},
|
|
3216
|
+
"updatedTextTranslations": {
|
|
3217
|
+
"type": "string",
|
|
3218
|
+
"mapKeyType": "string"
|
|
3219
|
+
},
|
|
3220
|
+
"errorText": {
|
|
3221
|
+
"type": "string"
|
|
3222
|
+
},
|
|
3223
|
+
"errorTextTranslations": {
|
|
3224
|
+
"type": "string",
|
|
3225
|
+
"mapKeyType": "string"
|
|
3226
|
+
},
|
|
3227
|
+
"accentColor": {
|
|
3228
|
+
"type": "string"
|
|
3229
|
+
},
|
|
3230
|
+
"rowGap": {
|
|
3231
|
+
"type": "number"
|
|
3232
|
+
},
|
|
3233
|
+
"fontSize": {
|
|
3234
|
+
"type": "number"
|
|
3235
|
+
}
|
|
3236
|
+
}
|
|
3237
|
+
},
|
|
3238
|
+
"pushwoosh.aibuilder.v1.SurveyOption": {
|
|
3239
|
+
"type": "I",
|
|
3240
|
+
"fields": {
|
|
3241
|
+
"text": {
|
|
3242
|
+
"type": "string"
|
|
3243
|
+
},
|
|
3244
|
+
"translations": {
|
|
3245
|
+
"type": "string",
|
|
3246
|
+
"mapKeyType": "string"
|
|
3247
|
+
},
|
|
3248
|
+
"value": {
|
|
3249
|
+
"type": "string"
|
|
3250
|
+
}
|
|
3251
|
+
}
|
|
3252
|
+
},
|
|
3253
|
+
"pushwoosh.aibuilder.v1.UnsubscribeSurvey": {
|
|
3254
|
+
"type": "I",
|
|
3255
|
+
"fields": {
|
|
3256
|
+
"options": {
|
|
3257
|
+
"type": "pushwoosh.aibuilder.v1.SurveyOption",
|
|
3258
|
+
"array": true
|
|
3259
|
+
},
|
|
3260
|
+
"otherEnabled": {
|
|
3261
|
+
"type": "boolean"
|
|
3262
|
+
},
|
|
3263
|
+
"otherLabel": {
|
|
3264
|
+
"type": "string"
|
|
3265
|
+
},
|
|
3266
|
+
"otherLabelTranslations": {
|
|
3267
|
+
"type": "string",
|
|
3268
|
+
"mapKeyType": "string"
|
|
3269
|
+
},
|
|
3270
|
+
"otherPlaceholder": {
|
|
3271
|
+
"type": "string"
|
|
3272
|
+
},
|
|
3273
|
+
"otherPlaceholderTranslations": {
|
|
3274
|
+
"type": "string",
|
|
3275
|
+
"mapKeyType": "string"
|
|
3276
|
+
},
|
|
3277
|
+
"accentColor": {
|
|
3278
|
+
"type": "string"
|
|
3279
|
+
},
|
|
3280
|
+
"rowGap": {
|
|
3281
|
+
"type": "number"
|
|
3282
|
+
},
|
|
3283
|
+
"fontSize": {
|
|
3284
|
+
"type": "number"
|
|
3285
|
+
}
|
|
3286
|
+
}
|
|
3287
|
+
},
|
|
3185
3288
|
"pushwoosh.aibuilder.v1.Timer": {
|
|
3186
3289
|
"type": "I",
|
|
3187
3290
|
"fields": {
|
|
@@ -3447,6 +3550,12 @@ export const data = {
|
|
|
3447
3550
|
"barcode": {
|
|
3448
3551
|
"type": "pushwoosh.aibuilder.v1.Barcode"
|
|
3449
3552
|
},
|
|
3553
|
+
"emailCategories": {
|
|
3554
|
+
"type": "pushwoosh.aibuilder.v1.EmailCategories"
|
|
3555
|
+
},
|
|
3556
|
+
"survey": {
|
|
3557
|
+
"type": "pushwoosh.aibuilder.v1.UnsubscribeSurvey"
|
|
3558
|
+
},
|
|
3450
3559
|
"padding": {
|
|
3451
3560
|
"type": "pushwoosh.aibuilder.v1.EdgeInsets",
|
|
3452
3561
|
"optional": true
|
|
@@ -3481,7 +3590,9 @@ export const data = {
|
|
|
3481
3590
|
"menu",
|
|
3482
3591
|
"social",
|
|
3483
3592
|
"video",
|
|
3484
|
-
"barcode"
|
|
3593
|
+
"barcode",
|
|
3594
|
+
"emailCategories",
|
|
3595
|
+
"survey"
|
|
3485
3596
|
]
|
|
3486
3597
|
}
|
|
3487
3598
|
}
|
|
@@ -13573,6 +13684,182 @@ export const data = {
|
|
|
13573
13684
|
}
|
|
13574
13685
|
}
|
|
13575
13686
|
},
|
|
13687
|
+
"pushwoosh.rpc_v2.email_subscription_pages.EmailSubscriptionPagesService": {
|
|
13688
|
+
"type": "S",
|
|
13689
|
+
"key": "emailSubscriptionPages",
|
|
13690
|
+
"methods": {
|
|
13691
|
+
"List": {
|
|
13692
|
+
"request": "pushwoosh.rpc_v2.email_subscription_pages.ListRequest",
|
|
13693
|
+
"response": "pushwoosh.rpc_v2.email_subscription_pages.ListResponse",
|
|
13694
|
+
"method": "get",
|
|
13695
|
+
"path": "/api/email_subscription_pages"
|
|
13696
|
+
},
|
|
13697
|
+
"Get": {
|
|
13698
|
+
"request": "pushwoosh.rpc_v2.email_subscription_pages.GetRequest",
|
|
13699
|
+
"response": "pushwoosh.rpc_v2.email_subscription_pages.GetResponse",
|
|
13700
|
+
"method": "get",
|
|
13701
|
+
"path": "/api/email_subscription_pages/{kind}"
|
|
13702
|
+
},
|
|
13703
|
+
"Set": {
|
|
13704
|
+
"request": "pushwoosh.rpc_v2.email_subscription_pages.SetRequest",
|
|
13705
|
+
"response": "pushwoosh.rpc_v2.email_subscription_pages.SetResponse",
|
|
13706
|
+
"method": "put",
|
|
13707
|
+
"path": "/api/email_subscription_pages/{kind}"
|
|
13708
|
+
},
|
|
13709
|
+
"Reset": {
|
|
13710
|
+
"request": "pushwoosh.rpc_v2.email_subscription_pages.ResetRequest",
|
|
13711
|
+
"response": "pushwoosh.rpc_v2.email_subscription_pages.ResetResponse",
|
|
13712
|
+
"method": "delete",
|
|
13713
|
+
"path": "/api/email_subscription_pages/{kind}"
|
|
13714
|
+
},
|
|
13715
|
+
"SetUnsubscribeFlow": {
|
|
13716
|
+
"request": "pushwoosh.rpc_v2.email_subscription_pages.SetUnsubscribeFlowRequest",
|
|
13717
|
+
"response": "pushwoosh.rpc_v2.email_subscription_pages.SetUnsubscribeFlowResponse",
|
|
13718
|
+
"method": "post",
|
|
13719
|
+
"path": "/api/email_subscription_pages/unsubscribe_flow"
|
|
13720
|
+
}
|
|
13721
|
+
}
|
|
13722
|
+
},
|
|
13723
|
+
"pushwoosh.rpc_v2.email_subscription_pages.Page": {
|
|
13724
|
+
"type": "I",
|
|
13725
|
+
"fields": {
|
|
13726
|
+
"kind": {
|
|
13727
|
+
"type": "string"
|
|
13728
|
+
},
|
|
13729
|
+
"document": {
|
|
13730
|
+
"type": "pushwoosh.aibuilder.v1.AiBuilderDocument"
|
|
13731
|
+
},
|
|
13732
|
+
"isCustom": {
|
|
13733
|
+
"type": "boolean"
|
|
13734
|
+
},
|
|
13735
|
+
"updated": {
|
|
13736
|
+
"type": "Date"
|
|
13737
|
+
}
|
|
13738
|
+
}
|
|
13739
|
+
},
|
|
13740
|
+
"pushwoosh.rpc_v2.email_subscription_pages.PageSummary": {
|
|
13741
|
+
"type": "I",
|
|
13742
|
+
"fields": {
|
|
13743
|
+
"kind": {
|
|
13744
|
+
"type": "string"
|
|
13745
|
+
},
|
|
13746
|
+
"isCustom": {
|
|
13747
|
+
"type": "boolean"
|
|
13748
|
+
},
|
|
13749
|
+
"updated": {
|
|
13750
|
+
"type": "Date"
|
|
13751
|
+
}
|
|
13752
|
+
}
|
|
13753
|
+
},
|
|
13754
|
+
"pushwoosh.rpc_v2.email_subscription_pages.UnsubscribeFlow": {
|
|
13755
|
+
"type": "I",
|
|
13756
|
+
"fields": {
|
|
13757
|
+
"confirm": {
|
|
13758
|
+
"type": "boolean"
|
|
13759
|
+
},
|
|
13760
|
+
"survey": {
|
|
13761
|
+
"type": "boolean"
|
|
13762
|
+
}
|
|
13763
|
+
}
|
|
13764
|
+
},
|
|
13765
|
+
"pushwoosh.rpc_v2.email_subscription_pages.ListRequest": {
|
|
13766
|
+
"type": "I",
|
|
13767
|
+
"fields": {
|
|
13768
|
+
"application": {
|
|
13769
|
+
"type": "string"
|
|
13770
|
+
}
|
|
13771
|
+
}
|
|
13772
|
+
},
|
|
13773
|
+
"pushwoosh.rpc_v2.email_subscription_pages.ListResponse": {
|
|
13774
|
+
"type": "I",
|
|
13775
|
+
"fields": {
|
|
13776
|
+
"pages": {
|
|
13777
|
+
"type": "pushwoosh.rpc_v2.email_subscription_pages.PageSummary",
|
|
13778
|
+
"array": true
|
|
13779
|
+
},
|
|
13780
|
+
"unsubscribeFlow": {
|
|
13781
|
+
"type": "pushwoosh.rpc_v2.email_subscription_pages.UnsubscribeFlow"
|
|
13782
|
+
},
|
|
13783
|
+
"preferenceCenterEnabled": {
|
|
13784
|
+
"type": "boolean"
|
|
13785
|
+
}
|
|
13786
|
+
}
|
|
13787
|
+
},
|
|
13788
|
+
"pushwoosh.rpc_v2.email_subscription_pages.GetRequest": {
|
|
13789
|
+
"type": "I",
|
|
13790
|
+
"fields": {
|
|
13791
|
+
"application": {
|
|
13792
|
+
"type": "string"
|
|
13793
|
+
},
|
|
13794
|
+
"kind": {
|
|
13795
|
+
"type": "string"
|
|
13796
|
+
}
|
|
13797
|
+
}
|
|
13798
|
+
},
|
|
13799
|
+
"pushwoosh.rpc_v2.email_subscription_pages.GetResponse": {
|
|
13800
|
+
"type": "I",
|
|
13801
|
+
"fields": {
|
|
13802
|
+
"page": {
|
|
13803
|
+
"type": "pushwoosh.rpc_v2.email_subscription_pages.Page"
|
|
13804
|
+
}
|
|
13805
|
+
}
|
|
13806
|
+
},
|
|
13807
|
+
"pushwoosh.rpc_v2.email_subscription_pages.SetRequest": {
|
|
13808
|
+
"type": "I",
|
|
13809
|
+
"fields": {
|
|
13810
|
+
"application": {
|
|
13811
|
+
"type": "string"
|
|
13812
|
+
},
|
|
13813
|
+
"kind": {
|
|
13814
|
+
"type": "string"
|
|
13815
|
+
},
|
|
13816
|
+
"document": {
|
|
13817
|
+
"type": "pushwoosh.aibuilder.v1.AiBuilderDocument"
|
|
13818
|
+
}
|
|
13819
|
+
}
|
|
13820
|
+
},
|
|
13821
|
+
"pushwoosh.rpc_v2.email_subscription_pages.SetResponse": {
|
|
13822
|
+
"type": "I",
|
|
13823
|
+
"fields": {
|
|
13824
|
+
"page": {
|
|
13825
|
+
"type": "pushwoosh.rpc_v2.email_subscription_pages.Page"
|
|
13826
|
+
}
|
|
13827
|
+
}
|
|
13828
|
+
},
|
|
13829
|
+
"pushwoosh.rpc_v2.email_subscription_pages.ResetRequest": {
|
|
13830
|
+
"type": "I",
|
|
13831
|
+
"fields": {
|
|
13832
|
+
"application": {
|
|
13833
|
+
"type": "string"
|
|
13834
|
+
},
|
|
13835
|
+
"kind": {
|
|
13836
|
+
"type": "string"
|
|
13837
|
+
}
|
|
13838
|
+
}
|
|
13839
|
+
},
|
|
13840
|
+
"pushwoosh.rpc_v2.email_subscription_pages.ResetResponse": {
|
|
13841
|
+
"type": "I",
|
|
13842
|
+
"fields": {}
|
|
13843
|
+
},
|
|
13844
|
+
"pushwoosh.rpc_v2.email_subscription_pages.SetUnsubscribeFlowRequest": {
|
|
13845
|
+
"type": "I",
|
|
13846
|
+
"fields": {
|
|
13847
|
+
"application": {
|
|
13848
|
+
"type": "string"
|
|
13849
|
+
},
|
|
13850
|
+
"unsubscribeFlow": {
|
|
13851
|
+
"type": "pushwoosh.rpc_v2.email_subscription_pages.UnsubscribeFlow"
|
|
13852
|
+
}
|
|
13853
|
+
}
|
|
13854
|
+
},
|
|
13855
|
+
"pushwoosh.rpc_v2.email_subscription_pages.SetUnsubscribeFlowResponse": {
|
|
13856
|
+
"type": "I",
|
|
13857
|
+
"fields": {
|
|
13858
|
+
"unsubscribeFlow": {
|
|
13859
|
+
"type": "pushwoosh.rpc_v2.email_subscription_pages.UnsubscribeFlow"
|
|
13860
|
+
}
|
|
13861
|
+
}
|
|
13862
|
+
},
|
|
13576
13863
|
"pushwoosh.rpc_v2.email_suppressions.EmailSuppressionsService": {
|
|
13577
13864
|
"type": "S",
|
|
13578
13865
|
"key": "emailSuppressions",
|
|
@@ -35938,6 +36225,46 @@ export const data = {
|
|
|
35938
36225
|
}
|
|
35939
36226
|
}
|
|
35940
36227
|
},
|
|
36228
|
+
"pushwoosh.rpc_v2.sdk_integrator.SdkIntegratorService": {
|
|
36229
|
+
"type": "S",
|
|
36230
|
+
"key": "sdkIntegrator",
|
|
36231
|
+
"methods": {
|
|
36232
|
+
"CreateInstallCode": {
|
|
36233
|
+
"request": "pushwoosh.rpc_v2.sdk_integrator.CreateInstallCodeRequest",
|
|
36234
|
+
"response": "pushwoosh.rpc_v2.sdk_integrator.CreateInstallCodeResponse",
|
|
36235
|
+
"method": "post",
|
|
36236
|
+
"path": "/api/sdk_integrator/install_code"
|
|
36237
|
+
}
|
|
36238
|
+
}
|
|
36239
|
+
},
|
|
36240
|
+
"pushwoosh.rpc_v2.sdk_integrator.CreateInstallCodeRequest": {
|
|
36241
|
+
"type": "I",
|
|
36242
|
+
"fields": {
|
|
36243
|
+
"applicationCode": {
|
|
36244
|
+
"type": "string"
|
|
36245
|
+
},
|
|
36246
|
+
"web": {
|
|
36247
|
+
"type": "boolean"
|
|
36248
|
+
}
|
|
36249
|
+
}
|
|
36250
|
+
},
|
|
36251
|
+
"pushwoosh.rpc_v2.sdk_integrator.CreateInstallCodeResponse": {
|
|
36252
|
+
"type": "I",
|
|
36253
|
+
"fields": {
|
|
36254
|
+
"code": {
|
|
36255
|
+
"type": "string"
|
|
36256
|
+
},
|
|
36257
|
+
"expiresAt": {
|
|
36258
|
+
"type": "Date"
|
|
36259
|
+
},
|
|
36260
|
+
"installCommand": {
|
|
36261
|
+
"type": "string"
|
|
36262
|
+
},
|
|
36263
|
+
"webConfigured": {
|
|
36264
|
+
"type": "boolean"
|
|
36265
|
+
}
|
|
36266
|
+
}
|
|
36267
|
+
},
|
|
35941
36268
|
"pushwoosh.rpc_v2.segment_statistics.SegmentStatisticsService": {
|
|
35942
36269
|
"type": "S",
|
|
35943
36270
|
"key": "segmentStatistics",
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { RpcMethod } from './commonTypes';
|
|
2
|
+
import { AiBuilderDocument as pushwoosh_aibuilder_v1_AiBuilderDocument } from './pushwoosh_aibuilder_v1';
|
|
3
|
+
export type EmailSubscriptionPagesService_List = RpcMethod<ListRequest, ListResponse>;
|
|
4
|
+
export type EmailSubscriptionPagesService_Get = RpcMethod<GetRequest, GetResponse>;
|
|
5
|
+
export type EmailSubscriptionPagesService_Set = RpcMethod<SetRequest, SetResponse>;
|
|
6
|
+
export type EmailSubscriptionPagesService_Reset = RpcMethod<ResetRequest, ResetResponse>;
|
|
7
|
+
export type EmailSubscriptionPagesService_SetUnsubscribeFlow = RpcMethod<SetUnsubscribeFlowRequest, SetUnsubscribeFlowResponse>;
|
|
8
|
+
/**
|
|
9
|
+
* The pages a subscriber sees in the email unsubscribe flow and the preference center. Each application
|
|
10
|
+
* may design its own in the AI builder; until it does, a stock default serves.
|
|
11
|
+
*/
|
|
12
|
+
export interface EmailSubscriptionPagesService {
|
|
13
|
+
/** Lists the seven pages of the email subscription flow with whether each one is customised, plus the unsubscribe flow switches. Use to render the Subscription pages settings. */
|
|
14
|
+
List: EmailSubscriptionPagesService_List;
|
|
15
|
+
/** Returns one page's builder document by kind: the application's own, or the stock default when it has none. Use before editing a page. */
|
|
16
|
+
Get: EmailSubscriptionPagesService_Get;
|
|
17
|
+
/** Saves a page's builder document for an application; the HTML is rendered server-side and the previous version is replaced. The document must follow the kind's rules (required buttons, blocks). */
|
|
18
|
+
Set: EmailSubscriptionPagesService_Set;
|
|
19
|
+
/** Drops the application's own version of a page so the stock default serves again. Resetting a page that was never customised is a no-op. */
|
|
20
|
+
Reset: EmailSubscriptionPagesService_Reset;
|
|
21
|
+
/** Turns the unsubscribe confirmation step and the unsubscribe-reason survey on or off for an application. Switching the survey on creates the tag its answers are stored in. */
|
|
22
|
+
SetUnsubscribeFlow: EmailSubscriptionPagesService_SetUnsubscribeFlow;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Page kinds: preference_center, unsubscribe_confirm, unsubscribe_survey, unsubscribed_category,
|
|
26
|
+
* unsubscribed_all, resubscribed_category, resubscribed_all.
|
|
27
|
+
*/
|
|
28
|
+
export type Page = {
|
|
29
|
+
kind: string;
|
|
30
|
+
document: pushwoosh_aibuilder_v1_AiBuilderDocument;
|
|
31
|
+
/** False when the stock default is returned. */
|
|
32
|
+
isCustom: boolean;
|
|
33
|
+
/** Last save of the application's own version; unset for the default. */
|
|
34
|
+
updated: Date;
|
|
35
|
+
};
|
|
36
|
+
export type PageSummary = {
|
|
37
|
+
kind: string;
|
|
38
|
+
isCustom: boolean;
|
|
39
|
+
updated: Date;
|
|
40
|
+
};
|
|
41
|
+
export type UnsubscribeFlow = {
|
|
42
|
+
/** Ask before applying an unsubscribe link from an email; on by default. */
|
|
43
|
+
confirm: boolean;
|
|
44
|
+
/** Show the unsubscribe-reason survey after an unsubscribe; off by default. */
|
|
45
|
+
survey: boolean;
|
|
46
|
+
};
|
|
47
|
+
export type ListRequest = {
|
|
48
|
+
/** Application code XXXXX-XXXXX */
|
|
49
|
+
application?: string;
|
|
50
|
+
};
|
|
51
|
+
export type ListResponse = {
|
|
52
|
+
pages: PageSummary[];
|
|
53
|
+
unsubscribeFlow: UnsubscribeFlow;
|
|
54
|
+
/** The email categories feature; the preference center page serves only with it on. */
|
|
55
|
+
preferenceCenterEnabled: boolean;
|
|
56
|
+
};
|
|
57
|
+
export type GetRequest = {
|
|
58
|
+
/** Application code XXXXX-XXXXX */
|
|
59
|
+
application?: string;
|
|
60
|
+
kind?: string;
|
|
61
|
+
};
|
|
62
|
+
export type GetResponse = {
|
|
63
|
+
page: Page;
|
|
64
|
+
};
|
|
65
|
+
export type SetRequest = {
|
|
66
|
+
/** Application code XXXXX-XXXXX */
|
|
67
|
+
application?: string;
|
|
68
|
+
kind?: string;
|
|
69
|
+
document?: pushwoosh_aibuilder_v1_AiBuilderDocument;
|
|
70
|
+
};
|
|
71
|
+
export type SetResponse = {
|
|
72
|
+
page: Page;
|
|
73
|
+
};
|
|
74
|
+
export type ResetRequest = {
|
|
75
|
+
/** Application code XXXXX-XXXXX */
|
|
76
|
+
application?: string;
|
|
77
|
+
kind?: string;
|
|
78
|
+
};
|
|
79
|
+
export type ResetResponse = {};
|
|
80
|
+
export type SetUnsubscribeFlowRequest = {
|
|
81
|
+
/** Application code XXXXX-XXXXX */
|
|
82
|
+
application?: string;
|
|
83
|
+
unsubscribeFlow?: UnsubscribeFlow;
|
|
84
|
+
};
|
|
85
|
+
export type SetUnsubscribeFlowResponse = {
|
|
86
|
+
unsubscribeFlow: UnsubscribeFlow;
|
|
87
|
+
};
|
package/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ import { DeliverabilityCheckerService as pushwoosh_rpc_v2_deliverability_checker
|
|
|
31
31
|
import { DevicesService as pushwoosh_rpc_v2_devices_DevicesService } from './devices';
|
|
32
32
|
import { EmailAdsService as pushwoosh_rpc_v2_email_ads_EmailAdsService } from './email_ads';
|
|
33
33
|
import { EmailCategoriesService as pushwoosh_rpc_v2_email_categories_EmailCategoriesService } from './email_categories';
|
|
34
|
+
import { EmailSubscriptionPagesService as pushwoosh_rpc_v2_email_subscription_pages_EmailSubscriptionPagesService } from './email_subscription_pages';
|
|
34
35
|
import { EmailSuppressionsService as pushwoosh_rpc_v2_email_suppressions_EmailSuppressionsService } from './email_suppressions';
|
|
35
36
|
import { EmailTemplatesService as pushwoosh_rpc_v2_accounts_EmailTemplatesService } from './accounts';
|
|
36
37
|
import { EmailsConfigurationsService as pushwoosh_rpc_v2_emails_configurations_EmailsConfigurationsService } from './emails_configurations';
|
|
@@ -62,6 +63,7 @@ import { presetsService as pushwoosh_rpc_v2_presets_presetsService } from './pre
|
|
|
62
63
|
import { ReferralPartnerService as pushwoosh_rpc_v2_referral_partners_ReferralPartnerService } from './referral_partners';
|
|
63
64
|
import { RestrictionsService as pushwoosh_rpc_v2_restrictions_RestrictionsService } from './restrictions';
|
|
64
65
|
import { RichMediaService as pushwoosh_rpc_v2_rich_medias_RichMediaService } from './rich_medias';
|
|
66
|
+
import { SdkIntegratorService as pushwoosh_rpc_v2_sdk_integrator_SdkIntegratorService } from './sdk_integrator';
|
|
65
67
|
import { SegmentStatisticsService as pushwoosh_rpc_v2_segment_statistics_SegmentStatisticsService } from './segment_statistics';
|
|
66
68
|
import { SegmentsService as pushwoosh_rpc_segments_v3_SegmentsService } from './pushwoosh_rpc_segments_v3';
|
|
67
69
|
import { SendRateService as pushwoosh_rpc_v2_send_rate_SendRateService } from './send_rate';
|
|
@@ -112,6 +114,7 @@ export type API = {
|
|
|
112
114
|
devices: pushwoosh_rpc_v2_devices_DevicesService;
|
|
113
115
|
emailAds: pushwoosh_rpc_v2_email_ads_EmailAdsService;
|
|
114
116
|
emailCategories: pushwoosh_rpc_v2_email_categories_EmailCategoriesService;
|
|
117
|
+
emailSubscriptionPages: pushwoosh_rpc_v2_email_subscription_pages_EmailSubscriptionPagesService;
|
|
115
118
|
emailSuppressions: pushwoosh_rpc_v2_email_suppressions_EmailSuppressionsService;
|
|
116
119
|
emailTemplates: pushwoosh_rpc_v2_accounts_EmailTemplatesService;
|
|
117
120
|
emailsConfigurations: pushwoosh_rpc_v2_emails_configurations_EmailsConfigurationsService;
|
|
@@ -143,6 +146,7 @@ export type API = {
|
|
|
143
146
|
referralPartner: pushwoosh_rpc_v2_referral_partners_ReferralPartnerService;
|
|
144
147
|
restrictions: pushwoosh_rpc_v2_restrictions_RestrictionsService;
|
|
145
148
|
richMedia: pushwoosh_rpc_v2_rich_medias_RichMediaService;
|
|
149
|
+
sdkIntegrator: pushwoosh_rpc_v2_sdk_integrator_SdkIntegratorService;
|
|
146
150
|
segmentStatistics: pushwoosh_rpc_v2_segment_statistics_SegmentStatisticsService;
|
|
147
151
|
segments: pushwoosh_rpc_segments_v3_SegmentsService;
|
|
148
152
|
sendRate: pushwoosh_rpc_v2_send_rate_SendRateService;
|
package/package.json
CHANGED
|
@@ -478,6 +478,21 @@ export type ButtonActionHref = {
|
|
|
478
478
|
export type ButtonActionJs = {
|
|
479
479
|
onClick: string;
|
|
480
480
|
};
|
|
481
|
+
/**
|
|
482
|
+
* What a button does on an email subscription page. The emitter writes it as
|
|
483
|
+
* data-pw-action; channels/gateway's runtime script performs it.
|
|
484
|
+
*/
|
|
485
|
+
export type SubscriptionAction = 'SUBSCRIPTION_ACTION_UNSPECIFIED'
|
|
486
|
+
/** Applies the unsubscribe the signed link carries (category or all). */
|
|
487
|
+
| 'SUBSCRIPTION_ACTION_CONFIRM_UNSUBSCRIBE' | 'SUBSCRIPTION_ACTION_UNSUBSCRIBE_ALL'
|
|
488
|
+
/** Saves the EmailCategories item's checkboxes. */
|
|
489
|
+
| 'SUBSCRIPTION_ACTION_SAVE_PREFERENCES' | 'SUBSCRIPTION_ACTION_RESUBSCRIBE' | 'SUBSCRIPTION_ACTION_MANAGE_PREFERENCES'
|
|
490
|
+
/** Posts the UnsubscribeSurvey item's answer; SKIP leaves without one. */
|
|
491
|
+
| 'SUBSCRIPTION_ACTION_SURVEY_SEND' | 'SUBSCRIPTION_ACTION_SURVEY_SKIP';
|
|
492
|
+
/** SUBSCRIPTION_PAGE only; the page kind decides which actions it may carry. */
|
|
493
|
+
export type ButtonActionSubscription = {
|
|
494
|
+
action: SubscriptionAction;
|
|
495
|
+
};
|
|
481
496
|
export type ButtonAction_action_href = {
|
|
482
497
|
type: 'href';
|
|
483
498
|
data: ButtonActionHref;
|
|
@@ -486,7 +501,11 @@ export type ButtonAction_action_js = {
|
|
|
486
501
|
type: 'js';
|
|
487
502
|
data: ButtonActionJs;
|
|
488
503
|
};
|
|
489
|
-
export type
|
|
504
|
+
export type ButtonAction_action_subscription = {
|
|
505
|
+
type: 'subscription';
|
|
506
|
+
data: ButtonActionSubscription;
|
|
507
|
+
};
|
|
508
|
+
export type ButtonAction_action = ButtonAction_action_href | ButtonAction_action_js | ButtonAction_action_subscription;
|
|
490
509
|
export type ButtonAction = {
|
|
491
510
|
action: ButtonAction_action;
|
|
492
511
|
};
|
|
@@ -630,6 +649,50 @@ export type Form = {
|
|
|
630
649
|
submitLabel: string;
|
|
631
650
|
submitStyles?: ButtonStyles;
|
|
632
651
|
};
|
|
652
|
+
/**
|
|
653
|
+
* Preference-center checkboxes (SUBSCRIPTION_PAGE only). The list is not stored:
|
|
654
|
+
* the emitter writes one row template, the gateway runtime fills it per subscriber.
|
|
655
|
+
*/
|
|
656
|
+
export type EmailCategories = {
|
|
657
|
+
/** Banner shown after a successful save; per-language overrides as TextBlock.translations. */
|
|
658
|
+
updatedText: string;
|
|
659
|
+
updatedTextTranslations: Record<string, string>;
|
|
660
|
+
/** Banner shown when the save fails. */
|
|
661
|
+
errorText: string;
|
|
662
|
+
errorTextTranslations: Record<string, string>;
|
|
663
|
+
/** Checkbox colour (#RGB / #RRGGBB); empty = the scheme's accent. */
|
|
664
|
+
accentColor: string;
|
|
665
|
+
/** Vertical gap between rows in px; 0 = 16. */
|
|
666
|
+
rowGap: number;
|
|
667
|
+
/** Row label size in px; 0 = 14. */
|
|
668
|
+
fontSize: number;
|
|
669
|
+
};
|
|
670
|
+
export type SurveyOption = {
|
|
671
|
+
text: string;
|
|
672
|
+
translations: Record<string, string>;
|
|
673
|
+
/**
|
|
674
|
+
* What a pick submits; empty = `text` in the default language. Never
|
|
675
|
+
* translated, so a reason reads the same whatever language the visitor saw.
|
|
676
|
+
*/
|
|
677
|
+
value: string;
|
|
678
|
+
};
|
|
679
|
+
/**
|
|
680
|
+
* Unsubscribe-reason radio list (SUBSCRIPTION_PAGE only). The question above it
|
|
681
|
+
* is ordinary text; Send / Skip are ordinary buttons with SURVEY_SEND / SURVEY_SKIP.
|
|
682
|
+
*/
|
|
683
|
+
export type UnsubscribeSurvey = {
|
|
684
|
+
options: SurveyOption[];
|
|
685
|
+
/** Adds a free-text option below the fixed ones. */
|
|
686
|
+
otherEnabled: boolean;
|
|
687
|
+
otherLabel: string;
|
|
688
|
+
otherLabelTranslations: Record<string, string>;
|
|
689
|
+
otherPlaceholder: string;
|
|
690
|
+
otherPlaceholderTranslations: Record<string, string>;
|
|
691
|
+
/** Radio colour (#RGB / #RRGGBB); empty = the scheme's accent. */
|
|
692
|
+
accentColor: string;
|
|
693
|
+
rowGap: number;
|
|
694
|
+
fontSize: number;
|
|
695
|
+
};
|
|
633
696
|
/**
|
|
634
697
|
* Countdown timer. Renders in email HTML as an animated GIF served by this
|
|
635
698
|
* service's public /timer/v1/countdown.gif endpoint (regenerated per open).
|
|
@@ -843,7 +906,15 @@ export type ContentItem_item_barcode = {
|
|
|
843
906
|
type: 'barcode';
|
|
844
907
|
data: Barcode;
|
|
845
908
|
};
|
|
846
|
-
export type
|
|
909
|
+
export type ContentItem_item_emailCategories = {
|
|
910
|
+
type: 'emailCategories';
|
|
911
|
+
data: EmailCategories;
|
|
912
|
+
};
|
|
913
|
+
export type ContentItem_item_survey = {
|
|
914
|
+
type: 'survey';
|
|
915
|
+
data: UnsubscribeSurvey;
|
|
916
|
+
};
|
|
917
|
+
export type ContentItem_item = ContentItem_item_text | ContentItem_item_buttonGroup | ContentItem_item_list | ContentItem_item_image | ContentItem_item_form | ContentItem_item_timer | ContentItem_item_rawHtml | ContentItem_item_menu | ContentItem_item_social | ContentItem_item_video | ContentItem_item_barcode | ContentItem_item_emailCategories | ContentItem_item_survey;
|
|
847
918
|
export type ContentItem = {
|
|
848
919
|
/**
|
|
849
920
|
* Container padding of the item. Unset = client's default inter-item gap;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RpcMethod } from './commonTypes';
|
|
2
|
+
export type SdkIntegratorService_CreateInstallCode = RpcMethod<CreateInstallCodeRequest, CreateInstallCodeResponse>;
|
|
3
|
+
export interface SdkIntegratorService {
|
|
4
|
+
/** Prepares an application for the Pushwoosh SDK Integrator and returns a one-time install code with the command that uses it. Creates (or reuses) the account's "SDK Integrator" device API token and grants it this application; with web set, also generates Web push (VAPID) keys when the application has no web push configured yet. Use when a user asks to integrate a Pushwoosh SDK into their project. */
|
|
5
|
+
CreateInstallCode: SdkIntegratorService_CreateInstallCode;
|
|
6
|
+
}
|
|
7
|
+
export type CreateInstallCodeRequest = {
|
|
8
|
+
/** Application code (XXXXX-XXXXX) the SDK is integrated with. */
|
|
9
|
+
applicationCode?: string;
|
|
10
|
+
/** Also make the Web platform ready: generates VAPID keys only when no web push (VAPID or FCM) is configured, never replacing existing keys. */
|
|
11
|
+
web?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type CreateInstallCodeResponse = {
|
|
14
|
+
/** One-time code the integrator redeems for the application code and the device API token. */
|
|
15
|
+
code: string;
|
|
16
|
+
expiresAt: Date;
|
|
17
|
+
/** Shell command that runs the integrator with this code. */
|
|
18
|
+
installCommand: string;
|
|
19
|
+
/** True when this call generated the Web push keys. */
|
|
20
|
+
webConfigured: boolean;
|
|
21
|
+
};
|