@gofynd/fdk-client-javascript 1.5.1 → 1.6.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.
Files changed (64) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.js +293 -0
  4. package/sdk/application/Catalog/CatalogApplicationClient.js +408 -0
  5. package/sdk/application/Common/CommonApplicationClient.js +21 -0
  6. package/sdk/application/Communication/CommunicationApplicationClient.js +29 -0
  7. package/sdk/application/Configuration/ConfigurationApplicationClient.js +147 -0
  8. package/sdk/application/Content/ContentApplicationClient.js +226 -0
  9. package/sdk/application/FileStorage/FileStorageApplicationClient.js +43 -0
  10. package/sdk/application/Finance/FinanceApplicationClient.js +21 -0
  11. package/sdk/application/Lead/LeadApplicationClient.js +73 -0
  12. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +1 -1
  13. package/sdk/application/Logistic/LogisticApplicationClient.js +192 -3
  14. package/sdk/application/Order/OrderApplicationClient.js +202 -0
  15. package/sdk/application/Payment/PaymentApplicationClient.js +454 -0
  16. package/sdk/application/Rewards/RewardsApplicationClient.js +68 -0
  17. package/sdk/application/Share/ShareApplicationClient.js +96 -0
  18. package/sdk/application/Theme/ThemeApplicationClient.js +64 -0
  19. package/sdk/application/User/UserApplicationClient.js +412 -0
  20. package/sdk/application/Webhook/WebhookApplicationClient.js +13 -0
  21. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -0
  22. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +75 -0
  23. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
  24. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
  25. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -0
  26. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +6 -0
  27. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +16 -3
  28. package/sdk/partner/Webhook/WebhookPartnerModel.js +5 -3
  29. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
  30. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  31. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +46 -23
  32. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -23
  33. package/sdk/platform/Cart/CartPlatformModel.d.ts +59 -1
  34. package/sdk/platform/Cart/CartPlatformModel.js +31 -0
  35. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -12
  36. package/sdk/platform/Content/ContentPlatformApplicationClient.js +0 -81
  37. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -10
  38. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -12
  39. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -0
  40. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +82 -0
  41. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +10 -1
  42. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +12 -0
  43. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +129 -1
  44. package/sdk/platform/Payment/PaymentPlatformModel.js +94 -0
  45. package/sdk/platform/User/UserPlatformModel.d.ts +2 -2
  46. package/sdk/platform/User/UserPlatformModel.js +2 -2
  47. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +58 -14
  48. package/sdk/platform/Webhook/WebhookPlatformModel.js +15 -14
  49. package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
  50. package/sdk/public/Catalog/CatalogPublicClient.js +138 -0
  51. package/sdk/public/Catalog/CatalogPublicModel.d.ts +155 -0
  52. package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
  53. package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
  54. package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
  55. package/sdk/public/Configuration/ConfigurationPublicClient.js +16 -0
  56. package/sdk/public/Content/ContentPublicClient.js +116 -0
  57. package/sdk/public/Partner/PartnerPublicClient.js +15 -0
  58. package/sdk/public/PublicClient.d.ts +2 -0
  59. package/sdk/public/PublicClient.js +4 -0
  60. package/sdk/public/Webhook/WebhookPublicClient.js +40 -0
  61. package/sdk/public/Webhook/WebhookPublicModel.d.ts +194 -46
  62. package/sdk/public/Webhook/WebhookPublicModel.js +51 -46
  63. package/sdk/public/index.d.ts +1 -0
  64. package/sdk/public/index.js +2 -0
@@ -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;
@@ -10,4 +10,5 @@ declare class FileStorageValidator {
10
10
  static saveOrganizationLevelProxy(): any;
11
11
  static fetchProxy(): any;
12
12
  static saveProxyDetails(): any;
13
+ static signUrls(): any;
13
14
  }
@@ -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
- * @property {Object} [location]
19
- * @property {string} [sessions]
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, BadRequestSchema };
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
- * - Failure message.
92
+ * - The action performed on or by the entity.
70
93
  */
71
- message?: string;
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
- * @property {Object} [location]
22
- * @property {string} [sessions]
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;
@@ -1434,6 +1434,19 @@ export = CartPlatformModel;
1434
1434
  * @property {boolean} [partial] - When adding multiple items check if all
1435
1435
  * added. True if only few are added.
