@gofynd/fdk-client-javascript 1.3.1-beta.1 → 1.3.2
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/package.json +3 -2
- package/sdk/common/AxiosHelper.js +2 -2
- package/sdk/partner/OAuthClient.js +2 -2
- package/sdk/platform/OAuthClient.js +2 -2
- package/sdk/platform/Order/OrderPlatformModel.d.ts +8 -8
- package/sdk/platform/Order/OrderPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +11 -3
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +13 -3
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +9 -2
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +50 -1
- package/sdk/platform/Payment/PaymentPlatformModel.js +34 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1 -349
- package/sdk/platform/Theme/ThemePlatformModel.js +0 -282
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +13 -19
- package/sdk/platform/Webhook/WebhookPlatformModel.js +21 -8
- package/sdk/common/RequestSigner.d.ts +0 -1
- package/sdk/common/RequestSigner.js +0 -300
|
@@ -5,13 +5,6 @@ const Joi = require("joi");
|
|
|
5
5
|
* @property {string} [theme_id]
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* @typedef AdvanceSetting
|
|
10
|
-
* @property {DividerStrokeHighlightSetting} [divider_stroke_highlight]
|
|
11
|
-
* @property {OverlayPopupSetting} [overlay_popup]
|
|
12
|
-
* @property {UserAlertsSetting} [user_alerts]
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
8
|
/**
|
|
16
9
|
* @typedef AllAvailablePageSchema
|
|
17
10
|
* @property {AvailablePageSchema[]} [pages]
|
|
@@ -24,12 +17,6 @@ const Joi = require("joi");
|
|
|
24
17
|
* @property {UMDJs} [umd_js]
|
|
25
18
|
*/
|
|
26
19
|
|
|
27
|
-
/**
|
|
28
|
-
* @typedef AuthConfig
|
|
29
|
-
* @property {boolean} [show_footer_auth] - Whether to show footer authentication or not
|
|
30
|
-
* @property {boolean} [show_header_auth] - Whether to show header authentication or not
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
20
|
/**
|
|
34
21
|
* @typedef AvailablePagePredicate
|
|
35
22
|
* @property {AvailablePageRoutePredicate} [route]
|
|
@@ -116,29 +103,12 @@ const Joi = require("joi");
|
|
|
116
103
|
* @property {UrlProp} [slide_link]
|
|
117
104
|
*/
|
|
118
105
|
|
|
119
|
-
/**
|
|
120
|
-
* @typedef ButtonSetting
|
|
121
|
-
* @property {string} [button_link] - The button link color
|
|
122
|
-
* @property {string} [button_primary] - The primary button color
|
|
123
|
-
* @property {string} [button_secondary] - The secondary button color
|
|
124
|
-
*/
|
|
125
|
-
|
|
126
106
|
/**
|
|
127
107
|
* @typedef CheckboxProp
|
|
128
108
|
* @property {string} [type] - The type of the property.
|
|
129
109
|
* @property {boolean} [value] - The value of the checkbox property.
|
|
130
110
|
*/
|
|
131
111
|
|
|
132
|
-
/**
|
|
133
|
-
* @typedef Colors
|
|
134
|
-
* @property {string} [accent_color] - The accent color
|
|
135
|
-
* @property {string} [bg_color] - The background color
|
|
136
|
-
* @property {string} [button_secondary_color] - The secondary button color
|
|
137
|
-
* @property {string} [link_color] - The link color
|
|
138
|
-
* @property {string} [primary_color] - The primary color
|
|
139
|
-
* @property {string} [secondary_color] - The secondary color
|
|
140
|
-
*/
|
|
141
|
-
|
|
142
112
|
/**
|
|
143
113
|
* @typedef CommonJS
|
|
144
114
|
* @property {string} [link]
|
|
@@ -212,12 +182,6 @@ const Joi = require("joi");
|
|
|
212
182
|
* price color
|
|
213
183
|
*/
|
|
214
184
|
|
|
215
|
-
/**
|
|
216
|
-
* @typedef DividerStrokeHighlightSetting
|
|
217
|
-
* @property {string} [divider_strokes] - The divider strokes color
|
|
218
|
-
* @property {string} [highlight] - The highlight color
|
|
219
|
-
*/
|
|
220
|
-
|
|
221
185
|
/**
|
|
222
186
|
* @typedef DummyResponse
|
|
223
187
|
* @property {string} [message]
|
|
@@ -269,43 +233,11 @@ const Joi = require("joi");
|
|
|
269
233
|
* @property {FontVariant} [semi_bold]
|
|
270
234
|
*/
|
|
271
235
|
|
|
272
|
-
/**
|
|
273
|
-
* @typedef FooterSetting
|
|
274
|
-
* @property {string} [footer_background] - The footer background color
|
|
275
|
-
* @property {string} [footer_body_text] - The footer body text color
|
|
276
|
-
* @property {string} [footer_bottom_background] - The footer bottom background color
|
|
277
|
-
* @property {string} [footer_heading_text] - The footer heading text color
|
|
278
|
-
* @property {string} [footer_icon] - The footer icon color
|
|
279
|
-
*/
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* @typedef GeneralSetting
|
|
283
|
-
* @property {ButtonSetting} [button]
|
|
284
|
-
* @property {FooterSetting} [footer]
|
|
285
|
-
* @property {HeaderSetting} [header]
|
|
286
|
-
* @property {SaleDiscountSetting} [sale_discount]
|
|
287
|
-
* @property {TextSetting} [text]
|
|
288
|
-
* @property {ThemeSetting} [theme]
|
|
289
|
-
*/
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* @typedef GlobalConfig
|
|
293
|
-
* @property {CustomConfig} [custom]
|
|
294
|
-
* @property {StaticConfig} [statics]
|
|
295
|
-
*/
|
|
296
|
-
|
|
297
236
|
/**
|
|
298
237
|
* @typedef GlobalSchema
|
|
299
238
|
* @property {Prop[]} [props]
|
|
300
239
|
*/
|
|
301
240
|
|
|
302
|
-
/**
|
|
303
|
-
* @typedef HeaderSetting
|
|
304
|
-
* @property {string} [header_background] - The header background color
|
|
305
|
-
* @property {string} [header_icon] - The header icon color
|
|
306
|
-
* @property {string} [header_nav] - The header navigation color
|
|
307
|
-
*/
|
|
308
|
-
|
|
309
241
|
/**
|
|
310
242
|
* @typedef ImagePickerProp
|
|
311
243
|
* @property {string} [type] - The type of the property.
|
|
@@ -335,12 +267,6 @@ const Joi = require("joi");
|
|
|
335
267
|
* @property {string} [slug] - The slug of the theme
|
|
336
268
|
*/
|
|
337
269
|
|
|
338
|
-
/**
|
|
339
|
-
* @typedef OverlayPopupSetting
|
|
340
|
-
* @property {string} [dialog_backgroung] - The dialog background color
|
|
341
|
-
* @property {string} [overlay] - The overlay color
|
|
342
|
-
*/
|
|
343
|
-
|
|
344
270
|
/**
|
|
345
271
|
* @typedef Page
|
|
346
272
|
* @property {number} [current]
|
|
@@ -352,12 +278,6 @@ const Joi = require("joi");
|
|
|
352
278
|
* @property {string} type
|
|
353
279
|
*/
|
|
354
280
|
|
|
355
|
-
/**
|
|
356
|
-
* @typedef PaletteConfig
|
|
357
|
-
* @property {AdvanceSetting} [advance_setting]
|
|
358
|
-
* @property {GeneralSetting} [general_setting]
|
|
359
|
-
*/
|
|
360
|
-
|
|
361
281
|
/**
|
|
362
282
|
* @typedef Predicate
|
|
363
283
|
* @property {Route} [route]
|
|
@@ -397,14 +317,6 @@ const Joi = require("joi");
|
|
|
397
317
|
* @property {string} [selected] - The selected route.
|
|
398
318
|
*/
|
|
399
319
|
|
|
400
|
-
/**
|
|
401
|
-
* @typedef SaleDiscountSetting
|
|
402
|
-
* @property {string} [sale_badge_background] - The sale badge background color
|
|
403
|
-
* @property {string} [sale_badge_text] - The sale badge text color
|
|
404
|
-
* @property {string} [sale_discount_text] - The sale discount text color
|
|
405
|
-
* @property {string} [sale_timer] - The sale timer color
|
|
406
|
-
*/
|
|
407
|
-
|
|
408
320
|
/**
|
|
409
321
|
* @typedef Screen
|
|
410
322
|
* @property {boolean} [desktop] - True if the screen is a desktop device.
|
|
@@ -442,32 +354,12 @@ const Joi = require("joi");
|
|
|
442
354
|
* @property {TextProp} [title]
|
|
443
355
|
*/
|
|
444
356
|
|
|
445
|
-
/**
|
|
446
|
-
* @typedef StaticConfig
|
|
447
|
-
* @property {StaticProps} [props]
|
|
448
|
-
*/
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
* @typedef StaticProps
|
|
452
|
-
* @property {AuthConfig} [auth]
|
|
453
|
-
* @property {Colors} [colors]
|
|
454
|
-
* @property {PaletteConfig} [palette]
|
|
455
|
-
*/
|
|
456
|
-
|
|
457
357
|
/**
|
|
458
358
|
* @typedef TextProp
|
|
459
359
|
* @property {string} [type] - The type of the property.
|
|
460
360
|
* @property {string} [value] - The value of the text property.
|
|
461
361
|
*/
|
|
462
362
|
|
|
463
|
-
/**
|
|
464
|
-
* @typedef TextSetting
|
|
465
|
-
* @property {string} [text_body] - The text body color
|
|
466
|
-
* @property {string} [text_heading] - The text heading color
|
|
467
|
-
* @property {string} [text_label] - The text label color
|
|
468
|
-
* @property {string} [text_secondary] - The secondary text color
|
|
469
|
-
*/
|
|
470
|
-
|
|
471
363
|
/**
|
|
472
364
|
* @typedef ThemeConfiguration
|
|
473
365
|
* @property {CustomConfig} [custom]
|
|
@@ -504,12 +396,6 @@ const Joi = require("joi");
|
|
|
504
396
|
* to apply to the company.
|
|
505
397
|
*/
|
|
506
398
|
|
|
507
|
-
/**
|
|
508
|
-
* @typedef ThemeSetting
|
|
509
|
-
* @property {string} [page_background] - The page background color
|
|
510
|
-
* @property {string} [theme_accent] - The theme accent color
|
|
511
|
-
*/
|
|
512
|
-
|
|
513
399
|
/**
|
|
514
400
|
* @typedef ThemesSchema
|
|
515
401
|
* @property {string} [_id] - The unique identifier of the theme
|
|
@@ -572,16 +458,6 @@ const Joi = require("joi");
|
|
|
572
458
|
* @property {string} [value] - The value of the URL property.
|
|
573
459
|
*/
|
|
574
460
|
|
|
575
|
-
/**
|
|
576
|
-
* @typedef UserAlertsSetting
|
|
577
|
-
* @property {string} [error_background] - The error background color
|
|
578
|
-
* @property {string} [error_text] - The error text color
|
|
579
|
-
* @property {string} [info_background] - The info background color
|
|
580
|
-
* @property {string} [info_text] - The info text color
|
|
581
|
-
* @property {string} [success_background] - The success background color
|
|
582
|
-
* @property {string} [success_text] - The success text color
|
|
583
|
-
*/
|
|
584
|
-
|
|
585
461
|
class ThemePlatformModel {
|
|
586
462
|
/** @returns {AddThemeRequestSchema} */
|
|
587
463
|
static AddThemeRequestSchema() {
|
|
@@ -590,15 +466,6 @@ class ThemePlatformModel {
|
|
|
590
466
|
});
|
|
591
467
|
}
|
|
592
468
|
|
|
593
|
-
/** @returns {AdvanceSetting} */
|
|
594
|
-
static AdvanceSetting() {
|
|
595
|
-
return Joi.object({
|
|
596
|
-
divider_stroke_highlight: ThemePlatformModel.DividerStrokeHighlightSetting(),
|
|
597
|
-
overlay_popup: ThemePlatformModel.OverlayPopupSetting(),
|
|
598
|
-
user_alerts: ThemePlatformModel.UserAlertsSetting(),
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
|
|
602
469
|
/** @returns {AllAvailablePageSchema} */
|
|
603
470
|
static AllAvailablePageSchema() {
|
|
604
471
|
return Joi.object({
|
|
@@ -615,14 +482,6 @@ class ThemePlatformModel {
|
|
|
615
482
|
});
|
|
616
483
|
}
|
|
617
484
|
|
|
618
|
-
/** @returns {AuthConfig} */
|
|
619
|
-
static AuthConfig() {
|
|
620
|
-
return Joi.object({
|
|
621
|
-
show_footer_auth: Joi.boolean(),
|
|
622
|
-
show_header_auth: Joi.boolean(),
|
|
623
|
-
});
|
|
624
|
-
}
|
|
625
|
-
|
|
626
485
|
/** @returns {AvailablePagePredicate} */
|
|
627
486
|
static AvailablePagePredicate() {
|
|
628
487
|
return Joi.object({
|
|
@@ -737,15 +596,6 @@ class ThemePlatformModel {
|
|
|
737
596
|
});
|
|
738
597
|
}
|
|
739
598
|
|
|
740
|
-
/** @returns {ButtonSetting} */
|
|
741
|
-
static ButtonSetting() {
|
|
742
|
-
return Joi.object({
|
|
743
|
-
button_link: Joi.string().allow(""),
|
|
744
|
-
button_primary: Joi.string().allow(""),
|
|
745
|
-
button_secondary: Joi.string().allow(""),
|
|
746
|
-
});
|
|
747
|
-
}
|
|
748
|
-
|
|
749
599
|
/** @returns {CheckboxProp} */
|
|
750
600
|
static CheckboxProp() {
|
|
751
601
|
return Joi.object({
|
|
@@ -754,18 +604,6 @@ class ThemePlatformModel {
|
|
|
754
604
|
});
|
|
755
605
|
}
|
|
756
606
|
|
|
757
|
-
/** @returns {Colors} */
|
|
758
|
-
static Colors() {
|
|
759
|
-
return Joi.object({
|
|
760
|
-
accent_color: Joi.string().allow(""),
|
|
761
|
-
bg_color: Joi.string().allow(""),
|
|
762
|
-
button_secondary_color: Joi.string().allow(""),
|
|
763
|
-
link_color: Joi.string().allow(""),
|
|
764
|
-
primary_color: Joi.string().allow(""),
|
|
765
|
-
secondary_color: Joi.string().allow(""),
|
|
766
|
-
});
|
|
767
|
-
}
|
|
768
|
-
|
|
769
607
|
/** @returns {CommonJS} */
|
|
770
608
|
static CommonJS() {
|
|
771
609
|
return Joi.object({
|
|
@@ -848,14 +686,6 @@ class ThemePlatformModel {
|
|
|
848
686
|
});
|
|
849
687
|
}
|
|
850
688
|
|
|
851
|
-
/** @returns {DividerStrokeHighlightSetting} */
|
|
852
|
-
static DividerStrokeHighlightSetting() {
|
|
853
|
-
return Joi.object({
|
|
854
|
-
divider_strokes: Joi.string().allow(""),
|
|
855
|
-
highlight: Joi.string().allow(""),
|
|
856
|
-
});
|
|
857
|
-
}
|
|
858
|
-
|
|
859
689
|
/** @returns {DummyResponse} */
|
|
860
690
|
static DummyResponse() {
|
|
861
691
|
return Joi.object({
|
|
@@ -921,37 +751,6 @@ class ThemePlatformModel {
|
|
|
921
751
|
});
|
|
922
752
|
}
|
|
923
753
|
|
|
924
|
-
/** @returns {FooterSetting} */
|
|
925
|
-
static FooterSetting() {
|
|
926
|
-
return Joi.object({
|
|
927
|
-
footer_background: Joi.string().allow(""),
|
|
928
|
-
footer_body_text: Joi.string().allow(""),
|
|
929
|
-
footer_bottom_background: Joi.string().allow(""),
|
|
930
|
-
footer_heading_text: Joi.string().allow(""),
|
|
931
|
-
footer_icon: Joi.string().allow(""),
|
|
932
|
-
});
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
/** @returns {GeneralSetting} */
|
|
936
|
-
static GeneralSetting() {
|
|
937
|
-
return Joi.object({
|
|
938
|
-
button: ThemePlatformModel.ButtonSetting(),
|
|
939
|
-
footer: ThemePlatformModel.FooterSetting(),
|
|
940
|
-
header: ThemePlatformModel.HeaderSetting(),
|
|
941
|
-
sale_discount: ThemePlatformModel.SaleDiscountSetting(),
|
|
942
|
-
text: ThemePlatformModel.TextSetting(),
|
|
943
|
-
theme: ThemePlatformModel.ThemeSetting(),
|
|
944
|
-
});
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
/** @returns {GlobalConfig} */
|
|
948
|
-
static GlobalConfig() {
|
|
949
|
-
return Joi.object({
|
|
950
|
-
custom: ThemePlatformModel.CustomConfig(),
|
|
951
|
-
statics: ThemePlatformModel.StaticConfig(),
|
|
952
|
-
});
|
|
953
|
-
}
|
|
954
|
-
|
|
955
754
|
/** @returns {GlobalSchema} */
|
|
956
755
|
static GlobalSchema() {
|
|
957
756
|
return Joi.object({
|
|
@@ -959,15 +758,6 @@ class ThemePlatformModel {
|
|
|
959
758
|
});
|
|
960
759
|
}
|
|
961
760
|
|
|
962
|
-
/** @returns {HeaderSetting} */
|
|
963
|
-
static HeaderSetting() {
|
|
964
|
-
return Joi.object({
|
|
965
|
-
header_background: Joi.string().allow(""),
|
|
966
|
-
header_icon: Joi.string().allow(""),
|
|
967
|
-
header_nav: Joi.string().allow(""),
|
|
968
|
-
});
|
|
969
|
-
}
|
|
970
|
-
|
|
971
761
|
/** @returns {ImagePickerProp} */
|
|
972
762
|
static ImagePickerProp() {
|
|
973
763
|
return Joi.object({
|
|
@@ -1005,14 +795,6 @@ class ThemePlatformModel {
|
|
|
1005
795
|
});
|
|
1006
796
|
}
|
|
1007
797
|
|
|
1008
|
-
/** @returns {OverlayPopupSetting} */
|
|
1009
|
-
static OverlayPopupSetting() {
|
|
1010
|
-
return Joi.object({
|
|
1011
|
-
dialog_backgroung: Joi.string().allow(""),
|
|
1012
|
-
overlay: Joi.string().allow(""),
|
|
1013
|
-
});
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
798
|
/** @returns {Page} */
|
|
1017
799
|
static Page() {
|
|
1018
800
|
return Joi.object({
|
|
@@ -1026,14 +808,6 @@ class ThemePlatformModel {
|
|
|
1026
808
|
});
|
|
1027
809
|
}
|
|
1028
810
|
|
|
1029
|
-
/** @returns {PaletteConfig} */
|
|
1030
|
-
static PaletteConfig() {
|
|
1031
|
-
return Joi.object({
|
|
1032
|
-
advance_setting: ThemePlatformModel.AdvanceSetting(),
|
|
1033
|
-
general_setting: ThemePlatformModel.GeneralSetting(),
|
|
1034
|
-
});
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
811
|
/** @returns {Predicate} */
|
|
1038
812
|
static Predicate() {
|
|
1039
813
|
return Joi.object({
|
|
@@ -1085,16 +859,6 @@ class ThemePlatformModel {
|
|
|
1085
859
|
});
|
|
1086
860
|
}
|
|
1087
861
|
|
|
1088
|
-
/** @returns {SaleDiscountSetting} */
|
|
1089
|
-
static SaleDiscountSetting() {
|
|
1090
|
-
return Joi.object({
|
|
1091
|
-
sale_badge_background: Joi.string().allow(""),
|
|
1092
|
-
sale_badge_text: Joi.string().allow(""),
|
|
1093
|
-
sale_discount_text: Joi.string().allow(""),
|
|
1094
|
-
sale_timer: Joi.string().allow(""),
|
|
1095
|
-
});
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
862
|
/** @returns {Screen} */
|
|
1099
863
|
static Screen() {
|
|
1100
864
|
return Joi.object({
|
|
@@ -1142,22 +906,6 @@ class ThemePlatformModel {
|
|
|
1142
906
|
});
|
|
1143
907
|
}
|
|
1144
908
|
|
|
1145
|
-
/** @returns {StaticConfig} */
|
|
1146
|
-
static StaticConfig() {
|
|
1147
|
-
return Joi.object({
|
|
1148
|
-
props: ThemePlatformModel.StaticProps(),
|
|
1149
|
-
});
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
/** @returns {StaticProps} */
|
|
1153
|
-
static StaticProps() {
|
|
1154
|
-
return Joi.object({
|
|
1155
|
-
auth: ThemePlatformModel.AuthConfig(),
|
|
1156
|
-
colors: ThemePlatformModel.Colors(),
|
|
1157
|
-
palette: ThemePlatformModel.PaletteConfig(),
|
|
1158
|
-
});
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
909
|
/** @returns {TextProp} */
|
|
1162
910
|
static TextProp() {
|
|
1163
911
|
return Joi.object({
|
|
@@ -1166,16 +914,6 @@ class ThemePlatformModel {
|
|
|
1166
914
|
});
|
|
1167
915
|
}
|
|
1168
916
|
|
|
1169
|
-
/** @returns {TextSetting} */
|
|
1170
|
-
static TextSetting() {
|
|
1171
|
-
return Joi.object({
|
|
1172
|
-
text_body: Joi.string().allow(""),
|
|
1173
|
-
text_heading: Joi.string().allow(""),
|
|
1174
|
-
text_label: Joi.string().allow(""),
|
|
1175
|
-
text_secondary: Joi.string().allow(""),
|
|
1176
|
-
});
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
917
|
/** @returns {ThemeConfiguration} */
|
|
1180
918
|
static ThemeConfiguration() {
|
|
1181
919
|
return Joi.object({
|
|
@@ -1220,14 +958,6 @@ class ThemePlatformModel {
|
|
|
1220
958
|
});
|
|
1221
959
|
}
|
|
1222
960
|
|
|
1223
|
-
/** @returns {ThemeSetting} */
|
|
1224
|
-
static ThemeSetting() {
|
|
1225
|
-
return Joi.object({
|
|
1226
|
-
page_background: Joi.string().allow(""),
|
|
1227
|
-
theme_accent: Joi.string().allow(""),
|
|
1228
|
-
});
|
|
1229
|
-
}
|
|
1230
|
-
|
|
1231
961
|
/** @returns {ThemesSchema} */
|
|
1232
962
|
static ThemesSchema() {
|
|
1233
963
|
return Joi.object({
|
|
@@ -1305,17 +1035,5 @@ class ThemePlatformModel {
|
|
|
1305
1035
|
value: Joi.string().allow(""),
|
|
1306
1036
|
});
|
|
1307
1037
|
}
|
|
1308
|
-
|
|
1309
|
-
/** @returns {UserAlertsSetting} */
|
|
1310
|
-
static UserAlertsSetting() {
|
|
1311
|
-
return Joi.object({
|
|
1312
|
-
error_background: Joi.string().allow(""),
|
|
1313
|
-
error_text: Joi.string().allow(""),
|
|
1314
|
-
info_background: Joi.string().allow(""),
|
|
1315
|
-
info_text: Joi.string().allow(""),
|
|
1316
|
-
success_background: Joi.string().allow(""),
|
|
1317
|
-
success_text: Joi.string().allow(""),
|
|
1318
|
-
});
|
|
1319
|
-
}
|
|
1320
1038
|
}
|
|
1321
1039
|
module.exports = ThemePlatformModel;
|
|
@@ -193,9 +193,7 @@ export = WebhookPlatformModel;
|
|
|
193
193
|
* @property {number[]} [event_id]
|
|
194
194
|
* @property {number} [id]
|
|
195
195
|
* @property {string} [name]
|
|
196
|
-
* @property {
|
|
197
|
-
* inactive blocked: Subscriber is blocked by system due to multiple failed
|
|
198
|
-
* delivery attempts.
|
|
196
|
+
* @property {SubscriberStatus} [status]
|
|
199
197
|
* @property {string} [webhook_url]
|
|
200
198
|
*/
|
|
201
199
|
/**
|
|
@@ -213,9 +211,7 @@ export = WebhookPlatformModel;
|
|
|
213
211
|
* @property {EventConfig[]} [event_configs]
|
|
214
212
|
* @property {number} [id]
|
|
215
213
|
* @property {string} [name]
|
|
216
|
-
* @property {
|
|
217
|
-
* inactive blocked: Subscriber is blocked by system due to multiple failed
|
|
218
|
-
* delivery attempts.
|
|
214
|
+
* @property {SubscriberStatus} [status]
|
|
219
215
|
* @property {string} [updated_on]
|
|
220
216
|
* @property {string} [webhook_url]
|
|
221
217
|
*/
|
|
@@ -228,10 +224,11 @@ export = WebhookPlatformModel;
|
|
|
228
224
|
* @property {string} [name] - The name of the uploaded report file.
|
|
229
225
|
* @property {string} [url] - The URL of the uploaded report file.
|
|
230
226
|
*/
|
|
227
|
+
/** @typedef {"active" | "inactive" | "blocked"} SubscriberStatus */
|
|
231
228
|
declare class WebhookPlatformModel {
|
|
232
229
|
}
|
|
233
230
|
declare namespace WebhookPlatformModel {
|
|
234
|
-
export { Association, AssociationDetails, AuthMeta, CancelResponse, CdnObject, Error, Event, EventConfig, EventConfigResponse, EventCountItem, EventProcessedSuccessResponse, EventProcessReportObject, EventProcessReports, EventProcessRequest, EventSuccessResponse, FailedEventsCountSuccessResponse, FilterResponseObject, FilterValues, HistoryFilters, HistoryPayload, HistoryResponse, HistoryResponseObject, ManualRetryFailedResponse, Page, PingWebhook, PingWebhookResponse, ReportFilterResponse, ReportFiltersPayload, RetryStatusResponse, SubscriberConfig, SubscriberConfigList, SubscriberResponse, UploadServiceObject, Url };
|
|
231
|
+
export { Association, AssociationDetails, AuthMeta, CancelResponse, CdnObject, Error, Event, EventConfig, EventConfigResponse, EventCountItem, EventProcessedSuccessResponse, EventProcessReportObject, EventProcessReports, EventProcessRequest, EventSuccessResponse, FailedEventsCountSuccessResponse, FilterResponseObject, FilterValues, HistoryFilters, HistoryPayload, HistoryResponse, HistoryResponseObject, ManualRetryFailedResponse, Page, PingWebhook, PingWebhookResponse, ReportFilterResponse, ReportFiltersPayload, RetryStatusResponse, SubscriberConfig, SubscriberConfigList, SubscriberResponse, UploadServiceObject, Url, SubscriberStatus };
|
|
235
232
|
}
|
|
236
233
|
/** @returns {Association} */
|
|
237
234
|
declare function Association(): Association;
|
|
@@ -580,12 +577,7 @@ type SubscriberConfig = {
|
|
|
580
577
|
event_id?: number[];
|
|
581
578
|
id?: number;
|
|
582
579
|
name?: string;
|
|
583
|
-
|
|
584
|
-
* - Active: Status is active inactive: Status is
|
|
585
|
-
* inactive blocked: Subscriber is blocked by system due to multiple failed
|
|
586
|
-
* delivery attempts.
|
|
587
|
-
*/
|
|
588
|
-
status?: string;
|
|
580
|
+
status?: SubscriberStatus;
|
|
589
581
|
webhook_url?: string;
|
|
590
582
|
};
|
|
591
583
|
/** @returns {SubscriberConfigList} */
|
|
@@ -605,12 +597,7 @@ type SubscriberResponse = {
|
|
|
605
597
|
event_configs?: EventConfig[];
|
|
606
598
|
id?: number;
|
|
607
599
|
name?: string;
|
|
608
|
-
|
|
609
|
-
* - Active: Status is active inactive: Status is
|
|
610
|
-
* inactive blocked: Subscriber is blocked by system due to multiple failed
|
|
611
|
-
* delivery attempts.
|
|
612
|
-
*/
|
|
613
|
-
status?: string;
|
|
600
|
+
status?: SubscriberStatus;
|
|
614
601
|
updated_on?: string;
|
|
615
602
|
webhook_url?: string;
|
|
616
603
|
};
|
|
@@ -631,3 +618,10 @@ type Url = {
|
|
|
631
618
|
*/
|
|
632
619
|
url?: string;
|
|
633
620
|
};
|
|
621
|
+
/**
|
|
622
|
+
* Enum: SubscriberStatus Used By: Webhook
|
|
623
|
+
*
|
|
624
|
+
* @returns {SubscriberStatus}
|
|
625
|
+
*/
|
|
626
|
+
declare function SubscriberStatus(): SubscriberStatus;
|
|
627
|
+
type SubscriberStatus = "active" | "inactive" | "blocked";
|
|
@@ -223,9 +223,7 @@ const Joi = require("joi");
|
|
|
223
223
|
* @property {number[]} [event_id]
|
|
224
224
|
* @property {number} [id]
|
|
225
225
|
* @property {string} [name]
|
|
226
|
-
* @property {
|
|
227
|
-
* inactive blocked: Subscriber is blocked by system due to multiple failed
|
|
228
|
-
* delivery attempts.
|
|
226
|
+
* @property {SubscriberStatus} [status]
|
|
229
227
|
* @property {string} [webhook_url]
|
|
230
228
|
*/
|
|
231
229
|
|
|
@@ -245,9 +243,7 @@ const Joi = require("joi");
|
|
|
245
243
|
* @property {EventConfig[]} [event_configs]
|
|
246
244
|
* @property {number} [id]
|
|
247
245
|
* @property {string} [name]
|
|
248
|
-
* @property {
|
|
249
|
-
* inactive blocked: Subscriber is blocked by system due to multiple failed
|
|
250
|
-
* delivery attempts.
|
|
246
|
+
* @property {SubscriberStatus} [status]
|
|
251
247
|
* @property {string} [updated_on]
|
|
252
248
|
* @property {string} [webhook_url]
|
|
253
249
|
*/
|
|
@@ -263,6 +259,8 @@ const Joi = require("joi");
|
|
|
263
259
|
* @property {string} [url] - The URL of the uploaded report file.
|
|
264
260
|
*/
|
|
265
261
|
|
|
262
|
+
/** @typedef {"active" | "inactive" | "blocked"} SubscriberStatus */
|
|
263
|
+
|
|
266
264
|
class WebhookPlatformModel {
|
|
267
265
|
/** @returns {Association} */
|
|
268
266
|
static Association() {
|
|
@@ -540,7 +538,7 @@ class WebhookPlatformModel {
|
|
|
540
538
|
event_id: Joi.array().items(Joi.number()),
|
|
541
539
|
id: Joi.number(),
|
|
542
540
|
name: Joi.string().allow(""),
|
|
543
|
-
status:
|
|
541
|
+
status: WebhookPlatformModel.SubscriberStatus(),
|
|
544
542
|
webhook_url: Joi.string().allow(""),
|
|
545
543
|
});
|
|
546
544
|
}
|
|
@@ -564,7 +562,7 @@ class WebhookPlatformModel {
|
|
|
564
562
|
event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()),
|
|
565
563
|
id: Joi.number(),
|
|
566
564
|
name: Joi.string().allow(""),
|
|
567
|
-
status:
|
|
565
|
+
status: WebhookPlatformModel.SubscriberStatus(),
|
|
568
566
|
updated_on: Joi.string().allow(""),
|
|
569
567
|
webhook_url: Joi.string().allow(""),
|
|
570
568
|
});
|
|
@@ -584,5 +582,20 @@ class WebhookPlatformModel {
|
|
|
584
582
|
url: Joi.string().allow(""),
|
|
585
583
|
});
|
|
586
584
|
}
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Enum: SubscriberStatus Used By: Webhook
|
|
588
|
+
*
|
|
589
|
+
* @returns {SubscriberStatus}
|
|
590
|
+
*/
|
|
591
|
+
static SubscriberStatus() {
|
|
592
|
+
return Joi.string().valid(
|
|
593
|
+
"active",
|
|
594
|
+
|
|
595
|
+
"inactive",
|
|
596
|
+
|
|
597
|
+
"blocked"
|
|
598
|
+
);
|
|
599
|
+
}
|
|
587
600
|
}
|
|
588
601
|
module.exports = WebhookPlatformModel;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function sign(request: any): any;
|