@gofynd/fdk-client-javascript 3.11.0 → 3.13.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 (32) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +16 -6
  4. package/sdk/application/Catalog/CatalogApplicationClient.js +71 -12
  5. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +80 -80
  6. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +48 -48
  7. package/sdk/platform/Cart/CartPlatformModel.d.ts +6 -18
  8. package/sdk/platform/Cart/CartPlatformModel.js +2 -36
  9. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +14 -48
  10. package/sdk/platform/Catalog/CatalogPlatformClient.js +85 -338
  11. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +207 -763
  12. package/sdk/platform/Catalog/CatalogPlatformModel.js +107 -392
  13. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +15 -71
  14. package/sdk/platform/Catalog/CatalogPlatformValidator.js +14 -60
  15. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +36 -0
  16. package/sdk/platform/Order/OrderPlatformApplicationClient.js +252 -0
  17. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +34 -1
  18. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +42 -0
  19. package/sdk/platform/Order/OrderPlatformClient.d.ts +69 -7
  20. package/sdk/platform/Order/OrderPlatformClient.js +453 -7
  21. package/sdk/platform/Order/OrderPlatformModel.d.ts +1938 -493
  22. package/sdk/platform/Order/OrderPlatformModel.js +1238 -506
  23. package/sdk/platform/Order/OrderPlatformValidator.d.ts +162 -16
  24. package/sdk/platform/Order/OrderPlatformValidator.js +111 -9
  25. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +14 -0
  26. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +85 -0
  27. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +17 -1
  28. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +16 -0
  29. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +861 -178
  30. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +534 -84
  31. package/sdk/public/Webhook/WebhookPublicModel.d.ts +5 -0
  32. package/sdk/public/Webhook/WebhookPublicModel.js +2 -0
@@ -27,14 +27,40 @@ export = OrderPlatformValidator;
27
27
  * @typedef CheckOrderStatusParam
28
28
  * @property {OrderPlatformModel.OrderStatus} body
29
29
  */
30
+ /**
31
+ * @typedef CreateAccountParam
32
+ * @property {OrderPlatformModel.CreateAccount} body
33
+ */
30
34
  /**
31
35
  * @typedef CreateChannelConfigParam
32
36
  * @property {OrderPlatformModel.CreateChannelConfigData} body
33
37
  */
34
38
  /**
35
39
  * @typedef CreateOrderParam
36
- * @property {OrderPlatformModel.OrderingSource} [xOrderingSource] - To uniquely
37
- * identify the source through which order has been placed.
40
+ * @property {string} xOrderingSource - To uniquely identify the source through
41
+ * which order has been placed.
42
+ * @property {string} [xApplicationId] - The Application ID is a unique
43
+ * identifier assigned to a storefront that typically follows a 24-character
44
+ * hexadecimal string. Either `x-application-id` or `x-extension-id` header is
45
+ * mandatory. At least one of them must be provided.
46
+ * @property {string} [xExtensionId] - The Extension ID is a unique identifier
47
+ * assigned to an extension that typically follows a 24-character hexadecimal
48
+ * string. Either `x-application-id` or `x-extension-id` header is mandatory.
49
+ * At least one of them must be provided.
50
+ * @property {OrderPlatformModel.CreateOrderRequestSchema} body
51
+ */
52
+ /**
53
+ * @typedef CreateOrderDeprecatedParam
54
+ * @property {string} xOrderingSource - To uniquely identify the source through
55
+ * which order has been placed.
56
+ * @property {string} [xApplicationId] - The Application ID is a unique
57
+ * identifier assigned to a storefront that typically follows a 24-character
58
+ * hexadecimal string. Either `x-application-id` or `x-extension-id` header is
59
+ * mandatory. At least one of them must be provided.
60
+ * @property {string} [xExtensionId] - The Extension ID is a unique identifier
61
+ * assigned to an extension that typically follows a 24-character hexadecimal
62
+ * string. Either `x-application-id` or `x-extension-id` header is mandatory.
63
+ * At least one of them must be provided.
38
64
  * @property {OrderPlatformModel.CreateOrderAPI} body
39
65
  */
40
66
  /**
@@ -84,13 +110,18 @@ export = OrderPlatformValidator;
84
110
  * @typedef GenerateProcessManifestParam
85
111
  * @property {OrderPlatformModel.ProcessManifestRequestSchema} body
86
112
  */
