@gofynd/fdk-client-javascript 1.4.15-beta.1 → 1.4.15-beta.10
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/README.md +2 -2
- package/application.d.ts +1 -2
- package/application.js +2 -3
- package/index.d.ts +1 -2
- package/index.js +7 -1
- package/package.json +2 -3
- package/sdk/application/ApplicationClient.js +0 -18
- package/sdk/application/Cart/CartApplicationClient.d.ts +55 -90
- package/sdk/application/Cart/CartApplicationClient.js +60 -1185
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +80 -142
- package/sdk/application/Catalog/CatalogApplicationClient.js +148 -1293
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -8
- package/sdk/application/Common/CommonApplicationClient.js +5 -89
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
- package/sdk/application/Communication/CommunicationApplicationClient.js +6 -145
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -73
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +31 -718
- package/sdk/application/Content/ContentApplicationClient.d.ts +46 -78
- package/sdk/application/Content/ContentApplicationClient.js +77 -914
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +9 -12
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +22 -125
- package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -18
- package/sdk/application/Lead/LeadApplicationClient.js +32 -202
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +22 -39
- package/sdk/application/Logistic/LogisticApplicationClient.js +50 -478
- package/sdk/application/Order/OrderApplicationClient.d.ts +22 -42
- package/sdk/application/Order/OrderApplicationClient.js +86 -472
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +92 -212
- package/sdk/application/Payment/PaymentApplicationClient.js +57 -2102
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -28
- package/sdk/application/Rewards/RewardsApplicationClient.js +16 -305
- package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
- package/sdk/application/Share/ShareApplicationClient.js +34 -294
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
- package/sdk/application/Theme/ThemeApplicationClient.js +28 -162
- package/sdk/application/User/UserApplicationClient.d.ts +85 -136
- package/sdk/application/User/UserApplicationClient.js +45 -1815
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +2 -5
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -47
- package/sdk/application/index.d.ts +0 -18
- package/sdk/application/index.js +0 -33
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +2 -0
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +2 -0
- package/sdk/partner/OAuthClient.js +1 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +3 -40
- package/sdk/partner/Theme/ThemePartnerModel.js +2 -24
- package/sdk/platform/Cart/CartPlatformModel.d.ts +28 -0
- package/sdk/platform/Cart/CartPlatformModel.js +12 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +0 -7
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +14 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +6 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +3 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +3 -0
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +3 -1
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +3 -0
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +16 -1
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +20 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +10 -0
- package/sdk/platform/Order/OrderPlatformClient.js +99 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +7 -0
- package/sdk/platform/Order/OrderPlatformModel.js +3 -0
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +4 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +56 -19
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +42 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +3 -3
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +2 -2
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +3 -40
- package/sdk/platform/Theme/ThemePlatformModel.js +2 -24
- package/sdk/public/Configuration/ConfigurationPublicClient.js +5 -2
- package/sdk/public/Content/ContentPublicClient.d.ts +1 -1
- package/sdk/public/Content/ContentPublicClient.js +14 -2
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +14 -2
- package/sdk/public/Webhook/WebhookPublicClient.js +5 -2
- package/sdk/application/Cart/CartApplicationModel.d.ts +0 -3994
- package/sdk/application/Cart/CartApplicationModel.js +0 -2497
- package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -769
- package/sdk/application/Cart/CartApplicationValidator.js +0 -530
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3857
- package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2629
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -791
- package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -551
- package/sdk/application/Common/CommonApplicationModel.d.ts +0 -449
- package/sdk/application/Common/CommonApplicationModel.js +0 -308
- package/sdk/application/Common/CommonApplicationValidator.d.ts +0 -46
- package/sdk/application/Common/CommonApplicationValidator.js +0 -38
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +0 -293
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -201
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +0 -29
- package/sdk/application/Communication/CommunicationApplicationValidator.js +0 -38
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +0 -2556
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1887
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +0 -179
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +0 -176
- package/sdk/application/Content/ContentApplicationModel.d.ts +0 -2133
- package/sdk/application/Content/ContentApplicationModel.js +0 -1589
- package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -284
- package/sdk/application/Content/ContentApplicationValidator.js +0 -264
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -272
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -190
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
- package/sdk/application/Lead/LeadApplicationModel.d.ts +0 -590
- package/sdk/application/Lead/LeadApplicationModel.js +0 -480
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +0 -68
- package/sdk/application/Lead/LeadApplicationValidator.js +0 -71
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +0 -1675
- package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1121
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -254
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -190
- package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2296
- package/sdk/application/Order/OrderApplicationModel.js +0 -1471
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -265
- package/sdk/application/Order/OrderApplicationValidator.js +0 -197
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4058
- package/sdk/application/Payment/PaymentApplicationModel.js +0 -2630
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +0 -576
- package/sdk/application/Payment/PaymentApplicationValidator.js +0 -594
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +0 -365
- package/sdk/application/Rewards/RewardsApplicationModel.js +0 -396
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +0 -73
- package/sdk/application/Rewards/RewardsApplicationValidator.js +0 -84
- package/sdk/application/Share/ShareApplicationModel.d.ts +0 -339
- package/sdk/application/Share/ShareApplicationModel.js +0 -234
- package/sdk/application/Share/ShareApplicationValidator.d.ts +0 -90
- package/sdk/application/Share/ShareApplicationValidator.js +0 -91
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +0 -1713
- package/sdk/application/Theme/ThemeApplicationModel.js +0 -1426
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -66
- package/sdk/application/Theme/ThemeApplicationValidator.js +0 -58
- package/sdk/application/User/UserApplicationModel.d.ts +0 -1943
- package/sdk/application/User/UserApplicationModel.js +0 -1382
- package/sdk/application/User/UserApplicationValidator.d.ts +0 -560
- package/sdk/application/User/UserApplicationValidator.js +0 -573
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +0 -52
- package/sdk/application/Webhook/WebhookApplicationModel.js +0 -46
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +0 -16
- package/sdk/application/Webhook/WebhookApplicationValidator.js +0 -19
- package/sdk/common/Clickstream.d.ts +0 -1
- package/sdk/common/Clickstream.js +0 -464
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
const Joi = require("joi");
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @typedef CommunicationConsentReq
|
|
5
|
-
* @property {string} [response] - Whether the user has responded to the inquiry
|
|
6
|
-
* regarding their preference for opting in or out of receiving communications.
|
|
7
|
-
* @property {string} [action] - The user's choice to opt in or opt out of
|
|
8
|
-
* receiving communications.
|
|
9
|
-
* @property {string} [channel] - The channel of communication the user has
|
|
10
|
-
* agreed to receive messages through.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @typedef CommunicationConsentRes
|
|
15
|
-
* @property {string} [app_id] - The ID of the sales channel where the user has
|
|
16
|
-
* given their consent.
|
|
17
|
-
* @property {string} [user_id] - Identifier which can uniquely identify the user.
|
|
18
|
-
* @property {CommunicationConsentChannels} [channels]
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @typedef CommunicationConsentChannelsEmail
|
|
23
|
-
* @property {string} [response] - The user's choice to opt in or opt out of
|
|
24
|
-
* receiving communications.
|
|
25
|
-
* @property {string} [display_name] - Name of the channel of communication the
|
|
26
|
-
* user has agreed to receive messages through.
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @typedef CommunicationConsentChannelsSms
|
|
31
|
-
* @property {string} [response] - The user's choice to opt in or opt out of
|
|
32
|
-
* receiving communications.
|
|
33
|
-
* @property {string} [display_name] - Name of the channel of communication the
|
|
34
|
-
* user has agreed to receive messages through.
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* @typedef CommunicationConsentChannelsWhatsapp
|
|
39
|
-
* @property {string} [response] - The user's choice to opt in or opt out of
|
|
40
|
-
* receiving communications.
|
|
41
|
-
* @property {string} [display_name] - Name of the channel of communication the
|
|
42
|
-
* user has agreed to receive messages through.
|
|
43
|
-
* @property {string} [country_code] - Alphanumeric identification code for the
|
|
44
|
-
* users country.
|
|
45
|
-
* @property {string} [phone_number] - Phone number of the user that the user
|
|
46
|
-
* has accepted to receive communication through WhatsApp.
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @typedef CommunicationConsentChannels
|
|
51
|
-
* @property {CommunicationConsentChannelsEmail} [email]
|
|
52
|
-
* @property {CommunicationConsentChannelsSms} [sms]
|
|
53
|
-
* @property {CommunicationConsentChannelsWhatsapp} [whatsapp]
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @typedef CommunicationConsent
|
|
58
|
-
* @property {string} [app_id] - The ID of the sales channel where the user has
|
|
59
|
-
* given their consent.
|
|
60
|
-
* @property {string} [user_id] - Identifier which can uniquely identify the user.
|
|
61
|
-
* @property {CommunicationConsentChannels} [channels]
|
|
62
|
-
*/
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* @typedef BadRequestSchema
|
|
66
|
-
* @property {string} [status] - Error code indicating the type of issue.
|
|
67
|
-
* @property {string} [message] - Error message providing details about the error.
|
|
68
|
-
*/
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* @typedef PushtokenReq
|
|
72
|
-
* @property {string} [action] - The type of operation to perform with the push
|
|
73
|
-
* token, such as create, update, or reset.
|
|
74
|
-
* @property {string} [bundle_identifier] - Unique identifier used to identify a bundle.
|
|
75
|
-
* @property {string} [push_token] - A string of codes containing comprehensive
|
|
76
|
-
* data that identifies a identity of requester.
|
|
77
|
-
* @property {string} [unique_device_id] - Unique identifier used to identify a device.
|
|
78
|
-
* @property {string} [type] - Source address of the requestee.
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* @typedef PushtokenRes
|
|
83
|
-
* @property {string} [_id] - Key used to uniquely identify document that
|
|
84
|
-
* contains push token credentials.
|
|
85
|
-
* @property {string} [bundle_identifier] - Unique identifier used to identify a bundle.
|
|
86
|
-
* @property {string} [push_token] - A string of codes containing comprehensive
|
|
87
|
-
* data that identifies a identity of requester.
|
|
88
|
-
* @property {string} [unique_device_id] - Unique identifier used to identify a device.
|
|
89
|
-
* @property {string} [type] - Source address of the requester.
|
|
90
|
-
* @property {string} [platform] - Source address of the requester.
|
|
91
|
-
* @property {string} [application_id] - The ID of the sales channel associated
|
|
92
|
-
* with the push token.
|
|
93
|
-
* @property {string} [user_id] - Identifier which can uniquely identify the user.
|
|
94
|
-
* @property {string} [created_at] - The timestamp indicating when a record was
|
|
95
|
-
* initially created.
|
|
96
|
-
* @property {string} [updated_at] - The timestamp indicating when a record was
|
|
97
|
-
* last modified or updated.
|
|
98
|
-
* @property {string} [expired_at] - The timestamp indicating when a record is
|
|
99
|
-
* set to expire or become invalid.
|
|
100
|
-
*/
|
|
101
|
-
|
|
102
|
-
class CommunicationApplicationModel {
|
|
103
|
-
/** @returns {CommunicationConsentReq} */
|
|
104
|
-
static CommunicationConsentReq() {
|
|
105
|
-
return Joi.object({
|
|
106
|
-
response: Joi.string().allow(""),
|
|
107
|
-
action: Joi.string().allow(""),
|
|
108
|
-
channel: Joi.string().allow(""),
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/** @returns {CommunicationConsentRes} */
|
|
113
|
-
static CommunicationConsentRes() {
|
|
114
|
-
return Joi.object({
|
|
115
|
-
app_id: Joi.string().allow(""),
|
|
116
|
-
user_id: Joi.string().allow(""),
|
|
117
|
-
channels: CommunicationApplicationModel.CommunicationConsentChannels(),
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/** @returns {CommunicationConsentChannelsEmail} */
|
|
122
|
-
static CommunicationConsentChannelsEmail() {
|
|
123
|
-
return Joi.object({
|
|
124
|
-
response: Joi.string().allow(""),
|
|
125
|
-
display_name: Joi.string().allow(""),
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/** @returns {CommunicationConsentChannelsSms} */
|
|
130
|
-
static CommunicationConsentChannelsSms() {
|
|
131
|
-
return Joi.object({
|
|
132
|
-
response: Joi.string().allow(""),
|
|
133
|
-
display_name: Joi.string().allow(""),
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/** @returns {CommunicationConsentChannelsWhatsapp} */
|
|
138
|
-
static CommunicationConsentChannelsWhatsapp() {
|
|
139
|
-
return Joi.object({
|
|
140
|
-
response: Joi.string().allow(""),
|
|
141
|
-
display_name: Joi.string().allow(""),
|
|
142
|
-
country_code: Joi.string().allow(""),
|
|
143
|
-
phone_number: Joi.string().allow(""),
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/** @returns {CommunicationConsentChannels} */
|
|
148
|
-
static CommunicationConsentChannels() {
|
|
149
|
-
return Joi.object({
|
|
150
|
-
email: CommunicationApplicationModel.CommunicationConsentChannelsEmail(),
|
|
151
|
-
sms: CommunicationApplicationModel.CommunicationConsentChannelsSms(),
|
|
152
|
-
whatsapp: CommunicationApplicationModel.CommunicationConsentChannelsWhatsapp(),
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/** @returns {CommunicationConsent} */
|
|
157
|
-
static CommunicationConsent() {
|
|
158
|
-
return Joi.object({
|
|
159
|
-
app_id: Joi.string().allow(""),
|
|
160
|
-
user_id: Joi.string().allow(""),
|
|
161
|
-
channels: CommunicationApplicationModel.CommunicationConsentChannels(),
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/** @returns {BadRequestSchema} */
|
|
166
|
-
static BadRequestSchema() {
|
|
167
|
-
return Joi.object({
|
|
168
|
-
status: Joi.string().allow(""),
|
|
169
|
-
message: Joi.string().allow(""),
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/** @returns {PushtokenReq} */
|
|
174
|
-
static PushtokenReq() {
|
|
175
|
-
return Joi.object({
|
|
176
|
-
action: Joi.string().allow(""),
|
|
177
|
-
bundle_identifier: Joi.string().allow(""),
|
|
178
|
-
push_token: Joi.string().allow(""),
|
|
179
|
-
unique_device_id: Joi.string().allow(""),
|
|
180
|
-
type: Joi.string().allow(""),
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/** @returns {PushtokenRes} */
|
|
185
|
-
static PushtokenRes() {
|
|
186
|
-
return Joi.object({
|
|
187
|
-
_id: Joi.string().allow(""),
|
|
188
|
-
bundle_identifier: Joi.string().allow(""),
|
|
189
|
-
push_token: Joi.string().allow(""),
|
|
190
|
-
unique_device_id: Joi.string().allow(""),
|
|
191
|
-
type: Joi.string().allow(""),
|
|
192
|
-
platform: Joi.string().allow(""),
|
|
193
|
-
application_id: Joi.string().allow(""),
|
|
194
|
-
user_id: Joi.string().allow(""),
|
|
195
|
-
created_at: Joi.string().allow(""),
|
|
196
|
-
updated_at: Joi.string().allow(""),
|
|
197
|
-
expired_at: Joi.string().allow(""),
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
module.exports = CommunicationApplicationModel;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export = CommunicationApplicationValidator;
|
|
2
|
-
/** @typedef GetCommunicationConsentParam */
|
|
3
|
-
/**
|
|
4
|
-
* @typedef UpsertAppPushtokenParam
|
|
5
|
-
* @property {CommunicationApplicationModel.PushtokenReq} body
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* @typedef UpsertCommunicationConsentParam
|
|
9
|
-
* @property {CommunicationApplicationModel.CommunicationConsentReq} body
|
|
10
|
-
*/
|
|
11
|
-
declare class CommunicationApplicationValidator {
|
|
12
|
-
/** @returns {GetCommunicationConsentParam} */
|
|
13
|
-
static getCommunicationConsent(): any;
|
|
14
|
-
/** @returns {UpsertAppPushtokenParam} */
|
|
15
|
-
static upsertAppPushtoken(): UpsertAppPushtokenParam;
|
|
16
|
-
/** @returns {UpsertCommunicationConsentParam} */
|
|
17
|
-
static upsertCommunicationConsent(): UpsertCommunicationConsentParam;
|
|
18
|
-
}
|
|
19
|
-
declare namespace CommunicationApplicationValidator {
|
|
20
|
-
export { GetCommunicationConsentParam, UpsertAppPushtokenParam, UpsertCommunicationConsentParam };
|
|
21
|
-
}
|
|
22
|
-
type UpsertAppPushtokenParam = {
|
|
23
|
-
body: CommunicationApplicationModel.PushtokenReq;
|
|
24
|
-
};
|
|
25
|
-
type UpsertCommunicationConsentParam = {
|
|
26
|
-
body: CommunicationApplicationModel.CommunicationConsentReq;
|
|
27
|
-
};
|
|
28
|
-
type GetCommunicationConsentParam = any;
|
|
29
|
-
import CommunicationApplicationModel = require("./CommunicationApplicationModel");
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
const Joi = require("joi");
|
|
2
|
-
|
|
3
|
-
const CommunicationApplicationModel = require("./CommunicationApplicationModel");
|
|
4
|
-
|
|
5
|
-
/** @typedef GetCommunicationConsentParam */
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @typedef UpsertAppPushtokenParam
|
|
9
|
-
* @property {CommunicationApplicationModel.PushtokenReq} body
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @typedef UpsertCommunicationConsentParam
|
|
14
|
-
* @property {CommunicationApplicationModel.CommunicationConsentReq} body
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
class CommunicationApplicationValidator {
|
|
18
|
-
/** @returns {GetCommunicationConsentParam} */
|
|
19
|
-
static getCommunicationConsent() {
|
|
20
|
-
return Joi.object({});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/** @returns {UpsertAppPushtokenParam} */
|
|
24
|
-
static upsertAppPushtoken() {
|
|
25
|
-
return Joi.object({
|
|
26
|
-
body: CommunicationApplicationModel.PushtokenReq().required(),
|
|
27
|
-
}).required();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/** @returns {UpsertCommunicationConsentParam} */
|
|
31
|
-
static upsertCommunicationConsent() {
|
|
32
|
-
return Joi.object({
|
|
33
|
-
body: CommunicationApplicationModel.CommunicationConsentReq().required(),
|
|
34
|
-
}).required();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
module.exports = CommunicationApplicationValidator;
|