@gofynd/fdk-client-javascript 1.3.5-beta.4 → 1.3.5

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 CHANGED
@@ -214,7 +214,7 @@ console.log("Active Theme: ", response.information.name);
214
214
  The above code will log the curl command in the console
215
215
 
216
216
  ```bash
217
- curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.3.5-beta.4' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
217
+ curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.3.5' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
218
218
  Active Theme: Emerge
219
219
  ```
220
220
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gofynd/fdk-client-javascript",
3
- "version": "1.3.5-beta.4",
3
+ "version": "1.3.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -282,7 +282,7 @@ export = OrderPlatformModel;
282
282
  * @property {Item} [item]
283
283
  * @property {string} [journey_type]
284
284
  * @property {number} [line_number]
285
- * @property {BagMeta} [meta]
285
+ * @property {Object} [meta]
286
286
  * @property {number} [no_of_bags_order]
287
287
  * @property {string} [operational_status]
288
288
  * @property {string} [order_integration_id]
@@ -660,7 +660,7 @@ export = OrderPlatformModel;
660
660
  * @property {Shipment[]} shipments
661
661
  * @property {ShippingInfo} shipping_info
662
662
  * @property {TaxInfo} [tax_info]
663
- * @property {UserInfo} user_info
663
+ * @property {UserInfo} [user_info]
664
664
  */
665
665
  /**
666
666
  * @typedef CreateOrderErrorReponse
@@ -1215,7 +1215,7 @@ export = OrderPlatformModel;
1215
1215
  * @property {string} [affiliate_id]
1216
1216
  * @property {string} [cod_charges]
1217
1217
  * @property {string} fynd_order_id
1218
- * @property {OrderMeta} [meta]
1218
+ * @property {Object} [meta]
1219
1219
  * @property {string} [order_date]
1220
1220
  * @property {string} [order_value]
1221
1221
  * @property {string} [ordering_channel]
@@ -1509,7 +1509,7 @@ export = OrderPlatformModel;
1509
1509
  * @property {boolean} [is_self_ship]
1510
1510
  * @property {string} [journey_type]
1511
1511
  * @property {boolean} [lock_status]
1512
- * @property {ShipmentMeta} [meta]
1512
+ * @property {Object} [meta]
1513
1513
  * @property {string} [mode_of_payment]
1514
1514
  * @property {string} [operational_status]
1515
1515
  * @property {OrderDetailsData} [order]
@@ -2306,6 +2306,7 @@ export = OrderPlatformModel;
2306
2306
  * @typedef UserDataInfo
2307
2307
  * @property {string} [avis_user_id]
2308
2308
  * @property {string} [email]
2309
+ * @property {string} [external_customer_id]
2309
2310
  * @property {string} [first_name]
2310
2311
  * @property {string} [gender]
2311
2312
  * @property {boolean} [is_anonymous_user]
@@ -2313,6 +2314,7 @@ export = OrderPlatformModel;
2313
2314
  * @property {string} [mobile]
2314
2315
  * @property {string} [name]
2315
2316
  * @property {number} [uid]
2317
+ * @property {string} [user_oid]
2316
2318
  */
2317
2319
  /**
2318
2320
  * @typedef UserDetailsData
@@ -2689,7 +2691,7 @@ type BagDetailsPlatformResponse = {
2689
2691
  item?: Item;
2690
2692
  journey_type?: string;
2691
2693
  line_number?: number;
2692
- meta?: BagMeta;
2694
+ meta?: any;
2693
2695
  no_of_bags_order?: number;
2694
2696
  operational_status?: string;
2695
2697
  order_integration_id?: string;
@@ -3202,7 +3204,7 @@ type CreateOrderAPI = {
3202
3204
  shipments: Shipment[];
3203
3205
  shipping_info: ShippingInfo;
3204
3206
  tax_info?: TaxInfo;
3205
- user_info: UserInfo;
3207
+ user_info?: UserInfo;
3206
3208
  };
3207
3209
  /** @returns {CreateOrderErrorReponse} */
