@gofynd/fdk-client-javascript 1.4.0-beta.3 → 1.4.1
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/Cart/CartApplicationModel.d.ts +10 -0
- package/sdk/application/Cart/CartApplicationModel.js +4 -0
- package/sdk/partner/OAuthClient.js +29 -10
- package/sdk/partner/PartnerAPIClient.js +1 -1
- package/sdk/platform/Cart/CartPlatformModel.d.ts +10 -0
- package/sdk/platform/Cart/CartPlatformModel.js +4 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5 -14
- package/sdk/platform/Order/OrderPlatformModel.js +6 -18
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +3 -60
- package/sdk/platform/Webhook/WebhookPlatformModel.js +2 -68
package/README.md
CHANGED
|
@@ -214,7 +214,7 @@ console.log("Active Theme: ", response.information.name);
|
|
|
214
214
|
The above code will log the curl command in the console
|
|
215
215
|
|
|
216
216
|
```bash
|
|
217
|
-
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.4.
|
|
217
|
+
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.4.1' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
|
|
218
218
|
Active Theme: Emerge
|
|
219
219
|
```
|
|
220
220
|
|
package/package.json
CHANGED
|
@@ -81,7 +81,9 @@ export = CartApplicationModel;
|
|
|
81
81
|
* @property {number} [article_quantity] - Quantity of article on which
|
|
82
82
|
* promotion is applicable
|
|
83
83
|
* @property {BuyRules[]} [buy_rules] - Buy rules for promotions
|
|
84
|
+
* @property {string} [code] - Promotion code
|
|
84
85
|
* @property {DiscountRulesApp[]} [discount_rules] - Discount rules for promotions
|
|
86
|
+
* @property {Object} [meta] - Meta object for extra data
|
|
85
87
|
* @property {boolean} [mrp_promotion] - If applied promotion is applied on
|
|
86
88
|
* product MRP or ESP
|
|
87
89
|
* @property {string} [offer_text] - Offer text of current promotion
|
|
@@ -1056,10 +1058,18 @@ type AppliedPromotion = {
|
|
|
1056
1058
|
* - Buy rules for promotions
|
|
1057
1059
|
*/
|
|
1058
1060
|
buy_rules?: BuyRules[];
|
|
1061
|
+
/**
|
|
1062
|
+
* - Promotion code
|
|
1063
|
+
*/
|
|
1064
|
+
code?: string;
|
|
1059
1065
|
/**
|
|
1060
1066
|
* - Discount rules for promotions
|
|
1061
1067
|
*/
|
|
1062
1068
|
discount_rules?: DiscountRulesApp[];
|
|
1069
|
+
/**
|
|
1070
|
+
* - Meta object for extra data
|
|
1071
|
+
*/
|
|
1072
|
+
meta?: any;
|
|
1063
1073
|
/**
|
|
1064
1074
|
* - If applied promotion is applied on
|
|
1065
1075
|
* product MRP or ESP
|
|
@@ -88,7 +88,9 @@ const Joi = require("joi");
|
|
|
88
88
|
* @property {number} [article_quantity] - Quantity of article on which
|
|
89
89
|
* promotion is applicable
|
|
90
90
|
* @property {BuyRules[]} [buy_rules] - Buy rules for promotions
|
|
91
|
+
* @property {string} [code] - Promotion code
|
|
91
92
|
* @property {DiscountRulesApp[]} [discount_rules] - Discount rules for promotions
|
|
93
|
+
* @property {Object} [meta] - Meta object for extra data
|
|
92
94
|
* @property {boolean} [mrp_promotion] - If applied promotion is applied on
|
|
93
95
|
* product MRP or ESP
|
|
94
96
|
* @property {string} [offer_text] - Offer text of current promotion
|
|
@@ -1129,9 +1131,11 @@ class CartApplicationModel {
|
|
|
1129
1131
|
),
|
|
1130
1132
|
article_quantity: Joi.number(),
|
|
1131
1133
|
buy_rules: Joi.array().items(CartApplicationModel.BuyRules()),
|
|
1134
|
+
code: Joi.string().allow("").allow(null),
|
|
1132
1135
|
discount_rules: Joi.array().items(
|
|
1133
1136
|
CartApplicationModel.DiscountRulesApp()
|
|
1134
1137
|
),
|
|
1138
|
+
meta: Joi.any(),
|
|
1135
1139
|
mrp_promotion: Joi.boolean(),
|
|
1136
1140
|
offer_text: Joi.string().allow(""),
|
|
1137
1141
|
ownership: CartApplicationModel.Ownership(),
|
|
@@ -68,18 +68,37 @@ class OAuthClient extends BaseOAuthClient {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
async renewAccessToken(isOfflineToken =
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
async renewAccessToken(isOfflineToken = false) {
|
|
72
|
+
try {
|
|
73
|
+
Logger({ level: "INFO", message: "Renewing partner access token..." });
|
|
74
|
+
let res;
|
|
75
|
+
if (isOfflineToken) {
|
|
76
|
+
let requestCacheKey = `${this.config.apiKey}:${this.config.organizationId}`;
|
|
77
|
+
if (!refreshTokenRequestCache[requestCacheKey]) {
|
|
78
|
+
refreshTokenRequestCache[requestCacheKey] = this.getAccesstokenObj({
|
|
79
|
+
grant_type: "refresh_token",
|
|
80
|
+
refresh_token: this.refreshToken,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
res = await refreshTokenRequestCache[requestCacheKey].finally(() => {
|
|
84
|
+
delete refreshTokenRequestCache[requestCacheKey];
|
|
85
|
+
});
|
|
86
|
+
} else {
|
|
87
|
+
res = await this.getAccesstokenObj({
|
|
88
|
+
grant_type: "refresh_token",
|
|
89
|
+
refresh_token: this.refreshToken,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
81
92
|
this.setToken(res);
|
|
93
|
+
this.token_expires_at =
|
|
94
|
+
new Date().getTime() + this.token_expires_in * 1000;
|
|
95
|
+
Logger({ level: "INFO", message: "Done." });
|
|
82
96
|
return res;
|
|
97
|
+
} catch (error) {
|
|
98
|
+
if (error.isAxiosError) {
|
|
99
|
+
throw new FDKTokenIssueError(error.message);
|
|
100
|
+
}
|
|
101
|
+
throw error;
|
|
83
102
|
}
|
|
84
103
|
}
|
|
85
104
|
|
|
@@ -16,7 +16,7 @@ class APIClient {
|
|
|
16
16
|
* @param {Options} options
|
|
17
17
|
*/
|
|
18
18
|
static async execute(conf, method, url, query, body, xHeaders, options) {
|
|
19
|
-
const token = await conf.oauthClient.
|
|
19
|
+
const token = await conf.oauthClient.getAccessToken();
|
|
20
20
|
|
|
21
21
|
const extraHeaders = conf.extraHeaders.reduce((acc, curr) => {
|
|
22
22
|
acc = { ...acc, ...curr };
|
|
@@ -108,8 +108,10 @@ export = CartPlatformModel;
|
|
|
108
108
|
* @property {number} [article_quantity] - Quantity of article on which
|
|
109
109
|
* promotion is applicable
|
|
110
110
|
* @property {BuyRules[]} [buy_rules] - Buy rules for promotions
|
|
111
|
+
* @property {string} [code] - Promotion code
|
|
111
112
|
* @property {CartCurrency} [currency]
|
|
112
113
|
* @property {DiscountRulesApp[]} [discount_rules] - Discount rules for promotions
|
|
114
|
+
* @property {Object} [meta] - Meta object for extra data
|
|
113
115
|
* @property {boolean} [mrp_promotion] - If applied promotion is applied on
|
|
114
116
|
* product MRP or ESP
|
|
115
117
|
* @property {string} [offer_text] - Offer text of current promotion
|
|
@@ -1909,11 +1911,19 @@ type AppliedPromotion = {
|
|
|
1909
1911
|
* - Buy rules for promotions
|
|
1910
1912
|
*/
|
|
1911
1913
|
buy_rules?: BuyRules[];
|
|
1914
|
+
/**
|
|
1915
|
+
* - Promotion code
|
|
1916
|
+
*/
|
|
1917
|
+
code?: string;
|
|
1912
1918
|
currency?: CartCurrency;
|
|
1913
1919
|
/**
|
|
1914
1920
|
* - Discount rules for promotions
|
|
1915
1921
|
*/
|
|
1916
1922
|
discount_rules?: DiscountRulesApp[];
|
|
1923
|
+
/**
|
|
1924
|
+
* - Meta object for extra data
|
|
1925
|
+
*/
|
|
1926
|
+
meta?: any;
|
|
1917
1927
|
/**
|
|
1918
1928
|
* - If applied promotion is applied on
|
|
1919
1929
|
* product MRP or ESP
|
|
@@ -117,8 +117,10 @@ const Joi = require("joi");
|
|
|
117
117
|
* @property {number} [article_quantity] - Quantity of article on which
|
|
118
118
|
* promotion is applicable
|
|
119
119
|
* @property {BuyRules[]} [buy_rules] - Buy rules for promotions
|
|
120
|
+
* @property {string} [code] - Promotion code
|
|
120
121
|
* @property {CartCurrency} [currency]
|
|
121
122
|
* @property {DiscountRulesApp[]} [discount_rules] - Discount rules for promotions
|
|
123
|
+
* @property {Object} [meta] - Meta object for extra data
|
|
122
124
|
* @property {boolean} [mrp_promotion] - If applied promotion is applied on
|
|
123
125
|
* product MRP or ESP
|
|
124
126
|
* @property {string} [offer_text] - Offer text of current promotion
|
|
@@ -2033,8 +2035,10 @@ class CartPlatformModel {
|
|
|
2033
2035
|
),
|
|
2034
2036
|
article_quantity: Joi.number(),
|
|
2035
2037
|
buy_rules: Joi.array().items(CartPlatformModel.BuyRules()),
|
|
2038
|
+
code: Joi.string().allow("").allow(null),
|
|
2036
2039
|
currency: CartPlatformModel.CartCurrency(),
|
|
2037
2040
|
discount_rules: Joi.array().items(CartPlatformModel.DiscountRulesApp()),
|
|
2041
|
+
meta: Joi.any(),
|
|
2038
2042
|
mrp_promotion: Joi.boolean(),
|
|
2039
2043
|
offer_text: Joi.string().allow(""),
|
|
2040
2044
|
ownership: CartPlatformModel.Ownership2(),
|
|
@@ -1930,11 +1930,6 @@ export = OrderPlatformModel;
|
|
|
1930
1930
|
* @property {string} [request_id]
|
|
1931
1931
|
* @property {number} [resend_timer]
|
|
1932
1932
|
*/
|
|
1933
|
-
/**
|
|
1934
|
-
* @typedef PostActivityHistory
|
|
1935
|
-
* @property {PostHistoryData} data
|
|
1936
|
-
* @property {PostHistoryFilters[]} filters
|
|
1937
|
-
*/
|
|
1938
1933
|
/**
|
|
1939
1934
|
* @typedef PostHistoryData
|
|
1940
1935
|
* @property {string} message
|
|
@@ -1942,7 +1937,8 @@ export = OrderPlatformModel;
|
|
|
1942
1937
|
*/
|
|
1943
1938
|
/**
|
|
1944
1939
|
* @typedef PostHistoryDict
|
|
1945
|
-
* @property {
|
|
1940
|
+
* @property {PostHistoryData} data
|
|
1941
|
+
* @property {PostHistoryFilters[]} filters
|
|
1946
1942
|
*/
|
|
1947
1943
|
/**
|
|
1948
1944
|
* @typedef PostHistoryFilters
|
|
@@ -2812,7 +2808,7 @@ export = OrderPlatformModel;
|
|
|
2812
2808
|
declare class OrderPlatformModel {
|
|
2813
2809
|
}
|
|
2814
2810
|
declare namespace OrderPlatformModel {
|
|
2815
|
-
export { ActionInfo, AdvanceFilterInfo, Affiliate, AffiliateAppConfig, AffiliateAppConfigMeta, AffiliateBag, AffiliateBagDetails, AffiliateBagsDetails, AffiliateConfig, AffiliateDetails, AffiliateInventoryArticleAssignmentConfig, AffiliateInventoryConfig, AffiliateInventoryLogisticsConfig, AffiliateInventoryOrderConfig, AffiliateInventoryPaymentConfig, AffiliateInventoryStoreConfig, AffiliateMeta, AffiliateStoreIdMapping, AllowedTemplatesResponse, AnnouncementResponse, AnnouncementsResponse, AppliedPromos, Article, ArticleDetails, ArticleStatusDetails, AttachOrderUser, AttachOrderUserResponse, AttachUserInfo, AttachUserOtpData, Attributes, BagConfigs, BagData, BagDetails, BagDetailsPlatformResponse, BagPaymentMethods, BagReasonMeta, BagReasons, BagReturnableCancelableStatus, Bags, BagsPage, BagStateMapper, BagStateTransitionMap, BagStatusHistory, BagUnit, BaseResponse, BillingInfo, Brand, BulkActionListingData, BulkActionTemplate, BulkActionTemplateResponse, BulkFailedResponse, BulkListingResponse, BulkListinPage, BulkReportsDownloadRequest, BulkReportsDownloadResponse, BulkStateTransistionRequest, BulkStateTransistionResponse, BuyerDetails, BuyRules, Charge, CheckResponse, Click2CallResponse, Company, CompanyDetails, ContactDetails, ConversionRate, CourierPartnerTrackingDetails, CourierPartnerTrackingResponse, CreateChannelConfig, CreateChannelConfigData, CreateChannelConfigResponse, CreateChannelConifgErrorResponse, CreateChannelPaymentInfo, CreateOrderAPI, CreateOrderErrorReponse, CreateOrderPayload, CreateOrderResponse, CreditBalanceInfo, Currency, CurrencyInfo, CurrentStatus, DataUpdates, DateRange, Dates, DebugInfo, DeliverySlotDetails, Dimension, Dimensions, DiscountRules, DispatchManifest, Document, DpConfiguration, DPDetailsData, EInvoiceDetails, EInvoiceErrorDetails, EInvoiceErrorInfo, EInvoiceErrorResponse, EInvoiceErrorResponseData, EInvoiceErrorResponseDetails, EinvoiceInfo, EInvoiceIrnDetails, EInvoicePortalDetails, EInvoiceResponseData, EInvoiceRetry, EInvoiceRetryResponse, EInvoiceRetryShipmentData, Entities, EntitiesDataUpdates, EntitiesReasons, EntityReasonData, Error, ErrorDetail, ErrorResponse, FailedOrderLogDetails, FailedOrderLogs, FailedOrdersItem, FetchCreditBalanceRequestPayload, FetchCreditBalanceResponsePayload, FileResponse, FilterInfoOption, Filters, FiltersInfo, FiltersRequest, FiltersResponse, FinancialBreakup, Formatted, FulfillingStore, FyndOrderIdList, GenerateInvoiceIDErrorResponse, GenerateInvoiceIDErrorResponseData, GenerateInvoiceIDRequest, GenerateInvoiceIDResponse, GenerateInvoiceIDResponseData, GeneratePosOrderReceiptResponse, GetActionsResponse, GetBagsPlatformResponse, GSTDetailsData, HistoryDict, HistoryMeta, HistoryReason, Identifier, InvalidateShipmentCacheNestedResponse, InvalidateShipmentCachePayload, InvalidateShipmentCacheResponse, InvoiceDetails, InvoiceInfo, Item, ItemCriterias, JobDetailsData, JobDetailsResponse, JobFailedResponse, LaneConfigResponse, LineItem, LocationDetails, LockData, LogPaymentDetails, LogsChannelDetails, Manifest, ManifestDetails, ManifestFile, ManifestFiltersResponse, ManifestItemDetails, ManifestList, ManifestMediaUpdate, ManifestMeta, ManifestPageInfo, ManifestShipmentListing, MarketPlacePdf, Meta, OrderBagArticle, OrderBags, OrderBrandName, OrderConfig, OrderData, OrderDetails, OrderDetailsData, OrderDetailsResponse, OrderInfo, OrderingCurrency, OrderingStoreDetails, OrderItemDataUpdates, OrderListingResponse, OrderPriority, OrderStatus, OrderStatusData, OrderStatusResult, OrderUser, OriginalFilter, Page, PageDetails, PaymentInfo, PaymentMethod, PaymentMethods, PDFLinks, PDFMeta, PhoneDetails, PlatformArticleAttributes, PlatformBreakupValues, PlatformChannel, PlatformDeliveryAddress, PlatformItem, PlatformOrderItems, PlatformOrderUpdate, PlatformShipment, PlatformShipmentReasonsResponse, PlatformShipmentTrack, PlatformTrack, PointBlankOtpData,
|
|
2811
|
+
export { ActionInfo, AdvanceFilterInfo, Affiliate, AffiliateAppConfig, AffiliateAppConfigMeta, AffiliateBag, AffiliateBagDetails, AffiliateBagsDetails, AffiliateConfig, AffiliateDetails, AffiliateInventoryArticleAssignmentConfig, AffiliateInventoryConfig, AffiliateInventoryLogisticsConfig, AffiliateInventoryOrderConfig, AffiliateInventoryPaymentConfig, AffiliateInventoryStoreConfig, AffiliateMeta, AffiliateStoreIdMapping, AllowedTemplatesResponse, AnnouncementResponse, AnnouncementsResponse, AppliedPromos, Article, ArticleDetails, ArticleStatusDetails, AttachOrderUser, AttachOrderUserResponse, AttachUserInfo, AttachUserOtpData, Attributes, BagConfigs, BagData, BagDetails, BagDetailsPlatformResponse, BagPaymentMethods, BagReasonMeta, BagReasons, BagReturnableCancelableStatus, Bags, BagsPage, BagStateMapper, BagStateTransitionMap, BagStatusHistory, BagUnit, BaseResponse, BillingInfo, Brand, BulkActionListingData, BulkActionTemplate, BulkActionTemplateResponse, BulkFailedResponse, BulkListingResponse, BulkListinPage, BulkReportsDownloadRequest, BulkReportsDownloadResponse, BulkStateTransistionRequest, BulkStateTransistionResponse, BuyerDetails, BuyRules, Charge, CheckResponse, Click2CallResponse, Company, CompanyDetails, ContactDetails, ConversionRate, CourierPartnerTrackingDetails, CourierPartnerTrackingResponse, CreateChannelConfig, CreateChannelConfigData, CreateChannelConfigResponse, CreateChannelConifgErrorResponse, CreateChannelPaymentInfo, CreateOrderAPI, CreateOrderErrorReponse, CreateOrderPayload, CreateOrderResponse, CreditBalanceInfo, Currency, CurrencyInfo, CurrentStatus, DataUpdates, DateRange, Dates, DebugInfo, DeliverySlotDetails, Dimension, Dimensions, DiscountRules, DispatchManifest, Document, DpConfiguration, DPDetailsData, EInvoiceDetails, EInvoiceErrorDetails, EInvoiceErrorInfo, EInvoiceErrorResponse, EInvoiceErrorResponseData, EInvoiceErrorResponseDetails, EinvoiceInfo, EInvoiceIrnDetails, EInvoicePortalDetails, EInvoiceResponseData, EInvoiceRetry, EInvoiceRetryResponse, EInvoiceRetryShipmentData, Entities, EntitiesDataUpdates, EntitiesReasons, EntityReasonData, Error, ErrorDetail, ErrorResponse, FailedOrderLogDetails, FailedOrderLogs, FailedOrdersItem, FetchCreditBalanceRequestPayload, FetchCreditBalanceResponsePayload, FileResponse, FilterInfoOption, Filters, FiltersInfo, FiltersRequest, FiltersResponse, FinancialBreakup, Formatted, FulfillingStore, FyndOrderIdList, GenerateInvoiceIDErrorResponse, GenerateInvoiceIDErrorResponseData, GenerateInvoiceIDRequest, GenerateInvoiceIDResponse, GenerateInvoiceIDResponseData, GeneratePosOrderReceiptResponse, GetActionsResponse, GetBagsPlatformResponse, GSTDetailsData, HistoryDict, HistoryMeta, HistoryReason, Identifier, InvalidateShipmentCacheNestedResponse, InvalidateShipmentCachePayload, InvalidateShipmentCacheResponse, InvoiceDetails, InvoiceInfo, Item, ItemCriterias, JobDetailsData, JobDetailsResponse, JobFailedResponse, LaneConfigResponse, LineItem, LocationDetails, LockData, LogPaymentDetails, LogsChannelDetails, Manifest, ManifestDetails, ManifestFile, ManifestFiltersResponse, ManifestItemDetails, ManifestList, ManifestMediaUpdate, ManifestMeta, ManifestPageInfo, ManifestShipmentListing, MarketPlacePdf, Meta, OrderBagArticle, OrderBags, OrderBrandName, OrderConfig, OrderData, OrderDetails, OrderDetailsData, OrderDetailsResponse, OrderInfo, OrderingCurrency, OrderingStoreDetails, OrderItemDataUpdates, OrderListingResponse, OrderPriority, OrderStatus, OrderStatusData, OrderStatusResult, OrderUser, OriginalFilter, Page, PageDetails, PaymentInfo, PaymentMethod, PaymentMethods, PDFLinks, PDFMeta, PhoneDetails, PlatformArticleAttributes, PlatformBreakupValues, PlatformChannel, PlatformDeliveryAddress, PlatformItem, PlatformOrderItems, PlatformOrderUpdate, PlatformShipment, PlatformShipmentReasonsResponse, PlatformShipmentTrack, PlatformTrack, PointBlankOtpData, PostHistoryData, PostHistoryDict, PostHistoryFilters, PostShipmentHistory, Prices, ProcessingDates, ProcessManifest, ProcessManifestItemResponse, ProcessManifestResponse, Products, ProductsDataUpdates, ProductsDataUpdatesFilters, ProductsReasons, ProductsReasonsData, ProductsReasonsFilters, QuestionSet, Reason, ReasonsData, RefundModeConfigRequestPayload, RefundModeConfigResponsePayload, RefundModeInfo, RefundOption, ReplacementDetails, ResponseDetail, ReturnConfig, RoleBaseStateTransitionMapping, SendSmsPayload, SendUserMobileOTP, SendUserMobileOtpResponse, Shipment, ShipmentActionInfo, ShipmentBagReasons, ShipmentConfig, ShipmentData, ShipmentDetail, ShipmentDetails, ShipmentGstDetails, ShipmentHistoryResponse, ShipmentInfoResponse, ShipmentInternalPlatformViewResponse, ShipmentItem, ShipmentItemFulFillingStore, ShipmentListingBrand, ShipmentListingChannel, ShipmentLockDetails, ShipmentMeta, ShipmentPayments, ShipmentReasonsResponse, ShipmentResponseReasons, ShipmentsRequest, ShipmentsResponse, ShipmentStatus, ShipmentStatusData, ShipmentTags, ShipmentTimeStamp, ShippingInfo, SmsDataPayload, StatuesRequest, StatuesResponse, Store, StoreAddress, StoreDocuments, StoreEinvoice, StoreEwaybill, StoreGstCredentials, StoreMeta, StoreReassign, StoreReassignResponse, SubLane, SuccessResponse, SuperLane, Tax, TaxDetails, TaxInfo, TemplateDownloadResponse, Templates, TotalShipmentPricesCount, TrackingList, UpdatePackagingDimensionsPayload, UpdatePackagingDimensionsResponse, UpdateShipmentLockPayload, UpdateShipmentLockResponse, UpdateShipmentStatusRequest, UpdateShipmentStatusResponseBody, UploadConsent, URL, UserData, UserDataInfo, UserDetails, UserDetailsData, UserInfo, VerifyMobileOTP, VerifyOtpData, VerifyOtpResponse, VerifyOtpResponseData, Weight, WeightData };
|
|
2816
2812
|
}
|
|
2817
2813
|
/** @returns {ActionInfo} */
|
|
2818
2814
|
declare function ActionInfo(): ActionInfo;
|
|
@@ -5154,12 +5150,6 @@ type PointBlankOtpData = {
|
|
|
5154
5150
|
request_id?: string;
|
|
5155
5151
|
resend_timer?: number;
|
|
5156
5152
|
};
|
|
5157
|
-
/** @returns {PostActivityHistory} */
|
|
5158
|
-
declare function PostActivityHistory(): PostActivityHistory;
|
|
5159
|
-
type PostActivityHistory = {
|
|
5160
|
-
data: PostHistoryData;
|
|
5161
|
-
filters: PostHistoryFilters[];
|
|
5162
|
-
};
|
|
5163
5153
|
/** @returns {PostHistoryData} */
|
|
5164
5154
|
declare function PostHistoryData(): PostHistoryData;
|
|
5165
5155
|
type PostHistoryData = {
|
|
@@ -5169,7 +5159,8 @@ type PostHistoryData = {
|
|
|
5169
5159
|
/** @returns {PostHistoryDict} */
|
|
5170
5160
|
declare function PostHistoryDict(): PostHistoryDict;
|
|
5171
5161
|
type PostHistoryDict = {
|
|
5172
|
-
|
|
5162
|
+
data: PostHistoryData;
|
|
5163
|
+
filters: PostHistoryFilters[];
|
|
5173
5164
|
};
|
|
5174
5165
|
/** @returns {PostHistoryFilters} */
|
|
5175
5166
|
declare function PostHistoryFilters(): PostHistoryFilters;
|
|
@@ -2139,12 +2139,6 @@ const Joi = require("joi");
|
|
|
2139
2139
|
* @property {number} [resend_timer]
|
|
2140
2140
|
*/
|
|
2141
2141
|
|
|
2142
|
-
/**
|
|
2143
|
-
* @typedef PostActivityHistory
|
|
2144
|
-
* @property {PostHistoryData} data
|
|
2145
|
-
* @property {PostHistoryFilters[]} filters
|
|
2146
|
-
*/
|
|
2147
|
-
|
|
2148
2142
|
/**
|
|
2149
2143
|
* @typedef PostHistoryData
|
|
2150
2144
|
* @property {string} message
|
|
@@ -2153,7 +2147,8 @@ const Joi = require("joi");
|
|
|
2153
2147
|
|
|
2154
2148
|
/**
|
|
2155
2149
|
* @typedef PostHistoryDict
|
|
2156
|
-
* @property {
|
|
2150
|
+
* @property {PostHistoryData} data
|
|
2151
|
+
* @property {PostHistoryFilters[]} filters
|
|
2157
2152
|
*/
|
|
2158
2153
|
|
|
2159
2154
|
/**
|
|
@@ -5702,16 +5697,6 @@ class OrderPlatformModel {
|
|
|
5702
5697
|
});
|
|
5703
5698
|
}
|
|
5704
5699
|
|
|
5705
|
-
/** @returns {PostActivityHistory} */
|
|
5706
|
-
static PostActivityHistory() {
|
|
5707
|
-
return Joi.object({
|
|
5708
|
-
data: OrderPlatformModel.PostHistoryData().required(),
|
|
5709
|
-
filters: Joi.array()
|
|
5710
|
-
.items(OrderPlatformModel.PostHistoryFilters())
|
|
5711
|
-
.required(),
|
|
5712
|
-
});
|
|
5713
|
-
}
|
|
5714
|
-
|
|
5715
5700
|
/** @returns {PostHistoryData} */
|
|
5716
5701
|
static PostHistoryData() {
|
|
5717
5702
|
return Joi.object({
|
|
@@ -5723,7 +5708,10 @@ class OrderPlatformModel {
|
|
|
5723
5708
|
/** @returns {PostHistoryDict} */
|
|
5724
5709
|
static PostHistoryDict() {
|
|
5725
5710
|
return Joi.object({
|
|
5726
|
-
|
|
5711
|
+
data: OrderPlatformModel.PostHistoryData().required(),
|
|
5712
|
+
filters: Joi.array()
|
|
5713
|
+
.items(OrderPlatformModel.PostHistoryFilters())
|
|
5714
|
+
.required(),
|
|
5727
5715
|
});
|
|
5728
5716
|
}
|
|
5729
5717
|
|
|
@@ -57,20 +57,6 @@ export = WebhookPlatformModel;
|
|
|
57
57
|
* @typedef EventConfigResponse
|
|
58
58
|
* @property {EventConfig[]} [event_configs]
|
|
59
59
|
*/
|
|
60
|
-
/**
|
|
61
|
-
* @typedef EventConfigs
|
|
62
|
-
* @property {string} [created_on]
|
|
63
|
-
* @property {string} [description]
|
|
64
|
-
* @property {string} [display_name]
|
|
65
|
-
* @property {string} [event_category]
|
|
66
|
-
* @property {string} [event_name]
|
|
67
|
-
* @property {Object} [event_schema]
|
|
68
|
-
* @property {string} [event_type]
|
|
69
|
-
* @property {number} [id]
|
|
70
|
-
* @property {SubscriberEventMapping} [subscriber_event_mapping]
|
|
71
|
-
* @property {string} [updated_on]
|
|
72
|
-
* @property {string} [version]
|
|
73
|
-
*/
|
|
74
60
|
/**
|
|
75
61
|
* @typedef EventProcessReportObject
|
|
76
62
|
* @property {number} [attempt] - The attempt number of the event.
|
|
@@ -241,19 +227,6 @@ export = WebhookPlatformModel;
|
|
|
241
227
|
* @property {string} [updated_on]
|
|
242
228
|
* @property {string} [webhook_url]
|
|
243
229
|
*/
|
|
244
|
-
/**
|
|
245
|
-
* @typedef SubscriberEventMapping
|
|
246
|
-
* @property {string} [created_on]
|
|
247
|
-
* @property {number} [event_id]
|
|
248
|
-
* @property {number} [id]
|
|
249
|
-
* @property {number} [subscriber_id]
|
|
250
|
-
*/
|
|
251
|
-
/**
|
|
252
|
-
* @typedef SubscriberFailureResponse
|
|
253
|
-
* @property {string} [code]
|
|
254
|
-
* @property {string} [message]
|
|
255
|
-
* @property {string} [stack]
|
|
256
|
-
*/
|
|
257
230
|
/**
|
|
258
231
|
* @typedef SubscriberResponse
|
|
259
232
|
* @property {Association} [association]
|
|
@@ -261,7 +234,7 @@ export = WebhookPlatformModel;
|
|
|
261
234
|
* @property {string} [created_on]
|
|
262
235
|
* @property {Object} [custom_headers]
|
|
263
236
|
* @property {string} [email_id]
|
|
264
|
-
* @property {
|
|
237
|
+
* @property {EventConfig[]} [event_configs]
|
|
265
238
|
* @property {number} [id]
|
|
266
239
|
* @property {string} [modified_by]
|
|
267
240
|
* @property {string} [name]
|
|
@@ -283,7 +256,7 @@ export = WebhookPlatformModel;
|
|
|
283
256
|
declare class WebhookPlatformModel {
|
|
284
257
|
}
|
|
285
258
|
declare namespace WebhookPlatformModel {
|
|
286
|
-
export { Association, AuthMeta, CancelResponse, CdnObject, DownloadReportResponse, Err, Error, Event, EventConfig, EventConfigResponse,
|
|
259
|
+
export { Association, AuthMeta, CancelResponse, CdnObject, DownloadReportResponse, Err, Error, Event, EventConfig, EventConfigResponse, EventProcessReportObject, EventProcessReports, EventProcessRequest, HistoryAssociation, HistoryFilters, HistoryItems, HistoryPayload, HistoryResponse, Item, Page, PingWebhook, PingWebhookResponse, ReportFilterResponse, ReportFiltersPayload, RetryCountResponse, RetryEventRequest, RetryFailureResponse, RetryStatusResponse, RetrySuccessResponse, SubscriberConfig, SubscriberConfigList, SubscriberConfigResponse, SubscriberResponse, UploadServiceObject, Url, SubscriberStatus };
|
|
287
260
|
}
|
|
288
261
|
/** @returns {Association} */
|
|
289
262
|
declare function Association(): Association;
|
|
@@ -359,21 +332,6 @@ declare function EventConfigResponse(): EventConfigResponse;
|
|
|
359
332
|
type EventConfigResponse = {
|
|
360
333
|
event_configs?: EventConfig[];
|
|
361
334
|
};
|
|
362
|
-
/** @returns {EventConfigs} */
|
|
363
|
-
declare function EventConfigs(): EventConfigs;
|
|
364
|
-
type EventConfigs = {
|
|
365
|
-
created_on?: string;
|
|
366
|
-
description?: string;
|
|
367
|
-
display_name?: string;
|
|
368
|
-
event_category?: string;
|
|
369
|
-
event_name?: string;
|
|
370
|
-
event_schema?: any;
|
|
371
|
-
event_type?: string;
|
|
372
|
-
id?: number;
|
|
373
|
-
subscriber_event_mapping?: SubscriberEventMapping;
|
|
374
|
-
updated_on?: string;
|
|
375
|
-
version?: string;
|
|
376
|
-
};
|
|
377
335
|
/** @returns {EventProcessReportObject} */
|
|
378
336
|
declare function EventProcessReportObject(): EventProcessReportObject;
|
|
379
337
|
type EventProcessReportObject = {
|
|
@@ -671,21 +629,6 @@ type SubscriberConfigResponse = {
|
|
|
671
629
|
updated_on?: string;
|
|
672
630
|
webhook_url?: string;
|
|
673
631
|
};
|
|
674
|
-
/** @returns {SubscriberEventMapping} */
|
|
675
|
-
declare function SubscriberEventMapping(): SubscriberEventMapping;
|
|
676
|
-
type SubscriberEventMapping = {
|
|
677
|
-
created_on?: string;
|
|
678
|
-
event_id?: number;
|
|
679
|
-
id?: number;
|
|
680
|
-
subscriber_id?: number;
|
|
681
|
-
};
|
|
682
|
-
/** @returns {SubscriberFailureResponse} */
|
|
683
|
-
declare function SubscriberFailureResponse(): SubscriberFailureResponse;
|
|
684
|
-
type SubscriberFailureResponse = {
|
|
685
|
-
code?: string;
|
|
686
|
-
message?: string;
|
|
687
|
-
stack?: string;
|
|
688
|
-
};
|
|
689
632
|
/** @returns {SubscriberResponse} */
|
|
690
633
|
declare function SubscriberResponse(): SubscriberResponse;
|
|
691
634
|
type SubscriberResponse = {
|
|
@@ -694,7 +637,7 @@ type SubscriberResponse = {
|
|
|
694
637
|
created_on?: string;
|
|
695
638
|
custom_headers?: any;
|
|
696
639
|
email_id?: string;
|
|
697
|
-
event_configs?:
|
|
640
|
+
event_configs?: EventConfig[];
|
|
698
641
|
id?: number;
|
|
699
642
|
modified_by?: string;
|
|
700
643
|
name?: string;
|
|
@@ -68,21 +68,6 @@ const Joi = require("joi");
|
|
|
68
68
|
* @property {EventConfig[]} [event_configs]
|
|
69
69
|
*/
|
|
70
70
|
|
|
71
|
-
/**
|
|
72
|
-
* @typedef EventConfigs
|
|
73
|
-
* @property {string} [created_on]
|
|
74
|
-
* @property {string} [description]
|
|
75
|
-
* @property {string} [display_name]
|
|
76
|
-
* @property {string} [event_category]
|
|
77
|
-
* @property {string} [event_name]
|
|
78
|
-
* @property {Object} [event_schema]
|
|
79
|
-
* @property {string} [event_type]
|
|
80
|
-
* @property {number} [id]
|
|
81
|
-
* @property {SubscriberEventMapping} [subscriber_event_mapping]
|
|
82
|
-
* @property {string} [updated_on]
|
|
83
|
-
* @property {string} [version]
|
|
84
|
-
*/
|
|
85
|
-
|
|
86
71
|
/**
|
|
87
72
|
* @typedef EventProcessReportObject
|
|
88
73
|
* @property {number} [attempt] - The attempt number of the event.
|
|
@@ -275,21 +260,6 @@ const Joi = require("joi");
|
|
|
275
260
|
* @property {string} [webhook_url]
|
|
276
261
|
*/
|
|
277
262
|
|
|
278
|
-
/**
|
|
279
|
-
* @typedef SubscriberEventMapping
|
|
280
|
-
* @property {string} [created_on]
|
|
281
|
-
* @property {number} [event_id]
|
|
282
|
-
* @property {number} [id]
|
|
283
|
-
* @property {number} [subscriber_id]
|
|
284
|
-
*/
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* @typedef SubscriberFailureResponse
|
|
288
|
-
* @property {string} [code]
|
|
289
|
-
* @property {string} [message]
|
|
290
|
-
* @property {string} [stack]
|
|
291
|
-
*/
|
|
292
|
-
|
|
293
263
|
/**
|
|
294
264
|
* @typedef SubscriberResponse
|
|
295
265
|
* @property {Association} [association]
|
|
@@ -297,7 +267,7 @@ const Joi = require("joi");
|
|
|
297
267
|
* @property {string} [created_on]
|
|
298
268
|
* @property {Object} [custom_headers]
|
|
299
269
|
* @property {string} [email_id]
|
|
300
|
-
* @property {
|
|
270
|
+
* @property {EventConfig[]} [event_configs]
|
|
301
271
|
* @property {number} [id]
|
|
302
272
|
* @property {string} [modified_by]
|
|
303
273
|
* @property {string} [name]
|
|
@@ -409,23 +379,6 @@ class WebhookPlatformModel {
|
|
|
409
379
|
});
|
|
410
380
|
}
|
|
411
381
|
|
|
412
|
-
/** @returns {EventConfigs} */
|
|
413
|
-
static EventConfigs() {
|
|
414
|
-
return Joi.object({
|
|
415
|
-
created_on: Joi.string().allow(""),
|
|
416
|
-
description: Joi.string().allow(""),
|
|
417
|
-
display_name: Joi.string().allow(""),
|
|
418
|
-
event_category: Joi.string().allow(""),
|
|
419
|
-
event_name: Joi.string().allow(""),
|
|
420
|
-
event_schema: Joi.object().pattern(/\S/, Joi.any()),
|
|
421
|
-
event_type: Joi.string().allow(""),
|
|
422
|
-
id: Joi.number(),
|
|
423
|
-
subscriber_event_mapping: WebhookPlatformModel.SubscriberEventMapping(),
|
|
424
|
-
updated_on: Joi.string().allow(""),
|
|
425
|
-
version: Joi.string().allow(""),
|
|
426
|
-
});
|
|
427
|
-
}
|
|
428
|
-
|
|
429
382
|
/** @returns {EventProcessReportObject} */
|
|
430
383
|
static EventProcessReportObject() {
|
|
431
384
|
return Joi.object({
|
|
@@ -656,25 +609,6 @@ class WebhookPlatformModel {
|
|
|
656
609
|
});
|
|
657
610
|
}
|
|
658
611
|
|
|
659
|
-
/** @returns {SubscriberEventMapping} */
|
|
660
|
-
static SubscriberEventMapping() {
|
|
661
|
-
return Joi.object({
|
|
662
|
-
created_on: Joi.string().allow(""),
|
|
663
|
-
event_id: Joi.number(),
|
|
664
|
-
id: Joi.number(),
|
|
665
|
-
subscriber_id: Joi.number(),
|
|
666
|
-
});
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
/** @returns {SubscriberFailureResponse} */
|
|
670
|
-
static SubscriberFailureResponse() {
|
|
671
|
-
return Joi.object({
|
|
672
|
-
code: Joi.string().allow(""),
|
|
673
|
-
message: Joi.string().allow(""),
|
|
674
|
-
stack: Joi.string().allow(""),
|
|
675
|
-
});
|
|
676
|
-
}
|
|
677
|
-
|
|
678
612
|
/** @returns {SubscriberResponse} */
|
|
679
613
|
static SubscriberResponse() {
|
|
680
614
|
return Joi.object({
|
|
@@ -683,7 +617,7 @@ class WebhookPlatformModel {
|
|
|
683
617
|
created_on: Joi.string().allow(""),
|
|
684
618
|
custom_headers: Joi.any(),
|
|
685
619
|
email_id: Joi.string().allow(""),
|
|
686
|
-
event_configs: Joi.array().items(WebhookPlatformModel.
|
|
620
|
+
event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()),
|
|
687
621
|
id: Joi.number(),
|
|
688
622
|
modified_by: Joi.string().allow(""),
|
|
689
623
|
name: Joi.string().allow(""),
|