@gofynd/fdk-client-javascript 1.4.1 → 1.4.2-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 +1 -1
- package/package.json +3 -2
- package/sdk/application/ApplicationClient.js +20 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +3 -5
- package/sdk/application/Cart/CartApplicationModel.d.ts +1634 -1742
- package/sdk/application/Cart/CartApplicationModel.js +1388 -1464
- package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -4
- package/sdk/application/Cart/CartApplicationValidator.js +0 -4
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -3
- package/sdk/application/Catalog/CatalogApplicationClient.js +20 -7
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
- package/sdk/application/Catalog/CatalogApplicationModel.js +1613 -1613
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +14 -0
- package/sdk/application/Catalog/CatalogApplicationValidator.js +6 -0
- package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
- package/sdk/application/Common/CommonApplicationModel.js +172 -172
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
- package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1492 -1626
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1038 -1180
- package/sdk/application/Content/ContentApplicationClient.d.ts +0 -36
- package/sdk/application/Content/ContentApplicationClient.js +0 -246
- package/sdk/application/Content/ContentApplicationModel.d.ts +546 -753
- package/sdk/application/Content/ContentApplicationModel.js +565 -817
- package/sdk/application/Content/ContentApplicationValidator.d.ts +1 -40
- package/sdk/application/Content/ContentApplicationValidator.js +0 -41
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
- package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
- package/sdk/application/Lead/LeadApplicationModel.js +301 -301
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +0 -67
- package/sdk/application/Logistic/LogisticApplicationClient.js +0 -547
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +257 -712
- package/sdk/application/Logistic/LogisticApplicationModel.js +267 -755
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +1 -211
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -131
- package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
- package/sdk/application/Order/OrderApplicationClient.js +8 -32
- package/sdk/application/Order/OrderApplicationModel.d.ts +845 -853
- package/sdk/application/Order/OrderApplicationModel.js +816 -824
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -20
- package/sdk/application/Order/OrderApplicationValidator.js +0 -8
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -46
- package/sdk/application/Payment/PaymentApplicationClient.js +10 -341
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +1892 -2199
- package/sdk/application/Payment/PaymentApplicationModel.js +1235 -1506
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +14 -59
- package/sdk/application/Payment/PaymentApplicationValidator.js +10 -64
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1396 -1429
- package/sdk/application/PosCart/PosCartApplicationModel.js +1233 -1257
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
- package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
- package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
- package/sdk/application/Share/ShareApplicationModel.js +121 -121
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.js +3 -7
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +783 -969
- package/sdk/application/Theme/ThemeApplicationModel.js +571 -867
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -10
- package/sdk/application/Theme/ThemeApplicationValidator.js +0 -4
- package/sdk/application/User/UserApplicationClient.d.ts +0 -33
- package/sdk/application/User/UserApplicationClient.js +0 -239
- package/sdk/application/User/UserApplicationModel.d.ts +753 -768
- package/sdk/application/User/UserApplicationModel.js +731 -755
- package/sdk/application/User/UserApplicationValidator.d.ts +1 -34
- package/sdk/application/User/UserApplicationValidator.js +0 -36
- package/sdk/common/Clickstream.d.ts +1 -0
- package/sdk/common/Clickstream.js +254 -0
- package/sdk/common/Utility.js +1 -4
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +72 -60
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +70 -58
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +0 -10
- package/sdk/partner/Theme/ThemePartnerClient.js +0 -80
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1178 -1153
- package/sdk/partner/Theme/ThemePartnerModel.js +830 -974
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +0 -1
- package/sdk/partner/Theme/ThemePartnerValidator.js +0 -9
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +1 -11
- package/sdk/platform/Billing/BillingPlatformClient.js +3 -110
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +734 -800
- package/sdk/platform/Billing/BillingPlatformModel.js +732 -810
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +4 -43
- package/sdk/platform/Billing/BillingPlatformValidator.js +2 -29
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +11 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +81 -7
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +13 -5
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +12 -4
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3223 -3328
- package/sdk/platform/Cart/CartPlatformModel.js +2875 -2946
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +11 -15
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +21 -52
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +0 -27
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +0 -11
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +15 -27
- package/sdk/platform/Catalog/CatalogPlatformClient.js +93 -189
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +617 -920
- package/sdk/platform/Catalog/CatalogPlatformModel.js +584 -919
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +27 -41
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +19 -31
- package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
- package/sdk/platform/Common/CommonPlatformModel.js +187 -187
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +37 -139
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +52 -737
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +3 -133
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -113
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1079 -1228
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1090 -1262
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -8
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +4 -32
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +629 -658
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +641 -675
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +0 -14
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +0 -6
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2992 -3231
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2092 -2303
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -391
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1074 -3656
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -351
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -410
- package/sdk/platform/Content/ContentPlatformModel.d.ts +972 -2071
- package/sdk/platform/Content/ContentPlatformModel.js +1039 -2355
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +174 -259
- package/sdk/platform/Discount/DiscountPlatformModel.js +163 -257
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +6 -16
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +8 -117
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -55
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -39
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +821 -892
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +833 -901
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -33
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -240
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +910 -1056
- package/sdk/platform/Finance/FinancePlatformModel.js +884 -1070
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +1 -38
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -38
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
- package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +28 -38
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +56 -137
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +29 -41
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +21 -33
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +601 -610
- package/sdk/platform/Lead/LeadPlatformModel.js +457 -471
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -11
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +1 -93
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -143
- package/sdk/platform/Order/OrderPlatformClient.js +160 -1190
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4451 -5275
- package/sdk/platform/Order/OrderPlatformModel.js +4039 -4994
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +21 -257
- package/sdk/platform/Order/OrderPlatformValidator.js +15 -216
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
- package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -119
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +40 -750
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +7 -143
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +6 -133
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2067 -2929
- package/sdk/platform/Payment/PaymentPlatformModel.js +1427 -2090
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/PlatformApplicationClient.js +4 -4
- package/sdk/platform/PlatformClient.d.ts +2 -4
- package/sdk/platform/PlatformClient.js +4 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
- package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +66 -142
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +147 -645
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +63 -131
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +47 -126
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +105 -217
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +349 -1138
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +990 -1589
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +986 -1702
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +133 -382
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +102 -266
- package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
- package/sdk/platform/Share/SharePlatformModel.js +139 -139
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +1 -11
- package/sdk/platform/Theme/ThemePlatformClient.js +3 -87
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +765 -1133
- package/sdk/platform/Theme/ThemePlatformModel.js +561 -1009
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +4 -28
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -21
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +1 -116
- package/sdk/platform/User/UserPlatformApplicationClient.js +86 -932
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -224
- package/sdk/platform/User/UserPlatformApplicationValidator.js +5 -173
- package/sdk/platform/User/UserPlatformModel.d.ts +428 -765
- package/sdk/platform/User/UserPlatformModel.js +428 -679
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +37 -45
- package/sdk/platform/Webhook/WebhookPlatformClient.js +57 -61
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +403 -448
- package/sdk/platform/Webhook/WebhookPlatformModel.js +309 -369
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
- package/sdk/platform/index.d.ts +1 -1
- package/sdk/platform/index.js +2 -2
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
- package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
- package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
- package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
- package/sdk/public/Partner/PartnerPublicModel.js +113 -113
- package/sdk/public/PublicClient.d.ts +0 -4
- package/sdk/public/PublicClient.js +0 -8
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +0 -33
- package/sdk/public/Webhook/WebhookPublicClient.js +0 -242
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +15 -161
- package/sdk/public/Webhook/WebhookPublicModel.js +13 -189
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +1 -23
- package/sdk/public/Webhook/WebhookPublicValidator.js +0 -31
- package/sdk/public/index.d.ts +0 -2
- package/sdk/public/index.js +0 -4
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -125
- package/sdk/partner/Lead/LeadPartnerClient.js +0 -785
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +0 -1127
- package/sdk/partner/Lead/LeadPartnerModel.js +0 -896
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -12
- package/sdk/partner/Lead/LeadPartnerValidator.js +0 -67
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +0 -155
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +0 -1195
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +0 -372
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +0 -442
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -16
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +0 -123
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +0 -99
- package/sdk/partner/Webhook/WebhookPartnerClient.js +0 -753
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +0 -566
- package/sdk/partner/Webhook/WebhookPartnerModel.js +0 -583
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -12
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +0 -74
- package/sdk/platform/Content/ContentPlatformClient.d.ts +0 -277
- package/sdk/platform/Content/ContentPlatformClient.js +0 -2011
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +0 -247
- package/sdk/platform/Content/ContentPlatformValidator.js +0 -319
- package/sdk/public/Billing/BillingPublicClient.d.ts +0 -23
- package/sdk/public/Billing/BillingPublicClient.js +0 -116
- package/sdk/public/Billing/BillingPublicModel.d.ts +0 -92
- package/sdk/public/Billing/BillingPublicModel.js +0 -96
- package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -18
- package/sdk/public/Billing/BillingPublicValidator.js +0 -19
- package/sdk/public/Content/ContentPublicClient.d.ts +0 -22
- package/sdk/public/Content/ContentPublicClient.js +0 -114
- package/sdk/public/Content/ContentPublicModel.d.ts +0 -53
- package/sdk/public/Content/ContentPublicModel.js +0 -60
- package/sdk/public/Content/ContentPublicValidator.d.ts +0 -18
- package/sdk/public/Content/ContentPublicValidator.js +0 -19
|
@@ -48,10 +48,6 @@ export = UserApplicationValidator;
|
|
|
48
48
|
* @typedef GetPlatformConfigParam
|
|
49
49
|
* @property {string} [name] - Name of the application, e.g. Fynd
|
|
50
50
|
*/
|
|
51
|
-
/**
|
|
52
|
-
* @typedef GetUserAttributesParam
|
|
53
|
-
* @property {string} [slug] - Filter by attribute slug.
|
|
54
|
-
*/
|
|
55
51
|
/** @typedef HasPasswordParam */
|
|
56
52
|
/**
|
|
57
53
|
* @typedef LoginWithAppleIOSParam
|
|
@@ -162,14 +158,6 @@ export = UserApplicationValidator;
|
|
|
162
158
|
* @property {string} [platform] - ID of the application
|
|
163
159
|
* @property {UserApplicationModel.EditProfileRequestSchema} body
|
|
164
160
|
*/
|
|
165
|
-
/**
|
|
166
|
-
* @typedef UpdateUserAttributesParam
|
|
167
|
-
* @property {UserApplicationModel.UpdateUserAttributesRequest} body
|
|
168
|
-
*/
|
|
169
|
-
/**
|
|
170
|
-
* @typedef UserExistsParam
|
|
171
|
-
* @property {string} q - Email id or phone number of user
|
|
172
|
-
*/
|
|
173
161
|
/**
|
|
174
162
|
* @typedef VerifyEmailParam
|
|
175
163
|
* @property {UserApplicationModel.CodeRequestBodySchema} body
|
|
@@ -217,8 +205,6 @@ declare class UserApplicationValidator {
|
|
|
217
205
|
static getLoggedInUser(): any;
|
|
218
206
|
/** @returns {GetPlatformConfigParam} */
|
|
219
207
|
static getPlatformConfig(): GetPlatformConfigParam;
|
|
220
|
-
/** @returns {GetUserAttributesParam} */
|
|
221
|
-
static getUserAttributes(): GetUserAttributesParam;
|
|
222
208
|
/** @returns {HasPasswordParam} */
|
|
223
209
|
static hasPassword(): any;
|
|
224
210
|
/** @returns {LoginWithAppleIOSParam} */
|
|
@@ -269,10 +255,6 @@ declare class UserApplicationValidator {
|
|
|
269
255
|
static updatePassword(): UpdatePasswordParam;
|
|
270
256
|
/** @returns {UpdateProfileParam} */
|
|
271
257
|
static updateProfile(): UpdateProfileParam;
|
|
272
|
-
/** @returns {UpdateUserAttributesParam} */
|
|
273
|
-
static updateUserAttributes(): UpdateUserAttributesParam;
|
|
274
|
-
/** @returns {UserExistsParam} */
|
|
275
|
-
static userExists(): UserExistsParam;
|
|
276
258
|
/** @returns {VerifyEmailParam} */
|
|
277
259
|
static verifyEmail(): VerifyEmailParam;
|
|
278
260
|
/** @returns {VerifyEmailForgotOTPParam} */
|
|
@@ -287,7 +269,7 @@ declare class UserApplicationValidator {
|
|
|
287
269
|
static verifyMobileOTP(): VerifyMobileOTPParam;
|
|
288
270
|
}
|
|
289
271
|
declare namespace UserApplicationValidator {
|
|
290
|
-
export { AddEmailParam, AddMobileNumberParam, DeleteEmailParam, DeleteMobileNumberParam, DeleteUserParam, ForgotPasswordParam, GetListOfActiveSessionsParam, GetLoggedInUserParam, GetPlatformConfigParam,
|
|
272
|
+
export { AddEmailParam, AddMobileNumberParam, DeleteEmailParam, DeleteMobileNumberParam, DeleteUserParam, ForgotPasswordParam, GetListOfActiveSessionsParam, GetLoggedInUserParam, GetPlatformConfigParam, HasPasswordParam, LoginWithAppleIOSParam, LoginWithEmailAndPasswordParam, LoginWithFacebookParam, LoginWithGoogleParam, LoginWithGoogleAndroidParam, LoginWithGoogleIOSParam, LoginWithOTPParam, LoginWithTokenParam, LogoutParam, RegisterWithFormParam, ResetForgotPasswordParam, SendForgotOTPOnEmailParam, SendForgotOTPOnMobileParam, SendOTPOnEmailParam, SendOTPOnMobileParam, SendResetPasswordEmailParam, SendResetPasswordMobileParam, SendResetTokenParam, SendVerificationLinkToEmailParam, SendVerificationLinkToMobileParam, SetEmailAsPrimaryParam, SetMobileNumberAsPrimaryParam, UpdatePasswordParam, UpdateProfileParam, VerifyEmailParam, VerifyEmailForgotOTPParam, VerifyEmailOTPParam, VerifyMobileParam, VerifyMobileForgotOTPParam, VerifyMobileOTPParam };
|
|
291
273
|
}
|
|
292
274
|
type AddEmailParam = {
|
|
293
275
|
/**
|
|
@@ -371,12 +353,6 @@ type GetPlatformConfigParam = {
|
|
|
371
353
|
*/
|
|
372
354
|
name?: string;
|
|
373
355
|
};
|
|
374
|
-
type GetUserAttributesParam = {
|
|
375
|
-
/**
|
|
376
|
-
* - Filter by attribute slug.
|
|
377
|
-
*/
|
|
378
|
-
slug?: string;
|
|
379
|
-
};
|
|
380
356
|
type LoginWithAppleIOSParam = {
|
|
381
357
|
/**
|
|
382
358
|
* - ID of the application
|
|
@@ -510,15 +486,6 @@ type UpdateProfileParam = {
|
|
|
510
486
|
platform?: string;
|
|
511
487
|
body: UserApplicationModel.EditProfileRequestSchema;
|
|
512
488
|
};
|
|
513
|
-
type UpdateUserAttributesParam = {
|
|
514
|
-
body: UserApplicationModel.UpdateUserAttributesRequest;
|
|
515
|
-
};
|
|
516
|
-
type UserExistsParam = {
|
|
517
|
-
/**
|
|
518
|
-
* - Email id or phone number of user
|
|
519
|
-
*/
|
|
520
|
-
q: string;
|
|
521
|
-
};
|
|
522
489
|
type VerifyEmailParam = {
|
|
523
490
|
body: UserApplicationModel.CodeRequestBodySchema;
|
|
524
491
|
};
|
|
@@ -60,11 +60,6 @@ const UserApplicationModel = require("./UserApplicationModel");
|
|
|
60
60
|
* @property {string} [name] - Name of the application, e.g. Fynd
|
|
61
61
|
*/
|
|
62
62
|
|
|
63
|
-
/**
|
|
64
|
-
* @typedef GetUserAttributesParam
|
|
65
|
-
* @property {string} [slug] - Filter by attribute slug.
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
63
|
/** @typedef HasPasswordParam */
|
|
69
64
|
|
|
70
65
|
/**
|
|
@@ -200,16 +195,6 @@ const UserApplicationModel = require("./UserApplicationModel");
|
|
|
200
195
|
* @property {UserApplicationModel.EditProfileRequestSchema} body
|
|
201
196
|
*/
|
|
202
197
|
|
|
203
|
-
/**
|
|
204
|
-
* @typedef UpdateUserAttributesParam
|
|
205
|
-
* @property {UserApplicationModel.UpdateUserAttributesRequest} body
|
|
206
|
-
*/
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* @typedef UserExistsParam
|
|
210
|
-
* @property {string} q - Email id or phone number of user
|
|
211
|
-
*/
|
|
212
|
-
|
|
213
198
|
/**
|
|
214
199
|
* @typedef VerifyEmailParam
|
|
215
200
|
* @property {UserApplicationModel.CodeRequestBodySchema} body
|
|
@@ -315,13 +300,6 @@ class UserApplicationValidator {
|
|
|
315
300
|
});
|
|
316
301
|
}
|
|
317
302
|
|
|
318
|
-
/** @returns {GetUserAttributesParam} */
|
|
319
|
-
static getUserAttributes() {
|
|
320
|
-
return Joi.object({
|
|
321
|
-
slug: Joi.string().allow(""),
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
|
|
325
303
|
/** @returns {HasPasswordParam} */
|
|
326
304
|
static hasPassword() {
|
|
327
305
|
return Joi.object({});
|
|
@@ -509,20 +487,6 @@ class UserApplicationValidator {
|
|
|
509
487
|
}).required();
|
|
510
488
|
}
|
|
511
489
|
|
|
512
|
-
/** @returns {UpdateUserAttributesParam} */
|
|
513
|
-
static updateUserAttributes() {
|
|
514
|
-
return Joi.object({
|
|
515
|
-
body: UserApplicationModel.UpdateUserAttributesRequest().required(),
|
|
516
|
-
}).required();
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
/** @returns {UserExistsParam} */
|
|
520
|
-
static userExists() {
|
|
521
|
-
return Joi.object({
|
|
522
|
-
q: Joi.string().allow("").required(),
|
|
523
|
-
}).required();
|
|
524
|
-
}
|
|
525
|
-
|
|
526
490
|
/** @returns {VerifyEmailParam} */
|
|
527
491
|
static verifyEmail() {
|
|
528
492
|
return Joi.object({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
const Clickstream = require("@gofynd/flick");
|
|
2
|
+
const { Logger } = require("../common/Logger");
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Safely extracts a value from an Object of n-depth
|
|
6
|
+
*
|
|
7
|
+
* @author Nikhil Kakade
|
|
8
|
+
* @param {function} fn
|
|
9
|
+
* @param {any} [defaultValue] - Null
|
|
10
|
+
* @returns {any}
|
|
11
|
+
*/
|
|
12
|
+
const sg = function safeGet(fn, defaultValue = null) {
|
|
13
|
+
try {
|
|
14
|
+
return fn();
|
|
15
|
+
} catch (err) {
|
|
16
|
+
return defaultValue;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
if (typeof window != "undefined") {
|
|
21
|
+
window.FPI.event.on("user.login", (eventData) => {
|
|
22
|
+
Logger({ level: "DEBUG", message: eventData });
|
|
23
|
+
Clickstream.identify(eventData["user_id"], {
|
|
24
|
+
event_type: "identity",
|
|
25
|
+
...eventData,
|
|
26
|
+
}).catch((err) => {
|
|
27
|
+
Logger({ level: "ERROR", message: err });
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
window.FPI.event.on("user.update", (eventData) => {
|
|
32
|
+
Logger({ level: "DEBUG", message: eventData });
|
|
33
|
+
Clickstream.identify(eventData["used_id"], {
|
|
34
|
+
event_type: "identity",
|
|
35
|
+
...eventData,
|
|
36
|
+
}).catch((err) => {
|
|
37
|
+
Logger({ level: "ERROR", message: err });
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
window.FPI.event.on("user.logout", (eventData) => {
|
|
42
|
+
Logger({ level: "DEBUG", message: eventData });
|
|
43
|
+
Clickstream.sendEvent("user_logout", {
|
|
44
|
+
event_type: "identity",
|
|
45
|
+
...eventData,
|
|
46
|
+
}).catch((err) => {
|
|
47
|
+
Logger({ level: "ERROR", message: err });
|
|
48
|
+
});
|
|
49
|
+
Clickstream.reset().catch((err) => {
|
|
50
|
+
Logger({ level: "ERROR", message: err });
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
window.FPI.event.on("wishlist.add", (eventData) => {
|
|
55
|
+
Logger({ level: "DEBUG", message: eventData });
|
|
56
|
+
Clickstream.sendEvent("product_wishlist_add", {
|
|
57
|
+
wishlist_name: "TODO",
|
|
58
|
+
wishlist_id: "TODO",
|
|
59
|
+
event_type: "click",
|
|
60
|
+
product_id: sg(() => eventData.item["uid"]),
|
|
61
|
+
brand: sg(() => eventData.item.brand["name"]),
|
|
62
|
+
l3_category: sg(() => eventData.item.categories[0]["name"]),
|
|
63
|
+
mrp: sg(() => eventData.item.price.marked.max),
|
|
64
|
+
quantity: "TODO",
|
|
65
|
+
esp: sg(() => eventData.item.price.effective.min),
|
|
66
|
+
currency: sg(() => eventData.item.price.effective.currency_code),
|
|
67
|
+
value: "TODO",
|
|
68
|
+
source_url: "TODO",
|
|
69
|
+
})
|
|
70
|
+
.then((resp) => {
|
|
71
|
+
Logger({ level: "DEBUG", message: "Click event sent" });
|
|
72
|
+
})
|
|
73
|
+
.catch((err) => {
|
|
74
|
+
Logger({ level: "ERROR", message: err });
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
window.FPI.event.on("wishlist.remove", (eventData) => {
|
|
79
|
+
Logger({ level: "DEBUG", message: eventData });
|
|
80
|
+
Clickstream.sendEvent("product_wishlist_remove", {
|
|
81
|
+
wishlist_name: "TODO",
|
|
82
|
+
wishlist_id: "TODO",
|
|
83
|
+
event_type: "click",
|
|
84
|
+
product_id: sg(() => eventData.item["uid"]),
|
|
85
|
+
brand: sg(() => eventData.item.brand["name"]),
|
|
86
|
+
l3_category: sg(() => eventData.item.categories[0]["name"]),
|
|
87
|
+
mrp: sg(() => eventData.item.price.marked.max),
|
|
88
|
+
quantity: "TODO",
|
|
89
|
+
esp: sg(() => eventData.item.price.effective.min),
|
|
90
|
+
currency: sg(() => eventData.item.price.effective.currency_code),
|
|
91
|
+
value: "TODO",
|
|
92
|
+
source_url: "TODO",
|
|
93
|
+
})
|
|
94
|
+
.then((resp) => {
|
|
95
|
+
Logger({ level: "DEBUG", message: "Click event sent" });
|
|
96
|
+
})
|
|
97
|
+
.catch((err) => {
|
|
98
|
+
Logger({ level: "ERROR", message: err });
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
window.FPI.event.on("cart.newProduct", (eventData) => {
|
|
103
|
+
Logger({ level: "DEBUG", message: eventData });
|
|
104
|
+
Clickstream.sendEvent("add_to_cart", {
|
|
105
|
+
cart_id: eventData.cart_id,
|
|
106
|
+
event_type: "click",
|
|
107
|
+
product_id: sg(() => eventData.products[0]["uid"]),
|
|
108
|
+
brand: sg(() => eventData.products[0]["brand"]["name"]),
|
|
109
|
+
l3_category: sg(() => eventData.products[0]["category"]["name"]),
|
|
110
|
+
l1_category: "TODO",
|
|
111
|
+
currency: sg(() => eventData.products[0]["price"]["currency_code"]),
|
|
112
|
+
price: sg(() => eventData.products[0]["price"]["selling"]),
|
|
113
|
+
quantity: sg(() => eventData.products[0]["quantity"]["current"]),
|
|
114
|
+
source_url: "TODO",
|
|
115
|
+
position: "TODO",
|
|
116
|
+
value: "TODO",
|
|
117
|
+
})
|
|
118
|
+
.then((resp) => {
|
|
119
|
+
Logger({ level: "DEBUG", message: "Click event sent" });
|
|
120
|
+
})
|
|
121
|
+
.catch((err) => {
|
|
122
|
+
Logger({ level: "ERROR", message: err });
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
window.FPI.event.on("cart.remove", (eventData) => {
|
|
127
|
+
Logger({ level: "DEBUG", message: eventData });
|
|
128
|
+
Clickstream.sendEvent("remove_from_cart", {
|
|
129
|
+
cart_id: eventData.cart_id,
|
|
130
|
+
event_type: "click",
|
|
131
|
+
product_id: sg(() => eventData.products[0]["uid"]),
|
|
132
|
+
brand: sg(() => eventData.products[0]["brand"]["name"]),
|
|
133
|
+
l3_category: sg(() => eventData.products[0]["category"]["name"]),
|
|
134
|
+
l1_category: "TODO",
|
|
135
|
+
currency: sg(() => eventData.products[0]["price"]["currency_code"]),
|
|
136
|
+
price: sg(() => eventData.products[0]["price"]["selling"]),
|
|
137
|
+
quantity: sg(() => eventData.products[0]["quantity"]["current"]),
|
|
138
|
+
source_url: "TODO",
|
|
139
|
+
position: "TODO",
|
|
140
|
+
value: "TODO",
|
|
141
|
+
})
|
|
142
|
+
.then((resp) => {
|
|
143
|
+
Logger({ level: "DEBUG", message: "Click event sent" });
|
|
144
|
+
})
|
|
145
|
+
.catch((err) => {
|
|
146
|
+
Logger({ level: "ERROR", message: err });
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
window.FPI.event.on("order.processed", (eventData) => {
|
|
151
|
+
Logger({ level: "DEBUG", message: eventData });
|
|
152
|
+
Clickstream.sendEvent("order_complete", {
|
|
153
|
+
event_type: "click",
|
|
154
|
+
...eventData,
|
|
155
|
+
})
|
|
156
|
+
.then((resp) => {
|
|
157
|
+
Logger({ level: "DEBUG", message: "Click event sent" });
|
|
158
|
+
})
|
|
159
|
+
.catch((err) => {
|
|
160
|
+
Logger({ level: "ERROR", message: err });
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
window.FPI.event.on("refund.success", (eventData) => {
|
|
165
|
+
Logger({ level: "DEBUG", message: eventData });
|
|
166
|
+
Clickstream.sendEvent("order_refunded", {
|
|
167
|
+
event_type: "click",
|
|
168
|
+
...eventData,
|
|
169
|
+
})
|
|
170
|
+
.then((resp) => {
|
|
171
|
+
Logger({ level: "DEBUG", message: "Click event sent" });
|
|
172
|
+
})
|
|
173
|
+
.catch((err) => {
|
|
174
|
+
Logger({ level: "ERROR", message: err });
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
window.FPI.event.on("order.checkout", (eventData) => {
|
|
179
|
+
Logger({ level: "DEBUG", message: eventData });
|
|
180
|
+
Clickstream.sendEvent("order_checkout", {
|
|
181
|
+
event_type: "click",
|
|
182
|
+
cart_id: eventData.cart_id,
|
|
183
|
+
cart_total: sg(() => eventData.breakup_values_raw["mrp_total"]),
|
|
184
|
+
items: sg(() => eventData.products.lenght),
|
|
185
|
+
shipping: sg(() => eventData.breakup_values_raw["delivery_charge"]),
|
|
186
|
+
tax: sg(() => eventData.breakup_values_raw["gst_charges"]),
|
|
187
|
+
order_total: sg(() => eventData.breakup_values_raw["total"]),
|
|
188
|
+
currency: sg(() => eventData.products[0]["price"]["currency_code"]),
|
|
189
|
+
products: eventData.products.map((p) => {
|
|
190
|
+
return {
|
|
191
|
+
product_id: p.uid,
|
|
192
|
+
l3_category: sg(() => p.category["name"]),
|
|
193
|
+
l1_category: "TODO",
|
|
194
|
+
quantity: sg(() => p.quantity["current"]),
|
|
195
|
+
price: sg(() => p.price["marked"]),
|
|
196
|
+
value: sg(() => p.price["effective"]),
|
|
197
|
+
currency: sg(() => p.price["currency_code"]),
|
|
198
|
+
};
|
|
199
|
+
}),
|
|
200
|
+
})
|
|
201
|
+
.then((resp) => {
|
|
202
|
+
Logger({ level: "DEBUG", message: "Click event sent" });
|
|
203
|
+
})
|
|
204
|
+
.catch((err) => {
|
|
205
|
+
Logger({ level: "ERROR", message: err });
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
window.FPI.event.on("product.view", (eventData) => {
|
|
210
|
+
Logger({ level: "DEBUG", message: eventData });
|
|
211
|
+
Clickstream.sendEvent("product_view", {
|
|
212
|
+
event_type: "click",
|
|
213
|
+
product_id: sg(() => eventData.product["uid"]),
|
|
214
|
+
currency: sg(() => eventData.product.price["currency"]),
|
|
215
|
+
brand: sg(() => eventData.product.brand["name"]),
|
|
216
|
+
l3_category: sg(() => eventData.product.l3_category),
|
|
217
|
+
mrp: sg(() => eventData.product.price.max),
|
|
218
|
+
esp: sg(() => eventData.product.price.min),
|
|
219
|
+
l1_category: sg(() => eventData.product.l1_category),
|
|
220
|
+
source_url: sg(() => eventData.product.source_url),
|
|
221
|
+
quantity: sg(() => eventData.product.sizes[0]["quantity"]),
|
|
222
|
+
position: "TODO",
|
|
223
|
+
})
|
|
224
|
+
.then((resp) => {
|
|
225
|
+
Logger({ level: "DEBUG", message: "Click event sent" });
|
|
226
|
+
})
|
|
227
|
+
.catch((err) => {
|
|
228
|
+
Logger({ level: "ERROR", message: err });
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
window.FPI.event.on("search.products", (eventData) => {
|
|
233
|
+
Logger({ level: "DEBUG", message: eventData });
|
|
234
|
+
Clickstream.sendEvent("product_search", {
|
|
235
|
+
event_type: "search",
|
|
236
|
+
query: eventData.search_text,
|
|
237
|
+
})
|
|
238
|
+
.then((resp) => {
|
|
239
|
+
Logger({ level: "DEBUG", message: "Click event sent" });
|
|
240
|
+
})
|
|
241
|
+
.catch((err) => {
|
|
242
|
+
Logger({ level: "ERROR", message: err });
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
window.FPI.event.on("product_list.filter", (eventData) => {
|
|
247
|
+
Logger({ level: "DEBUG", message: eventData });
|
|
248
|
+
// Clickstream.sendEvent("add_to_cart", { event_type: "conversion", product_uid: eventData.products[0]['uid'], user_id: eventData.user['user_id'], brand: eventData.products[0]['brand']['name'], category: eventData.products[0]['category']['name'], currency: eventData.products[0]['price']['currency_code'], price: eventData.products[0]['price']['selling'], quantity: eventData.products[0]['quantity']['current'], cart: [] }).then((resp) => {
|
|
249
|
+
// console.log("Event sent succesfully")
|
|
250
|
+
// }).catch(err => {
|
|
251
|
+
// console.error(err)
|
|
252
|
+
// })
|
|
253
|
+
});
|
|
254
|
+
}
|
package/sdk/common/Utility.js
CHANGED
|
@@ -30,10 +30,7 @@ function convertUrlToAction(url) {
|
|
|
30
30
|
const closestMatchingNavLink = Object.keys(typeLink).find((pageType) => {
|
|
31
31
|
return utils.trimChar(pageType) === bestMatchingLink.value;
|
|
32
32
|
});
|
|
33
|
-
const closestMatchingNavKey = typeLink[closestMatchingNavLink];
|
|
34
|
-
if (!closestMatchingNavKey) {
|
|
35
|
-
closestMatchingNavKey = "home";
|
|
36
|
-
}
|
|
33
|
+
const closestMatchingNavKey = typeLink[closestMatchingNavLink] || "home";
|
|
37
34
|
return {
|
|
38
35
|
type: "page",
|
|
39
36
|
page: {
|
|
@@ -1,127 +1,139 @@
|
|
|
1
1
|
export = FileStoragePartnerModel;
|
|
2
2
|
/**
|
|
3
3
|
* @typedef CDN
|
|
4
|
+
* @property {string} url
|
|
4
5
|
* @property {string} absolute_url
|
|
5
6
|
* @property {string} relative_url
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @typedef Upload
|
|
10
|
+
* @property {number} expiry
|
|
6
11
|
* @property {string} url
|
|
7
12
|
*/
|
|
8
13
|
/**
|
|
9
|
-
* @typedef
|
|
10
|
-
* @property {string} _id
|
|
11
|
-
* @property {CDN} cdn
|
|
12
|
-
* @property {string} content_type
|
|
13
|
-
* @property {CreatedBy} [created_by]
|
|
14
|
-
* @property {string} created_on
|
|
14
|
+
* @typedef StartResponse
|
|
15
15
|
* @property {string} file_name
|
|
16
16
|
* @property {string} file_path
|
|
17
|
-
* @property {string}
|
|
17
|
+
* @property {string} content_type
|
|
18
|
+
* @property {string} [method]
|
|
18
19
|
* @property {string} namespace
|
|
19
20
|
* @property {string} operation
|
|
20
21
|
* @property {number} size
|
|
21
|
-
* @property {boolean} success
|
|
22
|
-
* @property {string[]} [tags]
|
|
23
22
|
* @property {Upload} upload
|
|
23
|
+
* @property {CDN} cdn
|
|
24
|
+
* @property {string[]} [tags]
|
|
24
25
|
*/
|
|
25
26
|
/**
|
|
26
|
-
* @typedef
|
|
27
|
-
* @property {string} [
|
|
28
|
-
*/
|
|
29
|
-
/**
|
|
30
|
-
* @typedef FailedResponse
|
|
31
|
-
* @property {string} message
|
|
27
|
+
* @typedef Params
|
|
28
|
+
* @property {string} [subpath] - The subpath for the file.
|
|
32
29
|
*/
|
|
33
30
|
/**
|
|
34
31
|
* @typedef StartRequest
|
|
35
|
-
* @property {string} content_type
|
|
36
32
|
* @property {string} file_name
|
|
37
|
-
* @property {
|
|
33
|
+
* @property {string} content_type
|
|
38
34
|
* @property {number} size
|
|
39
35
|
* @property {string[]} [tags]
|
|
36
|
+
* @property {Params} [params]
|
|
40
37
|
*/
|
|
41
38
|
/**
|
|
42
|
-
* @typedef
|
|
43
|
-
* @property {
|
|
44
|
-
|
|
39
|
+
* @typedef CreatedBy
|
|
40
|
+
* @property {string} [username]
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* @typedef CompleteResponse
|
|
44
|
+
* @property {string} _id
|
|
45
45
|
* @property {string} file_name
|
|
46
46
|
* @property {string} file_path
|
|
47
|
-
* @property {string}
|
|
47
|
+
* @property {string} content_type
|
|
48
48
|
* @property {string} namespace
|
|
49
49
|
* @property {string} operation
|
|
50
50
|
* @property {number} size
|
|
51
|
-
* @property {string[]} [tags]
|
|
52
51
|
* @property {Upload} upload
|
|
52
|
+
* @property {CDN} cdn
|
|
53
|
+
* @property {boolean} success
|
|
54
|
+
* @property {string[]} [tags]
|
|
55
|
+
* @property {string} created_on
|
|
56
|
+
* @property {string} modified_on
|
|
57
|
+
* @property {CreatedBy} [created_by]
|
|
53
58
|
*/
|
|
54
59
|
/**
|
|
55
|
-
* @typedef
|
|
56
|
-
* @property {
|
|
57
|
-
* @property {string} url
|
|
60
|
+
* @typedef FailedResponse
|
|
61
|
+
* @property {string} message
|
|
58
62
|
*/
|
|
59
63
|
declare class FileStoragePartnerModel {
|
|
60
64
|
}
|
|
61
65
|
declare namespace FileStoragePartnerModel {
|
|
62
|
-
export { CDN,
|
|
66
|
+
export { CDN, Upload, StartResponse, Params, StartRequest, CreatedBy, CompleteResponse, FailedResponse };
|
|
63
67
|
}
|
|
64
68
|
/** @returns {CDN} */
|
|
65
69
|
declare function CDN(): CDN;
|
|
66
70
|
type CDN = {
|
|
71
|
+
url: string;
|
|
67
72
|
absolute_url: string;
|
|
68
73
|
relative_url: string;
|
|
74
|
+
};
|
|
75
|
+
/** @returns {Upload} */
|
|
76
|
+
declare function Upload(): Upload;
|
|
77
|
+
type Upload = {
|
|
78
|
+
expiry: number;
|
|
69
79
|
url: string;
|
|
70
80
|
};
|
|
71
|
-
/** @returns {
|
|
72
|
-
declare function
|
|
73
|
-
type
|
|
74
|
-
_id: string;
|
|
75
|
-
cdn: CDN;
|
|
76
|
-
content_type: string;
|
|
77
|
-
created_by?: CreatedBy;
|
|
78
|
-
created_on: string;
|
|
81
|
+
/** @returns {StartResponse} */
|
|
82
|
+
declare function StartResponse(): StartResponse;
|
|
83
|
+
type StartResponse = {
|
|
79
84
|
file_name: string;
|
|
80
85
|
file_path: string;
|
|
81
|
-
|
|
86
|
+
content_type: string;
|
|
87
|
+
method?: string;
|
|
82
88
|
namespace: string;
|
|
83
89
|
operation: string;
|
|
84
90
|
size: number;
|
|
85
|
-
success: boolean;
|
|
86
|
-
tags?: string[];
|
|
87
91
|
upload: Upload;
|
|
92
|
+
cdn: CDN;
|
|
93
|
+
tags?: string[];
|
|
88
94
|
};
|
|
89
|
-
/** @returns {
|
|
90
|
-
declare function
|
|
91
|
-
type
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
type FailedResponse = {
|
|
97
|
-
message: string;
|
|
95
|
+
/** @returns {Params} */
|
|
96
|
+
declare function Params(): Params;
|
|
97
|
+
type Params = {
|
|
98
|
+
/**
|
|
99
|
+
* - The subpath for the file.
|
|
100
|
+
*/
|
|
101
|
+
subpath?: string;
|
|
98
102
|
};
|
|
99
103
|
/** @returns {StartRequest} */
|
|
100
104
|
declare function StartRequest(): StartRequest;
|
|
101
105
|
type StartRequest = {
|
|
102
|
-
content_type: string;
|
|
103
106
|
file_name: string;
|
|
104
|
-
|
|
107
|
+
content_type: string;
|
|
105
108
|
size: number;
|
|
106
109
|
tags?: string[];
|
|
110
|
+
params?: Params;
|
|
107
111
|
};
|
|
108
|
-
/** @returns {
|
|
109
|
-
declare function
|
|
110
|
-
type
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
/** @returns {CreatedBy} */
|
|
113
|
+
declare function CreatedBy(): CreatedBy;
|
|
114
|
+
type CreatedBy = {
|
|
115
|
+
username?: string;
|
|
116
|
+
};
|
|
117
|
+
/** @returns {CompleteResponse} */
|
|
118
|
+
declare function CompleteResponse(): CompleteResponse;
|
|
119
|
+
type CompleteResponse = {
|
|
120
|
+
_id: string;
|
|
113
121
|
file_name: string;
|
|
114
122
|
file_path: string;
|
|
115
|
-
|
|
123
|
+
content_type: string;
|
|
116
124
|
namespace: string;
|
|
117
125
|
operation: string;
|
|
118
126
|
size: number;
|
|
119
|
-
tags?: string[];
|
|
120
127
|
upload: Upload;
|
|
128
|
+
cdn: CDN;
|
|
129
|
+
success: boolean;
|
|
130
|
+
tags?: string[];
|
|
131
|
+
created_on: string;
|
|
132
|
+
modified_on: string;
|
|
133
|
+
created_by?: CreatedBy;
|
|
121
134
|
};
|
|
122
|
-
/** @returns {
|
|
123
|
-
declare function
|
|
124
|
-
type
|
|
125
|
-
|
|
126
|
-
url: string;
|
|
135
|
+
/** @returns {FailedResponse} */
|
|
136
|
+
declare function FailedResponse(): FailedResponse;
|
|
137
|
+
type FailedResponse = {
|
|
138
|
+
message: string;
|
|
127
139
|
};
|