113
+ /**
114
+ * @typedef GetAccountByIdParam
115
+ * @property {string} channelAccountId - Unique identifier of the channel
116
+ * account to retrieve.
117
+ */
87
118
  /**
88
119
  * @typedef GetAllowedStateTransitionParam
89
120
  * @property {string} [orderingChannel] - The specific channel through which
90
121
  * your order was placed. This field will be phased out after version 2.4.0.
91
122
  * Please use ordering_source instead to ensure accurate order tracking and processing.
92
- * @property {OrderPlatformModel.OrderingSource} [orderingSource] - To uniquely
93
- * identify the source through which order has been placed.
123
+ * @property {string} [orderingSource] - To uniquely identify the source through
124
+ * which order has been placed.
94
125
  * @property {string} status - The status key indicates the current status for
95
126
  * which the API will provide a list of possible next state transitions.
96
127
  */
@@ -276,6 +307,10 @@ export = OrderPlatformValidator;
276
307
  * Listing Orders, This is use when we want to get list of shipments or orders
277
308
  * by cross store or cross company or fulfilling Store (by default), this is
278
309
  * also depends on the login user accessType and store access
310
+ * @property {string} [orderingSource] - Filter orders by ordering source.
311
+ * Accepts comma-separated values for multiple sources.
312
+ * @property {string} [channelAccountId] - Comma-separated channel account IDs
313
+ * to filter orders by specific channel accounts.
279
314
  */
280
315
  /** @typedef GetRoleBasedActionsParam */
281
316
  /**
@@ -379,13 +414,17 @@ export = OrderPlatformValidator;
379
414
  * Listing Orders, This is use when we want to get list of shipments or orders
380
415
  * by cross store or cross company or fulfilling Store (by default), this is
381
416
  * also depends on the login user accessType and store access
417
+ * @property {string} [orderingSource] - Filter orders by ordering source.
418
+ * Accepts comma-separated values for multiple sources.
419
+ * @property {string} [channelAccountId] - Comma-separated channel account IDs
420
+ * to filter orders by specific channel accounts.
382
421
  */
383
422
  /**
384
423
  * @typedef GetStateManagerConfigParam
385
424
  * @property {string} [appId] - The unique identifier of the application.
386
425
  * @property {string} [orderingChannel] - The channel through which orders are placed.
387
- * @property {OrderPlatformModel.OrderingSource} [orderingSource] - To uniquely
388
- * identify the source through which order has been placed.
426
+ * @property {string} [orderingSource] - To uniquely identify the source through
427
+ * which order has been placed.
389
428
  * @property {string} [entity] - The entity for which the configuration is applied.
390
429
  */
391
430
  /** @typedef GetStateTransitionMapParam */
@@ -407,6 +446,13 @@ export = OrderPlatformValidator;
407
446
  * @property {string} batchId - A unique identifier for the batch associated
408
447
  * with this bulk action.
409
448
  */
449
+ /**
450
+ * @typedef ListAccountsParam
451
+ * @property {number} [page] - The page number to retrieve in the paginated
452
+ * results. Default is page 1.
453
+ * @property {number} [size] - Number of channel accounts to return per page.
454
+ * Default is 20 items per page.
455
+ */
410
456
  /**
411
457
  * @typedef OrderUpdateParam
412
458
  * @property {OrderPlatformModel.PlatformOrderUpdate} body
@@ -434,6 +480,11 @@ export = OrderPlatformValidator;
434
480
  * @property {number} [pageNo] - Page number for pagination.
435
481
  * @property {number} [pageSize] - Number of records per page for pagination.
436
482
  */
483
+ /**
484
+ * @typedef UpdateAccountParam
485
+ * @property {string} channelAccountId - Unique identifier of the account.
486
+ * @property {OrderPlatformModel.CreateAccount} body
487
+ */
437
488
  /**
438
489
  * @typedef UpdateAddressParam
439
490
  * @property {string} shipmentId - Unique shipment no. that is auto-generated
@@ -478,10 +529,14 @@ declare class OrderPlatformValidator {
478
529
  static bulkStateTransistion(): BulkStateTransistionParam;
479
530
  /** @returns {CheckOrderStatusParam} */
480
531
  static checkOrderStatus(): CheckOrderStatusParam;
532
+ /** @returns {CreateAccountParam} */
533
+ static createAccount(): CreateAccountParam;
481
534
  /** @returns {CreateChannelConfigParam} */
482
535
  static createChannelConfig(): CreateChannelConfigParam;
483
536
  /** @returns {CreateOrderParam} */
484
537
  static createOrder(): CreateOrderParam;
538
+ /** @returns {CreateOrderDeprecatedParam} */
539
+ static createOrderDeprecated(): CreateOrderDeprecatedParam;
485
540
  /** @returns {DispatchManifestsParam} */
