purecloud-platform-client-v2 166.0.0 → 167.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/node/purecloud-platform-client-v2.js +543 -153
- package/dist/web-amd/purecloud-platform-client-v2.js +543 -153
- package/dist/web-amd/purecloud-platform-client-v2.min.js +1 -1
- package/dist/web-cjs/bundle.js +543 -153
- package/dist/web-cjs/purecloud-platform-client-v2.js +543 -153
- package/dist/web-cjs/purecloud-platform-client-v2.min.js +1 -1
- package/index.d.ts +514 -208
- package/package.json +7 -7
- package/src/purecloud-platform-client-v2/ApiClient.js +1 -1
- package/src/purecloud-platform-client-v2/api/AlertingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AnalyticsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ArchitectApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AuditApi.js +3 -3
- package/src/purecloud-platform-client-v2/api/AuthorizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/BillingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ChatApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/CoachingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ContentManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ConversationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/DataExtensionsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/DownloadsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/EventsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ExternalContactsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/FaxApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/FlowsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GamificationApi.js +470 -1
- package/src/purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GeolocationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GreetingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GroupsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/IdentityProviderApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/InfrastructureAsCodeApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/IntegrationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/JourneyApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/KnowledgeApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LanguageUnderstandingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LanguagesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LearningApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LicenseApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LocationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/MessagingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/MobileDevicesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/NotificationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OAuthApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ObjectsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OrganizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OrganizationAuthorizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OutboundApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/PresenceApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ProcessAutomationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/QualityApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/RecordingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ResponseManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/RoutingApi.js +3 -2
- package/src/purecloud-platform-client-v2/api/SCIMApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ScriptsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SearchApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SpeechTextAnalyticsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/StationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SuggestApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TeamsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TelephonyApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi.js +1 -81
- package/src/purecloud-platform-client-v2/api/TextbotsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TokensApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UploadsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UsageApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UserRecordingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UsersApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UtilitiesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/VoicemailApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebChatApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebDeploymentsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebMessagingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WidgetsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WorkforceManagementApi.js +2 -2
- package/src/purecloud-platform-client-v2/index.js +1 -1
|
@@ -5,7 +5,7 @@ class GamificationApi {
|
|
|
5
5
|
/**
|
|
6
6
|
* Gamification service.
|
|
7
7
|
* @module purecloud-platform-client-v2/api/GamificationApi
|
|
8
|
-
* @version
|
|
8
|
+
* @version 167.0.0
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -95,6 +95,420 @@ class GamificationApi {
|
|
|
95
95
|
);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
/**
|
|
99
|
+
* Get insights summary
|
|
100
|
+
*
|
|
101
|
+
* @param {Object} filterType Filter type for the query request.
|
|
102
|
+
* @param {String} filterId ID for the filter type.
|
|
103
|
+
* @param {Object} granularity Granularity
|
|
104
|
+
* @param {String} comparativePeriodStartWorkday The start work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
105
|
+
* @param {String} primaryPeriodStartWorkday The start work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
106
|
+
* @param {Object} opts Optional parameters
|
|
107
|
+
* @param {Number} opts.pageSize Page size (default to 25)
|
|
108
|
+
* @param {Number} opts.pageNumber Page number (default to 1)
|
|
109
|
+
* @param {Object} opts.sortKey Sort key
|
|
110
|
+
* @param {String} opts.sortMetricId Sort Metric Id
|
|
111
|
+
* @param {Object} opts.sortOrder Sort order (default to asc)
|
|
112
|
+
* @param {String} opts.userIds A list of up to 100 comma-separated user Ids
|
|
113
|
+
*/
|
|
114
|
+
getGamificationInsights(filterType, filterId, granularity, comparativePeriodStartWorkday, primaryPeriodStartWorkday, opts) {
|
|
115
|
+
opts = opts || {};
|
|
116
|
+
|
|
117
|
+
// verify the required parameter 'filterType' is set
|
|
118
|
+
if (filterType === undefined || filterType === null) {
|
|
119
|
+
throw 'Missing the required parameter "filterType" when calling getGamificationInsights';
|
|
120
|
+
}
|
|
121
|
+
// verify the required parameter 'filterId' is set
|
|
122
|
+
if (filterId === undefined || filterId === null) {
|
|
123
|
+
throw 'Missing the required parameter "filterId" when calling getGamificationInsights';
|
|
124
|
+
}
|
|
125
|
+
// verify the required parameter 'granularity' is set
|
|
126
|
+
if (granularity === undefined || granularity === null) {
|
|
127
|
+
throw 'Missing the required parameter "granularity" when calling getGamificationInsights';
|
|
128
|
+
}
|
|
129
|
+
// verify the required parameter 'comparativePeriodStartWorkday' is set
|
|
130
|
+
if (comparativePeriodStartWorkday === undefined || comparativePeriodStartWorkday === null) {
|
|
131
|
+
throw 'Missing the required parameter "comparativePeriodStartWorkday" when calling getGamificationInsights';
|
|
132
|
+
}
|
|
133
|
+
// verify the required parameter 'primaryPeriodStartWorkday' is set
|
|
134
|
+
if (primaryPeriodStartWorkday === undefined || primaryPeriodStartWorkday === null) {
|
|
135
|
+
throw 'Missing the required parameter "primaryPeriodStartWorkday" when calling getGamificationInsights';
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return this.apiClient.callApi(
|
|
139
|
+
'/api/v2/gamification/insights',
|
|
140
|
+
'GET',
|
|
141
|
+
{ },
|
|
142
|
+
{ 'filterType': filterType,'filterId': filterId,'granularity': granularity,'comparativePeriodStartWorkday': comparativePeriodStartWorkday,'primaryPeriodStartWorkday': primaryPeriodStartWorkday,'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'sortKey': opts['sortKey'],'sortMetricId': opts['sortMetricId'],'sortOrder': opts['sortOrder'],'userIds': opts['userIds'] },
|
|
143
|
+
{ },
|
|
144
|
+
{ },
|
|
145
|
+
null,
|
|
146
|
+
['PureCloud OAuth'],
|
|
147
|
+
['application/json'],
|
|
148
|
+
['application/json']
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Get insights details for the current user
|
|
154
|
+
*
|
|
155
|
+
* @param {Object} filterType Filter type for the query request.
|
|
156
|
+
* @param {String} filterId ID for the filter type.
|
|
157
|
+
* @param {Object} granularity Granularity
|
|
158
|
+
* @param {String} comparativePeriodStartWorkday The start work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
159
|
+
* @param {String} primaryPeriodStartWorkday The start work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
160
|
+
*/
|
|
161
|
+
getGamificationInsightsDetails(filterType, filterId, granularity, comparativePeriodStartWorkday, primaryPeriodStartWorkday) {
|
|
162
|
+
// verify the required parameter 'filterType' is set
|
|
163
|
+
if (filterType === undefined || filterType === null) {
|
|
164
|
+
throw 'Missing the required parameter "filterType" when calling getGamificationInsightsDetails';
|
|
165
|
+
}
|
|
166
|
+
// verify the required parameter 'filterId' is set
|
|
167
|
+
if (filterId === undefined || filterId === null) {
|
|
168
|
+
throw 'Missing the required parameter "filterId" when calling getGamificationInsightsDetails';
|
|
169
|
+
}
|
|
170
|
+
// verify the required parameter 'granularity' is set
|
|
171
|
+
if (granularity === undefined || granularity === null) {
|
|
172
|
+
throw 'Missing the required parameter "granularity" when calling getGamificationInsightsDetails';
|
|
173
|
+
}
|
|
174
|
+
// verify the required parameter 'comparativePeriodStartWorkday' is set
|
|
175
|
+
if (comparativePeriodStartWorkday === undefined || comparativePeriodStartWorkday === null) {
|
|
176
|
+
throw 'Missing the required parameter "comparativePeriodStartWorkday" when calling getGamificationInsightsDetails';
|
|
177
|
+
}
|
|
178
|
+
// verify the required parameter 'primaryPeriodStartWorkday' is set
|
|
179
|
+
if (primaryPeriodStartWorkday === undefined || primaryPeriodStartWorkday === null) {
|
|
180
|
+
throw 'Missing the required parameter "primaryPeriodStartWorkday" when calling getGamificationInsightsDetails';
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
return this.apiClient.callApi(
|
|
184
|
+
'/api/v2/gamification/insights/details',
|
|
185
|
+
'GET',
|
|
186
|
+
{ },
|
|
187
|
+
{ 'filterType': filterType,'filterId': filterId,'granularity': granularity,'comparativePeriodStartWorkday': comparativePeriodStartWorkday,'primaryPeriodStartWorkday': primaryPeriodStartWorkday },
|
|
188
|
+
{ },
|
|
189
|
+
{ },
|
|
190
|
+
null,
|
|
191
|
+
['PureCloud OAuth'],
|
|
192
|
+
['application/json'],
|
|
193
|
+
['application/json']
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Get insights overall trend for the current user
|
|
199
|
+
*
|
|
200
|
+
* @param {Object} filterType Filter type for the query request.
|
|
201
|
+
* @param {String} filterId ID for the filter type.
|
|
202
|
+
* @param {Object} granularity Granularity
|
|
203
|
+
* @param {String} comparativePeriodStartWorkday The start work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
204
|
+
* @param {String} comparativePeriodEndWorkday The end work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
205
|
+
* @param {String} primaryPeriodStartWorkday The start work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
206
|
+
* @param {String} primaryPeriodEndWorkday The end work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
207
|
+
*/
|
|
208
|
+
getGamificationInsightsGroupsTrends(filterType, filterId, granularity, comparativePeriodStartWorkday, comparativePeriodEndWorkday, primaryPeriodStartWorkday, primaryPeriodEndWorkday) {
|
|
209
|
+
// verify the required parameter 'filterType' is set
|
|
210
|
+
if (filterType === undefined || filterType === null) {
|
|
211
|
+
throw 'Missing the required parameter "filterType" when calling getGamificationInsightsGroupsTrends';
|
|
212
|
+
}
|
|
213
|
+
// verify the required parameter 'filterId' is set
|
|
214
|
+
if (filterId === undefined || filterId === null) {
|
|
215
|
+
throw 'Missing the required parameter "filterId" when calling getGamificationInsightsGroupsTrends';
|
|
216
|
+
}
|
|
217
|
+
// verify the required parameter 'granularity' is set
|
|
218
|
+
if (granularity === undefined || granularity === null) {
|
|
219
|
+
throw 'Missing the required parameter "granularity" when calling getGamificationInsightsGroupsTrends';
|
|
220
|
+
}
|
|
221
|
+
// verify the required parameter 'comparativePeriodStartWorkday' is set
|
|
222
|
+
if (comparativePeriodStartWorkday === undefined || comparativePeriodStartWorkday === null) {
|
|
223
|
+
throw 'Missing the required parameter "comparativePeriodStartWorkday" when calling getGamificationInsightsGroupsTrends';
|
|
224
|
+
}
|
|
225
|
+
// verify the required parameter 'comparativePeriodEndWorkday' is set
|
|
226
|
+
if (comparativePeriodEndWorkday === undefined || comparativePeriodEndWorkday === null) {
|
|
227
|
+
throw 'Missing the required parameter "comparativePeriodEndWorkday" when calling getGamificationInsightsGroupsTrends';
|
|
228
|
+
}
|
|
229
|
+
// verify the required parameter 'primaryPeriodStartWorkday' is set
|
|
230
|
+
if (primaryPeriodStartWorkday === undefined || primaryPeriodStartWorkday === null) {
|
|
231
|
+
throw 'Missing the required parameter "primaryPeriodStartWorkday" when calling getGamificationInsightsGroupsTrends';
|
|
232
|
+
}
|
|
233
|
+
// verify the required parameter 'primaryPeriodEndWorkday' is set
|
|
234
|
+
if (primaryPeriodEndWorkday === undefined || primaryPeriodEndWorkday === null) {
|
|
235
|
+
throw 'Missing the required parameter "primaryPeriodEndWorkday" when calling getGamificationInsightsGroupsTrends';
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return this.apiClient.callApi(
|
|
239
|
+
'/api/v2/gamification/insights/groups/trends',
|
|
240
|
+
'GET',
|
|
241
|
+
{ },
|
|
242
|
+
{ 'filterType': filterType,'filterId': filterId,'granularity': granularity,'comparativePeriodStartWorkday': comparativePeriodStartWorkday,'comparativePeriodEndWorkday': comparativePeriodEndWorkday,'primaryPeriodStartWorkday': primaryPeriodStartWorkday,'primaryPeriodEndWorkday': primaryPeriodEndWorkday },
|
|
243
|
+
{ },
|
|
244
|
+
{ },
|
|
245
|
+
null,
|
|
246
|
+
['PureCloud OAuth'],
|
|
247
|
+
['application/json'],
|
|
248
|
+
['application/json']
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Get insights overall trend
|
|
254
|
+
*
|
|
255
|
+
* @param {Object} filterType Filter type for the query request.
|
|
256
|
+
* @param {String} filterId ID for the filter type.
|
|
257
|
+
* @param {Object} granularity Granularity
|
|
258
|
+
* @param {String} comparativePeriodStartWorkday The start work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
259
|
+
* @param {String} comparativePeriodEndWorkday The end work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
260
|
+
* @param {String} primaryPeriodStartWorkday The start work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
261
|
+
* @param {String} primaryPeriodEndWorkday The end work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
262
|
+
*/
|
|
263
|
+
getGamificationInsightsGroupsTrendsAll(filterType, filterId, granularity, comparativePeriodStartWorkday, comparativePeriodEndWorkday, primaryPeriodStartWorkday, primaryPeriodEndWorkday) {
|
|
264
|
+
// verify the required parameter 'filterType' is set
|
|
265
|
+
if (filterType === undefined || filterType === null) {
|
|
266
|
+
throw 'Missing the required parameter "filterType" when calling getGamificationInsightsGroupsTrendsAll';
|
|
267
|
+
}
|
|
268
|
+
// verify the required parameter 'filterId' is set
|
|
269
|
+
if (filterId === undefined || filterId === null) {
|
|
270
|
+
throw 'Missing the required parameter "filterId" when calling getGamificationInsightsGroupsTrendsAll';
|
|
271
|
+
}
|
|
272
|
+
// verify the required parameter 'granularity' is set
|
|
273
|
+
if (granularity === undefined || granularity === null) {
|
|
274
|
+
throw 'Missing the required parameter "granularity" when calling getGamificationInsightsGroupsTrendsAll';
|
|
275
|
+
}
|
|
276
|
+
// verify the required parameter 'comparativePeriodStartWorkday' is set
|
|
277
|
+
if (comparativePeriodStartWorkday === undefined || comparativePeriodStartWorkday === null) {
|
|
278
|
+
throw 'Missing the required parameter "comparativePeriodStartWorkday" when calling getGamificationInsightsGroupsTrendsAll';
|
|
279
|
+
}
|
|
280
|
+
// verify the required parameter 'comparativePeriodEndWorkday' is set
|
|
281
|
+
if (comparativePeriodEndWorkday === undefined || comparativePeriodEndWorkday === null) {
|
|
282
|
+
throw 'Missing the required parameter "comparativePeriodEndWorkday" when calling getGamificationInsightsGroupsTrendsAll';
|
|
283
|
+
}
|
|
284
|
+
// verify the required parameter 'primaryPeriodStartWorkday' is set
|
|
285
|
+
if (primaryPeriodStartWorkday === undefined || primaryPeriodStartWorkday === null) {
|
|
286
|
+
throw 'Missing the required parameter "primaryPeriodStartWorkday" when calling getGamificationInsightsGroupsTrendsAll';
|
|
287
|
+
}
|
|
288
|
+
// verify the required parameter 'primaryPeriodEndWorkday' is set
|
|
289
|
+
if (primaryPeriodEndWorkday === undefined || primaryPeriodEndWorkday === null) {
|
|
290
|
+
throw 'Missing the required parameter "primaryPeriodEndWorkday" when calling getGamificationInsightsGroupsTrendsAll';
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
return this.apiClient.callApi(
|
|
294
|
+
'/api/v2/gamification/insights/groups/trends/all',
|
|
295
|
+
'GET',
|
|
296
|
+
{ },
|
|
297
|
+
{ 'filterType': filterType,'filterId': filterId,'granularity': granularity,'comparativePeriodStartWorkday': comparativePeriodStartWorkday,'comparativePeriodEndWorkday': comparativePeriodEndWorkday,'primaryPeriodStartWorkday': primaryPeriodStartWorkday,'primaryPeriodEndWorkday': primaryPeriodEndWorkday },
|
|
298
|
+
{ },
|
|
299
|
+
{ },
|
|
300
|
+
null,
|
|
301
|
+
['PureCloud OAuth'],
|
|
302
|
+
['application/json'],
|
|
303
|
+
['application/json']
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Query users in a profile during a period of time
|
|
309
|
+
*
|
|
310
|
+
* @param {Object} filterType Filter type for the query request.
|
|
311
|
+
* @param {String} filterId ID for the filter type.
|
|
312
|
+
* @param {Object} granularity Granularity
|
|
313
|
+
* @param {String} startWorkday The start work day. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
314
|
+
*/
|
|
315
|
+
getGamificationInsightsMembers(filterType, filterId, granularity, startWorkday) {
|
|
316
|
+
// verify the required parameter 'filterType' is set
|
|
317
|
+
if (filterType === undefined || filterType === null) {
|
|
318
|
+
throw 'Missing the required parameter "filterType" when calling getGamificationInsightsMembers';
|
|
319
|
+
}
|
|
320
|
+
// verify the required parameter 'filterId' is set
|
|
321
|
+
if (filterId === undefined || filterId === null) {
|
|
322
|
+
throw 'Missing the required parameter "filterId" when calling getGamificationInsightsMembers';
|
|
323
|
+
}
|
|
324
|
+
// verify the required parameter 'granularity' is set
|
|
325
|
+
if (granularity === undefined || granularity === null) {
|
|
326
|
+
throw 'Missing the required parameter "granularity" when calling getGamificationInsightsMembers';
|
|
327
|
+
}
|
|
328
|
+
// verify the required parameter 'startWorkday' is set
|
|
329
|
+
if (startWorkday === undefined || startWorkday === null) {
|
|
330
|
+
throw 'Missing the required parameter "startWorkday" when calling getGamificationInsightsMembers';
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
return this.apiClient.callApi(
|
|
334
|
+
'/api/v2/gamification/insights/members',
|
|
335
|
+
'GET',
|
|
336
|
+
{ },
|
|
337
|
+
{ 'filterType': filterType,'filterId': filterId,'granularity': granularity,'startWorkday': startWorkday },
|
|
338
|
+
{ },
|
|
339
|
+
{ },
|
|
340
|
+
null,
|
|
341
|
+
['PureCloud OAuth'],
|
|
342
|
+
['application/json'],
|
|
343
|
+
['application/json']
|
|
344
|
+
);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Get insights user trend for the current user
|
|
349
|
+
*
|
|
350
|
+
* @param {Object} filterType Filter type for the query request.
|
|
351
|
+
* @param {String} filterId ID for the filter type.
|
|
352
|
+
* @param {Object} granularity Granularity
|
|
353
|
+
* @param {String} comparativePeriodStartWorkday The start work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
354
|
+
* @param {String} comparativePeriodEndWorkday The end work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
355
|
+
* @param {String} primaryPeriodStartWorkday The start work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
356
|
+
* @param {String} primaryPeriodEndWorkday The end work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
357
|
+
*/
|
|
358
|
+
getGamificationInsightsTrends(filterType, filterId, granularity, comparativePeriodStartWorkday, comparativePeriodEndWorkday, primaryPeriodStartWorkday, primaryPeriodEndWorkday) {
|
|
359
|
+
// verify the required parameter 'filterType' is set
|
|
360
|
+
if (filterType === undefined || filterType === null) {
|
|
361
|
+
throw 'Missing the required parameter "filterType" when calling getGamificationInsightsTrends';
|
|
362
|
+
}
|
|
363
|
+
// verify the required parameter 'filterId' is set
|
|
364
|
+
if (filterId === undefined || filterId === null) {
|
|
365
|
+
throw 'Missing the required parameter "filterId" when calling getGamificationInsightsTrends';
|
|
366
|
+
}
|
|
367
|
+
// verify the required parameter 'granularity' is set
|
|
368
|
+
if (granularity === undefined || granularity === null) {
|
|
369
|
+
throw 'Missing the required parameter "granularity" when calling getGamificationInsightsTrends';
|
|
370
|
+
}
|
|
371
|
+
// verify the required parameter 'comparativePeriodStartWorkday' is set
|
|
372
|
+
if (comparativePeriodStartWorkday === undefined || comparativePeriodStartWorkday === null) {
|
|
373
|
+
throw 'Missing the required parameter "comparativePeriodStartWorkday" when calling getGamificationInsightsTrends';
|
|
374
|
+
}
|
|
375
|
+
// verify the required parameter 'comparativePeriodEndWorkday' is set
|
|
376
|
+
if (comparativePeriodEndWorkday === undefined || comparativePeriodEndWorkday === null) {
|
|
377
|
+
throw 'Missing the required parameter "comparativePeriodEndWorkday" when calling getGamificationInsightsTrends';
|
|
378
|
+
}
|
|
379
|
+
// verify the required parameter 'primaryPeriodStartWorkday' is set
|
|
380
|
+
if (primaryPeriodStartWorkday === undefined || primaryPeriodStartWorkday === null) {
|
|
381
|
+
throw 'Missing the required parameter "primaryPeriodStartWorkday" when calling getGamificationInsightsTrends';
|
|
382
|
+
}
|
|
383
|
+
// verify the required parameter 'primaryPeriodEndWorkday' is set
|
|
384
|
+
if (primaryPeriodEndWorkday === undefined || primaryPeriodEndWorkday === null) {
|
|
385
|
+
throw 'Missing the required parameter "primaryPeriodEndWorkday" when calling getGamificationInsightsTrends';
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
return this.apiClient.callApi(
|
|
389
|
+
'/api/v2/gamification/insights/trends',
|
|
390
|
+
'GET',
|
|
391
|
+
{ },
|
|
392
|
+
{ 'filterType': filterType,'filterId': filterId,'granularity': granularity,'comparativePeriodStartWorkday': comparativePeriodStartWorkday,'comparativePeriodEndWorkday': comparativePeriodEndWorkday,'primaryPeriodStartWorkday': primaryPeriodStartWorkday,'primaryPeriodEndWorkday': primaryPeriodEndWorkday },
|
|
393
|
+
{ },
|
|
394
|
+
{ },
|
|
395
|
+
null,
|
|
396
|
+
['PureCloud OAuth'],
|
|
397
|
+
['application/json'],
|
|
398
|
+
['application/json']
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Get insights details for the user
|
|
404
|
+
*
|
|
405
|
+
* @param {String} userId The ID of a user.
|
|
406
|
+
* @param {Object} filterType Filter type for the query request.
|
|
407
|
+
* @param {String} filterId ID for the filter type.
|
|
408
|
+
* @param {Object} granularity Granularity
|
|
409
|
+
* @param {String} comparativePeriodStartWorkday The start work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
410
|
+
* @param {String} primaryPeriodStartWorkday The start work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
411
|
+
*/
|
|
412
|
+
getGamificationInsightsUserDetails(userId, filterType, filterId, granularity, comparativePeriodStartWorkday, primaryPeriodStartWorkday) {
|
|
413
|
+
// verify the required parameter 'userId' is set
|
|
414
|
+
if (userId === undefined || userId === null) {
|
|
415
|
+
throw 'Missing the required parameter "userId" when calling getGamificationInsightsUserDetails';
|
|
416
|
+
}
|
|
417
|
+
// verify the required parameter 'filterType' is set
|
|
418
|
+
if (filterType === undefined || filterType === null) {
|
|
419
|
+
throw 'Missing the required parameter "filterType" when calling getGamificationInsightsUserDetails';
|
|
420
|
+
}
|
|
421
|
+
// verify the required parameter 'filterId' is set
|
|
422
|
+
if (filterId === undefined || filterId === null) {
|
|
423
|
+
throw 'Missing the required parameter "filterId" when calling getGamificationInsightsUserDetails';
|
|
424
|
+
}
|
|
425
|
+
// verify the required parameter 'granularity' is set
|
|
426
|
+
if (granularity === undefined || granularity === null) {
|
|
427
|
+
throw 'Missing the required parameter "granularity" when calling getGamificationInsightsUserDetails';
|
|
428
|
+
}
|
|
429
|
+
// verify the required parameter 'comparativePeriodStartWorkday' is set
|
|
430
|
+
if (comparativePeriodStartWorkday === undefined || comparativePeriodStartWorkday === null) {
|
|
431
|
+
throw 'Missing the required parameter "comparativePeriodStartWorkday" when calling getGamificationInsightsUserDetails';
|
|
432
|
+
}
|
|
433
|
+
// verify the required parameter 'primaryPeriodStartWorkday' is set
|
|
434
|
+
if (primaryPeriodStartWorkday === undefined || primaryPeriodStartWorkday === null) {
|
|
435
|
+
throw 'Missing the required parameter "primaryPeriodStartWorkday" when calling getGamificationInsightsUserDetails';
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
return this.apiClient.callApi(
|
|
439
|
+
'/api/v2/gamification/insights/users/{userId}/details',
|
|
440
|
+
'GET',
|
|
441
|
+
{ 'userId': userId },
|
|
442
|
+
{ 'filterType': filterType,'filterId': filterId,'granularity': granularity,'comparativePeriodStartWorkday': comparativePeriodStartWorkday,'primaryPeriodStartWorkday': primaryPeriodStartWorkday },
|
|
443
|
+
{ },
|
|
444
|
+
{ },
|
|
445
|
+
null,
|
|
446
|
+
['PureCloud OAuth'],
|
|
447
|
+
['application/json'],
|
|
448
|
+
['application/json']
|
|
449
|
+
);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Get insights user trend for the user
|
|
454
|
+
*
|
|
455
|
+
* @param {String} userId The ID of a user.
|
|
456
|
+
* @param {Object} filterType Filter type for the query request.
|
|
457
|
+
* @param {String} filterId ID for the filter type.
|
|
458
|
+
* @param {Object} granularity Granularity
|
|
459
|
+
* @param {String} comparativePeriodStartWorkday The start work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
460
|
+
* @param {String} comparativePeriodEndWorkday The end work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
461
|
+
* @param {String} primaryPeriodStartWorkday The start work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
462
|
+
* @param {String} primaryPeriodEndWorkday The end work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
|
|
463
|
+
*/
|
|
464
|
+
getGamificationInsightsUserTrends(userId, filterType, filterId, granularity, comparativePeriodStartWorkday, comparativePeriodEndWorkday, primaryPeriodStartWorkday, primaryPeriodEndWorkday) {
|
|
465
|
+
// verify the required parameter 'userId' is set
|
|
466
|
+
if (userId === undefined || userId === null) {
|
|
467
|
+
throw 'Missing the required parameter "userId" when calling getGamificationInsightsUserTrends';
|
|
468
|
+
}
|
|
469
|
+
// verify the required parameter 'filterType' is set
|
|
470
|
+
if (filterType === undefined || filterType === null) {
|
|
471
|
+
throw 'Missing the required parameter "filterType" when calling getGamificationInsightsUserTrends';
|
|
472
|
+
}
|
|
473
|
+
// verify the required parameter 'filterId' is set
|
|
474
|
+
if (filterId === undefined || filterId === null) {
|
|
475
|
+
throw 'Missing the required parameter "filterId" when calling getGamificationInsightsUserTrends';
|
|
476
|
+
}
|
|
477
|
+
// verify the required parameter 'granularity' is set
|
|
478
|
+
if (granularity === undefined || granularity === null) {
|
|
479
|
+
throw 'Missing the required parameter "granularity" when calling getGamificationInsightsUserTrends';
|
|
480
|
+
}
|
|
481
|
+
// verify the required parameter 'comparativePeriodStartWorkday' is set
|
|
482
|
+
if (comparativePeriodStartWorkday === undefined || comparativePeriodStartWorkday === null) {
|
|
483
|
+
throw 'Missing the required parameter "comparativePeriodStartWorkday" when calling getGamificationInsightsUserTrends';
|
|
484
|
+
}
|
|
485
|
+
// verify the required parameter 'comparativePeriodEndWorkday' is set
|
|
486
|
+
if (comparativePeriodEndWorkday === undefined || comparativePeriodEndWorkday === null) {
|
|
487
|
+
throw 'Missing the required parameter "comparativePeriodEndWorkday" when calling getGamificationInsightsUserTrends';
|
|
488
|
+
}
|
|
489
|
+
// verify the required parameter 'primaryPeriodStartWorkday' is set
|
|
490
|
+
if (primaryPeriodStartWorkday === undefined || primaryPeriodStartWorkday === null) {
|
|
491
|
+
throw 'Missing the required parameter "primaryPeriodStartWorkday" when calling getGamificationInsightsUserTrends';
|
|
492
|
+
}
|
|
493
|
+
// verify the required parameter 'primaryPeriodEndWorkday' is set
|
|
494
|
+
if (primaryPeriodEndWorkday === undefined || primaryPeriodEndWorkday === null) {
|
|
495
|
+
throw 'Missing the required parameter "primaryPeriodEndWorkday" when calling getGamificationInsightsUserTrends';
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
return this.apiClient.callApi(
|
|
499
|
+
'/api/v2/gamification/insights/users/{userId}/trends',
|
|
500
|
+
'GET',
|
|
501
|
+
{ 'userId': userId },
|
|
502
|
+
{ 'filterType': filterType,'filterId': filterId,'granularity': granularity,'comparativePeriodStartWorkday': comparativePeriodStartWorkday,'comparativePeriodEndWorkday': comparativePeriodEndWorkday,'primaryPeriodStartWorkday': primaryPeriodStartWorkday,'primaryPeriodEndWorkday': primaryPeriodEndWorkday },
|
|
503
|
+
{ },
|
|
504
|
+
{ },
|
|
505
|
+
null,
|
|
506
|
+
['PureCloud OAuth'],
|
|
507
|
+
['application/json'],
|
|
508
|
+
['application/json']
|
|
509
|
+
);
|
|
510
|
+
}
|
|
511
|
+
|
|
98
512
|
/**
|
|
99
513
|
* Leaderboard of the requesting user's division or performance profile
|
|
100
514
|
*
|
|
@@ -1527,6 +1941,61 @@ class GamificationApi {
|
|
|
1527
1941
|
);
|
|
1528
1942
|
}
|
|
1529
1943
|
|
|
1944
|
+
/**
|
|
1945
|
+
* Query performance profiles in date range for a user
|
|
1946
|
+
*
|
|
1947
|
+
* @param {String} userId The ID of a user.
|
|
1948
|
+
* @param {Object} body The date range of work day.
|
|
1949
|
+
*/
|
|
1950
|
+
postGamificationProfilesUserQuery(userId, body) {
|
|
1951
|
+
// verify the required parameter 'userId' is set
|
|
1952
|
+
if (userId === undefined || userId === null) {
|
|
1953
|
+
throw 'Missing the required parameter "userId" when calling postGamificationProfilesUserQuery';
|
|
1954
|
+
}
|
|
1955
|
+
// verify the required parameter 'body' is set
|
|
1956
|
+
if (body === undefined || body === null) {
|
|
1957
|
+
throw 'Missing the required parameter "body" when calling postGamificationProfilesUserQuery';
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
return this.apiClient.callApi(
|
|
1961
|
+
'/api/v2/gamification/profiles/users/{userId}/query',
|
|
1962
|
+
'POST',
|
|
1963
|
+
{ 'userId': userId },
|
|
1964
|
+
{ },
|
|
1965
|
+
{ },
|
|
1966
|
+
{ },
|
|
1967
|
+
body,
|
|
1968
|
+
['PureCloud OAuth'],
|
|
1969
|
+
['application/json'],
|
|
1970
|
+
['application/json']
|
|
1971
|
+
);
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
/**
|
|
1975
|
+
* Query performance profiles in date range for the current user
|
|
1976
|
+
*
|
|
1977
|
+
* @param {Object} body The date range of work day.
|
|
1978
|
+
*/
|
|
1979
|
+
postGamificationProfilesUsersMeQuery(body) {
|
|
1980
|
+
// verify the required parameter 'body' is set
|
|
1981
|
+
if (body === undefined || body === null) {
|
|
1982
|
+
throw 'Missing the required parameter "body" when calling postGamificationProfilesUsersMeQuery';
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1985
|
+
return this.apiClient.callApi(
|
|
1986
|
+
'/api/v2/gamification/profiles/users/me/query',
|
|
1987
|
+
'POST',
|
|
1988
|
+
{ },
|
|
1989
|
+
{ },
|
|
1990
|
+
{ },
|
|
1991
|
+
{ },
|
|
1992
|
+
body,
|
|
1993
|
+
['PureCloud OAuth'],
|
|
1994
|
+
['application/json'],
|
|
1995
|
+
['application/json']
|
|
1996
|
+
);
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1530
1999
|
/**
|
|
1531
2000
|
* Updates a performance profile
|
|
1532
2001
|
*
|