1436
1436
  * @property {string} [message] - Message of add cart API response
1437
+ * @property {Object} [result] - Add to cart result data
1438
+ * @property {CartItemInfo[]} [items] - List of items that needs to be added in cart.
1439
+ */
1440
+ /**
1441
+ * @typedef CartItemInfo
1442
+ * @property {number} [item_id] - Item id of the product that needs to be
1443
+ * added/updated/removed.
1444
+ * @property {string} [size] - Item size of the product that needs to be
1445
+ * added/updated/removed.
1446
+ * @property {number} [store_id] - Unique identifier of the store selected by
1447
+ * the user from which user want to buy a product.
1448
+ * @property {boolean} [success] - True if items are added/updated/removed successfully.
1449
+ * @property {string} [message] - Message for added/updated/removed item.
1437
1450
  */
1438
1451
  /**
1439
1452
  * @typedef UpdateProductCart
@@ -1468,6 +1481,8 @@ export = CartPlatformModel;
1468
1481
  * @property {boolean} [success] - True if all items are added successfully.
1469
1482
  * False if partially added or not added.
1470
1483
  * @property {CartDetailResult} [cart]
1484
+ * @property {Object} [result] - Contains article related result info
1485
+ * @property {CartItemInfo[]} [items] - List of items that needs to be updated in cart.
1471
1486
  * @property {string} [message] - Message of update cart API response
1472
1487
  */