486
541
  static dispatchManifests(): DispatchManifestsParam;
487
542
  /** @returns {DownloadBulkActionTemplateParam} */
@@ -502,6 +557,8 @@ declare class OrderPlatformValidator {
502
557
  static generatePOSReceiptByOrderId(): GeneratePOSReceiptByOrderIdParam;
503
558
  /** @returns {GenerateProcessManifestParam} */
504
559
  static generateProcessManifest(): GenerateProcessManifestParam;
560
+ /** @returns {GetAccountByIdParam} */
561
+ static getAccountById(): GetAccountByIdParam;
505
562
  /** @returns {GetAllowedStateTransitionParam} */
506
563
  static getAllowedStateTransition(): GetAllowedStateTransitionParam;
507
564
  /** @returns {GetAllowedTemplatesForBulkParam} */
@@ -556,6 +613,8 @@ declare class OrderPlatformValidator {
556
613
  static invalidateShipmentCache(): InvalidateShipmentCacheParam;
557
614
  /** @returns {JobDetailsParam} */
558
615
  static jobDetails(): JobDetailsParam;
616
+ /** @returns {ListAccountsParam} */
617
+ static listAccounts(): ListAccountsParam;
559
618
  /** @returns {OrderUpdateParam} */
560
619
  static orderUpdate(): OrderUpdateParam;
561
620
  /** @returns {PostShipmentHistoryParam} */
@@ -568,6 +627,8 @@ declare class OrderPlatformValidator {
568
627
  static sendUserMobileOTP(): SendUserMobileOTPParam;
569
628
  /** @returns {TrackShipmentParam} */
570
629
  static trackShipment(): TrackShipmentParam;
630
+ /** @returns {UpdateAccountParam} */
631
+ static updateAccount(): UpdateAccountParam;
571
632
  /** @returns {UpdateAddressParam} */
572
633
  static updateAddress(): UpdateAddressParam;
573
634
  /** @returns {UpdatePackagingDimensionsParam} */
@@ -586,7 +647,7 @@ declare class OrderPlatformValidator {
586
647
  static verifyMobileOTP(): VerifyMobileOTPParam;
587
648
  }
588
649
  declare namespace OrderPlatformValidator {
589
- export { AddStateManagerConfigParam, AttachOrderUserParam, BulkListingParam, BulkStateTransistionParam, CheckOrderStatusParam, CreateChannelConfigParam, CreateOrderParam, DispatchManifestsParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FailedOrderLogDetailsParam, FailedOrderLogsParam, FetchRefundModeConfigParam, GenerateInvoiceIDParam, GeneratePOSReceiptByOrderIdParam, GenerateProcessManifestParam, GetAllowedStateTransitionParam, GetAllowedTemplatesForBulkParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetChannelConfigParam, GetFileByStatusParam, GetLaneConfigParam, GetManifestDetailsParam, GetManifestShipmentsParam, GetManifestfiltersParam, GetManifestsParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateManagerConfigParam, GetStateTransitionMapParam, GetTemplateParam, GetfiltersParam, InvalidateShipmentCacheParam, JobDetailsParam, OrderUpdateParam, PostShipmentHistoryParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdatePaymentInfoParam, UpdateShipmentLockParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentsParam, VerifyMobileOTPParam };
650
+ export { AddStateManagerConfigParam, AttachOrderUserParam, BulkListingParam, BulkStateTransistionParam, CheckOrderStatusParam, CreateAccountParam, CreateChannelConfigParam, CreateOrderParam, CreateOrderDeprecatedParam, DispatchManifestsParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FailedOrderLogDetailsParam, FailedOrderLogsParam, FetchRefundModeConfigParam, GenerateInvoiceIDParam, GeneratePOSReceiptByOrderIdParam, GenerateProcessManifestParam, GetAccountByIdParam, GetAllowedStateTransitionParam, GetAllowedTemplatesForBulkParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetChannelConfigParam, GetFileByStatusParam, GetLaneConfigParam, GetManifestDetailsParam, GetManifestShipmentsParam, GetManifestfiltersParam, GetManifestsParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateManagerConfigParam, GetStateTransitionMapParam, GetTemplateParam, GetfiltersParam, InvalidateShipmentCacheParam, JobDetailsParam, ListAccountsParam, OrderUpdateParam, PostShipmentHistoryParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAccountParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdatePaymentInfoParam, UpdateShipmentLockParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentsParam, VerifyMobileOTPParam };
590
651
  }
591
652
  type AddStateManagerConfigParam = {
592
653
  body: OrderPlatformModel.TransitionConfigPayload;
@@ -632,15 +693,54 @@ type BulkStateTransistionParam = {
632
693
  type CheckOrderStatusParam = {
633
694
  body: OrderPlatformModel.OrderStatus;
634
695
  };
696
+ type CreateAccountParam = {
697
+ body: OrderPlatformModel.CreateAccount;
698
+ };
635
699
  type CreateChannelConfigParam = {
636
700
  body: OrderPlatformModel.CreateChannelConfigData;
637
701
  };
638
702
  type CreateOrderParam = {
639
703
  /**
640
- * - To uniquely
641
- * identify the source through which order has been placed.
704
+ * - To uniquely identify the source through
705
+ * which order has been placed.
642
706
  */
643
- xOrderingSource?: OrderPlatformModel.OrderingSource;
707
+ xOrderingSource: string;
708
+ /**
709
+ * - The Application ID is a unique
710
+ * identifier assigned to a storefront that typically follows a 24-character
711
+ * hexadecimal string. Either `x-application-id` or `x-extension-id` header is
712
+ * mandatory. At least one of them must be provided.
713
+ */
714
+ xApplicationId?: string;
715
+ /**
716
+ * - The Extension ID is a unique identifier
717
+ * assigned to an extension that typically follows a 24-character hexadecimal
718
+ * string. Either `x-application-id` or `x-extension-id` header is mandatory.
719
+ * At least one of them must be provided.
720
+ */
721
+ xExtensionId?: string;
722
+ body: OrderPlatformModel.CreateOrderRequestSchema;
723
+ };
724
+ type CreateOrderDeprecatedParam = {
725
+ /**
726
+ * - To uniquely identify the source through
727
+ * which order has been placed.
728
+ */
729
+ xOrderingSource: string;
730
+ /**
731
+ * - The Application ID is a unique
732
+ * identifier assigned to a storefront that typically follows a 24-character
733
+ * hexadecimal string. Either `x-application-id` or `x-extension-id` header is
734
+ * mandatory. At least one of them must be provided.
735
+ */
736
+ xApplicationId?: string;
737
+ /**
738
+ * - The Extension ID is a unique identifier
739
+ * assigned to an extension that typically follows a 24-character hexadecimal
740
+ * string. Either `x-application-id` or `x-extension-id` header is mandatory.
741
+ * At least one of them must be provided.
742
+ */
743
+ xExtensionId?: string;
644
744
  body: OrderPlatformModel.CreateOrderAPI;
645
745
  };
646
746
  type DispatchManifestsParam = {
@@ -704,6 +804,13 @@ type GeneratePOSReceiptByOrderIdParam = {
704
804
  type GenerateProcessManifestParam = {
705
805
  body: OrderPlatformModel.ProcessManifestRequestSchema;
706
806
  };
807
+ type GetAccountByIdParam = {
808
+ /**
809
+ * - Unique identifier of the channel
810
+ * account to retrieve.
811
+ */
812
+ channelAccountId: string;
813
+ };
707
814
  type GetAllowedStateTransitionParam = {
708
815
  /**
709
816
  * - The specific channel through which
@@ -712,10 +819,10 @@ type GetAllowedStateTransitionParam = {
712
819
  */
713
820
  orderingChannel?: string;
714
821
  /**
715
- * - To uniquely
716
- * identify the source through which order has been placed.
822
+ * - To uniquely identify the source through
823
+ * which order has been placed.
717
824
  */
718
- orderingSource?: OrderPlatformModel.OrderingSource;
825
+ orderingSource?: string;
719
826
  /**
720
827
  * - The status key indicates the current status for
721
828
  * which the API will provide a list of possible next state transitions.
@@ -1156,6 +1263,16 @@ type GetOrdersParam = {
1156
1263
  * also depends on the login user accessType and store access
1157
1264
  */
1158
1265
  fulfillmentType?: string;
1266
+ /**
1267
+ * - Filter orders by ordering source.
1268
+ * Accepts comma-separated values for multiple sources.
1269
+ */
1270
+ orderingSource?: string;
1271
+ /**
1272
+ * - Comma-separated channel account IDs
1273
+ * to filter orders by specific channel accounts.
1274
+ */
1275
+ channelAccountId?: string;
1159
1276
  };
1160
1277
  type GetShipmentByIdParam = {
1161
1278
  /**
@@ -1392,6 +1509,16 @@ type GetShipmentsParam = {
1392
1509
  * also depends on the login user accessType and store access
1393
1510
  */
1394
1511
  fulfillmentType?: string;
1512
+ /**
1513
+ * - Filter orders by ordering source.
1514
+ * Accepts comma-separated values for multiple sources.
1515
+ */
1516
+ orderingSource?: string;
1517
+ /**
1518
+ * - Comma-separated channel account IDs
1519
+ * to filter orders by specific channel accounts.
1520
+ */
1521
+ channelAccountId?: string;
1395
1522
  };
1396
1523
  type GetStateManagerConfigParam = {
1397
1524
  /**
@@ -1403,10 +1530,10 @@ type GetStateManagerConfigParam = {
1403
1530
  */
1404
1531
  orderingChannel?: string;
1405
1532
  /**
1406
- * - To uniquely
1407
- * identify the source through which order has been placed.
1533
+ * - To uniquely identify the source through
1534
+ * which order has been placed.
1408
1535
  */
1409
- orderingSource?: OrderPlatformModel.OrderingSource;
1536
+ orderingSource?: string;
1410
1537
  /**
1411
1538
  * - The entity for which the configuration is applied.
1412
1539
  */
@@ -1435,6 +1562,18 @@ type JobDetailsParam = {
1435
1562
  */
1436
1563
  batchId: string;
1437
1564
  };
1565
+ type ListAccountsParam = {
1566
+ /**
1567
+ * - The page number to retrieve in the paginated
1568
+ * results. Default is page 1.
1569
+ */
1570
+ page?: number;
1571
+ /**
1572
+ * - Number of channel accounts to return per page.
1573
+ * Default is 20 items per page.
1574
+ */
1575
+ size?: number;
1576
+ };
1438
1577
  type OrderUpdateParam = {
1439
1578
  body: OrderPlatformModel.PlatformOrderUpdate;
1440
1579
  };
@@ -1468,6 +1607,13 @@ type TrackShipmentParam = {
1468
1607
  */
1469
1608
  pageSize?: number;
1470
1609
  };
1610
+ type UpdateAccountParam = {
1611
+ /**
1612
+ * - Unique identifier of the account.
1613
+ */
1614
+ channelAccountId: string;
1615
+ body: OrderPlatformModel.CreateAccount;
1616
+ };
1471
1617
  type UpdateAddressParam = {
1472
1618
  /**
1473
1619
  * - Unique shipment no. that is auto-generated
@@ -35,6 +35,11 @@ const OrderPlatformModel = require("./OrderPlatformModel");
35
35
  * @property {OrderPlatformModel.OrderStatus} body
36
36
  */
37
37
 
38
+ /**
39
+ * @typedef CreateAccountParam
40
+ * @property {OrderPlatformModel.CreateAccount} body
41
+ */
42
+
38
43
  /**
39
44
  * @typedef CreateChannelConfigParam
40
45
  * @property {OrderPlatformModel.CreateChannelConfigData} body
@@ -42,8 +47,31 @@ const OrderPlatformModel = require("./OrderPlatformModel");
42
47
 
43
48
  /**
44
49
  * @typedef CreateOrderParam
45
- * @property {OrderPlatformModel.OrderingSource} [xOrderingSource] - To uniquely
46
- * identify the source through which order has been placed.
50
+ * @property {string} xOrderingSource - To uniquely identify the source through
51
+ * which order has been placed.
52
+ * @property {string} [xApplicationId] - The Application ID is a unique
53
+ * identifier assigned to a storefront that typically follows a 24-character
54
+ * hexadecimal string. Either `x-application-id` or `x-extension-id` header is
55
+ * mandatory. At least one of them must be provided.
56
+ * @property {string} [xExtensionId] - The Extension ID is a unique identifier
57
+ * assigned to an extension that typically follows a 24-character hexadecimal
58
+ * string. Either `x-application-id` or `x-extension-id` header is mandatory.
59
+ * At least one of them must be provided.
60
+ * @property {OrderPlatformModel.CreateOrderRequestSchema} body
61
+ */
62
+
63
+ /**
64
+ * @typedef CreateOrderDeprecatedParam
65
+ * @property {string} xOrderingSource - To uniquely identify the source through
66
+ * which order has been placed.
67
+ * @property {string} [xApplicationId] - The Application ID is a unique
68
+ * identifier assigned to a storefront that typically follows a 24-character
69
+ * hexadecimal string. Either `x-application-id` or `x-extension-id` header is
70
+ * mandatory. At least one of them must be provided.
71
+ * @property {string} [xExtensionId] - The Extension ID is a unique identifier
72
+ * assigned to an extension that typically follows a 24-character hexadecimal
73
+ * string. Either `x-application-id` or `x-extension-id` header is mandatory.
74
+ * At least one of them must be provided.
47
75
  * @property {OrderPlatformModel.CreateOrderAPI} body
48
76
  */
49
77
 
@@ -104,13 +132,19 @@ const OrderPlatformModel = require("./OrderPlatformModel");
104
132
  * @property {OrderPlatformModel.ProcessManifestRequestSchema} body
105
133
  */
106
134
 
135
+ /**
136
+ * @typedef GetAccountByIdParam
137
+ * @property {string} channelAccountId - Unique identifier of the channel
138
+ * account to retrieve.
139
+ */
140
+
107
141
  /**
108
142
  * @typedef GetAllowedStateTransitionParam
109
143
  * @property {string} [orderingChannel] - The specific channel through which
110
144
  * your order was placed. This field will be phased out after version 2.4.0.
111
145
  * Please use ordering_source instead to ensure accurate order tracking and processing.
112
- * @property {OrderPlatformModel.OrderingSource} [orderingSource] - To uniquely
113
- * identify the source through which order has been placed.
146
+ * @property {string} [orderingSource] - To uniquely identify the source through
147
+ * which order has been placed.
114
148
  * @property {string} status - The status key indicates the current status for
115
149
  * which the API will provide a list of possible next state transitions.
116
150
  */
@@ -311,6 +345,10 @@ const OrderPlatformModel = require("./OrderPlatformModel");
311
345
  * Listing Orders, This is use when we want to get list of shipments or orders
312
346
  * by cross store or cross company or fulfilling Store (by default), this is
313
347
  * also depends on the login user accessType and store access
348
+ * @property {string} [orderingSource] - Filter orders by ordering source.
349
+ * Accepts comma-separated values for multiple sources.
350
+ * @property {string} [channelAccountId] - Comma-separated channel account IDs
351
+ * to filter orders by specific channel accounts.
314
352
  */
315
353
 
316
354
  /** @typedef GetRoleBasedActionsParam */
@@ -419,14 +457,18 @@ const OrderPlatformModel = require("./OrderPlatformModel");
419
457
  * Listing Orders, This is use when we want to get list of shipments or orders
420
458
  * by cross store or cross company or fulfilling Store (by default), this is
421
459
  * also depends on the login user accessType and store access
460
+ * @property {string} [orderingSource] - Filter orders by ordering source.
461
+ * Accepts comma-separated values for multiple sources.
462
+ * @property {string} [channelAccountId] - Comma-separated channel account IDs
463
+ * to filter orders by specific channel accounts.
422
464
  */
423
465
 
424
466
  /**
425
467
  * @typedef GetStateManagerConfigParam
426
468
  * @property {string} [appId] - The unique identifier of the application.
427
469
  * @property {string} [orderingChannel] - The channel through which orders are placed.
428
- * @property {OrderPlatformModel.OrderingSource} [orderingSource] - To uniquely
429
- * identify the source through which order has been placed.
470
+ * @property {string} [orderingSource] - To uniquely identify the source through
471
+ * which order has been placed.
430
472
  * @property {string} [entity] - The entity for which the configuration is applied.
431
473
  */
432
474
 
@@ -454,6 +496,14 @@ const OrderPlatformModel = require("./OrderPlatformModel");
454
496
  * with this bulk action.
455
497
  */
456
498
 
499
+ /**
500
+ * @typedef ListAccountsParam
501
+ * @property {number} [page] - The page number to retrieve in the paginated
502
+ * results. Default is page 1.
503
+ * @property {number} [size] - Number of channel accounts to return per page.
504
+ * Default is 20 items per page.
505
+ */
506
+
457
507
  /**
458
508
  * @typedef OrderUpdateParam
459
509
  * @property {OrderPlatformModel.PlatformOrderUpdate} body
@@ -487,6 +537,12 @@ const OrderPlatformModel = require("./OrderPlatformModel");
487
537
  * @property {number} [pageSize] - Number of records per page for pagination.
488
538
  */
489
539
 
540
+ /**
541
+ * @typedef UpdateAccountParam
542
+ * @property {string} channelAccountId - Unique identifier of the account.
543
+ * @property {OrderPlatformModel.CreateAccount} body
544
+ */
545
+
490
546
  /**
491
547
  * @typedef UpdateAddressParam
492
548
  * @property {string} shipmentId - Unique shipment no. that is auto-generated
@@ -570,6 +626,13 @@ class OrderPlatformValidator {
570
626
  }).required();
571
627
  }
572
628
 
629
+ /** @returns {CreateAccountParam} */
630
+ static createAccount() {
631
+ return Joi.object({
632
+ body: OrderPlatformModel.CreateAccount().required(),
633
+ }).required();
634
+ }
635
+
573
636
  /** @returns {CreateChannelConfigParam} */
574
637
  static createChannelConfig() {
575
638
  return Joi.object({
@@ -580,7 +643,19 @@ class OrderPlatformValidator {
580
643
  /** @returns {CreateOrderParam} */
581
644
  static createOrder() {
582
645
  return Joi.object({
583
- xOrderingSource: OrderPlatformModel.OrderingSource(),
646
+ xOrderingSource: Joi.string().allow("").required(),
647
+ xApplicationId: Joi.string().allow(""),
648
+ xExtensionId: Joi.string().allow(""),
649
+ body: OrderPlatformModel.CreateOrderRequestSchema().required(),
650
+ }).required();
651
+ }
652
+
653
+ /** @returns {CreateOrderDeprecatedParam} */
654
+ static createOrderDeprecated() {
655
+ return Joi.object({
656
+ xOrderingSource: Joi.string().allow("").required(),
657
+ xApplicationId: Joi.string().allow(""),
658
+ xExtensionId: Joi.string().allow(""),
584
659
  body: OrderPlatformModel.CreateOrderAPI().required(),
585
660
  }).required();
586
661
  }
@@ -662,11 +737,18 @@ class OrderPlatformValidator {
662
737
  }).required();
663
738
  }
664
739
 
740
+ /** @returns {GetAccountByIdParam} */
741
+ static getAccountById() {
742
+ return Joi.object({
743
+ channelAccountId: Joi.string().allow("").required(),
744
+ }).required();
745
+ }
746
+
665
747
  /** @returns {GetAllowedStateTransitionParam} */
666
748
  static getAllowedStateTransition() {
667
749
  return Joi.object({
668
750
  orderingChannel: Joi.string().allow(""),
669
- orderingSource: OrderPlatformModel.OrderingSource(),
751
+ orderingSource: Joi.string().allow(""),
670
752
  status: Joi.string().allow("").required(),
671
753
  }).required();
672
754
  }
@@ -858,6 +940,8 @@ class OrderPlatformValidator {
858
940
  groupEntity: Joi.string().allow(""),
859
941
  enforceDateFilter: Joi.boolean(),
860
942
  fulfillmentType: Joi.string().allow(""),
943
+ orderingSource: Joi.string().allow(""),
944
+ channelAccountId: Joi.string().allow(""),
861
945
  }).required();
862
946
  }
863
947
 
@@ -933,6 +1017,8 @@ class OrderPlatformValidator {
933
1017
  groupEntity: Joi.string().allow(""),
934
1018
  enforceDateFilter: Joi.boolean(),
935
1019
  fulfillmentType: Joi.string().allow(""),
1020
+ orderingSource: Joi.string().allow(""),
1021
+ channelAccountId: Joi.string().allow(""),
936
1022
  }).required();
937
1023
  }
938
1024
 
@@ -941,7 +1027,7 @@ class OrderPlatformValidator {
941
1027
  return Joi.object({
942
1028
  appId: Joi.string().allow(""),
943
1029
  orderingChannel: Joi.string().allow(""),
944
- orderingSource: OrderPlatformModel.OrderingSource(),
1030
+ orderingSource: Joi.string().allow(""),
945
1031
  entity: Joi.string().allow(""),
946
1032
  }).required();
947
1033
  }
@@ -980,6 +1066,14 @@ class OrderPlatformValidator {
980
1066
  }).required();
981
1067
  }
982
1068
 
1069
+ /** @returns {ListAccountsParam} */
1070
+ static listAccounts() {
1071
+ return Joi.object({
1072
+ page: Joi.number(),
1073
+ size: Joi.number(),
1074
+ }).required();
1075
+ }
1076
+
983
1077
  /** @returns {OrderUpdateParam} */
984
1078
  static orderUpdate() {
985
1079
  return Joi.object({
@@ -1025,6 +1119,14 @@ class OrderPlatformValidator {
1025
1119
  }).required();
1026
1120
  }
1027
1121
 
1122
+ /** @returns {UpdateAccountParam} */
1123
+ static updateAccount() {
1124
+ return Joi.object({
1125
+ channelAccountId: Joi.string().allow("").required(),
1126
+ body: OrderPlatformModel.CreateAccount().required(),
1127
+ }).required();
1128
+ }
1129
+
1028
1130
  /** @returns {UpdateAddressParam} */
1029
1131
  static updateAddress() {
1030
1132
  return Joi.object({
@@ -82,6 +82,20 @@ declare class Serviceability {
82
82
  * @description: Create the job for exporting the regions in Geoarea in CSV format. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createGeoAreaExportJob/).
83
83
  */
84
84
  createGeoAreaExportJob({ geoareaId, requestHeaders }?: ServiceabilityPlatformApplicationValidator.CreateGeoAreaExportJobParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.GeoAreaBulkCreationResult>;
85
+ /**
86
+ * @param {ServiceabilityPlatformApplicationValidator.CreateShipmentsParam} arg
87
+ * - Arg object
88
+ *
89
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
90
+ * @param {import("../PlatformAPIClient").Options} - Options
91
+ * @returns {Promise<ServiceabilityPlatformModel.PlatformShipmentsResponseSchema>}
92
+ * - Success response
93
+ *
94
+ * @name createShipments
95
+ * @summary: Create and return shipments
96
+ * @description: Create and return shipments. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createShipments/).
97
+ */
98
+ createShipments({ body, xOrderingSource, requestHeaders }?: ServiceabilityPlatformApplicationValidator.CreateShipmentsParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.PlatformShipmentsResponseSchema>;
85
99
  /**
86
100
  * @param {ServiceabilityPlatformApplicationValidator.CreateStoreRulesParam} arg
87
101
  * - Arg object
@@ -508,6 +508,91 @@ class Serviceability {
508
508
  return response;
509
509
  }
510
510
 
511
+ /**
512
+ * @param {ServiceabilityPlatformApplicationValidator.CreateShipmentsParam} arg
513
+ * - Arg object
514
+ *
515
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
516
+ * @param {import("../PlatformAPIClient").Options} - Options
517
+ * @returns {Promise<ServiceabilityPlatformModel.PlatformShipmentsResponseSchema>}
518
+ * - Success response
519
+ *
520
+ * @name createShipments
521
+ * @summary: Create and return shipments
522
+ * @description: Create and return shipments. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/createShipments/).
523
+ */
524
+ async createShipments(
525
+ { body, xOrderingSource, requestHeaders } = { requestHeaders: {} },
526
+ { responseHeaders } = { responseHeaders: false }
527
+ ) {
528
+ const {
529
+ error,
530
+ } = ServiceabilityPlatformApplicationValidator.createShipments().validate(
531
+ {
532
+ body,
533
+ xOrderingSource,
534
+ },
535
+ { abortEarly: false, allowUnknown: true }
536
+ );
537
+ if (error) {
538
+ return Promise.reject(new FDKClientValidationError(error));
539
+ }
540
+
541
+ // Showing warrnings if extra unknown parameters are found
542
+ const {
543
+ error: warrning,
544
+ } = ServiceabilityPlatformApplicationValidator.createShipments().validate(
545
+ {
546
+ body,
547
+ xOrderingSource,
548
+ },
549
+ { abortEarly: false, allowUnknown: false }
550
+ );
551
+ if (warrning) {
552
+ Logger({
553
+ level: "WARN",
554
+ message: `Parameter Validation warrnings for platform > Serviceability > createShipments \n ${warrning}`,
555
+ });
556
+ }
557
+
558
+ const query_params = {};
559
+
560
+ const response = await PlatformAPIClient.execute(
561
+ this.config,
562
+ "post",
563
+ `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/shipments`,
564
+ query_params,
565
+ body,
566
+ requestHeaders,
567
+ { responseHeaders }
568
+ );
569
+
570
+ let responseData = response;
571
+ if (responseHeaders) {
572
+ responseData = response[0];
573
+ }
574
+
575
+ const {
576
+ error: res_error,
577
+ } = ServiceabilityPlatformModel.PlatformShipmentsResponseSchema().validate(
578
+ responseData,
579
+ { abortEarly: false, allowUnknown: true }
580
+ );
581
+
582
+ if (res_error) {
583
+ if (this.config.options.strictResponseCheck === true) {
584
+ return Promise.reject(new FDKResponseValidationError(res_error));
585
+ } else {
586
+ Logger({
587
+ level: "WARN",
588
+ message: `Response Validation Warnings for platform > Serviceability > createShipments \n ${res_error}`,
589
+ });
590
+ }
591
+ }
592
+
593
+ return response;
594
+ }
595
+
511
596
  /**
512
597
  * @param {ServiceabilityPlatformApplicationValidator.CreateStoreRulesParam} arg
513
598
  * - Arg object