-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathKalturaServices.js
9175 lines (8260 loc) · 288 KB
/
KalturaServices.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// ===================================================================================================
// _ __ _ _
// | |/ /__ _| | |_ _ _ _ _ __ _
// | ' </ _` | | _| || | '_/ _` |
// |_|\_\__,_|_|\__|\_,_|_| \__,_|
//
// This file is part of the Kaltura Collaborative Media Suite which allows users
// to do with audio, video, and animation what Wiki platforms allow them to do with
// text.
//
// Copyright (C) 2006-2023 Kaltura Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// @ignore
// ===================================================================================================
const kaltura = require('./KalturaClientBase');
/**
*Class definition for the Kaltura service: announcement.
* The available service actions:
* @action add Add a new future scheduled system announcement push notification.
* @action delete Delete an existing announcing. Announcement cannot be delete while being sent.
* @action enableSystemAnnouncements Enable system announcements.
* @action list Lists all announcements in the system.
* @action update Update an existing future system announcement push notification. Announcement can only be updated only before sending.
* @action updateStatus Update a system announcement status.
*/
class announcement{
/**
* Add a new future scheduled system announcement push notification.
* @param announcement Announcement The announcement to be added.
* timezone parameter should be taken from the 'name of timezone' from: https://msdn.microsoft.com/en-us/library/ms912391(v=winembedded.11).aspx
* Recipients values: All, LoggedIn, Guests
* @return KalturaAnnouncement
*/
static add(announcement){
let kparams = {};
kparams.announcement = announcement;
return new kaltura.RequestBuilder('announcement', 'add', kparams);
};
/**
* Delete an existing announcing. Announcement cannot be delete while being sent.
* @param id int Id of the announcement
* @return bool
*/
static deleteAction(id){
let kparams = {};
kparams.id = id;
return new kaltura.RequestBuilder('announcement', 'delete', kparams);
};
/**
* Enable system announcements.
* @return bool
*/
static enableSystemAnnouncements(){
let kparams = {};
return new kaltura.RequestBuilder('announcement', 'enableSystemAnnouncements', kparams);
};
/**
* Lists all announcements in the system.
* @param filter AnnouncementFilter Filter object
* @param pager FilterPager Paging the request (optional, default: null)
* @return KalturaAnnouncementListResponse
*/
static listAction(filter, pager = null){
let kparams = {};
kparams.filter = filter;
kparams.pager = pager;
return new kaltura.RequestBuilder('announcement', 'list', kparams);
};
/**
* Update an existing future system announcement push notification. Announcement can only be updated only before sending.
* @param announcementId int The announcement identifier
* @param announcement Announcement The announcement to update.
* timezone parameter should be taken from the 'name of timezone' from: https://msdn.microsoft.com/en-us/library/ms912391(v=winembedded.11).aspx
* Recipients values: All, LoggedIn, Guests
* @return KalturaAnnouncement
*/
static update(announcementId, announcement){
let kparams = {};
kparams.announcementId = announcementId;
kparams.announcement = announcement;
return new kaltura.RequestBuilder('announcement', 'update', kparams);
};
/**
* Update a system announcement status.
* @param id int Id of the announcement
* @param status bool Status to update to
* @return bool
*/
static updateStatus(id, status){
let kparams = {};
kparams.id = id;
kparams.status = status;
return new kaltura.RequestBuilder('announcement', 'updateStatus', kparams);
};
}
module.exports.announcement = announcement;
/**
*Class definition for the Kaltura service: appToken.
* The available service actions:
* @action add Add new application authentication token.
* @action delete Delete application authentication token by id.
* @action get Get application authentication token by id.
* @action startSession Starts a new KS (Kaltura Session) based on application authentication token id.
*/
class appToken{
/**
* Add new application authentication token.
* @param appToken AppToken Application token
* @return KalturaAppToken
*/
static add(appToken){
let kparams = {};
kparams.appToken = appToken;
return new kaltura.RequestBuilder('apptoken', 'add', kparams);
};
/**
* Delete application authentication token by id.
* @param id string Application token identifier
* @return bool
*/
static deleteAction(id){
let kparams = {};
kparams.id = id;
return new kaltura.RequestBuilder('apptoken', 'delete', kparams);
};
/**
* Get application authentication token by id.
* @param id string Application token identifier
* @return KalturaAppToken
*/
static get(id){
let kparams = {};
kparams.id = id;
return new kaltura.RequestBuilder('apptoken', 'get', kparams);
};
/**
* Starts a new KS (Kaltura Session) based on application authentication token id.
* @param id string application token id
* @param tokenHash string hashed token - current KS concatenated with the application token hashed using the application token ‘hashType’
* @param userId string session user id, will be ignored if a different user id already defined on the application token (optional, default: null)
* @param expiry int session expiry (in seconds), could be overwritten by shorter expiry of the application token and the session-expiry that defined on the application token (optional, default: null)
* @param udid string Device UDID (optional, default: null)
* @return KalturaSessionInfo
*/
static startSession(id, tokenHash, userId = null, expiry = null, udid = null){
let kparams = {};
kparams.id = id;
kparams.tokenHash = tokenHash;
kparams.userId = userId;
kparams.expiry = expiry;
kparams.udid = udid;
return new kaltura.RequestBuilder('apptoken', 'startSession', kparams);
};
}
module.exports.appToken = appToken;
/**
*Class definition for the Kaltura service: assetComment.
* The available service actions:
* @action add Add asset comments by asset id.
* @action list Returns asset comments by asset id.
*/
class assetComment{
/**
* Add asset comments by asset id.
* @param comment AssetComment comment
* @return KalturaAssetComment
*/
static add(comment){
let kparams = {};
kparams.comment = comment;
return new kaltura.RequestBuilder('assetcomment', 'add', kparams);
};
/**
* Returns asset comments by asset id.
* @param filter AssetCommentFilter Filtering the assets comments request
* @param pager FilterPager Page size and index (optional, default: null)
* @return KalturaAssetCommentListResponse
*/
static listAction(filter, pager = null){
let kparams = {};
kparams.filter = filter;
kparams.pager = pager;
return new kaltura.RequestBuilder('assetcomment', 'list', kparams);
};
}
module.exports.assetComment = assetComment;
/**
*Class definition for the Kaltura service: asset.
* The available service actions:
* @action add Add a new asset.
* For metas of type bool-> use kalturaBoolValue, type number-> KalturaDoubleValue, type date -> KalturaLongValue, type string -> KalturaStringValue.
* @action addFromBulkUpload Add new bulk upload batch job Conversion profile id can be specified in the API (note that the total request body size is limited to 10MB).
* @action count Returns a group-by result for media or EPG according to given filter. Lists values of each field and their respective count.
* @action delete Delete an existing asset.
* @action get Returns media or EPG asset by media / EPG internal or external identifier.
* Note: OPC accounts asset.get for internal identifier doesn't take under consideration personalized aspects neither shop limitations.
* @action getAdsContext Returns the data for ads control.
* @action getPlaybackContext This action delivers all data relevant for player.
* @action getPlaybackManifest This action delivers all data relevant for player.
* @action groupRepresentativeList Returns assets deduplicated by asset metadata (or supported asset's property).
* @action list Returns media or EPG assets. Filters by media identifiers or by EPG internal or external identifier.
* @action listPersonalSelection Returns recent selected assets.
* @action removeMetasAndTags remove metas and tags from asset.
* @action update update an existing asset.
* For metas of type bool-> use kalturaBoolValue, type number-> KalturaDoubleValue, type date -> KalturaLongValue, type string -> KalturaStringValue.
* @action watchBasedRecommendationsList Return list of assets - assets are personal recommendations for the caller.
*/
class asset{
/**
* Add a new asset.
* For metas of type bool-> use kalturaBoolValue, type number-> KalturaDoubleValue, type date -> KalturaLongValue, type string -> KalturaStringValue.
* @param asset Asset Asset object
* @return KalturaAsset
*/
static add(asset){
let kparams = {};
kparams.asset = asset;
return new kaltura.RequestBuilder('asset', 'add', kparams);
};
/**
* Add new bulk upload batch job Conversion profile id can be specified in the API (note that the total request body size is limited to 10MB).
* @param fileData file fileData
* @param bulkUploadJobData BulkUploadJobData bulkUploadJobData
* @param bulkUploadAssetData BulkUploadAssetData bulkUploadAssetData
* @return KalturaBulkUpload
*/
static addFromBulkUpload(fileData, bulkUploadJobData, bulkUploadAssetData){
let kparams = {};
let kfiles = {};
kfiles.fileData = fileData;
kparams.bulkUploadJobData = bulkUploadJobData;
kparams.bulkUploadAssetData = bulkUploadAssetData;
return new kaltura.RequestBuilder('asset', 'addFromBulkUpload', kparams, kfiles);
};
/**
* Returns a group-by result for media or EPG according to given filter. Lists values of each field and their respective count.
* @param filter SearchAssetFilter Filtering the assets request (optional, default: null)
* @return KalturaAssetCount
*/
static count(filter = null){
let kparams = {};
kparams.filter = filter;
return new kaltura.RequestBuilder('asset', 'count', kparams);
};
/**
* Delete an existing asset.
* @param id int Asset Identifier
* @param assetReferenceType string Type of asset (enum: KalturaAssetReferenceType)
* @return bool
*/
static deleteAction(id, assetReferenceType){
let kparams = {};
kparams.id = id;
kparams.assetReferenceType = assetReferenceType;
return new kaltura.RequestBuilder('asset', 'delete', kparams);
};
/**
* Returns media or EPG asset by media / EPG internal or external identifier.
* Note: OPC accounts asset.get for internal identifier doesn't take under consideration personalized aspects neither shop limitations.
* @param id string Asset identifier
* @param assetReferenceType string Asset type (enum: KalturaAssetReferenceType)
* @return KalturaAsset
*/
static get(id, assetReferenceType){
let kparams = {};
kparams.id = id;
kparams.assetReferenceType = assetReferenceType;
return new kaltura.RequestBuilder('asset', 'get', kparams);
};
/**
* Returns the data for ads control.
* @param assetId string Asset identifier
* @param assetType string Asset type (enum: KalturaAssetType)
* @param contextDataParams PlaybackContextOptions Parameters for the request
* @return KalturaAdsContext
*/
static getAdsContext(assetId, assetType, contextDataParams){
let kparams = {};
kparams.assetId = assetId;
kparams.assetType = assetType;
kparams.contextDataParams = contextDataParams;
return new kaltura.RequestBuilder('asset', 'getAdsContext', kparams);
};
/**
* This action delivers all data relevant for player.
* @param assetId string Asset identifier
* @param assetType string Asset type (enum: KalturaAssetType)
* @param contextDataParams PlaybackContextOptions Parameters for the request
* @param sourceType string Filter sources by type (optional, default: null)
* @return KalturaPlaybackContext
*/
static getPlaybackContext(assetId, assetType, contextDataParams, sourceType = null){
let kparams = {};
kparams.assetId = assetId;
kparams.assetType = assetType;
kparams.contextDataParams = contextDataParams;
kparams.sourceType = sourceType;
return new kaltura.RequestBuilder('asset', 'getPlaybackContext', kparams);
};
/**
* This action delivers all data relevant for player.
* @param assetId string Asset identifier
* @param assetType string Asset type (enum: KalturaAssetType)
* @param contextDataParams PlaybackContextOptions Parameters for the request
* @param sourceType string Filter sources by type (optional, default: null)
* @return KalturaPlaybackContext
*/
static getPlaybackManifest(assetId, assetType, contextDataParams, sourceType = null){
let kparams = {};
kparams.assetId = assetId;
kparams.assetType = assetType;
kparams.contextDataParams = contextDataParams;
kparams.sourceType = sourceType;
return new kaltura.RequestBuilder('asset', 'getPlaybackManifest', kparams);
};
/**
* Returns assets deduplicated by asset metadata (or supported asset's property).
* @param groupBy AssetGroupBy A metadata (or supported asset's property) to group by the assets
* @param unmatchedItemsPolicy string Defines the policy to handle assets that don't have groupBy property (enum: KalturaUnmatchedItemsPolicy)
* @param orderBy BaseAssetOrder A metadata or supported asset's property to sort by (optional, default: null)
* @param filter ListGroupsRepresentativesFilter Filtering the assets request (optional, default: null)
* @param selectionPolicy RepresentativeSelectionPolicy A policy that implements a well defined parametric process to select an asset out of group (optional, default: null)
* @param pager FilterPager Paging the request (optional, default: null)
* @return KalturaAssetListResponse
*/
static groupRepresentativeList(groupBy, unmatchedItemsPolicy, orderBy = null, filter = null, selectionPolicy = null, pager = null){
let kparams = {};
kparams.groupBy = groupBy;
kparams.unmatchedItemsPolicy = unmatchedItemsPolicy;
kparams.orderBy = orderBy;
kparams.filter = filter;
kparams.selectionPolicy = selectionPolicy;
kparams.pager = pager;
return new kaltura.RequestBuilder('asset', 'groupRepresentativeList', kparams);
};
/**
* Returns media or EPG assets. Filters by media identifiers or by EPG internal or external identifier.
* @param filter AssetFilter Filtering the assets request (optional, default: null)
* @param pager FilterPager Paging the request (optional, default: null)
* @return KalturaAssetListResponse
*/
static listAction(filter = null, pager = null){
let kparams = {};
kparams.filter = filter;
kparams.pager = pager;
return new kaltura.RequestBuilder('asset', 'list', kparams);
};
/**
* Returns recent selected assets.
* @param filter PersonalAssetSelectionFilter Filtering the assets request
* @return KalturaAssetListResponse
*/
static listPersonalSelection(filter){
let kparams = {};
kparams.filter = filter;
return new kaltura.RequestBuilder('asset', 'listPersonalSelection', kparams);
};
/**
* remove metas and tags from asset.
* @param id int Asset Identifier
* @param assetReferenceType string Type of asset (enum: KalturaAssetReferenceType)
* @param idIn string comma separated ids of metas and tags
* @return bool
*/
static removeMetasAndTags(id, assetReferenceType, idIn){
let kparams = {};
kparams.id = id;
kparams.assetReferenceType = assetReferenceType;
kparams.idIn = idIn;
return new kaltura.RequestBuilder('asset', 'removeMetasAndTags', kparams);
};
/**
* update an existing asset.
* For metas of type bool-> use kalturaBoolValue, type number-> KalturaDoubleValue, type date -> KalturaLongValue, type string -> KalturaStringValue.
* @param id int Asset Identifier
* @param asset Asset Asset object
* @return KalturaAsset
*/
static update(id, asset){
let kparams = {};
kparams.id = id;
kparams.asset = asset;
return new kaltura.RequestBuilder('asset', 'update', kparams);
};
/**
* Return list of assets - assets are personal recommendations for the caller.
* @param profileId int WatchBasedRecommendations profile id
* @return KalturaAssetListResponse
*/
static watchBasedRecommendationsList(profileId){
let kparams = {};
kparams.profileId = profileId;
return new kaltura.RequestBuilder('asset', 'watchBasedRecommendationsList', kparams);
};
}
module.exports.asset = asset;
/**
*Class definition for the Kaltura service: assetFile.
* The available service actions:
* @action getContext get KalturaAssetFileContext.
* @action playManifest Redirects to play manifest.
*/
class assetFile{
/**
* get KalturaAssetFileContext.
* @param id string Asset file identifier
* @param contextType string Kaltura Context Type (none = 0, recording = 1) (enum: KalturaContextType)
* @return KalturaAssetFileContext
*/
static getContext(id, contextType){
let kparams = {};
kparams.id = id;
kparams.contextType = contextType;
return new kaltura.RequestBuilder('assetfile', 'getContext', kparams);
};
/**
* Redirects to play manifest.
* @param partnerId int Partner identifier
* @param assetId string Asset identifier
* @param assetType string Asset type (enum: KalturaAssetType)
* @param assetFileId int Asset file identifier
* @param contextType string Playback context type (enum: KalturaPlaybackContextType)
* @param ks string Kaltura session for the user, not mandatory for anonymous user (optional, default: null)
* @param tokenizedUrl string Tokenized Url, not mandatory (optional, default: null)
* @param isAltUrl bool Is alternative url (optional, default: false)
* @return KalturaAssetFile
*/
static playManifest(partnerId, assetId, assetType, assetFileId, contextType, ks = null, tokenizedUrl = null, isAltUrl = false){
let kparams = {};
kparams.partnerId = partnerId;
kparams.assetId = assetId;
kparams.assetType = assetType;
kparams.assetFileId = assetFileId;
kparams.contextType = contextType;
kparams.ks = ks;
kparams.tokenizedUrl = tokenizedUrl;
kparams.isAltUrl = isAltUrl;
return new kaltura.RequestBuilder('assetfile', 'playManifest', kparams);
};
}
module.exports.assetFile = assetFile;
/**
*Class definition for the Kaltura service: assetFilePpv.
* The available service actions:
* @action add Add asset file ppv.
* @action delete Delete asset file ppv.
* @action list Return a list of asset files ppvs for the account with optional filter.
* @action update Update assetFilePpv.
*/
class assetFilePpv{
/**
* Add asset file ppv.
* @param assetFilePpv AssetFilePpv asset file ppv
* @return KalturaAssetFilePpv
*/
static add(assetFilePpv){
let kparams = {};
kparams.assetFilePpv = assetFilePpv;
return new kaltura.RequestBuilder('assetfileppv', 'add', kparams);
};
/**
* Delete asset file ppv.
* @param assetFileId int Asset file id
* @param ppvModuleId int Ppv module id
* @return bool
*/
static deleteAction(assetFileId, ppvModuleId){
let kparams = {};
kparams.assetFileId = assetFileId;
kparams.ppvModuleId = ppvModuleId;
return new kaltura.RequestBuilder('assetfileppv', 'delete', kparams);
};
/**
* Return a list of asset files ppvs for the account with optional filter.
* @param filter AssetFilePpvFilter Filter parameters for filtering out the result
* @return KalturaAssetFilePpvListResponse
*/
static listAction(filter){
let kparams = {};
kparams.filter = filter;
return new kaltura.RequestBuilder('assetfileppv', 'list', kparams);
};
/**
* Update assetFilePpv.
* @param assetFileId int Asset file id
* @param ppvModuleId int Ppv module id
* @param assetFilePpv AssetFilePpv assetFilePpv
* @return KalturaAssetFilePpv
*/
static update(assetFileId, ppvModuleId, assetFilePpv){
let kparams = {};
kparams.assetFileId = assetFileId;
kparams.ppvModuleId = ppvModuleId;
kparams.assetFilePpv = assetFilePpv;
return new kaltura.RequestBuilder('assetfileppv', 'update', kparams);
};
}
module.exports.assetFilePpv = assetFilePpv;
/**
*Class definition for the Kaltura service: assetHistory.
* The available service actions:
* @action clean Clean the user’s viewing history.
* @action getNextEpisode Get next episode by last watch asset in given assetId.
* @action list Get recently watched media for user, ordered by recently watched first.
*/
class assetHistory{
/**
* Clean the user’s viewing history.
* @param filter AssetHistoryFilter List of assets identifier (optional, default: null)
*/
static clean(filter = null){
let kparams = {};
kparams.filter = filter;
return new kaltura.RequestBuilder('assethistory', 'clean', kparams);
};
/**
* Get next episode by last watch asset in given assetId.
* @param assetId int asset Id of series to search for next episode (optional, default: null)
* @param seriesIdArguments SeriesIdArguments series Id arguments (optional, default: null)
* @param notWatchedReturnStrategy string not watched any episode strategy (optional, enum: KalturaNotWatchedReturnStrategy, default: null)
* @param watchedAllReturnStrategy string watched all series episodes strategy (optional, enum: KalturaWatchedAllReturnStrategy, default: null)
* @return KalturaAssetHistory
*/
static getNextEpisode(assetId = null, seriesIdArguments = null, notWatchedReturnStrategy = null, watchedAllReturnStrategy = null){
let kparams = {};
kparams.assetId = assetId;
kparams.seriesIdArguments = seriesIdArguments;
kparams.notWatchedReturnStrategy = notWatchedReturnStrategy;
kparams.watchedAllReturnStrategy = watchedAllReturnStrategy;
return new kaltura.RequestBuilder('assethistory', 'getNextEpisode', kparams);
};
/**
* Get recently watched media for user, ordered by recently watched first.
* @param filter AssetHistoryFilter Filter parameters for filtering out the result (optional, default: null)
* @param pager FilterPager Page size and index. Number of assets to return per page. Possible range 5 ≤ size ≥ 50. If omitted - will be set to 25. If a value > 50 provided – will set to 50 (optional, default: null)
* @return KalturaAssetHistoryListResponse
*/
static listAction(filter = null, pager = null){
let kparams = {};
kparams.filter = filter;
kparams.pager = pager;
return new kaltura.RequestBuilder('assethistory', 'list', kparams);
};
}
module.exports.assetHistory = assetHistory;
/**
*Class definition for the Kaltura service: assetPersonalMarkup.
* The available service actions:
* @action list Response with list of assetPersonalMarkup.
*/
class assetPersonalMarkup{
/**
* Response with list of assetPersonalMarkup.
* @param filter AssetPersonalMarkupSearchFilter Filter pager
* @return KalturaAssetPersonalMarkupListResponse
*/
static listAction(filter){
let kparams = {};
kparams.filter = filter;
return new kaltura.RequestBuilder('assetpersonalmarkup', 'list', kparams);
};
}
module.exports.assetPersonalMarkup = assetPersonalMarkup;
/**
*Class definition for the Kaltura service: assetPersonalSelection.
* The available service actions:
* @action delete Remove asset selection in slot.
* @action deleteAll Remove asset selection in slot.
* @action upsert Add or update asset selection in slot.
*/
class assetPersonalSelection{
/**
* Remove asset selection in slot.
* @param assetId int asset id
* @param assetType string asset type: media/epg (enum: KalturaAssetType)
* @param slotNumber int slot number
*/
static deleteAction(assetId, assetType, slotNumber){
let kparams = {};
kparams.assetId = assetId;
kparams.assetType = assetType;
kparams.slotNumber = slotNumber;
return new kaltura.RequestBuilder('assetpersonalselection', 'delete', kparams);
};
/**
* Remove asset selection in slot.
* @param slotNumber int slot number
*/
static deleteAll(slotNumber){
let kparams = {};
kparams.slotNumber = slotNumber;
return new kaltura.RequestBuilder('assetpersonalselection', 'deleteAll', kparams);
};
/**
* Add or update asset selection in slot.
* @param assetId int asset id
* @param assetType string asset type: media/epg (enum: KalturaAssetType)
* @param slotNumber int slot number
* @return KalturaAssetPersonalSelection
*/
static upsert(assetId, assetType, slotNumber){
let kparams = {};
kparams.assetId = assetId;
kparams.assetType = assetType;
kparams.slotNumber = slotNumber;
return new kaltura.RequestBuilder('assetpersonalselection', 'upsert', kparams);
};
}
module.exports.assetPersonalSelection = assetPersonalSelection;
/**
*Class definition for the Kaltura service: assetRule.
* The available service actions:
* @action add Add asset rule.
* @action delete Delete asset rule.
* @action list Get the list of asset rules for the partner.
* @action update Update asset rule.
*/
class assetRule{
/**
* Add asset rule.
* @param assetRule AssetRule Asset rule
* @return KalturaAssetRule
*/
static add(assetRule){
let kparams = {};
kparams.assetRule = assetRule;
return new kaltura.RequestBuilder('assetrule', 'add', kparams);
};
/**
* Delete asset rule.
* @param id int Asset rule ID
* @return bool
*/
static deleteAction(id){
let kparams = {};
kparams.id = id;
return new kaltura.RequestBuilder('assetrule', 'delete', kparams);
};
/**
* Get the list of asset rules for the partner.
* @param filter AssetRuleFilter filter by condition name (optional, default: null)
* @return KalturaAssetRuleListResponse
*/
static listAction(filter = null){
let kparams = {};
kparams.filter = filter;
return new kaltura.RequestBuilder('assetrule', 'list', kparams);
};
/**
* Update asset rule.
* @param id int Asset rule ID to update
* @param assetRule AssetRule Asset rule
* @return KalturaAssetRule
*/
static update(id, assetRule){
let kparams = {};
kparams.id = id;
kparams.assetRule = assetRule;
return new kaltura.RequestBuilder('assetrule', 'update', kparams);
};
}
module.exports.assetRule = assetRule;
/**
*Class definition for the Kaltura service: assetStatistics.
* The available service actions:
* @action query Returns statistics for given list of assets by type and / or time period.
* Supported values for KalturaAssetStatisticsQuery.assetTypeEqual : KalturaAssetType.media, KalturaAssetType.epg.
*/
class assetStatistics{
/**
* Returns statistics for given list of assets by type and / or time period.
* Supported values for KalturaAssetStatisticsQuery.assetTypeEqual : KalturaAssetType.media, KalturaAssetType.epg.
* @param query AssetStatisticsQuery Query for assets statistics
* @return KalturaAssetStatisticsListResponse
*/
static query(query){
let kparams = {};
kparams.query = query;
return new kaltura.RequestBuilder('assetstatistics', 'query', kparams);
};
}
module.exports.assetStatistics = assetStatistics;
/**
*Class definition for the Kaltura service: assetStruct.
* The available service actions:
* @action add Add a new assetStruct.
* @action delete Delete an existing assetStruct.
* @action get Get AssetStruct by ID.
* @action list Return a list of asset structs for the account with optional filter.
* @action update Update an existing assetStruct.
*/
class assetStruct{
/**
* Add a new assetStruct.
* @param assetStruct AssetStruct AssetStruct Object
* @return KalturaAssetStruct
*/
static add(assetStruct){
let kparams = {};
kparams.assetStruct = assetStruct;
return new kaltura.RequestBuilder('assetstruct', 'add', kparams);
};
/**
* Delete an existing assetStruct.
* @param id int AssetStruct Identifier, id = 0 is identified as program AssetStruct
* @return bool
*/
static deleteAction(id){
let kparams = {};
kparams.id = id;
return new kaltura.RequestBuilder('assetstruct', 'delete', kparams);
};
/**
* Get AssetStruct by ID.
* @param id int ID to get
* @return KalturaAssetStruct
*/
static get(id){
let kparams = {};
kparams.id = id;
return new kaltura.RequestBuilder('assetstruct', 'get', kparams);
};
/**
* Return a list of asset structs for the account with optional filter.
* @param filter BaseAssetStructFilter Filter parameters for filtering out the result (optional, default: null)
* @return KalturaAssetStructListResponse
*/
static listAction(filter = null){
let kparams = {};
kparams.filter = filter;
return new kaltura.RequestBuilder('assetstruct', 'list', kparams);
};
/**
* Update an existing assetStruct.
* @param id int AssetStruct Identifier, id = 0 is identified as program AssetStruct
* @param assetStruct AssetStruct AssetStruct Object
* @return KalturaAssetStruct
*/
static update(id, assetStruct){
let kparams = {};
kparams.id = id;
kparams.assetStruct = assetStruct;
return new kaltura.RequestBuilder('assetstruct', 'update', kparams);
};
}
module.exports.assetStruct = assetStruct;
/**
*Class definition for the Kaltura service: assetStructMeta.
* The available service actions:
* @action list Return a list of asset struct metas for the account with optional filter.
* @action update Update Asset struct meta.
*/
class assetStructMeta{
/**
* Return a list of asset struct metas for the account with optional filter.
* @param filter AssetStructMetaFilter Filter parameters for filtering out the result
* @return KalturaAssetStructMetaListResponse
*/
static listAction(filter){
let kparams = {};
kparams.filter = filter;
return new kaltura.RequestBuilder('assetstructmeta', 'list', kparams);
};
/**
* Update Asset struct meta.
* @param assetStructId int AssetStruct Identifier
* @param metaId int Meta Identifier
* @param assetStructMeta AssetStructMeta AssetStructMeta Object
* @return KalturaAssetStructMeta
*/
static update(assetStructId, metaId, assetStructMeta){
let kparams = {};
kparams.assetStructId = assetStructId;
kparams.metaId = metaId;
kparams.assetStructMeta = assetStructMeta;
return new kaltura.RequestBuilder('assetstructmeta', 'update', kparams);
};
}
module.exports.assetStructMeta = assetStructMeta;
/**
*Class definition for the Kaltura service: assetUserRule.
* The available service actions:
* @action add Add asset user rule.
* @action attachUser Attach AssetUserRule To User.
* @action delete Delete asset user rule.
* @action detachUser Detach AssetUserRule from user.
* @action list Get the list of asset user rules for the partner.
* @action update Update asset user rule.
*/
class assetUserRule{
/**
* Add asset user rule.
* @param assetUserRule AssetUserRule Asset user rule
* @return KalturaAssetUserRule
*/
static add(assetUserRule){
let kparams = {};
kparams.assetUserRule = assetUserRule;
return new kaltura.RequestBuilder('assetuserrule', 'add', kparams);
};
/**
* Attach AssetUserRule To User.
* @param ruleId int AssetUserRule id to add
*/
static attachUser(ruleId){
let kparams = {};
kparams.ruleId = ruleId;
return new kaltura.RequestBuilder('assetuserrule', 'attachUser', kparams);
};
/**
* Delete asset user rule.
* @param id int Asset user rule ID
*/
static deleteAction(id){
let kparams = {};
kparams.id = id;
return new kaltura.RequestBuilder('assetuserrule', 'delete', kparams);
};
/**
* Detach AssetUserRule from user.
* @param ruleId int AssetUserRule id to remove
*/
static detachUser(ruleId){
let kparams = {};
kparams.ruleId = ruleId;
return new kaltura.RequestBuilder('assetuserrule', 'detachUser', kparams);
};
/**
* Get the list of asset user rules for the partner.
* @param filter AssetUserRuleFilter AssetUserRule Filter (optional, default: null)
* @return KalturaAssetUserRuleListResponse
*/
static listAction(filter = null){
let kparams = {};
kparams.filter = filter;
return new kaltura.RequestBuilder('assetuserrule', 'list', kparams);
};
/**
* Update asset user rule.
* @param id int Asset user rule ID to update
* @param assetUserRule AssetUserRule Asset user rule
* @return KalturaAssetUserRule
*/
static update(id, assetUserRule){
let kparams = {};
kparams.id = id;
kparams.assetUserRule = assetUserRule;
return new kaltura.RequestBuilder('assetuserrule', 'update', kparams);
};
}
module.exports.assetUserRule = assetUserRule;
/**
*Class definition for the Kaltura service: bookmark.
* The available service actions:
* @action add Report player position and action for the user on the watched asset. Player position is used to later allow resume watching.
* @action list Returns player position record/s for the requested asset and the requesting user.
* If default user makes the request – player position records are provided for all of the users in the household.
* If non-default user makes the request - player position records are provided for the requesting user and the default user of the household.
*/
class bookmark{
/**
* Report player position and action for the user on the watched asset. Player position is used to later allow resume watching.
* @param bookmark Bookmark Bookmark details
* @return bool
*/
static add(bookmark){
let kparams = {};
kparams.bookmark = bookmark;
return new kaltura.RequestBuilder('bookmark', 'add', kparams);
};
/**
* Returns player position record/s for the requested asset and the requesting user.
* If default user makes the request – player position records are provided for all of the users in the household.
* If non-default user makes the request - player position records are provided for the requesting user and the default user of the household.
* @param filter BookmarkFilter Filter option for the last position
* @return KalturaBookmarkListResponse
*/
static listAction(filter){
let kparams = {};
kparams.filter = filter;
return new kaltura.RequestBuilder('bookmark', 'list', kparams);
};
}
module.exports.bookmark = bookmark;
/**
*Class definition for the Kaltura service: bulkUpload.
* The available service actions:
* @action get Get BulkUpload by ID.
* @action list Get list of KalturaBulkUpload by filter.
*/
class bulkUpload{
/**
* Get BulkUpload by ID.
* @param id int ID to get
* @return KalturaBulkUpload
*/