@gofynd/fdk-client-javascript 3.10.0 → 3.12.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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +16 -6
- package/sdk/application/Catalog/CatalogApplicationClient.js +71 -12
- package/sdk/common/Constant.d.ts +5 -0
- package/sdk/common/Constant.js +5 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +3 -2
- package/sdk/partner/Theme/ThemePartnerModel.js +5 -2
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +80 -80
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +48 -48
- package/sdk/platform/Cart/CartPlatformModel.d.ts +193 -35
- package/sdk/platform/Cart/CartPlatformModel.js +103 -46
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +14 -48
- package/sdk/platform/Catalog/CatalogPlatformClient.js +85 -338
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +210 -765
- package/sdk/platform/Catalog/CatalogPlatformModel.js +112 -394
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +15 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +14 -60
- package/sdk/platform/Content/ContentPlatformModel.d.ts +3 -2
- package/sdk/platform/Content/ContentPlatformModel.js +5 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +36 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +252 -0
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +34 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +42 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +70 -8
- package/sdk/platform/Order/OrderPlatformClient.js +454 -8
- package/sdk/platform/Order/OrderPlatformModel.d.ts +1851 -431
- package/sdk/platform/Order/OrderPlatformModel.js +1171 -448
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +150 -16
- package/sdk/platform/Order/OrderPlatformValidator.js +105 -9
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +3 -2
- package/sdk/platform/Theme/ThemePlatformModel.js +5 -2
- package/sdk/platform/User/UserPlatformModel.d.ts +2 -2
- package/sdk/platform/User/UserPlatformModel.js +2 -2
- package/utility.d.ts +3 -0
- package/utility.js +7 -0
|
@@ -27,14 +27,34 @@ 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 {
|
|
37
|
-
*
|
|
40
|
+
* @property {string} xOrderingSource - To uniquely identify the source through
|
|
41
|
+
* which order has been placed.
|
|
42
|
+
* @property {string} [xApplicationId] - Application id
|
|
43
|
+
* @property {string} [xExtensionId] - Extension id
|
|
44
|
+
* @property {OrderPlatformModel.CreateOrderRequestSchema} body
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* @typedef CreateOrderDeprecatedParam
|
|
48
|
+
* @property {string} xOrderingSource - To uniquely identify the source through
|
|
49
|
+
* which order has been placed.
|
|
50
|
+
* @property {string} [xApplicationId] - The Application ID is a unique
|
|
51
|
+
* identifier assigned to a storefront that typically follows a 24-character
|
|
52
|
+
* hexadecimal string. Either `x-application-id` or `x-extension-id` header is
|
|
53
|
+
* mandatory. At least one of them must be provided.
|
|
54
|
+
* @property {string} [xExtensionId] - The Extension ID is a unique identifier
|
|
55
|
+
* assigned to an extension that typically follows a 24-character hexadecimal
|
|
56
|
+
* string. Either `x-application-id` or `x-extension-id` header is mandatory.
|
|
57
|
+
* At least one of them must be provided.
|
|
38
58
|
* @property {OrderPlatformModel.CreateOrderAPI} body
|
|
39
59
|
*/
|
|
40
60
|
/**
|
|
@@ -84,13 +104,18 @@ export = OrderPlatformValidator;
|
|
|
84
104
|
* @typedef GenerateProcessManifestParam
|
|
85
105
|
* @property {OrderPlatformModel.ProcessManifestRequestSchema} body
|
|
86
106
|
*/
|
|
107
|
+
/**
|
|
108
|
+
* @typedef GetAccountByIdParam
|
|
109
|
+
* @property {string} channelAccountId - Unique identifier of the channel
|
|
110
|
+
* account to retrieve.
|
|
111
|
+
*/
|
|
87
112
|
/**
|
|
88
113
|
* @typedef GetAllowedStateTransitionParam
|
|
89
114
|
* @property {string} [orderingChannel] - The specific channel through which
|
|
90
115
|
* your order was placed. This field will be phased out after version 2.4.0.
|
|
91
116
|
* Please use ordering_source instead to ensure accurate order tracking and processing.
|
|
92
|
-
* @property {
|
|
93
|
-
*
|
|
117
|
+
* @property {string} [orderingSource] - To uniquely identify the source through
|
|
118
|
+
* which order has been placed.
|
|
94
119
|
* @property {string} status - The status key indicates the current status for
|
|
95
120
|
* which the API will provide a list of possible next state transitions.
|
|
96
121
|
*/
|
|
@@ -276,6 +301,10 @@ export = OrderPlatformValidator;
|
|
|
276
301
|
* Listing Orders, This is use when we want to get list of shipments or orders
|
|
277
302
|
* by cross store or cross company or fulfilling Store (by default), this is
|
|
278
303
|
* also depends on the login user accessType and store access
|
|
304
|
+
* @property {string} [orderingSource] - Filter orders by ordering source.
|
|
305
|
+
* Accepts comma-separated values for multiple sources.
|
|
306
|
+
* @property {string} [channelAccountId] - Comma-separated channel account IDs
|
|
307
|
+
* to filter orders by specific channel accounts.
|
|
279
308
|
*/
|
|
280
309
|
/** @typedef GetRoleBasedActionsParam */
|
|
281
310
|
/**
|
|
@@ -379,13 +408,17 @@ export = OrderPlatformValidator;
|
|
|
379
408
|
* Listing Orders, This is use when we want to get list of shipments or orders
|
|
380
409
|
* by cross store or cross company or fulfilling Store (by default), this is
|
|
381
410
|
* also depends on the login user accessType and store access
|
|
411
|
+
* @property {string} [orderingSource] - Filter orders by ordering source.
|
|
412
|
+
* Accepts comma-separated values for multiple sources.
|
|
413
|
+
* @property {string} [channelAccountId] - Comma-separated channel account IDs
|
|
414
|
+
* to filter orders by specific channel accounts.
|
|
382
415
|
*/
|
|
383
416
|
/**
|
|
384
417
|
* @typedef GetStateManagerConfigParam
|
|
385
418
|
* @property {string} [appId] - The unique identifier of the application.
|
|
386
419
|
* @property {string} [orderingChannel] - The channel through which orders are placed.
|
|
387
|
-
* @property {
|
|
388
|
-
*
|
|
420
|
+
* @property {string} [orderingSource] - To uniquely identify the source through
|
|
421
|
+
* which order has been placed.
|
|
389
422
|
* @property {string} [entity] - The entity for which the configuration is applied.
|
|
390
423
|
*/
|
|
391
424
|
/** @typedef GetStateTransitionMapParam */
|
|
@@ -407,6 +440,13 @@ export = OrderPlatformValidator;
|
|
|
407
440
|
* @property {string} batchId - A unique identifier for the batch associated
|
|
408
441
|
* with this bulk action.
|
|
409
442
|
*/
|
|
443
|
+
/**
|
|
444
|
+
* @typedef ListAccountsParam
|
|
445
|
+
* @property {number} [page] - The page number to retrieve in the paginated
|
|
446
|
+
* results. Default is page 1.
|
|
447
|
+
* @property {number} [size] - Number of channel accounts to return per page.
|
|
448
|
+
* Default is 20 items per page.
|
|
449
|
+
*/
|
|
410
450
|
/**
|
|
411
451
|
* @typedef OrderUpdateParam
|
|
412
452
|
* @property {OrderPlatformModel.PlatformOrderUpdate} body
|
|
@@ -434,6 +474,11 @@ export = OrderPlatformValidator;
|
|
|
434
474
|
* @property {number} [pageNo] - Page number for pagination.
|
|
435
475
|
* @property {number} [pageSize] - Number of records per page for pagination.
|
|
436
476
|
*/
|
|
477
|
+
/**
|
|
478
|
+
* @typedef UpdateAccountParam
|
|
479
|
+
* @property {string} channelAccountId - Unique identifier of the account.
|
|
480
|
+
* @property {OrderPlatformModel.CreateAccount} body
|
|
481
|
+
*/
|
|
437
482
|
/**
|
|
438
483
|
* @typedef UpdateAddressParam
|
|
439
484
|
* @property {string} shipmentId - Unique shipment no. that is auto-generated
|
|
@@ -478,10 +523,14 @@ declare class OrderPlatformValidator {
|
|
|
478
523
|
static bulkStateTransistion(): BulkStateTransistionParam;
|
|
479
524
|
/** @returns {CheckOrderStatusParam} */
|
|
480
525
|
static checkOrderStatus(): CheckOrderStatusParam;
|
|
526
|
+
/** @returns {CreateAccountParam} */
|
|
527
|
+
static createAccount(): CreateAccountParam;
|
|
481
528
|
/** @returns {CreateChannelConfigParam} */
|
|
482
529
|
static createChannelConfig(): CreateChannelConfigParam;
|
|
483
530
|
/** @returns {CreateOrderParam} */
|
|
484
531
|
static createOrder(): CreateOrderParam;
|
|
532
|
+
/** @returns {CreateOrderDeprecatedParam} */
|
|
533
|
+
static createOrderDeprecated(): CreateOrderDeprecatedParam;
|
|
485
534
|
/** @returns {DispatchManifestsParam} */
|
|
486
535
|
static dispatchManifests(): DispatchManifestsParam;
|
|
487
536
|
/** @returns {DownloadBulkActionTemplateParam} */
|
|
@@ -502,6 +551,8 @@ declare class OrderPlatformValidator {
|
|
|
502
551
|
static generatePOSReceiptByOrderId(): GeneratePOSReceiptByOrderIdParam;
|
|
503
552
|
/** @returns {GenerateProcessManifestParam} */
|
|
504
553
|
static generateProcessManifest(): GenerateProcessManifestParam;
|
|
554
|
+
/** @returns {GetAccountByIdParam} */
|
|
555
|
+
static getAccountById(): GetAccountByIdParam;
|
|
505
556
|
/** @returns {GetAllowedStateTransitionParam} */
|
|
506
557
|
static getAllowedStateTransition(): GetAllowedStateTransitionParam;
|
|
507
558
|
/** @returns {GetAllowedTemplatesForBulkParam} */
|
|
@@ -556,6 +607,8 @@ declare class OrderPlatformValidator {
|
|
|
556
607
|
static invalidateShipmentCache(): InvalidateShipmentCacheParam;
|
|
557
608
|
/** @returns {JobDetailsParam} */
|
|
558
609
|
static jobDetails(): JobDetailsParam;
|
|
610
|
+
/** @returns {ListAccountsParam} */
|
|
611
|
+
static listAccounts(): ListAccountsParam;
|
|
559
612
|
/** @returns {OrderUpdateParam} */
|
|
560
613
|
static orderUpdate(): OrderUpdateParam;
|
|
561
614
|
/** @returns {PostShipmentHistoryParam} */
|
|
@@ -568,6 +621,8 @@ declare class OrderPlatformValidator {
|
|
|
568
621
|
static sendUserMobileOTP(): SendUserMobileOTPParam;
|
|
569
622
|
/** @returns {TrackShipmentParam} */
|
|
570
623
|
static trackShipment(): TrackShipmentParam;
|
|
624
|
+
/** @returns {UpdateAccountParam} */
|
|
625
|
+
static updateAccount(): UpdateAccountParam;
|
|
571
626
|
/** @returns {UpdateAddressParam} */
|
|
572
627
|
static updateAddress(): UpdateAddressParam;
|
|
573
628
|
/** @returns {UpdatePackagingDimensionsParam} */
|
|
@@ -586,7 +641,7 @@ declare class OrderPlatformValidator {
|
|
|
586
641
|
static verifyMobileOTP(): VerifyMobileOTPParam;
|
|
587
642
|
}
|
|
588
643
|
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 };
|
|
644
|
+
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
645
|
}
|
|
591
646
|
type AddStateManagerConfigParam = {
|
|
592
647
|
body: OrderPlatformModel.TransitionConfigPayload;
|
|
@@ -632,15 +687,48 @@ type BulkStateTransistionParam = {
|
|
|
632
687
|
type CheckOrderStatusParam = {
|
|
633
688
|
body: OrderPlatformModel.OrderStatus;
|
|
634
689
|
};
|
|
690
|
+
type CreateAccountParam = {
|
|
691
|
+
body: OrderPlatformModel.CreateAccount;
|
|
692
|
+
};
|
|
635
693
|
type CreateChannelConfigParam = {
|
|
636
694
|
body: OrderPlatformModel.CreateChannelConfigData;
|
|
637
695
|
};
|
|
638
696
|
type CreateOrderParam = {
|
|
639
697
|
/**
|
|
640
|
-
* - To uniquely
|
|
641
|
-
*
|
|
698
|
+
* - To uniquely identify the source through
|
|
699
|
+
* which order has been placed.
|
|
642
700
|
*/
|
|
643
|
-
xOrderingSource
|
|
701
|
+
xOrderingSource: string;
|
|
702
|
+
/**
|
|
703
|
+
* - Application id
|
|
704
|
+
*/
|
|
705
|
+
xApplicationId?: string;
|
|
706
|
+
/**
|
|
707
|
+
* - Extension id
|
|
708
|
+
*/
|
|
709
|
+
xExtensionId?: string;
|
|
710
|
+
body: OrderPlatformModel.CreateOrderRequestSchema;
|
|
711
|
+
};
|
|
712
|
+
type CreateOrderDeprecatedParam = {
|
|
713
|
+
/**
|
|
714
|
+
* - To uniquely identify the source through
|
|
715
|
+
* which order has been placed.
|
|
716
|
+
*/
|
|
717
|
+
xOrderingSource: string;
|
|
718
|
+
/**
|
|
719
|
+
* - The Application ID is a unique
|
|
720
|
+
* identifier assigned to a storefront that typically follows a 24-character
|
|
721
|
+
* hexadecimal string. Either `x-application-id` or `x-extension-id` header is
|
|
722
|
+
* mandatory. At least one of them must be provided.
|
|
723
|
+
*/
|
|
724
|
+
xApplicationId?: string;
|
|
725
|
+
/**
|
|
726
|
+
* - The Extension ID is a unique identifier
|
|
727
|
+
* assigned to an extension that typically follows a 24-character hexadecimal
|
|
728
|
+
* string. Either `x-application-id` or `x-extension-id` header is mandatory.
|
|
729
|
+
* At least one of them must be provided.
|
|
730
|
+
*/
|
|
731
|
+
xExtensionId?: string;
|
|
644
732
|
body: OrderPlatformModel.CreateOrderAPI;
|
|
645
733
|
};
|
|
646
734
|
type DispatchManifestsParam = {
|
|
@@ -704,6 +792,13 @@ type GeneratePOSReceiptByOrderIdParam = {
|
|
|
704
792
|
type GenerateProcessManifestParam = {
|
|
705
793
|
body: OrderPlatformModel.ProcessManifestRequestSchema;
|
|
706
794
|
};
|
|
795
|
+
type GetAccountByIdParam = {
|
|
796
|
+
/**
|
|
797
|
+
* - Unique identifier of the channel
|
|
798
|
+
* account to retrieve.
|
|
799
|
+
*/
|
|
800
|
+
channelAccountId: string;
|
|
801
|
+
};
|
|
707
802
|
type GetAllowedStateTransitionParam = {
|
|
708
803
|
/**
|
|
709
804
|
* - The specific channel through which
|
|
@@ -712,10 +807,10 @@ type GetAllowedStateTransitionParam = {
|
|
|
712
807
|
*/
|
|
713
808
|
orderingChannel?: string;
|
|
714
809
|
/**
|
|
715
|
-
* - To uniquely
|
|
716
|
-
*
|
|
810
|
+
* - To uniquely identify the source through
|
|
811
|
+
* which order has been placed.
|
|
717
812
|
*/
|
|
718
|
-
orderingSource?:
|
|
813
|
+
orderingSource?: string;
|
|
719
814
|
/**
|
|
720
815
|
* - The status key indicates the current status for
|
|
721
816
|
* which the API will provide a list of possible next state transitions.
|
|
@@ -1156,6 +1251,16 @@ type GetOrdersParam = {
|
|
|
1156
1251
|
* also depends on the login user accessType and store access
|
|
1157
1252
|
*/
|
|
1158
1253
|
fulfillmentType?: string;
|
|
1254
|
+
/**
|
|
1255
|
+
* - Filter orders by ordering source.
|
|
1256
|
+
* Accepts comma-separated values for multiple sources.
|
|
1257
|
+
*/
|
|
1258
|
+
orderingSource?: string;
|
|
1259
|
+
/**
|
|
1260
|
+
* - Comma-separated channel account IDs
|
|
1261
|
+
* to filter orders by specific channel accounts.
|
|
1262
|
+
*/
|
|
1263
|
+
channelAccountId?: string;
|
|
1159
1264
|
};
|
|
1160
1265
|
type GetShipmentByIdParam = {
|
|
1161
1266
|
/**
|
|
@@ -1392,6 +1497,16 @@ type GetShipmentsParam = {
|
|
|
1392
1497
|
* also depends on the login user accessType and store access
|
|
1393
1498
|
*/
|
|
1394
1499
|
fulfillmentType?: string;
|
|
1500
|
+
/**
|
|
1501
|
+
* - Filter orders by ordering source.
|
|
1502
|
+
* Accepts comma-separated values for multiple sources.
|
|
1503
|
+
*/
|
|
1504
|
+
orderingSource?: string;
|
|
1505
|
+
/**
|
|
1506
|
+
* - Comma-separated channel account IDs
|
|
1507
|
+
* to filter orders by specific channel accounts.
|
|
1508
|
+
*/
|
|
1509
|
+
channelAccountId?: string;
|
|
1395
1510
|
};
|
|
1396
1511
|
type GetStateManagerConfigParam = {
|
|
1397
1512
|
/**
|
|
@@ -1403,10 +1518,10 @@ type GetStateManagerConfigParam = {
|
|
|
1403
1518
|
*/
|
|
1404
1519
|
orderingChannel?: string;
|
|
1405
1520
|
/**
|
|
1406
|
-
* - To uniquely
|
|
1407
|
-
*
|
|
1521
|
+
* - To uniquely identify the source through
|
|
1522
|
+
* which order has been placed.
|
|
1408
1523
|
*/
|
|
1409
|
-
orderingSource?:
|
|
1524
|
+
orderingSource?: string;
|
|
1410
1525
|
/**
|
|
1411
1526
|
* - The entity for which the configuration is applied.
|
|
1412
1527
|
*/
|
|
@@ -1435,6 +1550,18 @@ type JobDetailsParam = {
|
|
|
1435
1550
|
*/
|
|
1436
1551
|
batchId: string;
|
|
1437
1552
|
};
|
|
1553
|
+
type ListAccountsParam = {
|
|
1554
|
+
/**
|
|
1555
|
+
* - The page number to retrieve in the paginated
|
|
1556
|
+
* results. Default is page 1.
|
|
1557
|
+
*/
|
|
1558
|
+
page?: number;
|
|
1559
|
+
/**
|
|
1560
|
+
* - Number of channel accounts to return per page.
|
|
1561
|
+
* Default is 20 items per page.
|
|
1562
|
+
*/
|
|
1563
|
+
size?: number;
|
|
1564
|
+
};
|
|
1438
1565
|
type OrderUpdateParam = {
|
|
1439
1566
|
body: OrderPlatformModel.PlatformOrderUpdate;
|
|
1440
1567
|
};
|
|
@@ -1468,6 +1595,13 @@ type TrackShipmentParam = {
|
|
|
1468
1595
|
*/
|
|
1469
1596
|
pageSize?: number;
|
|
1470
1597
|
};
|
|
1598
|
+
type UpdateAccountParam = {
|
|
1599
|
+
/**
|
|
1600
|
+
* - Unique identifier of the account.
|
|
1601
|
+
*/
|
|
1602
|
+
channelAccountId: string;
|
|
1603
|
+
body: OrderPlatformModel.CreateAccount;
|
|
1604
|
+
};
|
|
1471
1605
|
type UpdateAddressParam = {
|
|
1472
1606
|
/**
|
|
1473
1607
|
* - 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,25 @@ const OrderPlatformModel = require("./OrderPlatformModel");
|
|
|
42
47
|
|
|
43
48
|
/**
|
|
44
49
|
* @typedef CreateOrderParam
|
|
45
|
-
* @property {
|
|
46
|
-
*
|
|
50
|
+
* @property {string} xOrderingSource - To uniquely identify the source through
|
|
51
|
+
* which order has been placed.
|
|
52
|
+
* @property {string} [xApplicationId] - Application id
|
|
53
|
+
* @property {string} [xExtensionId] - Extension id
|
|
54
|
+
* @property {OrderPlatformModel.CreateOrderRequestSchema} body
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @typedef CreateOrderDeprecatedParam
|
|
59
|
+
* @property {string} xOrderingSource - To uniquely identify the source through
|
|
60
|
+
* which order has been placed.
|
|
61
|
+
* @property {string} [xApplicationId] - The Application ID is a unique
|
|
62
|
+
* identifier assigned to a storefront that typically follows a 24-character
|
|
63
|
+
* hexadecimal string. Either `x-application-id` or `x-extension-id` header is
|
|
64
|
+
* mandatory. At least one of them must be provided.
|
|
65
|
+
* @property {string} [xExtensionId] - The Extension ID is a unique identifier
|
|
66
|
+
* assigned to an extension that typically follows a 24-character hexadecimal
|
|
67
|
+
* string. Either `x-application-id` or `x-extension-id` header is mandatory.
|
|
68
|
+
* At least one of them must be provided.
|
|
47
69
|
* @property {OrderPlatformModel.CreateOrderAPI} body
|
|
48
70
|
*/
|
|
49
71
|
|
|
@@ -104,13 +126,19 @@ const OrderPlatformModel = require("./OrderPlatformModel");
|
|
|
104
126
|
* @property {OrderPlatformModel.ProcessManifestRequestSchema} body
|
|
105
127
|
*/
|
|
106
128
|
|
|
129
|
+
/**
|
|
130
|
+
* @typedef GetAccountByIdParam
|
|
131
|
+
* @property {string} channelAccountId - Unique identifier of the channel
|
|
132
|
+
* account to retrieve.
|
|
133
|
+
*/
|
|
134
|
+
|
|
107
135
|
/**
|
|
108
136
|
* @typedef GetAllowedStateTransitionParam
|
|
109
137
|
* @property {string} [orderingChannel] - The specific channel through which
|
|
110
138
|
* your order was placed. This field will be phased out after version 2.4.0.
|
|
111
139
|
* Please use ordering_source instead to ensure accurate order tracking and processing.
|
|
112
|
-
* @property {
|
|
113
|
-
*
|
|
140
|
+
* @property {string} [orderingSource] - To uniquely identify the source through
|
|
141
|
+
* which order has been placed.
|
|
114
142
|
* @property {string} status - The status key indicates the current status for
|
|
115
143
|
* which the API will provide a list of possible next state transitions.
|
|
116
144
|
*/
|
|
@@ -311,6 +339,10 @@ const OrderPlatformModel = require("./OrderPlatformModel");
|
|
|
311
339
|
* Listing Orders, This is use when we want to get list of shipments or orders
|
|
312
340
|
* by cross store or cross company or fulfilling Store (by default), this is
|
|
313
341
|
* also depends on the login user accessType and store access
|
|
342
|
+
* @property {string} [orderingSource] - Filter orders by ordering source.
|
|
343
|
+
* Accepts comma-separated values for multiple sources.
|
|
344
|
+
* @property {string} [channelAccountId] - Comma-separated channel account IDs
|
|
345
|
+
* to filter orders by specific channel accounts.
|
|
314
346
|
*/
|
|
315
347
|
|
|
316
348
|
/** @typedef GetRoleBasedActionsParam */
|
|
@@ -419,14 +451,18 @@ const OrderPlatformModel = require("./OrderPlatformModel");
|
|
|
419
451
|
* Listing Orders, This is use when we want to get list of shipments or orders
|
|
420
452
|
* by cross store or cross company or fulfilling Store (by default), this is
|
|
421
453
|
* also depends on the login user accessType and store access
|
|
454
|
+
* @property {string} [orderingSource] - Filter orders by ordering source.
|
|
455
|
+
* Accepts comma-separated values for multiple sources.
|
|
456
|
+
* @property {string} [channelAccountId] - Comma-separated channel account IDs
|
|
457
|
+
* to filter orders by specific channel accounts.
|
|
422
458
|
*/
|
|
423
459
|
|
|
424
460
|
/**
|
|
425
461
|
* @typedef GetStateManagerConfigParam
|
|
426
462
|
* @property {string} [appId] - The unique identifier of the application.
|
|
427
463
|
* @property {string} [orderingChannel] - The channel through which orders are placed.
|
|
428
|
-
* @property {
|
|
429
|
-
*
|
|
464
|
+
* @property {string} [orderingSource] - To uniquely identify the source through
|
|
465
|
+
* which order has been placed.
|
|
430
466
|
* @property {string} [entity] - The entity for which the configuration is applied.
|
|
431
467
|
*/
|
|
432
468
|
|
|
@@ -454,6 +490,14 @@ const OrderPlatformModel = require("./OrderPlatformModel");
|
|
|
454
490
|
* with this bulk action.
|
|
455
491
|
*/
|
|
456
492
|
|
|
493
|
+
/**
|
|
494
|
+
* @typedef ListAccountsParam
|
|
495
|
+
* @property {number} [page] - The page number to retrieve in the paginated
|
|
496
|
+
* results. Default is page 1.
|
|
497
|
+
* @property {number} [size] - Number of channel accounts to return per page.
|
|
498
|
+
* Default is 20 items per page.
|
|
499
|
+
*/
|
|
500
|
+
|
|
457
501
|
/**
|
|
458
502
|
* @typedef OrderUpdateParam
|
|
459
503
|
* @property {OrderPlatformModel.PlatformOrderUpdate} body
|
|
@@ -487,6 +531,12 @@ const OrderPlatformModel = require("./OrderPlatformModel");
|
|
|
487
531
|
* @property {number} [pageSize] - Number of records per page for pagination.
|
|
488
532
|
*/
|
|
489
533
|
|
|
534
|
+
/**
|
|
535
|
+
* @typedef UpdateAccountParam
|
|
536
|
+
* @property {string} channelAccountId - Unique identifier of the account.
|
|
537
|
+
* @property {OrderPlatformModel.CreateAccount} body
|
|
538
|
+
*/
|
|
539
|
+
|
|
490
540
|
/**
|
|
491
541
|
* @typedef UpdateAddressParam
|
|
492
542
|
* @property {string} shipmentId - Unique shipment no. that is auto-generated
|
|
@@ -570,6 +620,13 @@ class OrderPlatformValidator {
|
|
|
570
620
|
}).required();
|
|
571
621
|
}
|
|
572
622
|
|
|
623
|
+
/** @returns {CreateAccountParam} */
|
|
624
|
+
static createAccount() {
|
|
625
|
+
return Joi.object({
|
|
626
|
+
body: OrderPlatformModel.CreateAccount().required(),
|
|
627
|
+
}).required();
|
|
628
|
+
}
|
|
629
|
+
|
|
573
630
|
/** @returns {CreateChannelConfigParam} */
|
|
574
631
|
static createChannelConfig() {
|
|
575
632
|
return Joi.object({
|
|
@@ -580,7 +637,19 @@ class OrderPlatformValidator {
|
|
|
580
637
|
/** @returns {CreateOrderParam} */
|
|
581
638
|
static createOrder() {
|
|
582
639
|
return Joi.object({
|
|
583
|
-
xOrderingSource:
|
|
640
|
+
xOrderingSource: Joi.string().allow("").required(),
|
|
641
|
+
xApplicationId: Joi.string().allow(""),
|
|
642
|
+
xExtensionId: Joi.string().allow(""),
|
|
643
|
+
body: OrderPlatformModel.CreateOrderRequestSchema().required(),
|
|
644
|
+
}).required();
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/** @returns {CreateOrderDeprecatedParam} */
|
|
648
|
+
static createOrderDeprecated() {
|
|
649
|
+
return Joi.object({
|
|
650
|
+
xOrderingSource: Joi.string().allow("").required(),
|
|
651
|
+
xApplicationId: Joi.string().allow(""),
|
|
652
|
+
xExtensionId: Joi.string().allow(""),
|
|
584
653
|
body: OrderPlatformModel.CreateOrderAPI().required(),
|
|
585
654
|
}).required();
|
|
586
655
|
}
|
|
@@ -662,11 +731,18 @@ class OrderPlatformValidator {
|
|
|
662
731
|
}).required();
|
|
663
732
|
}
|
|
664
733
|
|
|
734
|
+
/** @returns {GetAccountByIdParam} */
|
|
735
|
+
static getAccountById() {
|
|
736
|
+
return Joi.object({
|
|
737
|
+
channelAccountId: Joi.string().allow("").required(),
|
|
738
|
+
}).required();
|
|
739
|
+
}
|
|
740
|
+
|
|
665
741
|
/** @returns {GetAllowedStateTransitionParam} */
|
|
666
742
|
static getAllowedStateTransition() {
|
|
667
743
|
return Joi.object({
|
|
668
744
|
orderingChannel: Joi.string().allow(""),
|
|
669
|
-
orderingSource:
|
|
745
|
+
orderingSource: Joi.string().allow(""),
|
|
670
746
|
status: Joi.string().allow("").required(),
|
|
671
747
|
}).required();
|
|
672
748
|
}
|
|
@@ -858,6 +934,8 @@ class OrderPlatformValidator {
|
|
|
858
934
|
groupEntity: Joi.string().allow(""),
|
|
859
935
|
enforceDateFilter: Joi.boolean(),
|
|
860
936
|
fulfillmentType: Joi.string().allow(""),
|
|
937
|
+
orderingSource: Joi.string().allow(""),
|
|
938
|
+
channelAccountId: Joi.string().allow(""),
|
|
861
939
|
}).required();
|
|
862
940
|
}
|
|
863
941
|
|
|
@@ -933,6 +1011,8 @@ class OrderPlatformValidator {
|
|
|
933
1011
|
groupEntity: Joi.string().allow(""),
|
|
934
1012
|
enforceDateFilter: Joi.boolean(),
|
|
935
1013
|
fulfillmentType: Joi.string().allow(""),
|
|
1014
|
+
orderingSource: Joi.string().allow(""),
|
|
1015
|
+
channelAccountId: Joi.string().allow(""),
|
|
936
1016
|
}).required();
|
|
937
1017
|
}
|
|
938
1018
|
|
|
@@ -941,7 +1021,7 @@ class OrderPlatformValidator {
|
|
|
941
1021
|
return Joi.object({
|
|
942
1022
|
appId: Joi.string().allow(""),
|
|
943
1023
|
orderingChannel: Joi.string().allow(""),
|
|
944
|
-
orderingSource:
|
|
1024
|
+
orderingSource: Joi.string().allow(""),
|
|
945
1025
|
entity: Joi.string().allow(""),
|
|
946
1026
|
}).required();
|
|
947
1027
|
}
|
|
@@ -980,6 +1060,14 @@ class OrderPlatformValidator {
|
|
|
980
1060
|
}).required();
|
|
981
1061
|
}
|
|
982
1062
|
|
|
1063
|
+
/** @returns {ListAccountsParam} */
|
|
1064
|
+
static listAccounts() {
|
|
1065
|
+
return Joi.object({
|
|
1066
|
+
page: Joi.number(),
|
|
1067
|
+
size: Joi.number(),
|
|
1068
|
+
}).required();
|
|
1069
|
+
}
|
|
1070
|
+
|
|
983
1071
|
/** @returns {OrderUpdateParam} */
|
|
984
1072
|
static orderUpdate() {
|
|
985
1073
|
return Joi.object({
|
|
@@ -1025,6 +1113,14 @@ class OrderPlatformValidator {
|
|
|
1025
1113
|
}).required();
|
|
1026
1114
|
}
|
|
1027
1115
|
|
|
1116
|
+
/** @returns {UpdateAccountParam} */
|
|
1117
|
+
static updateAccount() {
|
|
1118
|
+
return Joi.object({
|
|
1119
|
+
channelAccountId: Joi.string().allow("").required(),
|
|
1120
|
+
body: OrderPlatformModel.CreateAccount().required(),
|
|
1121
|
+
}).required();
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1028
1124
|
/** @returns {UpdateAddressParam} */
|
|
1029
1125
|
static updateAddress() {
|
|
1030
1126
|
return Joi.object({
|
|
@@ -601,7 +601,8 @@ export = ThemePlatformModel;
|
|
|
601
601
|
* | "shipping-policy"
|
|
602
602
|
* | "return-policy"
|
|
603
603
|
* | "order-status"
|
|
604
|
-
* | "locate-us"
|
|
604
|
+
* | "locate-us"
|
|
605
|
+
* | "single-page-checkout"} PageType
|
|
605
606
|
*/
|
|
606
607
|
declare class ThemePlatformModel {
|
|
607
608
|
}
|
|
@@ -1664,4 +1665,4 @@ type ActionPage = {
|
|
|
1664
1665
|
* @returns {PageType}
|
|
1665
1666
|
*/
|
|
1666
1667
|
declare function PageType(): PageType;
|
|
1667
|
-
type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-emails" | "profile-phones" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status" | "locate-us";
|
|
1668
|
+
type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-emails" | "profile-phones" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status" | "locate-us" | "single-page-checkout";
|
|
@@ -684,7 +684,8 @@ const Joi = require("joi");
|
|
|
684
684
|
* | "shipping-policy"
|
|
685
685
|
* | "return-policy"
|
|
686
686
|
* | "order-status"
|
|
687
|
-
* | "locate-us"
|
|
687
|
+
* | "locate-us"
|
|
688
|
+
* | "single-page-checkout"} PageType
|
|
688
689
|
*/
|
|
689
690
|
|
|
690
691
|
class ThemePlatformModel {
|
|
@@ -1592,7 +1593,9 @@ class ThemePlatformModel {
|
|
|
1592
1593
|
|
|
1593
1594
|
"order-status",
|
|
1594
1595
|
|
|
1595
|
-
"locate-us"
|
|
1596
|
+
"locate-us",
|
|
1597
|
+
|
|
1598
|
+
"single-page-checkout"
|
|
1596
1599
|
);
|
|
1597
1600
|
}
|
|
1598
1601
|
}
|
|
@@ -399,7 +399,7 @@ export = UserPlatformModel;
|
|
|
399
399
|
*/
|
|
400
400
|
/**
|
|
401
401
|
* @typedef CreateUserRequestSchema
|
|
402
|
-
* @property {string} phone_number
|
|
402
|
+
* @property {string} [phone_number]
|
|
403
403
|
* @property {string} [email]
|
|
404
404
|
* @property {string} [first_name]
|
|
405
405
|
* @property {string} [last_name]
|
|
@@ -1487,7 +1487,7 @@ type CreateUserGroup = {
|
|
|
1487
1487
|
/** @returns {CreateUserRequestSchema} */
|
|
1488
1488
|
declare function CreateUserRequestSchema(): CreateUserRequestSchema;
|
|
1489
1489
|
type CreateUserRequestSchema = {
|
|
1490
|
-
phone_number
|
|
1490
|
+
phone_number?: string;
|
|
1491
1491
|
email?: string;
|
|
1492
1492
|
first_name?: string;
|
|
1493
1493
|
last_name?: string;
|
|
@@ -446,7 +446,7 @@ const Joi = require("joi");
|
|
|
446
446
|
|
|
447
447
|
/**
|
|
448
448
|
* @typedef CreateUserRequestSchema
|
|
449
|
-
* @property {string} phone_number
|
|
449
|
+
* @property {string} [phone_number]
|
|
450
450
|
* @property {string} [email]
|
|
451
451
|
* @property {string} [first_name]
|
|
452
452
|
* @property {string} [last_name]
|
|
@@ -1266,7 +1266,7 @@ class UserPlatformModel {
|
|
|
1266
1266
|
/** @returns {CreateUserRequestSchema} */
|
|
1267
1267
|
static CreateUserRequestSchema() {
|
|
1268
1268
|
return Joi.object({
|
|
1269
|
-
phone_number: Joi.string().allow("")
|
|
1269
|
+
phone_number: Joi.string().allow(""),
|
|
1270
1270
|
email: Joi.string().allow(""),
|
|
1271
1271
|
first_name: Joi.string().allow(""),
|
|
1272
1272
|
last_name: Joi.string().allow(""),
|
package/utility.d.ts
ADDED