3208
3210
  declare function CreateOrderErrorReponse(): CreateOrderErrorReponse;
@@ -3892,7 +3894,7 @@ type OrderDetailsData = {
3892
3894
  affiliate_id?: string;
3893
3895
  cod_charges?: string;
3894
3896
  fynd_order_id: string;
3895
- meta?: OrderMeta;
3897
+ meta?: any;
3896
3898
  order_date?: string;
3897
3899
  order_value?: string;
3898
3900
  ordering_channel?: string;
@@ -4234,7 +4236,7 @@ type PlatformShipment = {
4234
4236
  is_self_ship?: boolean;
4235
4237
  journey_type?: string;
4236
4238
  lock_status?: boolean;
4237
- meta?: ShipmentMeta;
4239
+ meta?: any;
4238
4240
  mode_of_payment?: string;
4239
4241
  operational_status?: string;
4240
4242
  order?: OrderDetailsData;
@@ -5214,6 +5216,7 @@ declare function UserDataInfo(): UserDataInfo;
5214
5216
  type UserDataInfo = {
5215
5217
  avis_user_id?: string;
5216
5218
  email?: string;
5219
+ external_customer_id?: string;
5217
5220
  first_name?: string;
5218
5221
  gender?: string;
5219
5222
  is_anonymous_user?: boolean;
@@ -5221,6 +5224,7 @@ type UserDataInfo = {
5221
5224
  mobile?: string;
5222
5225
  name?: string;
5223
5226
  uid?: number;
5227
+ user_oid?: string;
5224
5228
  };
5225
5229
  /** @returns {UserDetailsData} */
5226
5230
  declare function UserDetailsData(): UserDetailsData;
@@ -313,7 +313,7 @@ const Joi = require("joi");
313
313
  * @property {Item} [item]
314
314
  * @property {string} [journey_type]
315
315
  * @property {number} [line_number]
316
- * @property {BagMeta} [meta]
316
+ * @property {Object} [meta]
317
317
  * @property {number} [no_of_bags_order]
318
318
  * @property {string} [operational_status]
319
319
  * @property {string} [order_integration_id]
@@ -727,7 +727,7 @@ const Joi = require("joi");
727
727
  * @property {Shipment[]} shipments
728
728
  * @property {ShippingInfo} shipping_info
729
729
  * @property {TaxInfo} [tax_info]
730
- * @property {UserInfo} user_info
730
+ * @property {UserInfo} [user_info]
731
731
  */
732
732
 
733
733
  /**
@@ -1348,7 +1348,7 @@ const Joi = require("joi");
1348
1348
  * @property {string} [affiliate_id]
1349
1349
  * @property {string} [cod_charges]
1350
1350
  * @property {string} fynd_order_id
1351
- * @property {OrderMeta} [meta]
1351
+ * @property {Object} [meta]
1352
1352
  * @property {string} [order_date]
1353
1353
  * @property {string} [order_value]
1354
1354
  * @property {string} [ordering_channel]
@@ -1669,7 +1669,7 @@ const Joi = require("joi");
1669
1669
  * @property {boolean} [is_self_ship]
1670
1670
  * @property {string} [journey_type]
1671
1671
  * @property {boolean} [lock_status]
1672
- * @property {ShipmentMeta} [meta]
1672
+ * @property {Object} [meta]
1673
1673
  * @property {string} [mode_of_payment]
1674
1674
  * @property {string} [operational_status]
1675
1675
  * @property {OrderDetailsData} [order]
@@ -2553,6 +2553,7 @@ const Joi = require("joi");
2553
2553
  * @typedef UserDataInfo
2554
2554
  * @property {string} [avis_user_id]
2555
2555
  * @property {string} [email]
2556
+ * @property {string} [external_customer_id]
2556
2557
  * @property {string} [first_name]
2557
2558
  * @property {string} [gender]
2558
2559
  * @property {boolean} [is_anonymous_user]
@@ -2560,6 +2561,7 @@ const Joi = require("joi");
2560
2561
  * @property {string} [mobile]
2561
2562
  * @property {string} [name]
2562
2563
  * @property {number} [uid]
2564
+ * @property {string} [user_oid]
2563
2565
  */
2564
2566
 
2565
2567
  /**
@@ -3004,7 +3006,7 @@ class OrderPlatformModel {
3004
3006
  item: OrderPlatformModel.Item(),
3005
3007
  journey_type: Joi.string().allow("").allow(null),
3006
3008
  line_number: Joi.number().allow(null),
3007
- meta: OrderPlatformModel.BagMeta(),
3009
+ meta: Joi.object().pattern(/\S/, Joi.any()),
3008
3010
  no_of_bags_order: Joi.number().allow(null),
3009
3011
  operational_status: Joi.string().allow("").allow(null),
3010
3012
  order_integration_id: Joi.string().allow("").allow(null),
@@ -3489,7 +3491,7 @@ class OrderPlatformModel {
3489
3491
  shipments: Joi.array().items(OrderPlatformModel.Shipment()).required(),
3490
3492
  shipping_info: OrderPlatformModel.ShippingInfo().required(),
3491
3493
  tax_info: OrderPlatformModel.TaxInfo(),
3492
- user_info: OrderPlatformModel.UserInfo().required(),
3494
+ user_info: OrderPlatformModel.UserInfo(),
3493
3495
  });
3494
3496
  }
3495
3497
 
@@ -4250,7 +4252,7 @@ class OrderPlatformModel {
4250
4252
  affiliate_id: Joi.string().allow("").allow(null),
4251
4253
  cod_charges: Joi.string().allow("").allow(null),
4252
4254
  fynd_order_id: Joi.string().allow("").required(),
4253
- meta: OrderPlatformModel.OrderMeta(),
4255
+ meta: Joi.object().pattern(/\S/, Joi.any()),
4254
4256
  order_date: Joi.string().allow("").allow(null),
4255
4257
  order_value: Joi.string().allow("").allow(null),
4256
4258
  ordering_channel: Joi.string().allow("").allow(null),
@@ -4628,7 +4630,7 @@ class OrderPlatformModel {
4628
4630
  is_self_ship: Joi.boolean().allow(null),
4629
4631
  journey_type: Joi.string().allow("").allow(null),
4630
4632
  lock_status: Joi.boolean().allow(null),
4631
- meta: OrderPlatformModel.ShipmentMeta(),
4633
+ meta: Joi.object().pattern(/\S/, Joi.any()),
4632
4634
  mode_of_payment: Joi.string().allow("").allow(null),
4633
4635
  operational_status: Joi.string().allow("").allow(null),
4634
4636
  order: OrderPlatformModel.OrderDetailsData(),
@@ -5691,6 +5693,7 @@ class OrderPlatformModel {
5691
5693
  return Joi.object({
5692
5694
  avis_user_id: Joi.string().allow("").allow(null),
5693
5695
  email: Joi.string().allow("").allow(null),
5696
+ external_customer_id: Joi.string().allow("").allow(null),
5694
5697
  first_name: Joi.string().allow("").allow(null),
5695
5698
  gender: Joi.string().allow("").allow(null),
5696
5699
  is_anonymous_user: Joi.boolean().allow(null),
@@ -5698,6 +5701,7 @@ class OrderPlatformModel {
5698
5701
  mobile: Joi.string().allow("").allow(null),
5699
5702
  name: Joi.string().allow("").allow(null),
5700
5703
  uid: Joi.number().allow(null),
5704
+ user_oid: Joi.string().allow("").allow(null),
5701
5705
  });
5702
5706
  }
5703
5707
 
@@ -60,13 +60,13 @@ declare class User {
60
60
  *
61
61
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
62
62
  * @param {import("../PlatformAPIClient").Options} - Options
63
- * @returns {Promise<UserPlatformModel.SessionDeleteResponseSchema>} -
63
+ * @returns {Promise<UserPlatformModel.SessionsDeleteResponseSchema>} -
64
64
  * Success response
65
65
  * @name deleteActiveSessions
66
66
  * @summary: Delete a list of all session for a user
67
67
  * @description: Use this API to Delete a list of session of customers who have registered in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/deleteActiveSessions/).
68
68
  */
69
- deleteActiveSessions({ id, reason, requestHeaders }?: UserPlatformApplicationValidator.DeleteActiveSessionsParam, { responseHeaders }?: object): Promise<UserPlatformModel.SessionDeleteResponseSchema>;
69
+ deleteActiveSessions({ id, reason, requestHeaders }?: UserPlatformApplicationValidator.DeleteActiveSessionsParam, { responseHeaders }?: object): Promise<UserPlatformModel.SessionsDeleteResponseSchema>;
70
70
  /**
71
71
  * @param {UserPlatformApplicationValidator.DeleteSessionParam} arg - Arg object
72
72
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -390,7 +390,7 @@ class User {
390
390
  *
391
391
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
392
392
  * @param {import("../PlatformAPIClient").Options} - Options
393
- * @returns {Promise<UserPlatformModel.SessionDeleteResponseSchema>} -
393
+ * @returns {Promise<UserPlatformModel.SessionsDeleteResponseSchema>} -
394
394
  * Success response
395
395
  * @name deleteActiveSessions
396
396
  * @summary: Delete a list of all session for a user
@@ -451,10 +451,10 @@ class User {
451
451
 
452
452
  const {
453
453
  error: res_error,
454
- } = UserPlatformModel.SessionDeleteResponseSchema().validate(responseData, {
455
- abortEarly: false,
456
- allowUnknown: false,
457
- });
454
+ } = UserPlatformModel.SessionsDeleteResponseSchema().validate(
455
+ responseData,
456
+ { abortEarly: false, allowUnknown: false }
457
+ );
458
458
 
459
459
  if (res_error) {
460
460
  Logger({
@@ -200,7 +200,8 @@ export = UserPlatformModel;
200
200
  */
201
201
  /**
202
202
  * @typedef SessionDeleteResponseSchema
203
- * @property {string[]} [items]
203
+ * @property {string} [session_id]
204
+ * @property {string} [user_id]
204
205
  */
205
206
  /**
206
207
  * @typedef SessionExpiry
@@ -220,6 +221,11 @@ export = UserPlatformModel;
220
221
  * @typedef SessionListResponseSchema
221
222
  * @property {SessionListResponseInfo[]} [items]
222
223
  */
224
+ /**
225
+ * @typedef SessionsDeleteResponseSchema
226
+ * @property {string[]} [session_ids]
227
+ * @property {string} [user_id]
228
+ */
223
229
  /**
224
230
  * @typedef Social
225
231
  * @property {boolean} [account_kit]
@@ -326,7 +332,7 @@ export = UserPlatformModel;
326
332
  declare class UserPlatformModel {
327
333
  }
328
334
  declare namespace UserPlatformModel {
329
- export { Accountkit, ArchiveUserRequestSchema, ArchiveUserSuccess, AuthenticationApiErrorSchema, BlockUserRequestSchema, BlockUserSuccess, CreateUserGroupSchema, CreateUserRequestSchema, CreateUserResponseSchema, CreateUserSessionRequestSchema, CreateUserSessionResponseSchema, CustomerListResponseSchema, DeleteAccountConsent, DeleteAccountReasons, Email, Facebook, FlashCard, Google, Login, LookAndFeel, MetaSchema, PaginationSchema, PartialUserGroupUpdateSchema, PhoneNumber, PlatformEmail, PlatformMobile, PlatformSchema, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, RequiredFields, SessionDeleteResponseSchema, SessionExpiry, SessionListResponseInfo, SessionListResponseSchema, Social, SocialTokens, UnDeleteUserRequestSchema, UnDeleteUserSuccess, UpdateUserGroupSchema, UpdateUserRequestSchema, UserEmails, UserGroupListResponseSchema, UserGroupResponseSchema, UserGroupUpdateData, UserPhoneNumbers, UserSchema, UserSearchResponseSchema };
335
+ export { Accountkit, ArchiveUserRequestSchema, ArchiveUserSuccess, AuthenticationApiErrorSchema, BlockUserRequestSchema, BlockUserSuccess, CreateUserGroupSchema, CreateUserRequestSchema, CreateUserResponseSchema, CreateUserSessionRequestSchema, CreateUserSessionResponseSchema, CustomerListResponseSchema, DeleteAccountConsent, DeleteAccountReasons, Email, Facebook, FlashCard, Google, Login, LookAndFeel, MetaSchema, PaginationSchema, PartialUserGroupUpdateSchema, PhoneNumber, PlatformEmail, PlatformMobile, PlatformSchema, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, RequiredFields, SessionDeleteResponseSchema, SessionExpiry, SessionListResponseInfo, SessionListResponseSchema, SessionsDeleteResponseSchema, Social, SocialTokens, UnDeleteUserRequestSchema, UnDeleteUserSuccess, UpdateUserGroupSchema, UpdateUserRequestSchema, UserEmails, UserGroupListResponseSchema, UserGroupResponseSchema, UserGroupUpdateData, UserPhoneNumbers, UserSchema, UserSearchResponseSchema };
330
336
  }
331
337
  /** @returns {Accountkit} */
332
338
  declare function Accountkit(): Accountkit;
@@ -570,7 +576,8 @@ type RequiredFields = {
570
576
  /** @returns {SessionDeleteResponseSchema} */
571
577
  declare function SessionDeleteResponseSchema(): SessionDeleteResponseSchema;
572
578
  type SessionDeleteResponseSchema = {
573
- items?: string[];
579
+ session_id?: string;
580
+ user_id?: string;
574
581
  };
575
582
  /** @returns {SessionExpiry} */
576
583
  declare function SessionExpiry(): SessionExpiry;
@@ -593,6 +600,12 @@ declare function SessionListResponseSchema(): SessionListResponseSchema;
593
600
  type SessionListResponseSchema = {
594
601
  items?: SessionListResponseInfo[];
595
602
  };
603
+ /** @returns {SessionsDeleteResponseSchema} */
604
+ declare function SessionsDeleteResponseSchema(): SessionsDeleteResponseSchema;
605
+ type SessionsDeleteResponseSchema = {
606
+ session_ids?: string[];
607
+ user_id?: string;
608
+ };
596
609
  /** @returns {Social} */
597
610
  declare function Social(): Social;
598
611
  type Social = {
@@ -232,7 +232,8 @@ const Joi = require("joi");
232
232
 
233
233
  /**
234
234
  * @typedef SessionDeleteResponseSchema
235
- * @property {string[]} [items]
235
+ * @property {string} [session_id]
236
+ * @property {string} [user_id]
236
237
  */
237
238
 
238
239
  /**
@@ -256,6 +257,12 @@ const Joi = require("joi");
256
257
  * @property {SessionListResponseInfo[]} [items]
257
258
  */
258
259
 
260
+ /**
261
+ * @typedef SessionsDeleteResponseSchema
262
+ * @property {string[]} [session_ids]
263
+ * @property {string} [user_id]
264
+ */
265
+
259
266
  /**
260
267
  * @typedef Social
261
268
  * @property {boolean} [account_kit]
@@ -664,7 +671,8 @@ class UserPlatformModel {
664
671
  /** @returns {SessionDeleteResponseSchema} */
665
672
  static SessionDeleteResponseSchema() {
666
673
  return Joi.object({
667
- items: Joi.array().items(Joi.string().allow("")),
674
+ session_id: Joi.string().allow(""),
675
+ user_id: Joi.string().allow(""),
668
676
  });
669
677
  }
670
678
 
@@ -695,6 +703,14 @@ class UserPlatformModel {
695
703
  });
696
704
  }
697
705
 
706
+ /** @returns {SessionsDeleteResponseSchema} */
707
+ static SessionsDeleteResponseSchema() {
708
+ return Joi.object({
709
+ session_ids: Joi.array().items(Joi.string().allow("")),
710
+ user_id: Joi.string().allow(""),
711
+ });
712
+ }
713
+
698
714
  /** @returns {Social} */
699
715
  static Social() {
700
716
  return Joi.object({