@gofynd/fdk-client-javascript 1.5.2 → 1.6.1
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/CartApplicationClient.js +293 -0
- package/sdk/application/Catalog/CatalogApplicationClient.js +408 -0
- package/sdk/application/Common/CommonApplicationClient.js +21 -0
- package/sdk/application/Communication/CommunicationApplicationClient.js +29 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +147 -0
- package/sdk/application/Content/ContentApplicationClient.js +226 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +43 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +21 -0
- package/sdk/application/Lead/LeadApplicationClient.js +73 -0
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +1 -1
- package/sdk/application/Logistic/LogisticApplicationClient.js +192 -3
- package/sdk/application/Order/OrderApplicationClient.js +202 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +454 -0
- package/sdk/application/Rewards/RewardsApplicationClient.js +68 -0
- package/sdk/application/Share/ShareApplicationClient.js +96 -0
- package/sdk/application/Theme/ThemeApplicationClient.js +64 -0
- package/sdk/application/User/UserApplicationClient.js +412 -0
- package/sdk/application/Webhook/WebhookApplicationClient.js +13 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +75 -0
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +6 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +16 -3
- package/sdk/partner/Webhook/WebhookPartnerModel.js +5 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +46 -23
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -23
- package/sdk/platform/Cart/CartPlatformModel.d.ts +90 -1
- package/sdk/platform/Cart/CartPlatformModel.js +51 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -12
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +0 -81
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -10
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -12
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +82 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +10 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +12 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +108 -1
- package/sdk/platform/Payment/PaymentPlatformModel.js +77 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +2 -2
- package/sdk/platform/User/UserPlatformModel.js +2 -2
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +58 -14
- package/sdk/platform/Webhook/WebhookPlatformModel.js +15 -14
- package/sdk/public/Catalog/CatalogPublicClient.js +15 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.js +16 -0
- package/sdk/public/Content/ContentPublicClient.js +116 -0
- package/sdk/public/Partner/PartnerPublicClient.js +15 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +40 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +194 -46
- package/sdk/public/Webhook/WebhookPublicModel.js +51 -46
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
const {
|
|
2
|
+
FDKClientValidationError,
|
|
3
|
+
FDKResponseValidationError,
|
|
4
|
+
} = require("../../common/FDKError");
|
|
5
|
+
|
|
1
6
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
7
|
const constructUrl = require("../constructUrl");
|
|
3
8
|
const Paginator = require("../../common/Paginator");
|
|
@@ -37,6 +42,14 @@ class Webhook {
|
|
|
37
42
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
38
43
|
{ responseHeaders } = { responseHeaders: false }
|
|
39
44
|
) {
|
|
45
|
+
let invalidInput = [];
|
|
46
|
+
if (invalidInput.length) {
|
|
47
|
+
const error = new Error();
|
|
48
|
+
error.message = "Missing required field";
|
|
49
|
+
error.details = invalidInput;
|
|
50
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
51
|
+
}
|
|
52
|
+
|
|
40
53
|
const query_params = {};
|
|
41
54
|
|
|
42
55
|
const xHeaders = {};
|
|
@@ -142,5 +142,15 @@ declare class FileStorage {
|
|
|
142
142
|
* @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/saveProxyDetails/).
|
|
143
143
|
*/
|
|
144
144
|
saveProxyDetails({ body, requestHeaders }?: FileStoragePartnerValidator.SaveProxyDetailsParam, { responseHeaders }?: object): Promise<FileStoragePartnerModel.SaveProxy>;
|
|
145
|
+
/**
|
|
146
|
+
* @param {FileStoragePartnerValidator.SignUrlsParam} arg - Arg object.
|
|
147
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
148
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
149
|
+
* @returns {Promise<FileStoragePartnerModel.SignUrlResult>} - Success response
|
|
150
|
+
* @name signUrls
|
|
151
|
+
* @summary: Signs file URLs
|
|
152
|
+
* @description: Generates secure, signed URLs that is valid for certain expiry time for accessing stored files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/signUrls/).
|
|
153
|
+
*/
|
|
154
|
+
signUrls({ body, requestHeaders }?: FileStoragePartnerValidator.SignUrlsParam, { responseHeaders }?: object): Promise<FileStoragePartnerModel.SignUrlResult>;
|
|
145
155
|
}
|
|
146
156
|
import FileStoragePartnerModel = require("./FileStoragePartnerModel");
|
|
@@ -853,5 +853,80 @@ class FileStorage {
|
|
|
853
853
|
|
|
854
854
|
return response;
|
|
855
855
|
}
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* @param {FileStoragePartnerValidator.SignUrlsParam} arg - Arg object.
|
|
859
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
860
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
861
|
+
* @returns {Promise<FileStoragePartnerModel.SignUrlResult>} - Success response
|
|
862
|
+
* @name signUrls
|
|
863
|
+
* @summary: Signs file URLs
|
|
864
|
+
* @description: Generates secure, signed URLs that is valid for certain expiry time for accessing stored files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/signUrls/).
|
|
865
|
+
*/
|
|
866
|
+
async signUrls(
|
|
867
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
868
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
869
|
+
) {
|
|
870
|
+
const { error } = FileStoragePartnerValidator.signUrls().validate(
|
|
871
|
+
{
|
|
872
|
+
body,
|
|
873
|
+
},
|
|
874
|
+
{ abortEarly: false, allowUnknown: true }
|
|
875
|
+
);
|
|
876
|
+
if (error) {
|
|
877
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
// Showing warrnings if extra unknown parameters are found
|
|
881
|
+
const { error: warrning } = FileStoragePartnerValidator.signUrls().validate(
|
|
882
|
+
{
|
|
883
|
+
body,
|
|
884
|
+
},
|
|
885
|
+
{ abortEarly: false, allowUnknown: false }
|
|
886
|
+
);
|
|
887
|
+
if (warrning) {
|
|
888
|
+
Logger({
|
|
889
|
+
level: "WARN",
|
|
890
|
+
message: `Parameter Validation warrnings for partner > FileStorage > signUrls \n ${warrning}`,
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
const query_params = {};
|
|
895
|
+
|
|
896
|
+
const response = await PartnerAPIClient.execute(
|
|
897
|
+
this.config,
|
|
898
|
+
"post",
|
|
899
|
+
`/service/partner/assets/v1.0/organization/${this.config.organizationId}/sign-urls`,
|
|
900
|
+
query_params,
|
|
901
|
+
body,
|
|
902
|
+
requestHeaders,
|
|
903
|
+
{ responseHeaders }
|
|
904
|
+
);
|
|
905
|
+
|
|
906
|
+
let responseData = response;
|
|
907
|
+
if (responseHeaders) {
|
|
908
|
+
responseData = response[0];
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
const {
|
|
912
|
+
error: res_error,
|
|
913
|
+
} = FileStoragePartnerModel.SignUrlResult().validate(responseData, {
|
|
914
|
+
abortEarly: false,
|
|
915
|
+
allowUnknown: true,
|
|
916
|
+
});
|
|
917
|
+
|
|
918
|
+
if (res_error) {
|
|
919
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
920
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
921
|
+
} else {
|
|
922
|
+
Logger({
|
|
923
|
+
level: "WARN",
|
|
924
|
+
message: `Response Validation Warnings for partner > FileStorage > signUrls \n ${res_error}`,
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
return response;
|
|
930
|
+
}
|
|
856
931
|
}
|
|
857
932
|
module.exports = FileStorage;
|
|
@@ -95,10 +95,26 @@ export = FileStoragePartnerModel;
|
|
|
95
95
|
* @typedef FailedBrowseFilesResult
|
|
96
96
|
* @property {string} message
|
|
97
97
|
*/
|
|
98
|
+
/**
|
|
99
|
+
* @typedef SignedUrl
|
|
100
|
+
* @property {string} url - This is the original asset URL provided in the
|
|
101
|
+
* request. This is the URL for which a signed URL has been generated.
|
|
102
|
+
* @property {string} signed_url - Generated signed URL.
|
|
103
|
+
* @property {number} expiry - The expiration time for the signed URL in seconds.
|
|
104
|
+
*/
|
|
105
|
+
/**
|
|
106
|
+
* @typedef SignUrlResult
|
|
107
|
+
* @property {SignedUrl[]} urls - Signed URL object.
|
|
108
|
+
*/
|
|
109
|
+
/**
|
|
110
|
+
* @typedef SignUrl
|
|
111
|
+
* @property {number} expiry - The expiration time for the signed URL.
|
|
112
|
+
* @property {string[]} urls - List of asset URLs to be signed.
|
|
113
|
+
*/
|
|
98
114
|
declare class FileStoragePartnerModel {
|
|
99
115
|
}
|
|
100
116
|
declare namespace FileStoragePartnerModel {
|
|
101
|
-
export { SizeConstraints, SaveProxy, ProxyFileData, ProxyFile, FetchProxyDetails, NamespaceDetails, AllNamespaceDetails, CDN, Upload, FileUpload, FileUploadStart, CreatedBy, FileUploadComplete, FailedBrowseFilesResult };
|
|
117
|
+
export { SizeConstraints, SaveProxy, ProxyFileData, ProxyFile, FetchProxyDetails, NamespaceDetails, AllNamespaceDetails, CDN, Upload, FileUpload, FileUploadStart, CreatedBy, FileUploadComplete, FailedBrowseFilesResult, SignedUrl, SignUrlResult, SignUrl };
|
|
102
118
|
}
|
|
103
119
|
/** @returns {SizeConstraints} */
|
|
104
120
|
declare function SizeConstraints(): SizeConstraints;
|
|
@@ -222,3 +238,40 @@ declare function FailedBrowseFilesResult(): FailedBrowseFilesResult;
|
|
|
222
238
|
type FailedBrowseFilesResult = {
|
|
223
239
|
message: string;
|
|
224
240
|
};
|
|
241
|
+
/** @returns {SignedUrl} */
|
|
242
|
+
declare function SignedUrl(): SignedUrl;
|
|
243
|
+
type SignedUrl = {
|
|
244
|
+
/**
|
|
245
|
+
* - This is the original asset URL provided in the
|
|
246
|
+
* request. This is the URL for which a signed URL has been generated.
|
|
247
|
+
*/
|
|
248
|
+
url: string;
|
|
249
|
+
/**
|
|
250
|
+
* - Generated signed URL.
|
|
251
|
+
*/
|
|
252
|
+
signed_url: string;
|
|
253
|
+
/**
|
|
254
|
+
* - The expiration time for the signed URL in seconds.
|
|
255
|
+
*/
|
|
256
|
+
expiry: number;
|
|
257
|
+
};
|
|
258
|
+
/** @returns {SignUrlResult} */
|
|
259
|
+
declare function SignUrlResult(): SignUrlResult;
|
|
260
|
+
type SignUrlResult = {
|
|
261
|
+
/**
|
|
262
|
+
* - Signed URL object.
|
|
263
|
+
*/
|
|
264
|
+
urls: SignedUrl[];
|
|
265
|
+
};
|
|
266
|
+
/** @returns {SignUrl} */
|
|
267
|
+
declare function SignUrl(): SignUrl;
|
|
268
|
+
type SignUrl = {
|
|
269
|
+
/**
|
|
270
|
+
* - The expiration time for the signed URL.
|
|
271
|
+
*/
|
|
272
|
+
expiry: number;
|
|
273
|
+
/**
|
|
274
|
+
* - List of asset URLs to be signed.
|
|
275
|
+
*/
|
|
276
|
+
urls: string[];
|
|
277
|
+
};
|
|
@@ -110,6 +110,25 @@ const Joi = require("joi");
|
|
|
110
110
|
* @property {string} message
|
|
111
111
|
*/
|
|
112
112
|
|
|
113
|
+
/**
|
|
114
|
+
* @typedef SignedUrl
|
|
115
|
+
* @property {string} url - This is the original asset URL provided in the
|
|
116
|
+
* request. This is the URL for which a signed URL has been generated.
|
|
117
|
+
* @property {string} signed_url - Generated signed URL.
|
|
118
|
+
* @property {number} expiry - The expiration time for the signed URL in seconds.
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @typedef SignUrlResult
|
|
123
|
+
* @property {SignedUrl[]} urls - Signed URL object.
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @typedef SignUrl
|
|
128
|
+
* @property {number} expiry - The expiration time for the signed URL.
|
|
129
|
+
* @property {string[]} urls - List of asset URLs to be signed.
|
|
130
|
+
*/
|
|
131
|
+
|
|
113
132
|
class FileStoragePartnerModel {
|
|
114
133
|
/** @returns {SizeConstraints} */
|
|
115
134
|
static SizeConstraints() {
|
|
@@ -249,5 +268,29 @@ class FileStoragePartnerModel {
|
|
|
249
268
|
message: Joi.string().allow("").required(),
|
|
250
269
|
});
|
|
251
270
|
}
|
|
271
|
+
|
|
272
|
+
/** @returns {SignedUrl} */
|
|
273
|
+
static SignedUrl() {
|
|
274
|
+
return Joi.object({
|
|
275
|
+
url: Joi.string().allow("").required(),
|
|
276
|
+
signed_url: Joi.string().allow("").required(),
|
|
277
|
+
expiry: Joi.number().required(),
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/** @returns {SignUrlResult} */
|
|
282
|
+
static SignUrlResult() {
|
|
283
|
+
return Joi.object({
|
|
284
|
+
urls: Joi.array().items(FileStoragePartnerModel.SignedUrl()).required(),
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/** @returns {SignUrl} */
|
|
289
|
+
static SignUrl() {
|
|
290
|
+
return Joi.object({
|
|
291
|
+
expiry: Joi.number().required(),
|
|
292
|
+
urls: Joi.array().items(Joi.string().allow("")).required(),
|
|
293
|
+
});
|
|
294
|
+
}
|
|
252
295
|
}
|
|
253
296
|
module.exports = FileStoragePartnerModel;
|
|
@@ -75,6 +75,12 @@ class FileStorageValidator {
|
|
|
75
75
|
body: FileStorageModel.ProxyFile().required(),
|
|
76
76
|
}).required();
|
|
77
77
|
}
|
|
78
|
+
|
|
79
|
+
static signUrls() {
|
|
80
|
+
return Joi.object({
|
|
81
|
+
body: FileStorageModel.SignUrl().required(),
|
|
82
|
+
}).required();
|
|
83
|
+
}
|
|
78
84
|
}
|
|
79
85
|
|
|
80
86
|
module.exports = FileStorageValidator;
|
|
@@ -171,7 +171,7 @@ export = WebhookPartnerModel;
|
|
|
171
171
|
*/
|
|
172
172
|
/**
|
|
173
173
|
* @typedef DeliveryTsResult
|
|
174
|
-
* @property {DeliveryTsSchema[]} [delivery_ts]
|
|
174
|
+
* @property {DeliveryTsSchema[]} [delivery_ts] - List of delivery timestamps.
|
|
175
175
|
*/
|
|
176
176
|
/**
|
|
177
177
|
* @typedef DeliveryTsSchema
|
|
@@ -251,7 +251,8 @@ export = WebhookPartnerModel;
|
|
|
251
251
|
*/
|
|
252
252
|
/**
|
|
253
253
|
* @typedef ResponseTimeTs
|
|
254
|
-
* @property {AvgResponseTime[]} [avg_response_time_ts]
|
|
254
|
+
* @property {AvgResponseTime[]} [avg_response_time_ts] - List of average
|
|
255
|
+
* response time timestamps.
|
|
255
256
|
*/
|
|
256
257
|
/**
|
|
257
258
|
* @typedef AvgResponseTime
|
|
@@ -266,7 +267,8 @@ export = WebhookPartnerModel;
|
|
|
266
267
|
*/
|
|
267
268
|
/**
|
|
268
269
|
* @typedef DeliverySummaryResult
|
|
269
|
-
* @property {DeliveryEventLevelSchema[]} [delivery_event_level]
|
|
270
|
+
* @property {DeliveryEventLevelSchema[]} [delivery_event_level] - List of
|
|
271
|
+
* delivery event levels.
|
|
270
272
|
* @property {DeliverySummarySchema} [delivery_summary]
|
|
271
273
|
*/
|
|
272
274
|
/**
|
|
@@ -694,6 +696,9 @@ type FilterReportResult = {
|
|
|
694
696
|
/** @returns {DeliveryTsResult} */
|
|
695
697
|
declare function DeliveryTsResult(): DeliveryTsResult;
|
|
696
698
|
type DeliveryTsResult = {
|
|
699
|
+
/**
|
|
700
|
+
* - List of delivery timestamps.
|
|
701
|
+
*/
|
|
697
702
|
delivery_ts?: DeliveryTsSchema[];
|
|
698
703
|
};
|
|
699
704
|
/** @returns {DeliveryTsSchema} */
|
|
@@ -908,6 +913,10 @@ type DeliveryEventLevelSchema = {
|
|
|
908
913
|
/** @returns {ResponseTimeTs} */
|
|
909
914
|
declare function ResponseTimeTs(): ResponseTimeTs;
|
|
910
915
|
type ResponseTimeTs = {
|
|
916
|
+
/**
|
|
917
|
+
* - List of average
|
|
918
|
+
* response time timestamps.
|
|
919
|
+
*/
|
|
911
920
|
avg_response_time_ts?: AvgResponseTime[];
|
|
912
921
|
};
|
|
913
922
|
/** @returns {AvgResponseTime} */
|
|
@@ -940,6 +949,10 @@ type AvgResponseTime = {
|
|
|
940
949
|
/** @returns {DeliverySummaryResult} */
|
|
941
950
|
declare function DeliverySummaryResult(): DeliverySummaryResult;
|
|
942
951
|
type DeliverySummaryResult = {
|
|
952
|
+
/**
|
|
953
|
+
* - List of
|
|
954
|
+
* delivery event levels.
|
|
955
|
+
*/
|
|
943
956
|
delivery_event_level?: DeliveryEventLevelSchema[];
|
|
944
957
|
delivery_summary?: DeliverySummarySchema;
|
|
945
958
|
};
|
|
@@ -192,7 +192,7 @@ const Joi = require("joi");
|
|
|
192
192
|
|
|
193
193
|
/**
|
|
194
194
|
* @typedef DeliveryTsResult
|
|
195
|
-
* @property {DeliveryTsSchema[]} [delivery_ts]
|
|
195
|
+
* @property {DeliveryTsSchema[]} [delivery_ts] - List of delivery timestamps.
|
|
196
196
|
*/
|
|
197
197
|
|
|
198
198
|
/**
|
|
@@ -280,7 +280,8 @@ const Joi = require("joi");
|
|
|
280
280
|
|
|
281
281
|
/**
|
|
282
282
|
* @typedef ResponseTimeTs
|
|
283
|
-
* @property {AvgResponseTime[]} [avg_response_time_ts]
|
|
283
|
+
* @property {AvgResponseTime[]} [avg_response_time_ts] - List of average
|
|
284
|
+
* response time timestamps.
|
|
284
285
|
*/
|
|
285
286
|
|
|
286
287
|
/**
|
|
@@ -297,7 +298,8 @@ const Joi = require("joi");
|
|
|
297
298
|
|
|
298
299
|
/**
|
|
299
300
|
* @typedef DeliverySummaryResult
|
|
300
|
-
* @property {DeliveryEventLevelSchema[]} [delivery_event_level]
|
|
301
|
+
* @property {DeliveryEventLevelSchema[]} [delivery_event_level] - List of
|
|
302
|
+
* delivery event levels.
|
|
301
303
|
* @property {DeliverySummarySchema} [delivery_summary]
|
|
302
304
|
*/
|
|
303
305
|
|
|
@@ -9,7 +9,7 @@ export = AnalyticsPlatformApplicationValidator;
|
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* @typedef StartDownloadForQueryV2Param
|
|
12
|
-
* @property {string} exportType
|
|
12
|
+
* @property {string} exportType - Format in which to be exported(eg. CSV or excel).
|
|
13
13
|
* @property {AnalyticsPlatformModel.FileDownloadRequestBody} body
|
|
14
14
|
*/
|
|
15
15
|
declare class AnalyticsPlatformApplicationValidator {
|
|
@@ -33,6 +33,9 @@ type ExecuteJobForProvidedParametersV2Param = {
|
|
|
33
33
|
body: AnalyticsPlatformModel.JobExecute;
|
|
34
34
|
};
|
|
35
35
|
type StartDownloadForQueryV2Param = {
|
|
36
|
+
/**
|
|
37
|
+
* - Format in which to be exported(eg. CSV or excel).
|
|
38
|
+
*/
|
|
36
39
|
exportType: string;
|
|
37
40
|
body: AnalyticsPlatformModel.FileDownloadRequestBody;
|
|
38
41
|
};
|
|
@@ -14,7 +14,7 @@ const AnalyticsPlatformModel = require("./AnalyticsPlatformModel");
|
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @typedef StartDownloadForQueryV2Param
|
|
17
|
-
* @property {string} exportType
|
|
17
|
+
* @property {string} exportType - Format in which to be exported(eg. CSV or excel).
|
|
18
18
|
* @property {AnalyticsPlatformModel.FileDownloadRequestBody} body
|
|
19
19
|
*/
|
|
20
20
|
|
|
@@ -2,71 +2,94 @@ export = AuditTrailPlatformModel;
|
|
|
2
2
|
/**
|
|
3
3
|
* @typedef RequestBodyAuditLog
|
|
4
4
|
* @property {LogMetaObj} log_meta
|
|
5
|
-
* @property {Object} log_payload
|
|
5
|
+
* @property {Object} log_payload - Detailed information about payload.
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
8
|
* @typedef CreateLogResp
|
|
9
|
-
* @property {string} [message]
|
|
10
|
-
* @property {string} [internal_message]
|
|
9
|
+
* @property {string} [message] - Acknowledgement about success or failure of audit log.
|
|
10
|
+
* @property {string} [internal_message] - Status of audit log in internal system.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
13
|
* @typedef LogMetaObj
|
|
14
|
-
* @property {Object} [modifier]
|
|
15
|
-
* @property {string} [application]
|
|
14
|
+
* @property {Object} [modifier] - Details about user responsible for modifying events.
|
|
15
|
+
* @property {string} [application] - The application id generating the log event.
|
|
16
16
|
* @property {EntityObject} [entity]
|
|
17
|
-
* @property {Object} [device_info]
|
|
18
|
-
*
|
|
19
|
-
* @property {
|
|
17
|
+
* @property {Object} [device_info] - Contains device-specific information for
|
|
18
|
+
* the log event.
|
|
19
|
+
* @property {Object} [location] - Holds location-related data for the event context.
|
|
20
|
+
* @property {string} [sessions] - Identifies the session associated with the log event.
|
|
20
21
|
*/
|
|
21
22
|
/**
|
|
22
23
|
* @typedef EntityObject
|
|
23
|
-
* @property {string} [id]
|
|
24
|
-
* @property {string} [type]
|
|
25
|
-
* @property {string} [action]
|
|
26
|
-
*/
|
|
27
|
-
/**
|
|
28
|
-
* @typedef BadRequestSchema
|
|
29
|
-
* @property {string} [message] - Failure message.
|
|
24
|
+
* @property {string} [id] - Unique identifier for the entity.
|
|
25
|
+
* @property {string} [type] - The type/category of the entity.
|
|
26
|
+
* @property {string} [action] - The action performed on or by the entity.
|
|
30
27
|
*/
|
|
31
28
|
declare class AuditTrailPlatformModel {
|
|
32
29
|
}
|
|
33
30
|
declare namespace AuditTrailPlatformModel {
|
|
34
|
-
export { RequestBodyAuditLog, CreateLogResp, LogMetaObj, EntityObject
|
|
31
|
+
export { RequestBodyAuditLog, CreateLogResp, LogMetaObj, EntityObject };
|
|
35
32
|
}
|
|
36
33
|
/** @returns {RequestBodyAuditLog} */
|
|
37
34
|
declare function RequestBodyAuditLog(): RequestBodyAuditLog;
|
|
38
35
|
type RequestBodyAuditLog = {
|
|
39
36
|
log_meta: LogMetaObj;
|
|
37
|
+
/**
|
|
38
|
+
* - Detailed information about payload.
|
|
39
|
+
*/
|
|
40
40
|
log_payload: any;
|
|
41
41
|
};
|
|
42
42
|
/** @returns {CreateLogResp} */
|
|
43
43
|
declare function CreateLogResp(): CreateLogResp;
|
|
44
44
|
type CreateLogResp = {
|
|
45
|
+
/**
|
|
46
|
+
* - Acknowledgement about success or failure of audit log.
|
|
47
|
+
*/
|
|
45
48
|
message?: string;
|
|
49
|
+
/**
|
|
50
|
+
* - Status of audit log in internal system.
|
|
51
|
+
*/
|
|
46
52
|
internal_message?: string;
|
|
47
53
|
};
|
|
48
54
|
/** @returns {LogMetaObj} */
|
|
49
55
|
declare function LogMetaObj(): LogMetaObj;
|
|
50
56
|
type LogMetaObj = {
|
|
57
|
+
/**
|
|
58
|
+
* - Details about user responsible for modifying events.
|
|
59
|
+
*/
|
|
51
60
|
modifier?: any;
|
|
61
|
+
/**
|
|
62
|
+
* - The application id generating the log event.
|
|
63
|
+
*/
|
|
52
64
|
application?: string;
|
|
53
65
|
entity?: EntityObject;
|
|
66
|
+
/**
|
|
67
|
+
* - Contains device-specific information for
|
|
68
|
+
* the log event.
|
|
69
|
+
*/
|
|
54
70
|
device_info?: any;
|
|
71
|
+
/**
|
|
72
|
+
* - Holds location-related data for the event context.
|
|
73
|
+
*/
|
|
55
74
|
location?: any;
|
|
75
|
+
/**
|
|
76
|
+
* - Identifies the session associated with the log event.
|
|
77
|
+
*/
|
|
56
78
|
sessions?: string;
|
|
57
79
|
};
|
|
58
80
|
/** @returns {EntityObject} */
|
|
59
81
|
declare function EntityObject(): EntityObject;
|
|
60
82
|
type EntityObject = {
|
|
83
|
+
/**
|
|
84
|
+
* - Unique identifier for the entity.
|
|
85
|
+
*/
|
|
61
86
|
id?: string;
|
|
87
|
+
/**
|
|
88
|
+
* - The type/category of the entity.
|
|
89
|
+
*/
|
|
62
90
|
type?: string;
|
|
63
|
-
action?: string;
|
|
64
|
-
};
|
|
65
|
-
/** @returns {BadRequestSchema} */
|
|
66
|
-
declare function BadRequestSchema(): BadRequestSchema;
|
|
67
|
-
type BadRequestSchema = {
|
|
68
91
|
/**
|
|
69
|
-
* -
|
|
92
|
+
* - The action performed on or by the entity.
|
|
70
93
|
*/
|
|
71
|
-
|
|
94
|
+
action?: string;
|
|
72
95
|
};
|
|
@@ -3,35 +3,31 @@ const Joi = require("joi");
|
|
|
3
3
|
/**
|
|
4
4
|
* @typedef RequestBodyAuditLog
|
|
5
5
|
* @property {LogMetaObj} log_meta
|
|
6
|
-
* @property {Object} log_payload
|
|
6
|
+
* @property {Object} log_payload - Detailed information about payload.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @typedef CreateLogResp
|
|
11
|
-
* @property {string} [message]
|
|
12
|
-
* @property {string} [internal_message]
|
|
11
|
+
* @property {string} [message] - Acknowledgement about success or failure of audit log.
|
|
12
|
+
* @property {string} [internal_message] - Status of audit log in internal system.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @typedef LogMetaObj
|
|
17
|
-
* @property {Object} [modifier]
|
|
18
|
-
* @property {string} [application]
|
|
17
|
+
* @property {Object} [modifier] - Details about user responsible for modifying events.
|
|
18
|
+
* @property {string} [application] - The application id generating the log event.
|
|
19
19
|
* @property {EntityObject} [entity]
|
|
20
|
-
* @property {Object} [device_info]
|
|
21
|
-
*
|
|
22
|
-
* @property {
|
|
20
|
+
* @property {Object} [device_info] - Contains device-specific information for
|
|
21
|
+
* the log event.
|
|
22
|
+
* @property {Object} [location] - Holds location-related data for the event context.
|
|
23
|
+
* @property {string} [sessions] - Identifies the session associated with the log event.
|
|
23
24
|
*/
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* @typedef EntityObject
|
|
27
|
-
* @property {string} [id]
|
|
28
|
-
* @property {string} [type]
|
|
29
|
-
* @property {string} [action]
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @typedef BadRequestSchema
|
|
34
|
-
* @property {string} [message] - Failure message.
|
|
28
|
+
* @property {string} [id] - Unique identifier for the entity.
|
|
29
|
+
* @property {string} [type] - The type/category of the entity.
|
|
30
|
+
* @property {string} [action] - The action performed on or by the entity.
|
|
35
31
|
*/
|
|
36
32
|
|
|
37
33
|
class AuditTrailPlatformModel {
|
|
@@ -71,12 +67,5 @@ class AuditTrailPlatformModel {
|
|
|
71
67
|
action: Joi.string().allow(""),
|
|
72
68
|
});
|
|
73
69
|
}
|
|
74
|
-
|
|
75
|
-
/** @returns {BadRequestSchema} */
|
|
76
|
-
static BadRequestSchema() {
|
|
77
|
-
return Joi.object({
|
|
78
|
-
message: Joi.string().allow(""),
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
70
|
}
|
|
82
71
|
module.exports = AuditTrailPlatformModel;
|