@gofynd/fdk-client-javascript 1.4.6 → 1.4.8-beta.2
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 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +16 -3
- package/sdk/application/Cart/CartApplicationClient.js +118 -13
- package/sdk/application/Cart/CartApplicationModel.d.ts +121 -45
- package/sdk/application/Cart/CartApplicationModel.js +98 -26
- package/sdk/application/Cart/CartApplicationValidator.d.ts +45 -1
- package/sdk/application/Cart/CartApplicationValidator.js +26 -0
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +10 -2
- package/sdk/application/Catalog/CatalogApplicationModel.js +10 -2
- package/sdk/application/Content/ContentApplicationClient.d.ts +1 -1
- package/sdk/application/Content/ContentApplicationClient.js +5 -3
- package/sdk/application/Content/ContentApplicationModel.d.ts +7 -18
- package/sdk/application/Content/ContentApplicationModel.js +6 -20
- package/sdk/application/Content/ContentApplicationValidator.d.ts +10 -0
- package/sdk/application/Content/ContentApplicationValidator.js +4 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +0 -27
- package/sdk/application/Lead/LeadApplicationClient.js +0 -167
- package/sdk/application/Lead/LeadApplicationModel.d.ts +1 -146
- package/sdk/application/Lead/LeadApplicationModel.js +0 -126
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +1 -25
- package/sdk/application/Lead/LeadApplicationValidator.js +0 -24
- package/sdk/application/Logistic/LogisticApplicationClient.js +1 -1
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +2 -0
- package/sdk/application/Logistic/LogisticApplicationModel.js +2 -0
- package/sdk/application/Order/OrderApplicationModel.d.ts +72 -9
- package/sdk/application/Order/OrderApplicationModel.js +45 -7
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +27 -20
- package/sdk/application/Payment/PaymentApplicationModel.js +23 -20
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +2 -0
- package/sdk/application/Theme/ThemeApplicationModel.js +2 -0
- 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 -0
- package/sdk/application/index.js +2 -0
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -23
- package/sdk/partner/Lead/LeadPartnerClient.js +0 -157
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +12 -581
- package/sdk/partner/Lead/LeadPartnerModel.js +14 -403
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -2
- package/sdk/partner/Lead/LeadPartnerValidator.js +0 -12
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +4 -4
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +162 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +119 -1
- package/sdk/partner/Theme/ThemePartnerModel.js +142 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +2 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +14 -0
- 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 +19 -22
- 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/Billing/BillingPlatformClient.d.ts +304 -43
- package/sdk/platform/Billing/BillingPlatformClient.js +2218 -118
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1330 -282
- package/sdk/platform/Billing/BillingPlatformModel.js +1808 -590
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +324 -16
- package/sdk/platform/Billing/BillingPlatformValidator.js +340 -12
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +36 -3
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +276 -3
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +93 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +60 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +216 -40
- package/sdk/platform/Cart/CartPlatformModel.js +166 -24
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +11 -7
- package/sdk/platform/Catalog/CatalogPlatformClient.js +37 -14
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +122 -17
- package/sdk/platform/Catalog/CatalogPlatformModel.js +141 -15
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +40 -7
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +19 -5
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +18 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +25 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +10 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +8 -4
- package/sdk/platform/Content/ContentPlatformModel.js +8 -4
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +49 -28
- package/sdk/platform/Finance/FinancePlatformClient.js +181 -28
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +350 -127
- package/sdk/platform/Finance/FinancePlatformModel.js +378 -108
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +56 -43
- package/sdk/platform/Finance/FinancePlatformValidator.js +61 -42
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +0 -47
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +0 -321
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +1 -46
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +0 -48
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -25
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -167
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +82 -204
- package/sdk/platform/Lead/LeadPlatformModel.js +98 -178
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +1 -25
- package/sdk/platform/Lead/LeadPlatformValidator.js +0 -24
- package/sdk/platform/Order/OrderPlatformClient.d.ts +11 -1
- package/sdk/platform/Order/OrderPlatformClient.js +82 -5
- package/sdk/platform/Order/OrderPlatformModel.d.ts +270 -29
- package/sdk/platform/Order/OrderPlatformModel.js +139 -28
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +58 -17
- package/sdk/platform/Order/OrderPlatformValidator.js +28 -16
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +14 -2
- package/sdk/platform/Payment/PaymentPlatformModel.js +7 -2
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -0
- package/sdk/platform/PlatformApplicationClient.js +4 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +4 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +12 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +82 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -1
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +14 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +67 -1
- package/sdk/platform/Theme/ThemePlatformModel.js +78 -0
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +24 -40
- package/sdk/platform/Webhook/WebhookPlatformClient.js +78 -221
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +168 -167
- package/sdk/platform/Webhook/WebhookPlatformModel.js +180 -178
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +23 -31
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +28 -42
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Billing/BillingPublicClient.d.ts +24 -2
- package/sdk/public/Billing/BillingPublicClient.js +156 -3
- package/sdk/public/Billing/BillingPublicModel.d.ts +368 -26
- package/sdk/public/Billing/BillingPublicModel.js +317 -18
- package/sdk/public/Billing/BillingPublicValidator.d.ts +19 -3
- package/sdk/public/Billing/BillingPublicValidator.js +22 -3
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +2 -2
- package/sdk/public/Webhook/WebhookPublicClient.js +2 -2
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +24 -22
- package/sdk/public/Webhook/WebhookPublicModel.js +24 -22
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @typedef GeneralConfigResponse
|
|
5
|
+
* @property {string} [_id]
|
|
6
|
+
* @property {SupportCommunicationSchema[]} [support_communication]
|
|
7
|
+
* @property {boolean} [show_communication_info]
|
|
8
|
+
* @property {boolean} [show_support_dris]
|
|
9
|
+
* @property {string} [type]
|
|
10
|
+
* @property {GeneralConfigIntegrationSchema} [integration]
|
|
11
|
+
* @property {boolean} [allow_ticket_creation]
|
|
12
|
+
* @property {boolean} [show_listing]
|
|
13
|
+
* @property {string[]} [available_integration]
|
|
14
|
+
* @property {boolean} [enable_dris]
|
|
15
|
+
* @property {SupportSchema} [support_email]
|
|
16
|
+
* @property {SupportSchema} [support_phone]
|
|
17
|
+
* @property {SupportSchema} [support_faq]
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @typedef SupportCommunicationSchema
|
|
22
|
+
* @property {string} [type]
|
|
23
|
+
* @property {string} [title]
|
|
24
|
+
* @property {string} [description]
|
|
25
|
+
* @property {boolean} [enabled]
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @typedef SupportSchema
|
|
30
|
+
* @property {string} [value]
|
|
31
|
+
* @property {string} [description]
|
|
32
|
+
* @property {boolean} [enabled]
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @typedef GeneralConfigIntegrationSchema
|
|
37
|
+
* @property {string} [type]
|
|
38
|
+
*/
|
|
39
|
+
|
|
3
40
|
/**
|
|
4
41
|
* @typedef TicketList
|
|
5
42
|
* @property {Ticket[]} [items] - List of tickets
|
|
@@ -77,28 +114,6 @@ const Joi = require("joi");
|
|
|
77
114
|
* @property {string} agent_id - Agent's unique ID
|
|
78
115
|
*/
|
|
79
116
|
|
|
80
|
-
/**
|
|
81
|
-
* @typedef CreateVideoRoomResponse
|
|
82
|
-
* @property {string} unique_name - Video Room's unique name
|
|
83
|
-
*/
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* @typedef CloseVideoRoomResponse
|
|
87
|
-
* @property {boolean} success - Denotes if operation was successfully
|
|
88
|
-
*/
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* @typedef CreateVideoRoomPayload
|
|
92
|
-
* @property {string} unique_name - Ticket id
|
|
93
|
-
* @property {NotifyUser[]} [notify] - List of people to be notified
|
|
94
|
-
*/
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* @typedef NotifyUser
|
|
98
|
-
* @property {string} country_code - Country code
|
|
99
|
-
* @property {string} phone_number - Phone number
|
|
100
|
-
*/
|
|
101
|
-
|
|
102
117
|
/**
|
|
103
118
|
* @typedef Filter
|
|
104
119
|
* @property {Priority[]} priorities - List of possible priorities for tickets
|
|
@@ -113,45 +128,6 @@ const Joi = require("joi");
|
|
|
113
128
|
* @property {HistoryTypeEnum} type
|
|
114
129
|
*/
|
|
115
130
|
|
|
116
|
-
/**
|
|
117
|
-
* @typedef GetTokenForVideoRoomResponse
|
|
118
|
-
* @property {string} access_token - Access token to be used for video room
|
|
119
|
-
*/
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* @typedef GetParticipantsInsideVideoRoomResponse
|
|
123
|
-
* @property {Participant[]} participants - List of participants of the video room
|
|
124
|
-
*/
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* @typedef Participant
|
|
128
|
-
* @property {UserSchema} [user]
|
|
129
|
-
* @property {string} [identity] - Unique identifier of participant
|
|
130
|
-
* @property {string} [status] - Status of participant
|
|
131
|
-
*/
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* @typedef UserSchema
|
|
135
|
-
* @property {string} [application_id]
|
|
136
|
-
* @property {string} [user_id]
|
|
137
|
-
* @property {string} [first_name]
|
|
138
|
-
* @property {Object} [meta]
|
|
139
|
-
* @property {string} [last_name]
|
|
140
|
-
* @property {PhoneNumber[]} [phone_numbers]
|
|
141
|
-
* @property {Email[]} [emails]
|
|
142
|
-
* @property {string} [gender]
|
|
143
|
-
* @property {string} [dob]
|
|
144
|
-
* @property {boolean} [active]
|
|
145
|
-
* @property {string} [profile_pic_url]
|
|
146
|
-
* @property {string} [username]
|
|
147
|
-
* @property {string} [account_type]
|
|
148
|
-
* @property {string} [_id]
|
|
149
|
-
* @property {string} [created_at]
|
|
150
|
-
* @property {string} [updated_at]
|
|
151
|
-
* @property {string} [external_id]
|
|
152
|
-
* @property {string} [rr_id]
|
|
153
|
-
*/
|
|
154
|
-
|
|
155
131
|
/**
|
|
156
132
|
* @typedef TicketContext
|
|
157
133
|
* @property {string} [application_id] - Application ID related to the ticket
|
|
@@ -194,6 +170,11 @@ const Joi = require("joi");
|
|
|
194
170
|
* @property {string} color - Color for priority
|
|
195
171
|
*/
|
|
196
172
|
|
|
173
|
+
/**
|
|
174
|
+
* @typedef SLA
|
|
175
|
+
* @property {string} resolution_time
|
|
176
|
+
*/
|
|
177
|
+
|
|
197
178
|
/**
|
|
198
179
|
* @typedef Status
|
|
199
180
|
* @property {string} key - Key for status
|
|
@@ -307,6 +288,7 @@ const Joi = require("joi");
|
|
|
307
288
|
* @property {TicketSourceEnum} source
|
|
308
289
|
* @property {Status} status
|
|
309
290
|
* @property {Priority} priority
|
|
291
|
+
* @property {SLA} [sla]
|
|
310
292
|
* @property {Object} [created_by] - User details of ticket creator
|
|
311
293
|
* @property {Object} [assigned_to] - Details of support staff to whom ticket is assigned
|
|
312
294
|
* @property {string[]} [tags] - Tags relevant to ticket
|
|
@@ -324,23 +306,6 @@ const Joi = require("joi");
|
|
|
324
306
|
* @property {string} [message]
|
|
325
307
|
*/
|
|
326
308
|
|
|
327
|
-
/**
|
|
328
|
-
* @typedef PhoneNumber
|
|
329
|
-
* @property {string} [phone] - Phone number
|
|
330
|
-
* @property {number} [country_code] - Country code
|
|
331
|
-
* @property {boolean} [active] - Is the phone number active
|
|
332
|
-
* @property {boolean} [primary] - Is it a primary phone number
|
|
333
|
-
* @property {boolean} [verified] - Is the phone number verified
|
|
334
|
-
*/
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* @typedef Email
|
|
338
|
-
* @property {string} [email] - Email address
|
|
339
|
-
* @property {boolean} [active] - Is the email active
|
|
340
|
-
* @property {boolean} [primary] - Is it a primary email
|
|
341
|
-
* @property {boolean} [verified] - Is the email verified
|
|
342
|
-
*/
|
|
343
|
-
|
|
344
309
|
/** @typedef {"low" | "medium" | "high" | "urgent"} PriorityEnum */
|
|
345
310
|
|
|
346
311
|
/** @typedef {"rating" | "log" | "comment" | "thread"} HistoryTypeEnum */
|
|
@@ -360,6 +325,53 @@ const Joi = require("joi");
|
|
|
360
325
|
/** @typedef {"platform_panel" | "sales_channel"} TicketSourceEnum */
|
|
361
326
|
|
|
362
327
|
class LeadPlatformModel {
|
|
328
|
+
/** @returns {GeneralConfigResponse} */
|
|
329
|
+
static GeneralConfigResponse() {
|
|
330
|
+
return Joi.object({
|
|
331
|
+
_id: Joi.string().allow(""),
|
|
332
|
+
support_communication: Joi.array().items(
|
|
333
|
+
LeadPlatformModel.SupportCommunicationSchema()
|
|
334
|
+
),
|
|
335
|
+
show_communication_info: Joi.boolean(),
|
|
336
|
+
show_support_dris: Joi.boolean(),
|
|
337
|
+
type: Joi.string().allow(""),
|
|
338
|
+
integration: LeadPlatformModel.GeneralConfigIntegrationSchema(),
|
|
339
|
+
allow_ticket_creation: Joi.boolean(),
|
|
340
|
+
show_listing: Joi.boolean(),
|
|
341
|
+
available_integration: Joi.array().items(Joi.string().allow("")),
|
|
342
|
+
enable_dris: Joi.boolean(),
|
|
343
|
+
support_email: LeadPlatformModel.SupportSchema(),
|
|
344
|
+
support_phone: LeadPlatformModel.SupportSchema(),
|
|
345
|
+
support_faq: LeadPlatformModel.SupportSchema(),
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/** @returns {SupportCommunicationSchema} */
|
|
350
|
+
static SupportCommunicationSchema() {
|
|
351
|
+
return Joi.object({
|
|
352
|
+
type: Joi.string().allow(""),
|
|
353
|
+
title: Joi.string().allow(""),
|
|
354
|
+
description: Joi.string().allow(""),
|
|
355
|
+
enabled: Joi.boolean(),
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/** @returns {SupportSchema} */
|
|
360
|
+
static SupportSchema() {
|
|
361
|
+
return Joi.object({
|
|
362
|
+
value: Joi.string().allow(""),
|
|
363
|
+
description: Joi.string().allow(""),
|
|
364
|
+
enabled: Joi.boolean(),
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/** @returns {GeneralConfigIntegrationSchema} */
|
|
369
|
+
static GeneralConfigIntegrationSchema() {
|
|
370
|
+
return Joi.object({
|
|
371
|
+
type: Joi.string().allow(""),
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
|
|
363
375
|
/** @returns {TicketList} */
|
|
364
376
|
static TicketList() {
|
|
365
377
|
return Joi.object({
|
|
@@ -449,36 +461,6 @@ class LeadPlatformModel {
|
|
|
449
461
|
});
|
|
450
462
|
}
|
|
451
463
|
|
|
452
|
-
/** @returns {CreateVideoRoomResponse} */
|
|
453
|
-
static CreateVideoRoomResponse() {
|
|
454
|
-
return Joi.object({
|
|
455
|
-
unique_name: Joi.string().allow("").required(),
|
|
456
|
-
});
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
/** @returns {CloseVideoRoomResponse} */
|
|
460
|
-
static CloseVideoRoomResponse() {
|
|
461
|
-
return Joi.object({
|
|
462
|
-
success: Joi.boolean().required(),
|
|
463
|
-
});
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
/** @returns {CreateVideoRoomPayload} */
|
|
467
|
-
static CreateVideoRoomPayload() {
|
|
468
|
-
return Joi.object({
|
|
469
|
-
unique_name: Joi.string().allow("").required(),
|
|
470
|
-
notify: Joi.array().items(LeadPlatformModel.NotifyUser()),
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
/** @returns {NotifyUser} */
|
|
475
|
-
static NotifyUser() {
|
|
476
|
-
return Joi.object({
|
|
477
|
-
country_code: Joi.string().allow("").required(),
|
|
478
|
-
phone_number: Joi.string().allow("").required(),
|
|
479
|
-
});
|
|
480
|
-
}
|
|
481
|
-
|
|
482
464
|
/** @returns {Filter} */
|
|
483
465
|
static Filter() {
|
|
484
466
|
return Joi.object({
|
|
@@ -497,55 +479,6 @@ class LeadPlatformModel {
|
|
|
497
479
|
});
|
|
498
480
|
}
|
|
499
481
|
|
|
500
|
-
/** @returns {GetTokenForVideoRoomResponse} */
|
|
501
|
-
static GetTokenForVideoRoomResponse() {
|
|
502
|
-
return Joi.object({
|
|
503
|
-
access_token: Joi.string().allow("").required(),
|
|
504
|
-
});
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
/** @returns {GetParticipantsInsideVideoRoomResponse} */
|
|
508
|
-
static GetParticipantsInsideVideoRoomResponse() {
|
|
509
|
-
return Joi.object({
|
|
510
|
-
participants: Joi.array()
|
|
511
|
-
.items(LeadPlatformModel.Participant())
|
|
512
|
-
.required(),
|
|
513
|
-
});
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
/** @returns {Participant} */
|
|
517
|
-
static Participant() {
|
|
518
|
-
return Joi.object({
|
|
519
|
-
user: LeadPlatformModel.UserSchema(),
|
|
520
|
-
identity: Joi.string().allow(""),
|
|
521
|
-
status: Joi.string().allow(""),
|
|
522
|
-
});
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
/** @returns {UserSchema} */
|
|
526
|
-
static UserSchema() {
|
|
527
|
-
return Joi.object({
|
|
528
|
-
application_id: Joi.string().allow(""),
|
|
529
|
-
user_id: Joi.string().allow(""),
|
|
530
|
-
first_name: Joi.string().allow(""),
|
|
531
|
-
meta: Joi.any(),
|
|
532
|
-
last_name: Joi.string().allow(""),
|
|
533
|
-
phone_numbers: Joi.array().items(LeadPlatformModel.PhoneNumber()),
|
|
534
|
-
emails: Joi.array().items(LeadPlatformModel.Email()),
|
|
535
|
-
gender: Joi.string().allow(""),
|
|
536
|
-
dob: Joi.string().allow(""),
|
|
537
|
-
active: Joi.boolean(),
|
|
538
|
-
profile_pic_url: Joi.string().allow(""),
|
|
539
|
-
username: Joi.string().allow(""),
|
|
540
|
-
account_type: Joi.string().allow(""),
|
|
541
|
-
_id: Joi.string().allow(""),
|
|
542
|
-
created_at: Joi.string().allow(""),
|
|
543
|
-
updated_at: Joi.string().allow(""),
|
|
544
|
-
external_id: Joi.string().allow(""),
|
|
545
|
-
rr_id: Joi.string().allow(""),
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
|
|
549
482
|
/** @returns {TicketContext} */
|
|
550
483
|
static TicketContext() {
|
|
551
484
|
return Joi.object({
|
|
@@ -600,6 +533,13 @@ class LeadPlatformModel {
|
|
|
600
533
|
});
|
|
601
534
|
}
|
|
602
535
|
|
|
536
|
+
/** @returns {SLA} */
|
|
537
|
+
static SLA() {
|
|
538
|
+
return Joi.object({
|
|
539
|
+
resolution_time: Joi.string().allow("").required(),
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
|
|
603
543
|
/** @returns {Status} */
|
|
604
544
|
static Status() {
|
|
605
545
|
return Joi.object({
|
|
@@ -733,6 +673,7 @@ class LeadPlatformModel {
|
|
|
733
673
|
source: LeadPlatformModel.TicketSourceEnum().required(),
|
|
734
674
|
status: LeadPlatformModel.Status().required(),
|
|
735
675
|
priority: LeadPlatformModel.Priority().required(),
|
|
676
|
+
sla: LeadPlatformModel.SLA(),
|
|
736
677
|
created_by: Joi.any(),
|
|
737
678
|
assigned_to: Joi.any(),
|
|
738
679
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
@@ -752,27 +693,6 @@ class LeadPlatformModel {
|
|
|
752
693
|
});
|
|
753
694
|
}
|
|
754
695
|
|
|
755
|
-
/** @returns {PhoneNumber} */
|
|
756
|
-
static PhoneNumber() {
|
|
757
|
-
return Joi.object({
|
|
758
|
-
phone: Joi.string().allow(""),
|
|
759
|
-
country_code: Joi.number(),
|
|
760
|
-
active: Joi.boolean(),
|
|
761
|
-
primary: Joi.boolean(),
|
|
762
|
-
verified: Joi.boolean(),
|
|
763
|
-
});
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
/** @returns {Email} */
|
|
767
|
-
static Email() {
|
|
768
|
-
return Joi.object({
|
|
769
|
-
email: Joi.string().allow(""),
|
|
770
|
-
active: Joi.boolean(),
|
|
771
|
-
primary: Joi.boolean(),
|
|
772
|
-
verified: Joi.boolean(),
|
|
773
|
-
});
|
|
774
|
-
}
|
|
775
|
-
|
|
776
696
|
/**
|
|
777
697
|
* Enum: PriorityEnum Used By: Lead
|
|
778
698
|
*
|
|
@@ -40,14 +40,6 @@ export = LeadPlatformValidator;
|
|
|
40
40
|
* @property {number} [pageSize] - Number of items to retrieve in each page.
|
|
41
41
|
* Default is 12.
|
|
42
42
|
*/
|
|
43
|
-
/**
|
|
44
|
-
* @typedef GetPlatformVideoParticipantsParam
|
|
45
|
-
* @property {string} uniqueName - Unique name of Video Room
|
|
46
|
-
*/
|
|
47
|
-
/**
|
|
48
|
-
* @typedef GetTokenForPlatformVideoRoomParam
|
|
49
|
-
* @property {string} uniqueName - Unique name of video room
|
|
50
|
-
*/
|
|
51
43
|
/**
|
|
52
44
|
* @typedef SubmitFeedbackParam
|
|
53
45
|
* @property {string} id - Ticket ID for which feedback is to be submitted
|
|
@@ -70,15 +62,11 @@ declare class LeadPlatformValidator {
|
|
|
70
62
|
static getPlatformTicketHistory(): GetPlatformTicketHistoryParam;
|
|
71
63
|
/** @returns {GetPlatformTicketsParam} */
|
|
72
64
|
static getPlatformTickets(): GetPlatformTicketsParam;
|
|
73
|
-
/** @returns {GetPlatformVideoParticipantsParam} */
|
|
74
|
-
static getPlatformVideoParticipants(): GetPlatformVideoParticipantsParam;
|
|
75
|
-
/** @returns {GetTokenForPlatformVideoRoomParam} */
|
|
76
|
-
static getTokenForPlatformVideoRoom(): GetTokenForPlatformVideoRoomParam;
|
|
77
65
|
/** @returns {SubmitFeedbackParam} */
|
|
78
66
|
static submitFeedback(): SubmitFeedbackParam;
|
|
79
67
|
}
|
|
80
68
|
declare namespace LeadPlatformValidator {
|
|
81
|
-
export { CreatePlatformTicketHistoryParam, CreateTicketParam, EditPlatformTicketParam, GetFeedbacksParam, GetGeneralConfigParam, GetPlatformTicketParam, GetPlatformTicketHistoryParam, GetPlatformTicketsParam,
|
|
69
|
+
export { CreatePlatformTicketHistoryParam, CreateTicketParam, EditPlatformTicketParam, GetFeedbacksParam, GetGeneralConfigParam, GetPlatformTicketParam, GetPlatformTicketHistoryParam, GetPlatformTicketsParam, SubmitFeedbackParam };
|
|
82
70
|
}
|
|
83
71
|
type CreatePlatformTicketHistoryParam = {
|
|
84
72
|
/**
|
|
@@ -152,18 +140,6 @@ type GetPlatformTicketsParam = {
|
|
|
152
140
|
*/
|
|
153
141
|
pageSize?: number;
|
|
154
142
|
};
|
|
155
|
-
type GetPlatformVideoParticipantsParam = {
|
|
156
|
-
/**
|
|
157
|
-
* - Unique name of Video Room
|
|
158
|
-
*/
|
|
159
|
-
uniqueName: string;
|
|
160
|
-
};
|
|
161
|
-
type GetTokenForPlatformVideoRoomParam = {
|
|
162
|
-
/**
|
|
163
|
-
* - Unique name of video room
|
|
164
|
-
*/
|
|
165
|
-
uniqueName: string;
|
|
166
|
-
};
|
|
167
143
|
type SubmitFeedbackParam = {
|
|
168
144
|
/**
|
|
169
145
|
* - Ticket ID for which feedback is to be submitted
|
|
@@ -51,16 +51,6 @@ const LeadPlatformModel = require("./LeadPlatformModel");
|
|
|
51
51
|
* Default is 12.
|
|
52
52
|
*/
|
|
53
53
|
|
|
54
|
-
/**
|
|
55
|
-
* @typedef GetPlatformVideoParticipantsParam
|
|
56
|
-
* @property {string} uniqueName - Unique name of Video Room
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* @typedef GetTokenForPlatformVideoRoomParam
|
|
61
|
-
* @property {string} uniqueName - Unique name of video room
|
|
62
|
-
*/
|
|
63
|
-
|
|
64
54
|
/**
|
|
65
55
|
* @typedef SubmitFeedbackParam
|
|
66
56
|
* @property {string} id - Ticket ID for which feedback is to be submitted
|
|
@@ -131,20 +121,6 @@ class LeadPlatformValidator {
|
|
|
131
121
|
}).required();
|
|
132
122
|
}
|
|
133
123
|
|
|
134
|
-
/** @returns {GetPlatformVideoParticipantsParam} */
|
|
135
|
-
static getPlatformVideoParticipants() {
|
|
136
|
-
return Joi.object({
|
|
137
|
-
uniqueName: Joi.string().allow("").required(),
|
|
138
|
-
}).required();
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/** @returns {GetTokenForPlatformVideoRoomParam} */
|
|
142
|
-
static getTokenForPlatformVideoRoom() {
|
|
143
|
-
return Joi.object({
|
|
144
|
-
uniqueName: Joi.string().allow("").required(),
|
|
145
|
-
}).required();
|
|
146
|
-
}
|
|
147
|
-
|
|
148
124
|
/** @returns {SubmitFeedbackParam} */
|
|
149
125
|
static submitFeedback() {
|
|
150
126
|
return Joi.object({
|
|
@@ -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 },
|