1473
1488
  /**
@@ -2266,7 +2281,7 @@ export = CartPlatformModel;
2266
2281
  declare class CartPlatformModel {
2267
2282
  }
2268
2283
  declare namespace CartPlatformModel {
2269
- export { CouponDateMeta, Ownership, CouponAuthor, State, PaymentAllowValue, PaymentModes, PriceRange, PostOrder, BulkBundleRestriction, UsesRemaining, UsesRestriction, Restrictions, Validation, CouponAction, CouponSchedule, Rule, DisplayMetaDict, DisplayMeta, Identifier, Validity, RuleDefinition, CouponAdd, Page, CouponsResult, SuccessMessage, OperationErrorResult, CouponUpdate, CouponPartialUpdate, CouponCreateResult, DisplayMeta1, Ownership1, CompareObject, ItemSizeMapping, ItemCriteria, DiscountOffer, DiscountRule, PaymentAllowValue1, PromotionPaymentModes, UserRegistered, PostOrder1, UsesRemaining1, UsesRestriction1, Restrictions1, PromotionSchedule, PromotionAction, PromotionAuthor, Visibility, PromotionDateMeta, PromotionListItem, PromotionsResult, PromotionAdd, PromotionAddResult, PromotionUpdate, PromotionUpdateResult, PromotionPartialUpdate, ActivePromosResult, Charges, DeliveryCharges, CartMetaConfigUpdate, CartMetaConfigAdd, Article, PriceAdjustmentRestrictions, Collection, PriceAdjustmentUpdate, PriceAdjustment, PriceAdjustmentResult, GetPriceAdjustmentResult, PriceAdjustmentAdd, DistributionRule, Distribution, DistributionLogic, CartItem, OpenapiCartDetailsCreation, CouponBreakup, DisplayBreakup, LoyaltyPoints, RawBreakup, CartBreakup, ProductImage, Tags, BaseInfo, ActionQuery, ProductActionParams, ProductActionPage, ProductAction, CategoryInfo, CartProduct, BasePrice, ArticlePriceInfo, StoreInfo, ProductArticle, Ownership2, DiscountRulesApp, AppliedFreeArticles, BuyRules, AppliedPromotion, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, ShipmentPromise, CouponDetails, ProductPrice, ProductPriceInfo, CartProductIdentifer, ProductAvailabilitySize, ProductAvailability, PromoMeta, CartProductInfo, OpenapiCartDetailsResult, OpenApiErrorResult, ShippingAddress, OpenApiCartServiceabilityCreation, OpenApiCartServiceabilityResult, OpenApiFiles, CartItemMeta, MultiTenderPaymentMeta, MultiTenderPaymentMethod, OpenApiOrderItem, OpenApiPlatformCheckoutReq, OpenApiCheckoutResult, AbandonedCart, AbandonedCartResult, PaymentSelectionLock, CartCurrency, CartDetailCoupon, ChargesThreshold, DeliveryChargesConfig, CartCommonConfig, CartDetailResult, AddProductCart, AddCartCreation, AddCartDetailResult, UpdateProductCart, FreeGiftItemCreation, UpdateCartCreation, UpdateCartDetailResult, OverrideCartItemPromo, OverrideCartItem, OverrideCheckoutReq, OverrideCheckoutResult, GetShareCartLinkCreation, GetShareCartLinkResult, SharedCartDetails, SharedCart, SharedCartResult, CartList, MultiCartResult, UpdateUserCartMapping, UserInfo, UserCartMappingResult, PlatformAddCartDetails, PlatformUpdateCartDetails, DeleteCartDetails, DeleteCartDetailResult, CartItemCountResult, Coupon, PageCoupon, GetCouponResult, ApplyCouponDetails, GeoLocation, PlatformAddress, ValidationConfig, PlatformGetAddressesDetails, SaveAddressDetails, UpdateAddressDetails, DeleteAddressResult, PlatformSelectCartAddress, ShipmentArticle, PlatformShipmentDetails, PlatformCartShipmentsResult, UpdateCartShipmentItem, UpdateCartShipmentCreation, PlatformCartMetaCreation, CartMetaDetails, CartMetaMissingDetails, StaffCheckout, CustomerDetails, Files, CartCheckoutCustomMeta, PlatformCartCheckoutDetailCreation, CheckCart, CartCheckoutDetails, CartCheckoutResult, CartDeliveryModesDetails, PickupStoreDetail, StoreDetails, CartPaymentUpdate, CouponValidity, PaymentCouponValidate, PaymentMeta, PaymentMethod, PlatformCartCheckoutDetailV2Creation, UpdateCartPaymentRequestV2, PriceMinMax, ItemPriceDetails, ArticlePriceDetails, FreeGiftItems, PromotionOffer, PromotionOffersDetails, PromotionPaymentOffer, PromotionPaymentOffersDetails, ValidationError };
2284
+ export { CouponDateMeta, Ownership, CouponAuthor, State, PaymentAllowValue, PaymentModes, PriceRange, PostOrder, BulkBundleRestriction, UsesRemaining, UsesRestriction, Restrictions, Validation, CouponAction, CouponSchedule, Rule, DisplayMetaDict, DisplayMeta, Identifier, Validity, RuleDefinition, CouponAdd, Page, CouponsResult, SuccessMessage, OperationErrorResult, CouponUpdate, CouponPartialUpdate, CouponCreateResult, DisplayMeta1, Ownership1, CompareObject, ItemSizeMapping, ItemCriteria, DiscountOffer, DiscountRule, PaymentAllowValue1, PromotionPaymentModes, UserRegistered, PostOrder1, UsesRemaining1, UsesRestriction1, Restrictions1, PromotionSchedule, PromotionAction, PromotionAuthor, Visibility, PromotionDateMeta, PromotionListItem, PromotionsResult, PromotionAdd, PromotionAddResult, PromotionUpdate, PromotionUpdateResult, PromotionPartialUpdate, ActivePromosResult, Charges, DeliveryCharges, CartMetaConfigUpdate, CartMetaConfigAdd, Article, PriceAdjustmentRestrictions, Collection, PriceAdjustmentUpdate, PriceAdjustment, PriceAdjustmentResult, GetPriceAdjustmentResult, PriceAdjustmentAdd, DistributionRule, Distribution, DistributionLogic, CartItem, OpenapiCartDetailsCreation, CouponBreakup, DisplayBreakup, LoyaltyPoints, RawBreakup, CartBreakup, ProductImage, Tags, BaseInfo, ActionQuery, ProductActionParams, ProductActionPage, ProductAction, CategoryInfo, CartProduct, BasePrice, ArticlePriceInfo, StoreInfo, ProductArticle, Ownership2, DiscountRulesApp, AppliedFreeArticles, BuyRules, AppliedPromotion, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, ShipmentPromise, CouponDetails, ProductPrice, ProductPriceInfo, CartProductIdentifer, ProductAvailabilitySize, ProductAvailability, PromoMeta, CartProductInfo, OpenapiCartDetailsResult, OpenApiErrorResult, ShippingAddress, OpenApiCartServiceabilityCreation, OpenApiCartServiceabilityResult, OpenApiFiles, CartItemMeta, MultiTenderPaymentMeta, MultiTenderPaymentMethod, OpenApiOrderItem, OpenApiPlatformCheckoutReq, OpenApiCheckoutResult, AbandonedCart, AbandonedCartResult, PaymentSelectionLock, CartCurrency, CartDetailCoupon, ChargesThreshold, DeliveryChargesConfig, CartCommonConfig, CartDetailResult, AddProductCart, AddCartCreation, AddCartDetailResult, CartItemInfo, UpdateProductCart, FreeGiftItemCreation, UpdateCartCreation, UpdateCartDetailResult, OverrideCartItemPromo, OverrideCartItem, OverrideCheckoutReq, OverrideCheckoutResult, GetShareCartLinkCreation, GetShareCartLinkResult, SharedCartDetails, SharedCart, SharedCartResult, CartList, MultiCartResult, UpdateUserCartMapping, UserInfo, UserCartMappingResult, PlatformAddCartDetails, PlatformUpdateCartDetails, DeleteCartDetails, DeleteCartDetailResult, CartItemCountResult, Coupon, PageCoupon, GetCouponResult, ApplyCouponDetails, GeoLocation, PlatformAddress, ValidationConfig, PlatformGetAddressesDetails, SaveAddressDetails, UpdateAddressDetails, DeleteAddressResult, PlatformSelectCartAddress, ShipmentArticle, PlatformShipmentDetails, PlatformCartShipmentsResult, UpdateCartShipmentItem, UpdateCartShipmentCreation, PlatformCartMetaCreation, CartMetaDetails, CartMetaMissingDetails, StaffCheckout, CustomerDetails, Files, CartCheckoutCustomMeta, PlatformCartCheckoutDetailCreation, CheckCart, CartCheckoutDetails, CartCheckoutResult, CartDeliveryModesDetails, PickupStoreDetail, StoreDetails, CartPaymentUpdate, CouponValidity, PaymentCouponValidate, PaymentMeta, PaymentMethod, PlatformCartCheckoutDetailV2Creation, UpdateCartPaymentRequestV2, PriceMinMax, ItemPriceDetails, ArticlePriceDetails, FreeGiftItems, PromotionOffer, PromotionOffersDetails, PromotionPaymentOffer, PromotionPaymentOffersDetails, ValidationError };
2270
2285
  }
2271
2286
  /** @returns {CouponDateMeta} */
