@gofynd/fdk-client-javascript 3.3.6 → 3.4.0
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 +1 -1
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -3
- package/sdk/application/Catalog/CatalogApplicationClient.js +24 -5
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +10 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +44 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +4 -4
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +2 -2
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +5 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.js +2 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +193 -1
- package/sdk/platform/Cart/CartPlatformModel.js +123 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +4 -2
- package/sdk/platform/Catalog/CatalogPlatformClient.js +16 -3
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +33 -2
- package/sdk/platform/Catalog/CatalogPlatformModel.js +17 -2
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +5 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +2 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +17 -1
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +15 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +20 -1
- package/sdk/platform/Order/OrderPlatformModel.js +22 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +124 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +800 -33
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +139 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +125 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +2 -2
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +8 -2
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +936 -62
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +591 -33
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +12 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +5 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +36 -0
- package/sdk/platform/User/UserPlatformApplicationClient.js +251 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +38 -1
- package/sdk/platform/User/UserPlatformApplicationValidator.js +42 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +430 -10
- package/sdk/platform/User/UserPlatformModel.js +276 -7
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +10 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.js +4 -0
|
@@ -13,7 +13,14 @@ const Joi = require("joi");
|
|
|
13
13
|
* @property {string} [description] - The description of the attribute.
|
|
14
14
|
* @property {string} [application_id] - The application ID.
|
|
15
15
|
* @property {string} [type] - The attribute type.
|
|
16
|
-
* @property {
|
|
16
|
+
* @property {string} [icon] - Optional icon representation for this attribute.
|
|
17
|
+
* Defaults to an empty string.
|
|
18
|
+
* @property {string[]} [ordering_channels] - Ordering Channels where this
|
|
19
|
+
* attribute should be visible.
|
|
20
|
+
* @property {AttributeMaskingProperties} [masking]
|
|
21
|
+
* @property {AttributeRegistrationProperties} [registration]
|
|
22
|
+
* @property {boolean} [is_multi_value] - Indicates if this attribute can accept
|
|
23
|
+
* multiple values.
|
|
17
24
|
* @property {boolean} [customer_editable] - Whether the attribute is customer-editable.
|
|
18
25
|
* @property {boolean} [encrypted] - Whether the attribute is encrypted.
|
|
19
26
|
* @property {boolean} [pinned] - Whether the attribute is pinned.
|
|
@@ -33,7 +40,14 @@ const Joi = require("joi");
|
|
|
33
40
|
* @property {string} [description] - The description of the attribute.
|
|
34
41
|
* @property {string} [application_id] - The application ID.
|
|
35
42
|
* @property {string} [type] - The attribute type.
|
|
36
|
-
* @property {
|
|
43
|
+
* @property {string} [icon] - Optional icon representation for this attribute.
|
|
44
|
+
* Defaults to an empty string.
|
|
45
|
+
* @property {string[]} [ordering_channels] - Ordering Channels where this
|
|
46
|
+
* attribute should be visible.
|
|
47
|
+
* @property {AttributeMaskingProperties} [masking]
|
|
48
|
+
* @property {AttributeRegistrationProperties} [registration]
|
|
49
|
+
* @property {boolean} [is_multi_value] - Indicates if this attribute can accept
|
|
50
|
+
* multiple values.
|
|
37
51
|
* @property {boolean} [customer_editable] - Whether the attribute is customer-editable.
|
|
38
52
|
* @property {boolean} [encrypted] - Whether the attribute is encrypted.
|
|
39
53
|
* @property {boolean} [pinned] - Whether the attribute is pinned.
|
|
@@ -47,24 +61,67 @@ const Joi = require("joi");
|
|
|
47
61
|
* attribute definition.
|
|
48
62
|
*/
|
|
49
63
|
|
|
64
|
+
/**
|
|
65
|
+
* @typedef AttributeMaskingProperties
|
|
66
|
+
* @property {boolean} [enabled] - Indicates if PII masking is editable for this
|
|
67
|
+
* attribute.
|
|
68
|
+
* @property {string} [type] - Indicates the PII masking options available
|
|
69
|
+
* default or others
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @typedef AttributeRegistrationProperties
|
|
74
|
+
* @property {boolean} [enabled] - Indicates if an attribute is editable when
|
|
75
|
+
* customer registers for a storefront.
|
|
76
|
+
* @property {string} [type] - Indicates if this attribute is mandatory or
|
|
77
|
+
* optional when customer registers for a storefront.
|
|
78
|
+
*/
|
|
79
|
+
|
|
50
80
|
/**
|
|
51
81
|
* @typedef UserAttributeDefinitionValidation
|
|
52
82
|
* @property {string} [type] - The type of validation.
|
|
53
83
|
* @property {Object} [value] - The validation value.
|
|
54
84
|
*/
|
|
55
85
|
|
|
86
|
+
/**
|
|
87
|
+
* @typedef BulkUserAttribute
|
|
88
|
+
* @property {boolean} [success] - This describes the status of the API response
|
|
89
|
+
* @property {UserAttribute[]} [attributes]
|
|
90
|
+
*/
|
|
91
|
+
|
|
56
92
|
/**
|
|
57
93
|
* @typedef UserAttribute
|
|
58
94
|
* @property {string} [_id] - The unique identifier for the attribute definition.
|
|
59
95
|
* @property {string} [name] - The name of user attribute definition.
|
|
60
96
|
* @property {string} [user_id] - The unique identifier for the user.
|
|
61
97
|
* @property {string} [application_id] - The application ID.
|
|
98
|
+
* @property {string} [user_attribute_definition_id] - The unique id of the
|
|
99
|
+
* attribute definition.
|
|
100
|
+
* @property {string} [created_at] - The time when attribute value is created
|
|
101
|
+
* for a user in ISO format.
|
|
102
|
+
* @property {string} [updated_at] - The time when attribute value is updated
|
|
103
|
+
* for a user in ISO format.
|
|
62
104
|
* @property {string} [type] - The attribute type.
|
|
63
105
|
* @property {boolean} [customer_overridden] - Whether the attribute is customer-editable.
|
|
64
106
|
* @property {Object} [attribute]
|
|
65
107
|
* @property {string} [updated_by]
|
|
66
108
|
*/
|
|
67
109
|
|
|
110
|
+
/**
|
|
111
|
+
* @typedef CreateBulkUserAttribute
|
|
112
|
+
* @property {BulkUserAttributeRequestBody[]} attributes - This is an array of
|
|
113
|
+
* objects containing id of attribute definitions and the respective values to
|
|
114
|
+
* created or updated
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @typedef BulkUserAttributeRequestBody
|
|
119
|
+
* @property {string} definition_id - Theis is an unique id of user attribute definition
|
|
120
|
+
* @property {Object} value - Attribute values to be create or updated. Can be a
|
|
121
|
+
* single value or an array of values. Types supported: string, number, array
|
|
122
|
+
* of string, or array of number.
|
|
123
|
+
*/
|
|
124
|
+
|
|
68
125
|
/**
|
|
69
126
|
* @typedef CreateUserAttribute
|
|
70
127
|
* @property {boolean} [customer_overridden]
|
|
@@ -76,8 +133,15 @@ const Joi = require("joi");
|
|
|
76
133
|
* @property {string} [name]
|
|
77
134
|
* @property {string} [slug]
|
|
78
135
|
* @property {string} [description]
|
|
79
|
-
* @property {string} [type]
|
|
80
|
-
* @property {
|
|
136
|
+
* @property {string} [type] - The attribute type.
|
|
137
|
+
* @property {string} [icon] - Optional icon representation for this attribute.
|
|
138
|
+
* Defaults to an empty string.
|
|
139
|
+
* @property {string[]} [ordering_channels] - Ordering Channels where this
|
|
140
|
+
* attribute should be visible.
|
|
141
|
+
* @property {AttributeMaskingProperties} [masking]
|
|
142
|
+
* @property {AttributeRegistrationProperties} [registration]
|
|
143
|
+
* @property {boolean} [is_multi_value] - Indicates if this attribute can accept
|
|
144
|
+
* multiple values.
|
|
81
145
|
* @property {boolean} [customer_editable]
|
|
82
146
|
* @property {boolean} [encrypted]
|
|
83
147
|
* @property {boolean} [pinned]
|
|
@@ -205,6 +269,7 @@ const Joi = require("joi");
|
|
|
205
269
|
/**
|
|
206
270
|
* @typedef PaginationSchema
|
|
207
271
|
* @property {number} [size] - The number of items per page.
|
|
272
|
+
* @property {number} [total] - The total number of items across all pages.
|
|
208
273
|
* @property {number} [item_total] - The total number of items across all pages.
|
|
209
274
|
* @property {boolean} [has_next] - Indicates whether there are more pages to retrieve.
|
|
210
275
|
* @property {string} [type] - The type of pagination used (eg Number).
|
|
@@ -294,6 +359,82 @@ const Joi = require("joi");
|
|
|
294
359
|
* @property {string} [value]
|
|
295
360
|
*/
|
|
296
361
|
|
|
362
|
+
/**
|
|
363
|
+
* @typedef DeleteBulkUserAttribute
|
|
364
|
+
* @property {string[]} [definition_ids] - List of user attribute definition IDs
|
|
365
|
+
* for which the corresponding values should be deleted.
|
|
366
|
+
*/
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* @typedef UserAttributeFilter
|
|
370
|
+
* @property {UserAttributeFilterQuery} [query]
|
|
371
|
+
*/
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* @typedef UserAttributeFilterQuery
|
|
375
|
+
* @property {string} type - Logical condition type to apply between multiple
|
|
376
|
+
* attribute filters.
|
|
377
|
+
* @property {number} limit - Number of results to return per page.
|
|
378
|
+
* @property {number} page - Page number to fetch.
|
|
379
|
+
* @property {string} [email] - Filter users by their exact email address.
|
|
380
|
+
* @property {string} [phone] - Filter users by their exact phone number.
|
|
381
|
+
* @property {string[]} [definition_ids] - List of user attribute definition IDs
|
|
382
|
+
* to fetch attributes values available for each user.
|
|
383
|
+
* @property {UserAttributeFilterRequestConditions[]} conditions - List of
|
|
384
|
+
* filtering conditions to apply on user attributes.
|
|
385
|
+
*/
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* @typedef UserAttributeFilterRequestConditions
|
|
389
|
+
* @property {string} definition_id - ID of the user attribute definition to filter on.
|
|
390
|
+
* @property {string} type - Filter operation to apply on the attribute value.
|
|
391
|
+
* Supported operations include:
|
|
392
|
+
*
|
|
393
|
+
* - `eq`: Equal to - `ne`: Not equal to - `gt`: Greater than (or is after for
|
|
394
|
+
* dates) - `lt`: Less than (or is before for dates) - `gte`: Greater than
|
|
395
|
+
* or equal to - `lte`: Less than or equal to - `cnt`: Contains (for
|
|
396
|
+
* strings) - `nct`: Does not contain (for strings) - `is`: Matches
|
|
397
|
+
* exactly (for strings) - `nis`: Does not match exactly (for strings) -
|
|
398
|
+
* `sw`: Starts with (for strings) - `ew`: Ends with (for strings) -
|
|
399
|
+
* `btw`: Between two values (for date and datetime types) - `in`: Value
|
|
400
|
+
* exists in given list - `nin`: Value does not exist in given list
|
|
401
|
+
*
|
|
402
|
+
* @property {Object} value - Values to be used in filtering the attribute. Can
|
|
403
|
+
* be a single value or an array of values. Types supported: string, number,
|
|
404
|
+
* array of string, or array of number.
|
|
405
|
+
*/
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* @typedef UserAttributeFiltered
|
|
409
|
+
* @property {UserAttributeFilteredList[]} [items] - List of user objects that
|
|
410
|
+
* match the filter criteria.
|
|
411
|
+
* @property {PaginationSchema} [page]
|
|
412
|
+
*/
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* @typedef UserAttributeFilteredList
|
|
416
|
+
* @property {string} [_id] - Unique ID of the user.
|
|
417
|
+
* @property {string} [username] - Generated username for the user.
|
|
418
|
+
* @property {UserPhoneNumbers[]} [phone_numbers] - List of phone numbers
|
|
419
|
+
* associated with the user.
|
|
420
|
+
* @property {UserEmails[]} [emails] - List of emails associated with the user.
|
|
421
|
+
* @property {string} [gender] - Gender of the user.
|
|
422
|
+
* @property {boolean} [active] - Whether the user account is active.
|
|
423
|
+
* @property {boolean} [archive] - Whether the user account is archived.
|
|
424
|
+
* @property {string} [status] - Status of the user account.
|
|
425
|
+
* @property {UserAttribute[]} [attributes]
|
|
426
|
+
* @property {string} [first_name] - First name of the user.
|
|
427
|
+
* @property {string} [last_name] - Last name of the user.
|
|
428
|
+
* @property {string} [account_type] - Type of user account.
|
|
429
|
+
* @property {string} [profile_pic_url] - URL to user's profile picture.
|
|
430
|
+
* @property {boolean} [has_old_password_hash] - Whether user has legacy password format.
|
|
431
|
+
* @property {string} [user_id] - Unique user ID.
|
|
432
|
+
* @property {string} [application_id] - Application ID associated with the user.
|
|
433
|
+
* @property {boolean} [is_encrypted] - Whether the user data is encrypted.
|
|
434
|
+
* @property {string} [created_at] - Timestamp of user creation.
|
|
435
|
+
* @property {string} [updated_at] - Timestamp of last update.
|
|
436
|
+
*/
|
|
437
|
+
|
|
297
438
|
/**
|
|
298
439
|
* @typedef CreateUserGroup
|
|
299
440
|
* @property {ConditionsSchema[]} [conditions]
|
|
@@ -648,7 +789,11 @@ class UserPlatformModel {
|
|
|
648
789
|
description: Joi.string().allow(""),
|
|
649
790
|
application_id: Joi.string().allow(""),
|
|
650
791
|
type: Joi.string().allow(""),
|
|
651
|
-
|
|
792
|
+
icon: Joi.string().allow(""),
|
|
793
|
+
ordering_channels: Joi.array().items(Joi.string().allow("")),
|
|
794
|
+
masking: UserPlatformModel.AttributeMaskingProperties(),
|
|
795
|
+
registration: UserPlatformModel.AttributeRegistrationProperties(),
|
|
796
|
+
is_multi_value: Joi.boolean(),
|
|
652
797
|
customer_editable: Joi.boolean(),
|
|
653
798
|
encrypted: Joi.boolean(),
|
|
654
799
|
pinned: Joi.boolean(),
|
|
@@ -670,7 +815,11 @@ class UserPlatformModel {
|
|
|
670
815
|
description: Joi.string().allow(""),
|
|
671
816
|
application_id: Joi.string().allow(""),
|
|
672
817
|
type: Joi.string().allow(""),
|
|
673
|
-
|
|
818
|
+
icon: Joi.string().allow(""),
|
|
819
|
+
ordering_channels: Joi.array().items(Joi.string().allow("")),
|
|
820
|
+
masking: UserPlatformModel.AttributeMaskingProperties(),
|
|
821
|
+
registration: UserPlatformModel.AttributeRegistrationProperties(),
|
|
822
|
+
is_multi_value: Joi.boolean(),
|
|
674
823
|
customer_editable: Joi.boolean(),
|
|
675
824
|
encrypted: Joi.boolean(),
|
|
676
825
|
pinned: Joi.boolean(),
|
|
@@ -686,6 +835,22 @@ class UserPlatformModel {
|
|
|
686
835
|
});
|
|
687
836
|
}
|
|
688
837
|
|
|
838
|
+
/** @returns {AttributeMaskingProperties} */
|
|
839
|
+
static AttributeMaskingProperties() {
|
|
840
|
+
return Joi.object({
|
|
841
|
+
enabled: Joi.boolean(),
|
|
842
|
+
type: Joi.string().allow(""),
|
|
843
|
+
});
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
/** @returns {AttributeRegistrationProperties} */
|
|
847
|
+
static AttributeRegistrationProperties() {
|
|
848
|
+
return Joi.object({
|
|
849
|
+
enabled: Joi.boolean(),
|
|
850
|
+
type: Joi.string().allow(""),
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
|
|
689
854
|
/** @returns {UserAttributeDefinitionValidation} */
|
|
690
855
|
static UserAttributeDefinitionValidation() {
|
|
691
856
|
return Joi.object({
|
|
@@ -694,6 +859,14 @@ class UserPlatformModel {
|
|
|
694
859
|
});
|
|
695
860
|
}
|
|
696
861
|
|
|
862
|
+
/** @returns {BulkUserAttribute} */
|
|
863
|
+
static BulkUserAttribute() {
|
|
864
|
+
return Joi.object({
|
|
865
|
+
success: Joi.boolean(),
|
|
866
|
+
attributes: Joi.array().items(UserPlatformModel.UserAttribute()),
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
|
|
697
870
|
/** @returns {UserAttribute} */
|
|
698
871
|
static UserAttribute() {
|
|
699
872
|
return Joi.object({
|
|
@@ -701,6 +874,9 @@ class UserPlatformModel {
|
|
|
701
874
|
name: Joi.string().allow(""),
|
|
702
875
|
user_id: Joi.string().allow(""),
|
|
703
876
|
application_id: Joi.string().allow(""),
|
|
877
|
+
user_attribute_definition_id: Joi.string().allow(""),
|
|
878
|
+
created_at: Joi.string().allow(""),
|
|
879
|
+
updated_at: Joi.string().allow(""),
|
|
704
880
|
type: Joi.string().allow(""),
|
|
705
881
|
customer_overridden: Joi.boolean(),
|
|
706
882
|
attribute: Joi.object().pattern(/\S/, Joi.any()),
|
|
@@ -708,6 +884,23 @@ class UserPlatformModel {
|
|
|
708
884
|
});
|
|
709
885
|
}
|
|
710
886
|
|
|
887
|
+
/** @returns {CreateBulkUserAttribute} */
|
|
888
|
+
static CreateBulkUserAttribute() {
|
|
889
|
+
return Joi.object({
|
|
890
|
+
attributes: Joi.array()
|
|
891
|
+
.items(UserPlatformModel.BulkUserAttributeRequestBody())
|
|
892
|
+
.required(),
|
|
893
|
+
});
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
/** @returns {BulkUserAttributeRequestBody} */
|
|
897
|
+
static BulkUserAttributeRequestBody() {
|
|
898
|
+
return Joi.object({
|
|
899
|
+
definition_id: Joi.string().allow("").required(),
|
|
900
|
+
value: Joi.any().required(),
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
|
|
711
904
|
/** @returns {CreateUserAttribute} */
|
|
712
905
|
static CreateUserAttribute() {
|
|
713
906
|
return Joi.object({
|
|
@@ -723,7 +916,11 @@ class UserPlatformModel {
|
|
|
723
916
|
slug: Joi.string().allow(""),
|
|
724
917
|
description: Joi.string().allow(""),
|
|
725
918
|
type: Joi.string().allow(""),
|
|
726
|
-
|
|
919
|
+
icon: Joi.string().allow(""),
|
|
920
|
+
ordering_channels: Joi.array().items(Joi.string().allow("")),
|
|
921
|
+
masking: UserPlatformModel.AttributeMaskingProperties(),
|
|
922
|
+
registration: UserPlatformModel.AttributeRegistrationProperties(),
|
|
923
|
+
is_multi_value: Joi.boolean(),
|
|
727
924
|
customer_editable: Joi.boolean(),
|
|
728
925
|
encrypted: Joi.boolean(),
|
|
729
926
|
pinned: Joi.boolean(),
|
|
@@ -873,6 +1070,7 @@ class UserPlatformModel {
|
|
|
873
1070
|
static PaginationSchema() {
|
|
874
1071
|
return Joi.object({
|
|
875
1072
|
size: Joi.number(),
|
|
1073
|
+
total: Joi.number(),
|
|
876
1074
|
item_total: Joi.number(),
|
|
877
1075
|
has_next: Joi.boolean(),
|
|
878
1076
|
type: Joi.string().allow(""),
|
|
@@ -983,6 +1181,77 @@ class UserPlatformModel {
|
|
|
983
1181
|
});
|
|
984
1182
|
}
|
|
985
1183
|
|
|
1184
|
+
/** @returns {DeleteBulkUserAttribute} */
|
|
1185
|
+
static DeleteBulkUserAttribute() {
|
|
1186
|
+
return Joi.object({
|
|
1187
|
+
definition_ids: Joi.array().items(Joi.string().allow("")),
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
/** @returns {UserAttributeFilter} */
|
|
1192
|
+
static UserAttributeFilter() {
|
|
1193
|
+
return Joi.object({
|
|
1194
|
+
query: UserPlatformModel.UserAttributeFilterQuery(),
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
/** @returns {UserAttributeFilterQuery} */
|
|
1199
|
+
static UserAttributeFilterQuery() {
|
|
1200
|
+
return Joi.object({
|
|
1201
|
+
type: Joi.string().allow("").required(),
|
|
1202
|
+
limit: Joi.number().required(),
|
|
1203
|
+
page: Joi.number().required(),
|
|
1204
|
+
email: Joi.string().allow(""),
|
|
1205
|
+
phone: Joi.string().allow(""),
|
|
1206
|
+
definition_ids: Joi.array().items(Joi.string().allow("")),
|
|
1207
|
+
conditions: Joi.array()
|
|
1208
|
+
.items(UserPlatformModel.UserAttributeFilterRequestConditions())
|
|
1209
|
+
.required(),
|
|
1210
|
+
});
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
/** @returns {UserAttributeFilterRequestConditions} */
|
|
1214
|
+
static UserAttributeFilterRequestConditions() {
|
|
1215
|
+
return Joi.object({
|
|
1216
|
+
definition_id: Joi.string().allow("").required(),
|
|
1217
|
+
type: Joi.string().allow("").required(),
|
|
1218
|
+
value: Joi.any().required(),
|
|
1219
|
+
});
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
/** @returns {UserAttributeFiltered} */
|
|
1223
|
+
static UserAttributeFiltered() {
|
|
1224
|
+
return Joi.object({
|
|
1225
|
+
items: Joi.array().items(UserPlatformModel.UserAttributeFilteredList()),
|
|
1226
|
+
page: UserPlatformModel.PaginationSchema(),
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
/** @returns {UserAttributeFilteredList} */
|
|
1231
|
+
static UserAttributeFilteredList() {
|
|
1232
|
+
return Joi.object({
|
|
1233
|
+
_id: Joi.string().allow(""),
|
|
1234
|
+
username: Joi.string().allow(""),
|
|
1235
|
+
phone_numbers: Joi.array().items(UserPlatformModel.UserPhoneNumbers()),
|
|
1236
|
+
emails: Joi.array().items(UserPlatformModel.UserEmails()),
|
|
1237
|
+
gender: Joi.string().allow(""),
|
|
1238
|
+
active: Joi.boolean(),
|
|
1239
|
+
archive: Joi.boolean(),
|
|
1240
|
+
status: Joi.string().allow(""),
|
|
1241
|
+
attributes: Joi.array().items(UserPlatformModel.UserAttribute()),
|
|
1242
|
+
first_name: Joi.string().allow(""),
|
|
1243
|
+
last_name: Joi.string().allow(""),
|
|
1244
|
+
account_type: Joi.string().allow(""),
|
|
1245
|
+
profile_pic_url: Joi.string().allow(""),
|
|
1246
|
+
has_old_password_hash: Joi.boolean(),
|
|
1247
|
+
user_id: Joi.string().allow(""),
|
|
1248
|
+
application_id: Joi.string().allow(""),
|
|
1249
|
+
is_encrypted: Joi.boolean(),
|
|
1250
|
+
created_at: Joi.string().allow(""),
|
|
1251
|
+
updated_at: Joi.string().allow(""),
|
|
1252
|
+
});
|
|
1253
|
+
}
|
|
1254
|
+
|
|
986
1255
|
/** @returns {CreateUserGroup} */
|
|
987
1256
|
static CreateUserGroup() {
|
|
988
1257
|
return Joi.object({
|
|
@@ -109,6 +109,7 @@ export = WebhookPlatformModel;
|
|
|
109
109
|
* @property {string} [name] - The name of the subscriber.
|
|
110
110
|
* @property {string} [provider] - The provider of the subscriber.
|
|
111
111
|
* @property {string} [webhook_url] - The URL for the subscriber's webhook.
|
|
112
|
+
* @property {string} [source] - Source that subscriber belongs to.
|
|
112
113
|
* @property {AssociationResp} [association]
|
|
113
114
|
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
114
115
|
* @property {SubscriberStatus} [status]
|
|
@@ -195,6 +196,7 @@ export = WebhookPlatformModel;
|
|
|
195
196
|
* @property {AssociationResp} [association]
|
|
196
197
|
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
197
198
|
* @property {SubscriberStatus} [status]
|
|
199
|
+
* @property {string} [source] - Source that subscriber belongs to.
|
|
198
200
|
* @property {string} [email_id] - The email ID associated with the subscriber.
|
|
199
201
|
* @property {string} [updated_on] - The date and time when the subscriber was
|
|
200
202
|
* last updated.
|
|
@@ -590,6 +592,10 @@ type SubscriberDetails = {
|
|
|
590
592
|
* - The URL for the subscriber's webhook.
|
|
591
593
|
*/
|
|
592
594
|
webhook_url?: string;
|
|
595
|
+
/**
|
|
596
|
+
* - Source that subscriber belongs to.
|
|
597
|
+
*/
|
|
598
|
+
source?: string;
|
|
593
599
|
association?: AssociationResp;
|
|
594
600
|
/**
|
|
595
601
|
* - Custom headers for the subscriber.
|
|
@@ -820,6 +826,10 @@ type SubscriberConfigResult = {
|
|
|
820
826
|
*/
|
|
821
827
|
custom_headers?: any;
|
|
822
828
|
status?: SubscriberStatus;
|
|
829
|
+
/**
|
|
830
|
+
* - Source that subscriber belongs to.
|
|
831
|
+
*/
|
|
832
|
+
source?: string;
|
|
823
833
|
/**
|
|
824
834
|
* - The email ID associated with the subscriber.
|
|
825
835
|
*/
|
|
@@ -119,6 +119,7 @@ const Joi = require("joi");
|
|
|
119
119
|
* @property {string} [name] - The name of the subscriber.
|
|
120
120
|
* @property {string} [provider] - The provider of the subscriber.
|
|
121
121
|
* @property {string} [webhook_url] - The URL for the subscriber's webhook.
|
|
122
|
+
* @property {string} [source] - Source that subscriber belongs to.
|
|
122
123
|
* @property {AssociationResp} [association]
|
|
123
124
|
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
124
125
|
* @property {SubscriberStatus} [status]
|
|
@@ -211,6 +212,7 @@ const Joi = require("joi");
|
|
|
211
212
|
* @property {AssociationResp} [association]
|
|
212
213
|
* @property {Object} [custom_headers] - Custom headers for the subscriber.
|
|
213
214
|
* @property {SubscriberStatus} [status]
|
|
215
|
+
* @property {string} [source] - Source that subscriber belongs to.
|
|
214
216
|
* @property {string} [email_id] - The email ID associated with the subscriber.
|
|
215
217
|
* @property {string} [updated_on] - The date and time when the subscriber was
|
|
216
218
|
* last updated.
|
|
@@ -458,6 +460,7 @@ class WebhookPlatformModel {
|
|
|
458
460
|
name: Joi.string().allow(""),
|
|
459
461
|
provider: Joi.string().allow(""),
|
|
460
462
|
webhook_url: Joi.string().allow(""),
|
|
463
|
+
source: Joi.string().allow("").allow(null),
|
|
461
464
|
association: WebhookPlatformModel.AssociationResp(),
|
|
462
465
|
custom_headers: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
|
|
463
466
|
status: WebhookPlatformModel.SubscriberStatus(),
|
|
@@ -557,6 +560,7 @@ class WebhookPlatformModel {
|
|
|
557
560
|
association: WebhookPlatformModel.AssociationResp(),
|
|
558
561
|
custom_headers: Joi.object().pattern(/\S/, Joi.any()),
|
|
559
562
|
status: WebhookPlatformModel.SubscriberStatus(),
|
|
563
|
+
source: Joi.string().allow("").allow(null),
|
|
560
564
|
email_id: Joi.string().allow(""),
|
|
561
565
|
updated_on: Joi.string().allow(""),
|
|
562
566
|
created_on: Joi.string().allow(""),
|