@gofynd/fdk-client-javascript 1.4.5 → 1.4.7
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 +2 -2
- package/sdk/application/ApplicationClient.d.ts +2 -2
- package/sdk/application/ApplicationClient.js +2 -2
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +5 -5
- package/sdk/application/Catalog/CatalogApplicationClient.js +5 -5
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +6 -0
- package/sdk/application/Catalog/CatalogApplicationModel.js +6 -0
- package/sdk/application/Content/ContentApplicationModel.d.ts +2 -0
- package/sdk/application/Content/ContentApplicationModel.js +2 -0
- package/sdk/application/Logistic/LogisticApplicationModel.js +2 -2
- package/sdk/application/Order/OrderApplicationClient.d.ts +1 -1
- package/sdk/application/Order/OrderApplicationClient.js +1 -1
- package/sdk/application/Order/OrderApplicationModel.d.ts +70 -9
- package/sdk/application/Order/OrderApplicationModel.js +43 -7
- package/sdk/application/Order/OrderApplicationValidator.d.ts +2 -2
- package/sdk/application/Order/OrderApplicationValidator.js +1 -1
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +18 -18
- package/sdk/application/Payment/PaymentApplicationModel.js +41 -35
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +22 -0
- package/sdk/application/Webhook/WebhookApplicationClient.js +115 -0
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +37 -0
- package/sdk/application/Webhook/WebhookApplicationModel.js +46 -0
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +16 -0
- package/sdk/application/Webhook/WebhookApplicationValidator.js +19 -0
- package/sdk/application/index.d.ts +1 -1
- package/sdk/application/index.js +2 -2
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +2 -2
- package/sdk/partner/Webhook/WebhookPartnerClient.js +2 -2
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +23 -19
- package/sdk/partner/Webhook/WebhookPartnerModel.js +20 -23
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +43 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +257 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +39 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +45 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +60 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +57 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +10 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +80 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +13 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +12 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +2 -0
- package/sdk/platform/Cart/CartPlatformModel.js +2 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +34 -7
- package/sdk/platform/Catalog/CatalogPlatformClient.js +88 -13
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +120 -17
- package/sdk/platform/Catalog/CatalogPlatformModel.js +153 -27
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +71 -7
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +32 -5
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2 -0
- package/sdk/platform/Content/ContentPlatformModel.js +2 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +11 -1
- package/sdk/platform/Order/OrderPlatformClient.js +82 -5
- package/sdk/platform/Order/OrderPlatformModel.d.ts +163 -15
- package/sdk/platform/Order/OrderPlatformModel.js +157 -55
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +58 -17
- package/sdk/platform/Order/OrderPlatformValidator.js +28 -16
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2 -2
- package/sdk/platform/Payment/PaymentPlatformModel.js +24 -18
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -0
- package/sdk/platform/PlatformApplicationClient.js +4 -0
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +24 -0
- package/sdk/platform/Webhook/WebhookPlatformClient.js +164 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +71 -18
- package/sdk/platform/Webhook/WebhookPlatformModel.js +76 -23
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +19 -1
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +24 -0
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +2 -2
- package/sdk/public/Webhook/WebhookPublicClient.js +2 -2
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +2 -0
- package/sdk/public/Webhook/WebhookPublicModel.js +3 -1
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +0 -323
- package/sdk/application/PosCart/PosCartApplicationClient.js +0 -2364
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +0 -1857
- package/sdk/application/PosCart/PosCartApplicationModel.js +0 -1906
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +0 -483
- package/sdk/application/PosCart/PosCartApplicationValidator.js +0 -492
|
@@ -44,8 +44,8 @@ export = CatalogPlatformValidator;
|
|
|
44
44
|
*/
|
|
45
45
|
/**
|
|
46
46
|
* @typedef CreateMarketplaceOptinParam
|
|
47
|
-
* @property {string}
|
|
48
|
-
* to be retrieved.
|
|
47
|
+
* @property {string} marketplaceSlug - The marketplace for which the detail
|
|
48
|
+
* needs to be retrieved.
|
|
49
49
|
* @property {CatalogPlatformModel.OptInPostRequest} body
|
|
50
50
|
*/
|
|
51
51
|
/**
|
|
@@ -162,9 +162,25 @@ export = CatalogPlatformValidator;
|
|
|
162
162
|
* set of results
|
|
163
163
|
* @property {number} [pageSize] - Number of items to retrieve in each page.
|
|
164
164
|
* Default is 12.
|
|
165
|
+
* @property {string} [pageId] - Alphanumeric Page ID to retrieve next set of results.
|
|
166
|
+
* @property {string} [pageType] - Available pagination types are cursor or number.
|
|
165
167
|
* @property {string} [q] - Search with help of store code.
|
|
166
168
|
* @property {boolean} [sellable] - Filter on whether product is in stock or not.
|
|
167
169
|
* @property {number[]} [storeIds] - The Store Id of products to fetch inventory.
|
|
170
|
+
* @property {number[]} [brandIds] - The Brand Id of products to fetch inventory.
|
|
171
|
+
* @property {string[]} [sellerIdentifiers] - The Seller Identifier or Primary
|
|
172
|
+
* Identifier of the inventory.
|
|
173
|
+
* @property {number} [qtyGt] - This field allows you to filter for inventories
|
|
174
|
+
* that have quantity greater than to the specified value based on qty_type filter.
|
|
175
|
+
* @property {number} [qtyLt] - This field allows you to filter for inventories
|
|
176
|
+
* that have a quantity less than to the specified value based on qty_type filter.
|
|
177
|
+
* @property {string} [qtyType] - This field provides flexibility in selecting
|
|
178
|
+
* filter for inventory quantity counts and date queries. For example, you
|
|
179
|
+
* might use this field to specify "total" or "sellable" quantity.
|
|
180
|
+
* @property {string} [fromDate] - Inventory updated on filter to get
|
|
181
|
+
* inventories greater then or equal to provided date based on qty_type value.
|
|
182
|
+
* @property {string} [toDate] - Inventory updated on filter to get inventories
|
|
183
|
+
* less then or equal to provided date based on qty_type value.
|
|
168
184
|
* @property {string} [sizeIdentifier] - Size Identifier (Seller Identifier or
|
|
169
185
|
* Primary Identifier) of which inventory is to get.
|
|
170
186
|
*/
|
|
@@ -174,6 +190,7 @@ export = CatalogPlatformValidator;
|
|
|
174
190
|
* set of results
|
|
175
191
|
* @property {number} [pageSize] - Number of items to retrieve in each page.
|
|
176
192
|
* Default is 12.
|
|
193
|
+
* @property {string} [search] - Search string to filter the results by batch id
|
|
177
194
|
*/
|
|
178
195
|
/**
|
|
179
196
|
* @typedef GetInventoryBySizeParam
|
|
@@ -420,7 +437,7 @@ export = CatalogPlatformValidator;
|
|
|
420
437
|
* @property {string} department - Department of the product to be uploaded.
|
|
421
438
|
* @property {string} productType - Product type of the product to be uploaded
|
|
422
439
|
* i.e. set, standard , digital.
|
|
423
|
-
* @property {CatalogPlatformModel.
|
|
440
|
+
* @property {CatalogPlatformModel.BulkProductJob} body
|
|
424
441
|
*/
|
|
425
442
|
/**
|
|
426
443
|
* @typedef ValidateProductTemplateParam
|
|
@@ -645,10 +662,10 @@ type CreateInventoryExportJobParam = {
|
|
|
645
662
|
};
|
|
646
663
|
type CreateMarketplaceOptinParam = {
|
|
647
664
|
/**
|
|
648
|
-
* - The marketplace for which the detail
|
|
649
|
-
* to be retrieved.
|
|
665
|
+
* - The marketplace for which the detail
|
|
666
|
+
* needs to be retrieved.
|
|
650
667
|
*/
|
|
651
|
-
|
|
668
|
+
marketplaceSlug: string;
|
|
652
669
|
body: CatalogPlatformModel.OptInPostRequest;
|
|
653
670
|
};
|
|
654
671
|
type CreateProductParam = {
|
|
@@ -834,6 +851,14 @@ type GetInventoriesParam = {
|
|
|
834
851
|
* Default is 12.
|
|
835
852
|
*/
|
|
836
853
|
pageSize?: number;
|
|
854
|
+
/**
|
|
855
|
+
* - Alphanumeric Page ID to retrieve next set of results.
|
|
856
|
+
*/
|
|
857
|
+
pageId?: string;
|
|
858
|
+
/**
|
|
859
|
+
* - Available pagination types are cursor or number.
|
|
860
|
+
*/
|
|
861
|
+
pageType?: string;
|
|
837
862
|
/**
|
|
838
863
|
* - Search with help of store code.
|
|
839
864
|
*/
|
|
@@ -846,6 +871,41 @@ type GetInventoriesParam = {
|
|
|
846
871
|
* - The Store Id of products to fetch inventory.
|
|
847
872
|
*/
|
|
848
873
|
storeIds?: number[];
|
|
874
|
+
/**
|
|
875
|
+
* - The Brand Id of products to fetch inventory.
|
|
876
|
+
*/
|
|
877
|
+
brandIds?: number[];
|
|
878
|
+
/**
|
|
879
|
+
* - The Seller Identifier or Primary
|
|
880
|
+
* Identifier of the inventory.
|
|
881
|
+
*/
|
|
882
|
+
sellerIdentifiers?: string[];
|
|
883
|
+
/**
|
|
884
|
+
* - This field allows you to filter for inventories
|
|
885
|
+
* that have quantity greater than to the specified value based on qty_type filter.
|
|
886
|
+
*/
|
|
887
|
+
qtyGt?: number;
|
|
888
|
+
/**
|
|
889
|
+
* - This field allows you to filter for inventories
|
|
890
|
+
* that have a quantity less than to the specified value based on qty_type filter.
|
|
891
|
+
*/
|
|
892
|
+
qtyLt?: number;
|
|
893
|
+
/**
|
|
894
|
+
* - This field provides flexibility in selecting
|
|
895
|
+
* filter for inventory quantity counts and date queries. For example, you
|
|
896
|
+
* might use this field to specify "total" or "sellable" quantity.
|
|
897
|
+
*/
|
|
898
|
+
qtyType?: string;
|
|
899
|
+
/**
|
|
900
|
+
* - Inventory updated on filter to get
|
|
901
|
+
* inventories greater then or equal to provided date based on qty_type value.
|
|
902
|
+
*/
|
|
903
|
+
fromDate?: string;
|
|
904
|
+
/**
|
|
905
|
+
* - Inventory updated on filter to get inventories
|
|
906
|
+
* less then or equal to provided date based on qty_type value.
|
|
907
|
+
*/
|
|
908
|
+
toDate?: string;
|
|
849
909
|
/**
|
|
850
910
|
* - Size Identifier (Seller Identifier or
|
|
851
911
|
* Primary Identifier) of which inventory is to get.
|
|
@@ -863,6 +923,10 @@ type GetInventoryBulkUploadHistoryParam = {
|
|
|
863
923
|
* Default is 12.
|
|
864
924
|
*/
|
|
865
925
|
pageSize?: number;
|
|
926
|
+
/**
|
|
927
|
+
* - Search string to filter the results by batch id
|
|
928
|
+
*/
|
|
929
|
+
search?: string;
|
|
866
930
|
};
|
|
867
931
|
type GetInventoryBySizeParam = {
|
|
868
932
|
/**
|
|
@@ -1345,7 +1409,7 @@ type UploadBulkProductsParam = {
|
|
|
1345
1409
|
* i.e. set, standard , digital.
|
|
1346
1410
|
*/
|
|
1347
1411
|
productType: string;
|
|
1348
|
-
body: CatalogPlatformModel.
|
|
1412
|
+
body: CatalogPlatformModel.BulkProductJob;
|
|
1349
1413
|
};
|
|
1350
1414
|
type ValidateProductTemplateParam = {
|
|
1351
1415
|
/**
|
|
@@ -57,8 +57,8 @@ const CatalogPlatformModel = require("./CatalogPlatformModel");
|
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* @typedef CreateMarketplaceOptinParam
|
|
60
|
-
* @property {string}
|
|
61
|
-
* to be retrieved.
|
|
60
|
+
* @property {string} marketplaceSlug - The marketplace for which the detail
|
|
61
|
+
* needs to be retrieved.
|
|
62
62
|
* @property {CatalogPlatformModel.OptInPostRequest} body
|
|
63
63
|
*/
|
|
64
64
|
|
|
@@ -199,9 +199,25 @@ const CatalogPlatformModel = require("./CatalogPlatformModel");
|
|
|
199
199
|
* set of results
|
|
200
200
|
* @property {number} [pageSize] - Number of items to retrieve in each page.
|
|
201
201
|
* Default is 12.
|
|
202
|
+
* @property {string} [pageId] - Alphanumeric Page ID to retrieve next set of results.
|
|
203
|
+
* @property {string} [pageType] - Available pagination types are cursor or number.
|
|
202
204
|
* @property {string} [q] - Search with help of store code.
|
|
203
205
|
* @property {boolean} [sellable] - Filter on whether product is in stock or not.
|
|
204
206
|
* @property {number[]} [storeIds] - The Store Id of products to fetch inventory.
|
|
207
|
+
* @property {number[]} [brandIds] - The Brand Id of products to fetch inventory.
|
|
208
|
+
* @property {string[]} [sellerIdentifiers] - The Seller Identifier or Primary
|
|
209
|
+
* Identifier of the inventory.
|
|
210
|
+
* @property {number} [qtyGt] - This field allows you to filter for inventories
|
|
211
|
+
* that have quantity greater than to the specified value based on qty_type filter.
|
|
212
|
+
* @property {number} [qtyLt] - This field allows you to filter for inventories
|
|
213
|
+
* that have a quantity less than to the specified value based on qty_type filter.
|
|
214
|
+
* @property {string} [qtyType] - This field provides flexibility in selecting
|
|
215
|
+
* filter for inventory quantity counts and date queries. For example, you
|
|
216
|
+
* might use this field to specify "total" or "sellable" quantity.
|
|
217
|
+
* @property {string} [fromDate] - Inventory updated on filter to get
|
|
218
|
+
* inventories greater then or equal to provided date based on qty_type value.
|
|
219
|
+
* @property {string} [toDate] - Inventory updated on filter to get inventories
|
|
220
|
+
* less then or equal to provided date based on qty_type value.
|
|
205
221
|
* @property {string} [sizeIdentifier] - Size Identifier (Seller Identifier or
|
|
206
222
|
* Primary Identifier) of which inventory is to get.
|
|
207
223
|
*/
|
|
@@ -212,6 +228,7 @@ const CatalogPlatformModel = require("./CatalogPlatformModel");
|
|
|
212
228
|
* set of results
|
|
213
229
|
* @property {number} [pageSize] - Number of items to retrieve in each page.
|
|
214
230
|
* Default is 12.
|
|
231
|
+
* @property {string} [search] - Search string to filter the results by batch id
|
|
215
232
|
*/
|
|
216
233
|
|
|
217
234
|
/**
|
|
@@ -498,7 +515,7 @@ const CatalogPlatformModel = require("./CatalogPlatformModel");
|
|
|
498
515
|
* @property {string} department - Department of the product to be uploaded.
|
|
499
516
|
* @property {string} productType - Product type of the product to be uploaded
|
|
500
517
|
* i.e. set, standard , digital.
|
|
501
|
-
* @property {CatalogPlatformModel.
|
|
518
|
+
* @property {CatalogPlatformModel.BulkProductJob} body
|
|
502
519
|
*/
|
|
503
520
|
|
|
504
521
|
/**
|
|
@@ -595,7 +612,7 @@ class CatalogPlatformValidator {
|
|
|
595
612
|
/** @returns {CreateMarketplaceOptinParam} */
|
|
596
613
|
static createMarketplaceOptin() {
|
|
597
614
|
return Joi.object({
|
|
598
|
-
|
|
615
|
+
marketplaceSlug: Joi.string().allow("").required(),
|
|
599
616
|
body: CatalogPlatformModel.OptInPostRequest().required(),
|
|
600
617
|
}).required();
|
|
601
618
|
}
|
|
@@ -778,9 +795,18 @@ class CatalogPlatformValidator {
|
|
|
778
795
|
size: Joi.string().allow(""),
|
|
779
796
|
pageNo: Joi.number(),
|
|
780
797
|
pageSize: Joi.number(),
|
|
798
|
+
pageId: Joi.string().allow(""),
|
|
799
|
+
pageType: Joi.string().allow(""),
|
|
781
800
|
q: Joi.string().allow(""),
|
|
782
801
|
sellable: Joi.boolean(),
|
|
783
802
|
storeIds: Joi.array().items(Joi.number()),
|
|
803
|
+
brandIds: Joi.array().items(Joi.number()),
|
|
804
|
+
sellerIdentifiers: Joi.array().items(Joi.string().allow("")),
|
|
805
|
+
qtyGt: Joi.number(),
|
|
806
|
+
qtyLt: Joi.number(),
|
|
807
|
+
qtyType: Joi.string().allow(""),
|
|
808
|
+
fromDate: Joi.string().allow(""),
|
|
809
|
+
toDate: Joi.string().allow(""),
|
|
784
810
|
sizeIdentifier: Joi.string().allow(""),
|
|
785
811
|
}).required();
|
|
786
812
|
}
|
|
@@ -790,6 +816,7 @@ class CatalogPlatformValidator {
|
|
|
790
816
|
return Joi.object({
|
|
791
817
|
pageNo: Joi.number(),
|
|
792
818
|
pageSize: Joi.number(),
|
|
819
|
+
search: Joi.string().allow(""),
|
|
793
820
|
}).required();
|
|
794
821
|
}
|
|
795
822
|
|
|
@@ -1124,7 +1151,7 @@ class CatalogPlatformValidator {
|
|
|
1124
1151
|
return Joi.object({
|
|
1125
1152
|
department: Joi.string().allow("").required(),
|
|
1126
1153
|
productType: Joi.string().allow("").required(),
|
|
1127
|
-
body: CatalogPlatformModel.
|
|
1154
|
+
body: CatalogPlatformModel.BulkProductJob().required(),
|
|
1128
1155
|
}).required();
|
|
1129
1156
|
}
|
|
1130
1157
|
|
|
@@ -189,6 +189,7 @@ export = ContentPlatformModel;
|
|
|
189
189
|
* @property {boolean} [published]
|
|
190
190
|
* @property {string} [reading_time]
|
|
191
191
|
* @property {string} [slug]
|
|
192
|
+
* @property {string} [publish_date]
|
|
192
193
|
* @property {string[]} [tags]
|
|
193
194
|
* @property {SEO} [seo]
|
|
194
195
|
* @property {CronSchedule} [_schedule]
|
|
@@ -1446,6 +1447,7 @@ type BlogSchema = {
|
|
|
1446
1447
|
published?: boolean;
|
|
1447
1448
|
reading_time?: string;
|
|
1448
1449
|
slug?: string;
|
|
1450
|
+
publish_date?: string;
|
|
1449
1451
|
tags?: string[];
|
|
1450
1452
|
seo?: SEO;
|
|
1451
1453
|
_schedule?: CronSchedule;
|
|
@@ -215,6 +215,7 @@ const Joi = require("joi");
|
|
|
215
215
|
* @property {boolean} [published]
|
|
216
216
|
* @property {string} [reading_time]
|
|
217
217
|
* @property {string} [slug]
|
|
218
|
+
* @property {string} [publish_date]
|
|
218
219
|
* @property {string[]} [tags]
|
|
219
220
|
* @property {SEO} [seo]
|
|
220
221
|
* @property {CronSchedule} [_schedule]
|
|
@@ -1651,6 +1652,7 @@ class ContentPlatformModel {
|
|
|
1651
1652
|
published: Joi.boolean(),
|
|
1652
1653
|
reading_time: Joi.string().allow(""),
|
|
1653
1654
|
slug: Joi.string().allow(""),
|
|
1655
|
+
publish_date: Joi.string().allow(""),
|
|
1654
1656
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1655
1657
|
seo: ContentPlatformModel.SEO(),
|
|
1656
1658
|
_schedule: ContentPlatformModel.CronSchedule(),
|
|
@@ -73,7 +73,7 @@ declare class Order {
|
|
|
73
73
|
* @summary: Dispatch manifest
|
|
74
74
|
* @description: Updates the status of the manifest to processed and change the status of the shipments in the manifest to dispatch status - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/dispatchManifests/).
|
|
75
75
|
*/
|
|
76
|
-
dispatchManifests({
|
|
76
|
+
dispatchManifests({ body, requestHeaders }?: OrderPlatformValidator.DispatchManifestsParam, { responseHeaders }?: object): Promise<OrderPlatformModel.SuccessResponse>;
|
|
77
77
|
/**
|
|
78
78
|
* @param {OrderPlatformValidator.DownloadBulkActionTemplateParam} arg - Arg object
|
|
79
79
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -159,6 +159,16 @@ declare class Order {
|
|
|
159
159
|
* @description: Create a point-of-sale (POS) receipt for a specific order by order Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generatePOSReceiptByOrderId/).
|
|
160
160
|
*/
|
|
161
161
|
generatePOSReceiptByOrderId({ orderId, shipmentId, documentType, requestHeaders }?: OrderPlatformValidator.GeneratePOSReceiptByOrderIdParam, { responseHeaders }?: object): Promise<OrderPlatformModel.GeneratePosOrderReceiptResponse>;
|
|
162
|
+
/**
|
|
163
|
+
* @param {OrderPlatformValidator.GenerateProcessManifestParam} arg - Arg object
|
|
164
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
165
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
166
|
+
* @returns {Promise<OrderPlatformModel.ManifestResponse>} - Success response
|
|
167
|
+
* @name generateProcessManifest
|
|
168
|
+
* @summary: Process Order Manifest
|
|
169
|
+
* @description: Endpoint to save and process order manifests. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateProcessManifest/).
|
|
170
|
+
*/
|
|
171
|
+
generateProcessManifest({ body, requestHeaders }?: OrderPlatformValidator.GenerateProcessManifestParam, { responseHeaders }?: object): Promise<OrderPlatformModel.ManifestResponse>;
|
|
162
172
|
/**
|
|
163
173
|
* @param {OrderPlatformValidator.GetAllowedStateTransitionParam} arg - Arg object
|
|
164
174
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -524,12 +524,11 @@ class Order {
|
|
|
524
524
|
* @description: Updates the status of the manifest to processed and change the status of the shipments in the manifest to dispatch status - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/dispatchManifests/).
|
|
525
525
|
*/
|
|
526
526
|
async dispatchManifests(
|
|
527
|
-
{
|
|
527
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
528
528
|
{ responseHeaders } = { responseHeaders: false }
|
|
529
529
|
) {
|
|
530
530
|
const { error } = OrderPlatformValidator.dispatchManifests().validate(
|
|
531
531
|
{
|
|
532
|
-
manifestId,
|
|
533
532
|
body,
|
|
534
533
|
},
|
|
535
534
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -543,7 +542,6 @@ class Order {
|
|
|
543
542
|
error: warrning,
|
|
544
543
|
} = OrderPlatformValidator.dispatchManifests().validate(
|
|
545
544
|
{
|
|
546
|
-
manifestId,
|
|
547
545
|
body,
|
|
548
546
|
},
|
|
549
547
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -562,7 +560,7 @@ class Order {
|
|
|
562
560
|
const response = await PlatformAPIClient.execute(
|
|
563
561
|
this.config,
|
|
564
562
|
"post",
|
|
565
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest
|
|
563
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/dispatch`,
|
|
566
564
|
query_params,
|
|
567
565
|
body,
|
|
568
566
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -1247,6 +1245,85 @@ class Order {
|
|
|
1247
1245
|
return response;
|
|
1248
1246
|
}
|
|
1249
1247
|
|
|
1248
|
+
/**
|
|
1249
|
+
* @param {OrderPlatformValidator.GenerateProcessManifestParam} arg - Arg object
|
|
1250
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1251
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1252
|
+
* @returns {Promise<OrderPlatformModel.ManifestResponse>} - Success response
|
|
1253
|
+
* @name generateProcessManifest
|
|
1254
|
+
* @summary: Process Order Manifest
|
|
1255
|
+
* @description: Endpoint to save and process order manifests. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateProcessManifest/).
|
|
1256
|
+
*/
|
|
1257
|
+
async generateProcessManifest(
|
|
1258
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1259
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1260
|
+
) {
|
|
1261
|
+
const { error } = OrderPlatformValidator.generateProcessManifest().validate(
|
|
1262
|
+
{
|
|
1263
|
+
body,
|
|
1264
|
+
},
|
|
1265
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1266
|
+
);
|
|
1267
|
+
if (error) {
|
|
1268
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1272
|
+
const {
|
|
1273
|
+
error: warrning,
|
|
1274
|
+
} = OrderPlatformValidator.generateProcessManifest().validate(
|
|
1275
|
+
{
|
|
1276
|
+
body,
|
|
1277
|
+
},
|
|
1278
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1279
|
+
);
|
|
1280
|
+
if (warrning) {
|
|
1281
|
+
Logger({
|
|
1282
|
+
level: "WARN",
|
|
1283
|
+
message: `Parameter Validation warrnings for platform > Order > generateProcessManifest \n ${warrning}`,
|
|
1284
|
+
});
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
const query_params = {};
|
|
1288
|
+
|
|
1289
|
+
const xHeaders = {};
|
|
1290
|
+
|
|
1291
|
+
const response = await PlatformAPIClient.execute(
|
|
1292
|
+
this.config,
|
|
1293
|
+
"post",
|
|
1294
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/process-manifest`,
|
|
1295
|
+
query_params,
|
|
1296
|
+
body,
|
|
1297
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1298
|
+
{ responseHeaders }
|
|
1299
|
+
);
|
|
1300
|
+
|
|
1301
|
+
let responseData = response;
|
|
1302
|
+
if (responseHeaders) {
|
|
1303
|
+
responseData = response[0];
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
const {
|
|
1307
|
+
error: res_error,
|
|
1308
|
+
} = OrderPlatformModel.ManifestResponse().validate(responseData, {
|
|
1309
|
+
abortEarly: false,
|
|
1310
|
+
allowUnknown: true,
|
|
1311
|
+
});
|
|
1312
|
+
|
|
1313
|
+
if (res_error) {
|
|
1314
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1315
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1316
|
+
} else {
|
|
1317
|
+
Logger({
|
|
1318
|
+
level: "WARN",
|
|
1319
|
+
message: `Response Validation Warnings for platform > Order > generateProcessManifest \n ${res_error}`,
|
|
1320
|
+
});
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
return response;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1250
1327
|
/**
|
|
1251
1328
|
* @param {OrderPlatformValidator.GetAllowedStateTransitionParam} arg - Arg object
|
|
1252
1329
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -2376,7 +2453,7 @@ class Order {
|
|
|
2376
2453
|
const response = await PlatformAPIClient.execute(
|
|
2377
2454
|
this.config,
|
|
2378
2455
|
"get",
|
|
2379
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/
|
|
2456
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/shipments-listing`,
|
|
2380
2457
|
query_params,
|
|
2381
2458
|
undefined,
|
|
2382
2459
|
{ ...xHeaders, ...requestHeaders },
|