@gofynd/fdk-client-javascript 1.4.2-beta.2 → 1.4.2-beta.4
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/Cart/CartApplicationModel.d.ts +1742 -1726
- package/sdk/application/Cart/CartApplicationModel.js +1497 -1481
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
- package/sdk/application/Catalog/CatalogApplicationModel.js +1611 -1611
- 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 +1614 -1614
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1151 -1151
- package/sdk/application/Content/ContentApplicationModel.d.ts +797 -797
- package/sdk/application/Content/ContentApplicationModel.js +757 -757
- 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/LogisticApplicationModel.d.ts +666 -666
- package/sdk/application/Logistic/LogisticApplicationModel.js +601 -601
- package/sdk/application/Order/OrderApplicationModel.d.ts +852 -846
- package/sdk/application/Order/OrderApplicationModel.js +828 -822
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationClient.js +10 -10
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +2176 -2145
- package/sdk/application/Payment/PaymentApplicationModel.js +1474 -1453
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1462 -1462
- package/sdk/application/PosCart/PosCartApplicationModel.js +1260 -1260
- 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/ThemeApplicationModel.d.ts +895 -895
- package/sdk/application/Theme/ThemeApplicationModel.js +684 -684
- package/sdk/application/User/UserApplicationClient.d.ts +2 -2
- package/sdk/application/User/UserApplicationClient.js +4 -7
- package/sdk/application/User/UserApplicationModel.d.ts +769 -764
- package/sdk/application/User/UserApplicationModel.js +731 -741
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +63 -63
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +65 -65
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +661 -661
- package/sdk/partner/Lead/LeadPartnerModel.js +491 -491
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +223 -223
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +235 -235
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1087 -1087
- package/sdk/partner/Theme/ThemePartnerModel.js +819 -819
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +386 -386
- package/sdk/partner/Webhook/WebhookPartnerModel.js +342 -342
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +801 -801
- package/sdk/platform/Billing/BillingPlatformModel.js +783 -783
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3333 -3317
- package/sdk/platform/Cart/CartPlatformModel.js +2936 -2920
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +26 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +182 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +70 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +44 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -980
- package/sdk/platform/Catalog/CatalogPlatformModel.js +977 -933
- package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
- package/sdk/platform/Common/CommonPlatformModel.js +187 -187
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1238 -1238
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1273 -1273
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +661 -661
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +692 -692
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +3198 -3198
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2247 -2247
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1842 -1825
- package/sdk/platform/Content/ContentPlatformModel.js +1868 -1848
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
- package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +2 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -0
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +7 -4
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +882 -869
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +894 -878
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1044 -1044
- package/sdk/platform/Finance/FinancePlatformModel.js +974 -974
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
- package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +608 -608
- package/sdk/platform/Lead/LeadPlatformModel.js +465 -465
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5192 -5176
- package/sdk/platform/Order/OrderPlatformModel.js +4752 -4736
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
- package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2693 -2657
- package/sdk/platform/Payment/PaymentPlatformModel.js +1842 -1819
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
- package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +7 -6
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +11 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1674 -1539
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1663 -1534
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +4 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +4 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationClient.js +19 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +13 -3
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
- package/sdk/platform/Share/SharePlatformModel.js +139 -139
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1046 -1046
- package/sdk/platform/Theme/ThemePlatformModel.js +789 -789
- package/sdk/platform/User/UserPlatformModel.d.ts +823 -753
- package/sdk/platform/User/UserPlatformModel.js +731 -661
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +439 -439
- package/sdk/platform/Webhook/WebhookPlatformModel.js +364 -364
- package/sdk/public/Billing/BillingPublicModel.d.ts +55 -55
- package/sdk/public/Billing/BillingPublicModel.js +51 -51
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
- package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
- package/sdk/public/Content/ContentPublicModel.d.ts +26 -26
- package/sdk/public/Content/ContentPublicModel.js +28 -28
- 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/Webhook/WebhookPublicModel.d.ts +87 -87
- package/sdk/public/Webhook/WebhookPublicModel.js +93 -93
|
@@ -1,191 +1,191 @@
|
|
|
1
1
|
export = AuditTrailPlatformModel;
|
|
2
2
|
/**
|
|
3
|
-
* @typedef
|
|
4
|
-
* @property {
|
|
3
|
+
* @typedef RequestBodyAuditLog
|
|
4
|
+
* @property {LogMetaObj} log_meta
|
|
5
|
+
* @property {Object} log_payload
|
|
5
6
|
*/
|
|
6
7
|
/**
|
|
7
8
|
* @typedef CreateLogResponse
|
|
8
|
-
* @property {string} [internal_message]
|
|
9
9
|
* @property {string} [message]
|
|
10
|
+
* @property {string} [internal_message]
|
|
10
11
|
*/
|
|
11
12
|
/**
|
|
12
|
-
* @typedef
|
|
13
|
-
* @property {Object} [
|
|
14
|
-
* @property {string} [
|
|
13
|
+
* @typedef LogMetaObj
|
|
14
|
+
* @property {Object} [modifier]
|
|
15
|
+
* @property {string} [application]
|
|
16
|
+
* @property {EntityObject} [entity]
|
|
17
|
+
* @property {Object} [device_info]
|
|
18
|
+
* @property {Object} [location]
|
|
15
19
|
*/
|
|
16
20
|
/**
|
|
17
|
-
* @typedef
|
|
18
|
-
* @property {string} [action]
|
|
19
|
-
* @property {Object} [entity_details]
|
|
21
|
+
* @typedef EntityObject
|
|
20
22
|
* @property {string} [id]
|
|
21
23
|
* @property {string} [type]
|
|
24
|
+
* @property {string} [action]
|
|
22
25
|
*/
|
|
23
26
|
/**
|
|
24
|
-
* @typedef
|
|
25
|
-
* @property {
|
|
26
|
-
* @property {string} [id]
|
|
27
|
-
* @property {string} [type]
|
|
27
|
+
* @typedef LogSchemaResponse
|
|
28
|
+
* @property {LogDocs[]} [docs]
|
|
28
29
|
*/
|
|
29
30
|
/**
|
|
30
|
-
* @typedef
|
|
31
|
-
* @property {
|
|
32
|
-
* @property {
|
|
31
|
+
* @typedef LogDocs
|
|
32
|
+
* @property {EntityObj} [entity]
|
|
33
|
+
* @property {Modifier} [modifier]
|
|
34
|
+
* @property {DeviceInfo} [device_info]
|
|
35
|
+
* @property {Location} [location]
|
|
36
|
+
* @property {string} [_id]
|
|
37
|
+
* @property {string} [company]
|
|
38
|
+
* @property {string} [application]
|
|
39
|
+
* @property {string} [sessions]
|
|
40
|
+
* @property {string} [date]
|
|
41
|
+
* @property {Object} [logs]
|
|
33
42
|
*/
|
|
34
43
|
/**
|
|
35
|
-
* @typedef
|
|
36
|
-
* @property {
|
|
44
|
+
* @typedef EntityObj
|
|
45
|
+
* @property {string} [id]
|
|
46
|
+
* @property {string} [type]
|
|
47
|
+
* @property {string} [action]
|
|
48
|
+
* @property {Object} [entity_details]
|
|
37
49
|
*/
|
|
38
50
|
/**
|
|
39
|
-
* @typedef
|
|
40
|
-
* @property {string} [
|
|
41
|
-
* @property {
|
|
51
|
+
* @typedef Modifier
|
|
52
|
+
* @property {string} [user_id]
|
|
53
|
+
* @property {boolean} [as_administrator]
|
|
54
|
+
* @property {Object} [user_details]
|
|
42
55
|
*/
|
|
43
56
|
/**
|
|
44
|
-
* @typedef
|
|
57
|
+
* @typedef DeviceInfo
|
|
58
|
+
* @property {string} [user_agent]
|
|
45
59
|
* @property {Object} [extra_meta]
|
|
46
60
|
*/
|
|
47
61
|
/**
|
|
48
|
-
* @typedef
|
|
49
|
-
* @property {
|
|
50
|
-
* @property {string} [application]
|
|
51
|
-
* @property {string} [company]
|
|
52
|
-
* @property {string} [date]
|
|
53
|
-
* @property {DeviceInfo} [device_info]
|
|
54
|
-
* @property {EntityObj} [entity]
|
|
55
|
-
* @property {Location} [location]
|
|
56
|
-
* @property {Object} [logs]
|
|
57
|
-
* @property {Modifier} [modifier]
|
|
58
|
-
* @property {string} [sessions]
|
|
62
|
+
* @typedef Location
|
|
63
|
+
* @property {Object} [extra_meta]
|
|
59
64
|
*/
|
|
60
65
|
/**
|
|
61
|
-
* @typedef
|
|
62
|
-
* @property {string} [
|
|
63
|
-
* @property {Object} [device_info]
|
|
64
|
-
* @property {EntityObject} [entity]
|
|
65
|
-
* @property {Object} [location]
|
|
66
|
-
* @property {Object} [modifier]
|
|
66
|
+
* @typedef BadRequest
|
|
67
|
+
* @property {string} [message] - Failure message.
|
|
67
68
|
*/
|
|
68
69
|
/**
|
|
69
|
-
* @typedef
|
|
70
|
-
* @property {
|
|
70
|
+
* @typedef InternalServerError
|
|
71
|
+
* @property {string} [message] - Internal server Server error
|
|
72
|
+
* @property {string} [code] - Error code
|
|
71
73
|
*/
|
|
72
74
|
/**
|
|
73
|
-
* @typedef
|
|
74
|
-
* @property {
|
|
75
|
-
* @property {Object} [user_details]
|
|
76
|
-
* @property {string} [user_id]
|
|
75
|
+
* @typedef EntityTypesResponse
|
|
76
|
+
* @property {EntityTypeObj[]} [items]
|
|
77
77
|
*/
|
|
78
78
|
/**
|
|
79
|
-
* @typedef
|
|
80
|
-
* @property {
|
|
81
|
-
* @property {
|
|
79
|
+
* @typedef EntityTypeObj
|
|
80
|
+
* @property {string} [entity_value]
|
|
81
|
+
* @property {string} [display_name]
|
|
82
82
|
*/
|
|
83
83
|
declare class AuditTrailPlatformModel {
|
|
84
84
|
}
|
|
85
85
|
declare namespace AuditTrailPlatformModel {
|
|
86
|
-
export {
|
|
86
|
+
export { RequestBodyAuditLog, CreateLogResponse, LogMetaObj, EntityObject, LogSchemaResponse, LogDocs, EntityObj, Modifier, DeviceInfo, Location, BadRequest, InternalServerError, EntityTypesResponse, EntityTypeObj };
|
|
87
87
|
}
|
|
88
|
-
/** @returns {
|
|
89
|
-
declare function
|
|
90
|
-
type
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
*/
|
|
94
|
-
message?: string;
|
|
88
|
+
/** @returns {RequestBodyAuditLog} */
|
|
89
|
+
declare function RequestBodyAuditLog(): RequestBodyAuditLog;
|
|
90
|
+
type RequestBodyAuditLog = {
|
|
91
|
+
log_meta: LogMetaObj;
|
|
92
|
+
log_payload: any;
|
|
95
93
|
};
|
|
96
94
|
/** @returns {CreateLogResponse} */
|
|
97
95
|
declare function CreateLogResponse(): CreateLogResponse;
|
|
98
96
|
type CreateLogResponse = {
|
|
99
|
-
internal_message?: string;
|
|
100
97
|
message?: string;
|
|
98
|
+
internal_message?: string;
|
|
101
99
|
};
|
|
102
|
-
/** @returns {
|
|
103
|
-
declare function
|
|
104
|
-
type
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
type EntityObj = {
|
|
111
|
-
action?: string;
|
|
112
|
-
entity_details?: any;
|
|
113
|
-
id?: string;
|
|
114
|
-
type?: string;
|
|
100
|
+
/** @returns {LogMetaObj} */
|
|
101
|
+
declare function LogMetaObj(): LogMetaObj;
|
|
102
|
+
type LogMetaObj = {
|
|
103
|
+
modifier?: any;
|
|
104
|
+
application?: string;
|
|
105
|
+
entity?: EntityObject;
|
|
106
|
+
device_info?: any;
|
|
107
|
+
location?: any;
|
|
115
108
|
};
|
|
116
109
|
/** @returns {EntityObject} */
|
|
117
110
|
declare function EntityObject(): EntityObject;
|
|
118
111
|
type EntityObject = {
|
|
119
|
-
action?: string;
|
|
120
112
|
id?: string;
|
|
121
113
|
type?: string;
|
|
114
|
+
action?: string;
|
|
122
115
|
};
|
|
123
|
-
/** @returns {
|
|
124
|
-
declare function
|
|
125
|
-
type
|
|
126
|
-
|
|
127
|
-
entity_value?: string;
|
|
128
|
-
};
|
|
129
|
-
/** @returns {EntityTypesResponse} */
|
|
130
|
-
declare function EntityTypesResponse(): EntityTypesResponse;
|
|
131
|
-
type EntityTypesResponse = {
|
|
132
|
-
items?: EntityTypeObj[];
|
|
133
|
-
};
|
|
134
|
-
/** @returns {InternalServerError} */
|
|
135
|
-
declare function InternalServerError(): InternalServerError;
|
|
136
|
-
type InternalServerError = {
|
|
137
|
-
/**
|
|
138
|
-
* - Error code
|
|
139
|
-
*/
|
|
140
|
-
code?: string;
|
|
141
|
-
/**
|
|
142
|
-
* - Internal server Server error
|
|
143
|
-
*/
|
|
144
|
-
message?: string;
|
|
145
|
-
};
|
|
146
|
-
/** @returns {Location} */
|
|
147
|
-
declare function Location(): Location;
|
|
148
|
-
type Location = {
|
|
149
|
-
extra_meta?: any;
|
|
116
|
+
/** @returns {LogSchemaResponse} */
|
|
117
|
+
declare function LogSchemaResponse(): LogSchemaResponse;
|
|
118
|
+
type LogSchemaResponse = {
|
|
119
|
+
docs?: LogDocs[];
|
|
150
120
|
};
|
|
151
121
|
/** @returns {LogDocs} */
|
|
152
122
|
declare function LogDocs(): LogDocs;
|
|
153
123
|
type LogDocs = {
|
|
124
|
+
entity?: EntityObj;
|
|
125
|
+
modifier?: Modifier;
|
|
126
|
+
device_info?: DeviceInfo;
|
|
127
|
+
location?: Location;
|
|
154
128
|
_id?: string;
|
|
155
|
-
application?: string;
|
|
156
129
|
company?: string;
|
|
130
|
+
application?: string;
|
|
131
|
+
sessions?: string;
|
|
157
132
|
date?: string;
|
|
158
|
-
device_info?: DeviceInfo;
|
|
159
|
-
entity?: EntityObj;
|
|
160
|
-
location?: Location;
|
|
161
133
|
logs?: any;
|
|
162
|
-
modifier?: Modifier;
|
|
163
|
-
sessions?: string;
|
|
164
|
-
};
|
|
165
|
-
/** @returns {LogMetaObj} */
|
|
166
|
-
declare function LogMetaObj(): LogMetaObj;
|
|
167
|
-
type LogMetaObj = {
|
|
168
|
-
application?: string;
|
|
169
|
-
device_info?: any;
|
|
170
|
-
entity?: EntityObject;
|
|
171
|
-
location?: any;
|
|
172
|
-
modifier?: any;
|
|
173
134
|
};
|
|
174
|
-
/** @returns {
|
|
175
|
-
declare function
|
|
176
|
-
type
|
|
177
|
-
|
|
135
|
+
/** @returns {EntityObj} */
|
|
136
|
+
declare function EntityObj(): EntityObj;
|
|
137
|
+
type EntityObj = {
|
|
138
|
+
id?: string;
|
|
139
|
+
type?: string;
|
|
140
|
+
action?: string;
|
|
141
|
+
entity_details?: any;
|
|
178
142
|
};
|
|
179
143
|
/** @returns {Modifier} */
|
|
180
144
|
declare function Modifier(): Modifier;
|
|
181
145
|
type Modifier = {
|
|
146
|
+
user_id?: string;
|
|
182
147
|
as_administrator?: boolean;
|
|
183
148
|
user_details?: any;
|
|
184
|
-
user_id?: string;
|
|
185
149
|
};
|
|
186
|
-
/** @returns {
|
|
187
|
-
declare function
|
|
188
|
-
type
|
|
189
|
-
|
|
190
|
-
|
|
150
|
+
/** @returns {DeviceInfo} */
|
|
151
|
+
declare function DeviceInfo(): DeviceInfo;
|
|
152
|
+
type DeviceInfo = {
|
|
153
|
+
user_agent?: string;
|
|
154
|
+
extra_meta?: any;
|
|
155
|
+
};
|
|
156
|
+
/** @returns {Location} */
|
|
157
|
+
declare function Location(): Location;
|
|
158
|
+
type Location = {
|
|
159
|
+
extra_meta?: any;
|
|
160
|
+
};
|
|
161
|
+
/** @returns {BadRequest} */
|
|
162
|
+
declare function BadRequest(): BadRequest;
|
|
163
|
+
type BadRequest = {
|
|
164
|
+
/**
|
|
165
|
+
* - Failure message.
|
|
166
|
+
*/
|
|
167
|
+
message?: string;
|
|
168
|
+
};
|
|
169
|
+
/** @returns {InternalServerError} */
|
|
170
|
+
declare function InternalServerError(): InternalServerError;
|
|
171
|
+
type InternalServerError = {
|
|
172
|
+
/**
|
|
173
|
+
* - Internal server Server error
|
|
174
|
+
*/
|
|
175
|
+
message?: string;
|
|
176
|
+
/**
|
|
177
|
+
* - Error code
|
|
178
|
+
*/
|
|
179
|
+
code?: string;
|
|
180
|
+
};
|
|
181
|
+
/** @returns {EntityTypesResponse} */
|
|
182
|
+
declare function EntityTypesResponse(): EntityTypesResponse;
|
|
183
|
+
type EntityTypesResponse = {
|
|
184
|
+
items?: EntityTypeObj[];
|
|
185
|
+
};
|
|
186
|
+
/** @returns {EntityTypeObj} */
|
|
187
|
+
declare function EntityTypeObj(): EntityTypeObj;
|
|
188
|
+
type EntityTypeObj = {
|
|
189
|
+
entity_value?: string;
|
|
190
|
+
display_name?: string;
|
|
191
191
|
};
|
|
@@ -1,221 +1,221 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
5
|
-
* @property {
|
|
4
|
+
* @typedef RequestBodyAuditLog
|
|
5
|
+
* @property {LogMetaObj} log_meta
|
|
6
|
+
* @property {Object} log_payload
|
|
6
7
|
*/
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* @typedef CreateLogResponse
|
|
10
|
-
* @property {string} [internal_message]
|
|
11
11
|
* @property {string} [message]
|
|
12
|
+
* @property {string} [internal_message]
|
|
12
13
|
*/
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
|
-
* @typedef
|
|
16
|
-
* @property {Object} [
|
|
17
|
-
* @property {string} [
|
|
16
|
+
* @typedef LogMetaObj
|
|
17
|
+
* @property {Object} [modifier]
|
|
18
|
+
* @property {string} [application]
|
|
19
|
+
* @property {EntityObject} [entity]
|
|
20
|
+
* @property {Object} [device_info]
|
|
21
|
+
* @property {Object} [location]
|
|
18
22
|
*/
|
|
19
23
|
|
|
20
24
|
/**
|
|
21
|
-
* @typedef
|
|
22
|
-
* @property {string} [action]
|
|
23
|
-
* @property {Object} [entity_details]
|
|
25
|
+
* @typedef EntityObject
|
|
24
26
|
* @property {string} [id]
|
|
25
27
|
* @property {string} [type]
|
|
28
|
+
* @property {string} [action]
|
|
26
29
|
*/
|
|
27
30
|
|
|
28
31
|
/**
|
|
29
|
-
* @typedef
|
|
30
|
-
* @property {
|
|
31
|
-
* @property {string} [id]
|
|
32
|
-
* @property {string} [type]
|
|
32
|
+
* @typedef LogSchemaResponse
|
|
33
|
+
* @property {LogDocs[]} [docs]
|
|
33
34
|
*/
|
|
34
35
|
|
|
35
36
|
/**
|
|
36
|
-
* @typedef
|
|
37
|
-
* @property {
|
|
38
|
-
* @property {
|
|
37
|
+
* @typedef LogDocs
|
|
38
|
+
* @property {EntityObj} [entity]
|
|
39
|
+
* @property {Modifier} [modifier]
|
|
40
|
+
* @property {DeviceInfo} [device_info]
|
|
41
|
+
* @property {Location} [location]
|
|
42
|
+
* @property {string} [_id]
|
|
43
|
+
* @property {string} [company]
|
|
44
|
+
* @property {string} [application]
|
|
45
|
+
* @property {string} [sessions]
|
|
46
|
+
* @property {string} [date]
|
|
47
|
+
* @property {Object} [logs]
|
|
39
48
|
*/
|
|
40
49
|
|
|
41
50
|
/**
|
|
42
|
-
* @typedef
|
|
43
|
-
* @property {
|
|
51
|
+
* @typedef EntityObj
|
|
52
|
+
* @property {string} [id]
|
|
53
|
+
* @property {string} [type]
|
|
54
|
+
* @property {string} [action]
|
|
55
|
+
* @property {Object} [entity_details]
|
|
44
56
|
*/
|
|
45
57
|
|
|
46
58
|
/**
|
|
47
|
-
* @typedef
|
|
48
|
-
* @property {string} [
|
|
49
|
-
* @property {
|
|
59
|
+
* @typedef Modifier
|
|
60
|
+
* @property {string} [user_id]
|
|
61
|
+
* @property {boolean} [as_administrator]
|
|
62
|
+
* @property {Object} [user_details]
|
|
50
63
|
*/
|
|
51
64
|
|
|
52
65
|
/**
|
|
53
|
-
* @typedef
|
|
66
|
+
* @typedef DeviceInfo
|
|
67
|
+
* @property {string} [user_agent]
|
|
54
68
|
* @property {Object} [extra_meta]
|
|
55
69
|
*/
|
|
56
70
|
|
|
57
71
|
/**
|
|
58
|
-
* @typedef
|
|
59
|
-
* @property {
|
|
60
|
-
* @property {string} [application]
|
|
61
|
-
* @property {string} [company]
|
|
62
|
-
* @property {string} [date]
|
|
63
|
-
* @property {DeviceInfo} [device_info]
|
|
64
|
-
* @property {EntityObj} [entity]
|
|
65
|
-
* @property {Location} [location]
|
|
66
|
-
* @property {Object} [logs]
|
|
67
|
-
* @property {Modifier} [modifier]
|
|
68
|
-
* @property {string} [sessions]
|
|
72
|
+
* @typedef Location
|
|
73
|
+
* @property {Object} [extra_meta]
|
|
69
74
|
*/
|
|
70
75
|
|
|
71
76
|
/**
|
|
72
|
-
* @typedef
|
|
73
|
-
* @property {string} [
|
|
74
|
-
* @property {Object} [device_info]
|
|
75
|
-
* @property {EntityObject} [entity]
|
|
76
|
-
* @property {Object} [location]
|
|
77
|
-
* @property {Object} [modifier]
|
|
77
|
+
* @typedef BadRequest
|
|
78
|
+
* @property {string} [message] - Failure message.
|
|
78
79
|
*/
|
|
79
80
|
|
|
80
81
|
/**
|
|
81
|
-
* @typedef
|
|
82
|
-
* @property {
|
|
82
|
+
* @typedef InternalServerError
|
|
83
|
+
* @property {string} [message] - Internal server Server error
|
|
84
|
+
* @property {string} [code] - Error code
|
|
83
85
|
*/
|
|
84
86
|
|
|
85
87
|
/**
|
|
86
|
-
* @typedef
|
|
87
|
-
* @property {
|
|
88
|
-
* @property {Object} [user_details]
|
|
89
|
-
* @property {string} [user_id]
|
|
88
|
+
* @typedef EntityTypesResponse
|
|
89
|
+
* @property {EntityTypeObj[]} [items]
|
|
90
90
|
*/
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
|
-
* @typedef
|
|
94
|
-
* @property {
|
|
95
|
-
* @property {
|
|
93
|
+
* @typedef EntityTypeObj
|
|
94
|
+
* @property {string} [entity_value]
|
|
95
|
+
* @property {string} [display_name]
|
|
96
96
|
*/
|
|
97
97
|
|
|
98
98
|
class AuditTrailPlatformModel {
|
|
99
|
-
/** @returns {
|
|
100
|
-
static
|
|
99
|
+
/** @returns {RequestBodyAuditLog} */
|
|
100
|
+
static RequestBodyAuditLog() {
|
|
101
101
|
return Joi.object({
|
|
102
|
-
|
|
102
|
+
log_meta: AuditTrailPlatformModel.LogMetaObj().required(),
|
|
103
|
+
log_payload: Joi.any().required(),
|
|
103
104
|
});
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
/** @returns {CreateLogResponse} */
|
|
107
108
|
static CreateLogResponse() {
|
|
108
109
|
return Joi.object({
|
|
109
|
-
internal_message: Joi.string().allow(""),
|
|
110
110
|
message: Joi.string().allow(""),
|
|
111
|
+
internal_message: Joi.string().allow(""),
|
|
111
112
|
});
|
|
112
113
|
}
|
|
113
114
|
|
|
114
|
-
/** @returns {
|
|
115
|
-
static
|
|
115
|
+
/** @returns {LogMetaObj} */
|
|
116
|
+
static LogMetaObj() {
|
|
116
117
|
return Joi.object({
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
modifier: Joi.any(),
|
|
119
|
+
application: Joi.string().allow(""),
|
|
120
|
+
entity: AuditTrailPlatformModel.EntityObject(),
|
|
121
|
+
device_info: Joi.any(),
|
|
122
|
+
location: Joi.any(),
|
|
119
123
|
});
|
|
120
124
|
}
|
|
121
125
|
|
|
122
|
-
/** @returns {
|
|
123
|
-
static
|
|
126
|
+
/** @returns {EntityObject} */
|
|
127
|
+
static EntityObject() {
|
|
124
128
|
return Joi.object({
|
|
125
|
-
action: Joi.string().allow(""),
|
|
126
|
-
entity_details: Joi.any(),
|
|
127
129
|
id: Joi.string().allow(""),
|
|
128
130
|
type: Joi.string().allow(""),
|
|
131
|
+
action: Joi.string().allow(""),
|
|
129
132
|
});
|
|
130
133
|
}
|
|
131
134
|
|
|
132
|
-
/** @returns {
|
|
133
|
-
static
|
|
135
|
+
/** @returns {LogSchemaResponse} */
|
|
136
|
+
static LogSchemaResponse() {
|
|
134
137
|
return Joi.object({
|
|
135
|
-
|
|
136
|
-
id: Joi.string().allow(""),
|
|
137
|
-
type: Joi.string().allow(""),
|
|
138
|
+
docs: Joi.array().items(AuditTrailPlatformModel.LogDocs()),
|
|
138
139
|
});
|
|
139
140
|
}
|
|
140
141
|
|
|
141
|
-
/** @returns {
|
|
142
|
-
static
|
|
142
|
+
/** @returns {LogDocs} */
|
|
143
|
+
static LogDocs() {
|
|
143
144
|
return Joi.object({
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
entity: AuditTrailPlatformModel.EntityObj(),
|
|
146
|
+
modifier: AuditTrailPlatformModel.Modifier(),
|
|
147
|
+
device_info: AuditTrailPlatformModel.DeviceInfo(),
|
|
148
|
+
location: AuditTrailPlatformModel.Location(),
|
|
149
|
+
_id: Joi.string().allow(""),
|
|
150
|
+
company: Joi.string().allow(""),
|
|
151
|
+
application: Joi.string().allow(""),
|
|
152
|
+
sessions: Joi.string().allow(""),
|
|
153
|
+
date: Joi.string().allow(""),
|
|
154
|
+
logs: Joi.any(),
|
|
146
155
|
});
|
|
147
156
|
}
|
|
148
157
|
|
|
149
|
-
/** @returns {
|
|
150
|
-
static
|
|
158
|
+
/** @returns {EntityObj} */
|
|
159
|
+
static EntityObj() {
|
|
151
160
|
return Joi.object({
|
|
152
|
-
|
|
161
|
+
id: Joi.string().allow(""),
|
|
162
|
+
type: Joi.string().allow(""),
|
|
163
|
+
action: Joi.string().allow(""),
|
|
164
|
+
entity_details: Joi.any(),
|
|
153
165
|
});
|
|
154
166
|
}
|
|
155
167
|
|
|
156
|
-
/** @returns {
|
|
157
|
-
static
|
|
168
|
+
/** @returns {Modifier} */
|
|
169
|
+
static Modifier() {
|
|
158
170
|
return Joi.object({
|
|
159
|
-
|
|
160
|
-
|
|
171
|
+
user_id: Joi.string().allow(""),
|
|
172
|
+
as_administrator: Joi.boolean(),
|
|
173
|
+
user_details: Joi.any(),
|
|
161
174
|
});
|
|
162
175
|
}
|
|
163
176
|
|
|
164
|
-
/** @returns {
|
|
165
|
-
static
|
|
177
|
+
/** @returns {DeviceInfo} */
|
|
178
|
+
static DeviceInfo() {
|
|
166
179
|
return Joi.object({
|
|
180
|
+
user_agent: Joi.string().allow(""),
|
|
167
181
|
extra_meta: Joi.any(),
|
|
168
182
|
});
|
|
169
183
|
}
|
|
170
184
|
|
|
171
|
-
/** @returns {
|
|
172
|
-
static
|
|
185
|
+
/** @returns {Location} */
|
|
186
|
+
static Location() {
|
|
173
187
|
return Joi.object({
|
|
174
|
-
|
|
175
|
-
application: Joi.string().allow(""),
|
|
176
|
-
company: Joi.string().allow(""),
|
|
177
|
-
date: Joi.string().allow(""),
|
|
178
|
-
device_info: AuditTrailPlatformModel.DeviceInfo(),
|
|
179
|
-
entity: AuditTrailPlatformModel.EntityObj(),
|
|
180
|
-
location: AuditTrailPlatformModel.Location(),
|
|
181
|
-
logs: Joi.any(),
|
|
182
|
-
modifier: AuditTrailPlatformModel.Modifier(),
|
|
183
|
-
sessions: Joi.string().allow(""),
|
|
188
|
+
extra_meta: Joi.any(),
|
|
184
189
|
});
|
|
185
190
|
}
|
|
186
191
|
|
|
187
|
-
/** @returns {
|
|
188
|
-
static
|
|
192
|
+
/** @returns {BadRequest} */
|
|
193
|
+
static BadRequest() {
|
|
189
194
|
return Joi.object({
|
|
190
|
-
|
|
191
|
-
device_info: Joi.any(),
|
|
192
|
-
entity: AuditTrailPlatformModel.EntityObject(),
|
|
193
|
-
location: Joi.any(),
|
|
194
|
-
modifier: Joi.any(),
|
|
195
|
+
message: Joi.string().allow(""),
|
|
195
196
|
});
|
|
196
197
|
}
|
|
197
198
|
|
|
198
|
-
/** @returns {
|
|
199
|
-
static
|
|
199
|
+
/** @returns {InternalServerError} */
|
|
200
|
+
static InternalServerError() {
|
|
200
201
|
return Joi.object({
|
|
201
|
-
|
|
202
|
+
message: Joi.string().allow(""),
|
|
203
|
+
code: Joi.string().allow(""),
|
|
202
204
|
});
|
|
203
205
|
}
|
|
204
206
|
|
|
205
|
-
/** @returns {
|
|
206
|
-
static
|
|
207
|
+
/** @returns {EntityTypesResponse} */
|
|
208
|
+
static EntityTypesResponse() {
|
|
207
209
|
return Joi.object({
|
|
208
|
-
|
|
209
|
-
user_details: Joi.any(),
|
|
210
|
-
user_id: Joi.string().allow(""),
|
|
210
|
+
items: Joi.array().items(AuditTrailPlatformModel.EntityTypeObj()),
|
|
211
211
|
});
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
/** @returns {
|
|
215
|
-
static
|
|
214
|
+
/** @returns {EntityTypeObj} */
|
|
215
|
+
static EntityTypeObj() {
|
|
216
216
|
return Joi.object({
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
entity_value: Joi.string().allow(""),
|
|
218
|
+
display_name: Joi.string().allow(""),
|
|
219
219
|
});
|
|
220
220
|
}
|
|
221
221
|
}
|