2272
2287
  declare function CouponDateMeta(): CouponDateMeta;
@@ -5863,6 +5878,41 @@ type AddCartDetailResult = {
5863
5878
  * - Message of add cart API response
5864
5879
  */
5865
5880
  message?: string;
5881
+ /**
5882
+ * - Add to cart result data
5883
+ */
5884
+ result?: any;
5885
+ /**
5886
+ * - List of items that needs to be added in cart.
5887
+ */
5888
+ items?: CartItemInfo[];
5889
+ };
5890
+ /** @returns {CartItemInfo} */
5891
+ declare function CartItemInfo(): CartItemInfo;
5892
+ type CartItemInfo = {
5893
+ /**
5894
+ * - Item id of the product that needs to be
5895
+ * added/updated/removed.
5896
+ */
5897
+ item_id?: number;
5898
+ /**
5899
+ * - Item size of the product that needs to be
5900
+ * added/updated/removed.
5901
+ */
5902
+ size?: string;
5903
+ /**
5904
+ * - Unique identifier of the store selected by
5905
+ * the user from which user want to buy a product.
5906
+ */
5907
+ store_id?: number;
5908
+ /**
5909
+ * - True if items are added/updated/removed successfully.
5910
+ */
5911
+ success?: boolean;
5912
+ /**
5913
+ * - Message for added/updated/removed item.
5914
+ */
5915
+ message?: string;
5866
5916
  };
5867
5917
  /** @returns {UpdateProductCart} */
5868
5918
  declare function UpdateProductCart(): UpdateProductCart;
@@ -5946,6 +5996,14 @@ type UpdateCartDetailResult = {
5946
5996
  */
5947
5997
  success?: boolean;
5948
5998
  cart?: CartDetailResult;
5999
+ /**
6000
+ * - Contains article related result info
6001
+ */
6002
+ result?: any;
6003
+ /**
6004
+ * - List of items that needs to be updated in cart.
6005
+ */
6006
+ items?: CartItemInfo[];
5949
6007
  /**
5950
6008
  * - Message of update cart API response
5951
6009
  */