@guardian/bridget 8.11.0 → 8.12.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/Videos.d.ts +35 -0
- package/Videos.js +242 -20
- package/package.json +1 -1
package/Videos.d.ts
CHANGED
|
@@ -58,6 +58,22 @@ export declare class SendVideoEvent__Args extends thrift.StructLike implements I
|
|
|
58
58
|
static write(args: ISendVideoEvent__ArgsArgs, output: thrift.TProtocol): void;
|
|
59
59
|
write(output: thrift.TProtocol): void;
|
|
60
60
|
}
|
|
61
|
+
export interface ISendVideoAttentionTimes__Args {
|
|
62
|
+
componentAttentionMs: Map<string, thrift.Int64>;
|
|
63
|
+
}
|
|
64
|
+
export interface ISendVideoAttentionTimes__ArgsArgs {
|
|
65
|
+
componentAttentionMs: Map<string, number | string | thrift.Int64>;
|
|
66
|
+
}
|
|
67
|
+
export declare const SendVideoAttentionTimes__ArgsCodec: thrift.IStructCodec<ISendVideoAttentionTimes__ArgsArgs, ISendVideoAttentionTimes__Args>;
|
|
68
|
+
export declare class SendVideoAttentionTimes__Args extends thrift.StructLike implements ISendVideoAttentionTimes__Args {
|
|
69
|
+
componentAttentionMs: Map<string, thrift.Int64>;
|
|
70
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
71
|
+
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
72
|
+
constructor(args: ISendVideoAttentionTimes__ArgsArgs);
|
|
73
|
+
static read(input: thrift.TProtocol): SendVideoAttentionTimes__Args;
|
|
74
|
+
static write(args: ISendVideoAttentionTimes__ArgsArgs, output: thrift.TProtocol): void;
|
|
75
|
+
write(output: thrift.TProtocol): void;
|
|
76
|
+
}
|
|
61
77
|
export interface ISetFullscreen__Args {
|
|
62
78
|
isFullscreen: boolean;
|
|
63
79
|
}
|
|
@@ -135,6 +151,22 @@ export declare class SendVideoEvent__Result extends thrift.StructLike implements
|
|
|
135
151
|
static write(args: ISendVideoEvent__ResultArgs, output: thrift.TProtocol): void;
|
|
136
152
|
write(output: thrift.TProtocol): void;
|
|
137
153
|
}
|
|
154
|
+
export interface ISendVideoAttentionTimes__Result {
|
|
155
|
+
success?: void;
|
|
156
|
+
}
|
|
157
|
+
export interface ISendVideoAttentionTimes__ResultArgs {
|
|
158
|
+
success?: void;
|
|
159
|
+
}
|
|
160
|
+
export declare const SendVideoAttentionTimes__ResultCodec: thrift.IStructCodec<ISendVideoAttentionTimes__ResultArgs, ISendVideoAttentionTimes__Result>;
|
|
161
|
+
export declare class SendVideoAttentionTimes__Result extends thrift.StructLike implements ISendVideoAttentionTimes__Result {
|
|
162
|
+
success?: void;
|
|
163
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
164
|
+
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
165
|
+
constructor(args?: ISendVideoAttentionTimes__ResultArgs);
|
|
166
|
+
static read(input: thrift.TProtocol): SendVideoAttentionTimes__Result;
|
|
167
|
+
static write(args: ISendVideoAttentionTimes__ResultArgs, output: thrift.TProtocol): void;
|
|
168
|
+
write(output: thrift.TProtocol): void;
|
|
169
|
+
}
|
|
138
170
|
export interface ISetFullscreen__Result {
|
|
139
171
|
success?: boolean;
|
|
140
172
|
}
|
|
@@ -182,6 +214,7 @@ export declare class Client<Context = any> extends thrift.ThriftClient<Context>
|
|
|
182
214
|
insertVideos(videoSlots: Array<VideoSlot.IVideoSlotArgs>, context?: Context): Promise<void>;
|
|
183
215
|
updateVideos(videoSlots: Array<VideoSlot.IVideoSlotArgs>, context?: Context): Promise<void>;
|
|
184
216
|
sendVideoEvent(videoEvent: VideoEvent.IVideoEventArgs, context?: Context): Promise<void>;
|
|
217
|
+
sendVideoAttentionTimes(componentAttentionMs: Map<string, number | string | thrift.Int64>, context?: Context): Promise<void>;
|
|
185
218
|
setFullscreen(isFullscreen: boolean, context?: Context): Promise<boolean>;
|
|
186
219
|
isAutoplayEnabled(context?: Context): Promise<boolean>;
|
|
187
220
|
}
|
|
@@ -189,6 +222,7 @@ export interface IHandler<Context = any> {
|
|
|
189
222
|
insertVideos(videoSlots: Array<VideoSlot.IVideoSlot>, context?: Context): void | Promise<void>;
|
|
190
223
|
updateVideos(videoSlots: Array<VideoSlot.IVideoSlot>, context?: Context): void | Promise<void>;
|
|
191
224
|
sendVideoEvent(videoEvent: VideoEvent.IVideoEvent, context?: Context): void | Promise<void>;
|
|
225
|
+
sendVideoAttentionTimes(componentAttentionMs: Map<string, thrift.Int64>, context?: Context): void | Promise<void>;
|
|
192
226
|
setFullscreen(isFullscreen: boolean, context?: Context): boolean | Promise<boolean>;
|
|
193
227
|
isAutoplayEnabled(context?: Context): boolean | Promise<boolean>;
|
|
194
228
|
}
|
|
@@ -207,6 +241,7 @@ export declare class Processor<Context = any> extends thrift.ThriftProcessor<Con
|
|
|
207
241
|
process_insertVideos(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
208
242
|
process_updateVideos(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
209
243
|
process_sendVideoEvent(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
244
|
+
process_sendVideoAttentionTimes(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
210
245
|
process_setFullscreen(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
211
246
|
process_isAutoplayEnabled(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
212
247
|
}
|
package/Videos.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Processor = exports.Client = exports.IsAutoplayEnabled__Result = exports.IsAutoplayEnabled__ResultCodec = exports.SetFullscreen__Result = exports.SetFullscreen__ResultCodec = exports.SendVideoEvent__Result = exports.SendVideoEvent__ResultCodec = exports.UpdateVideos__Result = exports.UpdateVideos__ResultCodec = exports.InsertVideos__Result = exports.InsertVideos__ResultCodec = exports.IsAutoplayEnabled__Args = exports.IsAutoplayEnabled__ArgsCodec = exports.SetFullscreen__Args = exports.SetFullscreen__ArgsCodec = exports.SendVideoEvent__Args = exports.SendVideoEvent__ArgsCodec = exports.UpdateVideos__Args = exports.UpdateVideos__ArgsCodec = exports.InsertVideos__Args = exports.InsertVideos__ArgsCodec = exports.methodParameters = exports.methodNames = exports.methodAnnotations = exports.annotations = exports.serviceName = void 0;
|
|
26
|
+
exports.Processor = exports.Client = exports.IsAutoplayEnabled__Result = exports.IsAutoplayEnabled__ResultCodec = exports.SetFullscreen__Result = exports.SetFullscreen__ResultCodec = exports.SendVideoAttentionTimes__Result = exports.SendVideoAttentionTimes__ResultCodec = exports.SendVideoEvent__Result = exports.SendVideoEvent__ResultCodec = exports.UpdateVideos__Result = exports.UpdateVideos__ResultCodec = exports.InsertVideos__Result = exports.InsertVideos__ResultCodec = exports.IsAutoplayEnabled__Args = exports.IsAutoplayEnabled__ArgsCodec = exports.SetFullscreen__Args = exports.SetFullscreen__ArgsCodec = exports.SendVideoAttentionTimes__Args = exports.SendVideoAttentionTimes__ArgsCodec = exports.SendVideoEvent__Args = exports.SendVideoEvent__ArgsCodec = exports.UpdateVideos__Args = exports.UpdateVideos__ArgsCodec = exports.InsertVideos__Args = exports.InsertVideos__ArgsCodec = exports.methodParameters = exports.methodNames = exports.methodAnnotations = exports.annotations = exports.serviceName = void 0;
|
|
27
27
|
/* tslint:disable */
|
|
28
28
|
/* eslint-disable */
|
|
29
29
|
/*
|
|
@@ -48,6 +48,10 @@ exports.methodAnnotations = {
|
|
|
48
48
|
annotations: {},
|
|
49
49
|
fieldAnnotations: {}
|
|
50
50
|
},
|
|
51
|
+
sendVideoAttentionTimes: {
|
|
52
|
+
annotations: {},
|
|
53
|
+
fieldAnnotations: {}
|
|
54
|
+
},
|
|
51
55
|
setFullscreen: {
|
|
52
56
|
annotations: {},
|
|
53
57
|
fieldAnnotations: {}
|
|
@@ -57,11 +61,12 @@ exports.methodAnnotations = {
|
|
|
57
61
|
fieldAnnotations: {}
|
|
58
62
|
}
|
|
59
63
|
};
|
|
60
|
-
exports.methodNames = ["insertVideos", "updateVideos", "sendVideoEvent", "setFullscreen", "isAutoplayEnabled"];
|
|
64
|
+
exports.methodNames = ["insertVideos", "updateVideos", "sendVideoEvent", "sendVideoAttentionTimes", "setFullscreen", "isAutoplayEnabled"];
|
|
61
65
|
exports.methodParameters = {
|
|
62
66
|
insertVideos: 2,
|
|
63
67
|
updateVideos: 2,
|
|
64
68
|
sendVideoEvent: 2,
|
|
69
|
+
sendVideoAttentionTimes: 2,
|
|
65
70
|
setFullscreen: 2,
|
|
66
71
|
isAutoplayEnabled: 1
|
|
67
72
|
};
|
|
@@ -332,6 +337,103 @@ class SendVideoEvent__Args extends thrift.StructLike {
|
|
|
332
337
|
}
|
|
333
338
|
}
|
|
334
339
|
exports.SendVideoEvent__Args = SendVideoEvent__Args;
|
|
340
|
+
exports.SendVideoAttentionTimes__ArgsCodec = {
|
|
341
|
+
encode(args, output) {
|
|
342
|
+
const obj = {
|
|
343
|
+
componentAttentionMs: args.componentAttentionMs
|
|
344
|
+
};
|
|
345
|
+
output.writeStructBegin("SendVideoAttentionTimes__Args");
|
|
346
|
+
if (obj.componentAttentionMs != null) {
|
|
347
|
+
output.writeFieldBegin("componentAttentionMs", thrift.TType.MAP, 1);
|
|
348
|
+
output.writeMapBegin(thrift.TType.STRING, thrift.TType.I64, obj.componentAttentionMs.size);
|
|
349
|
+
obj.componentAttentionMs.forEach((value_15, key_1) => {
|
|
350
|
+
output.writeString(key_1);
|
|
351
|
+
output.writeI64((typeof value_15 === "number" ? new thrift.Int64(value_15) : typeof value_15 === "string" ? thrift.Int64.fromDecimalString(value_15) : value_15));
|
|
352
|
+
});
|
|
353
|
+
output.writeMapEnd();
|
|
354
|
+
output.writeFieldEnd();
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[componentAttentionMs] is unset!");
|
|
358
|
+
}
|
|
359
|
+
output.writeFieldStop();
|
|
360
|
+
output.writeStructEnd();
|
|
361
|
+
return;
|
|
362
|
+
},
|
|
363
|
+
decode(input) {
|
|
364
|
+
let _args = {};
|
|
365
|
+
input.readStructBegin();
|
|
366
|
+
while (true) {
|
|
367
|
+
const ret = input.readFieldBegin();
|
|
368
|
+
const fieldType = ret.fieldType;
|
|
369
|
+
const fieldId = ret.fieldId;
|
|
370
|
+
if (fieldType === thrift.TType.STOP) {
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
switch (fieldId) {
|
|
374
|
+
case 1:
|
|
375
|
+
if (fieldType === thrift.TType.MAP) {
|
|
376
|
+
const value_16 = new Map();
|
|
377
|
+
const metadata_3 = input.readMapBegin();
|
|
378
|
+
const size_3 = metadata_3.size;
|
|
379
|
+
for (let i_3 = 0; i_3 < size_3; i_3++) {
|
|
380
|
+
const key_2 = input.readString();
|
|
381
|
+
const value_17 = input.readI64();
|
|
382
|
+
value_16.set(key_2, value_17);
|
|
383
|
+
}
|
|
384
|
+
input.readMapEnd();
|
|
385
|
+
_args.componentAttentionMs = value_16;
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
input.skip(fieldType);
|
|
389
|
+
}
|
|
390
|
+
break;
|
|
391
|
+
default: {
|
|
392
|
+
input.skip(fieldType);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
input.readFieldEnd();
|
|
396
|
+
}
|
|
397
|
+
input.readStructEnd();
|
|
398
|
+
if (_args.componentAttentionMs !== undefined) {
|
|
399
|
+
return {
|
|
400
|
+
componentAttentionMs: _args.componentAttentionMs
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
else {
|
|
404
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Unable to read SendVideoAttentionTimes__Args from input");
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
class SendVideoAttentionTimes__Args extends thrift.StructLike {
|
|
409
|
+
constructor(args) {
|
|
410
|
+
super();
|
|
411
|
+
this._annotations = {};
|
|
412
|
+
this._fieldAnnotations = {};
|
|
413
|
+
if (args.componentAttentionMs != null) {
|
|
414
|
+
const value_18 = new Map();
|
|
415
|
+
args.componentAttentionMs.forEach((value_19, key_3) => {
|
|
416
|
+
const value_20 = (typeof value_19 === "number" ? new thrift.Int64(value_19) : typeof value_19 === "string" ? thrift.Int64.fromDecimalString(value_19) : value_19);
|
|
417
|
+
const key_4 = key_3;
|
|
418
|
+
value_18.set(key_4, value_20);
|
|
419
|
+
});
|
|
420
|
+
this.componentAttentionMs = value_18;
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[componentAttentionMs] is unset!");
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
static read(input) {
|
|
427
|
+
return new SendVideoAttentionTimes__Args(exports.SendVideoAttentionTimes__ArgsCodec.decode(input));
|
|
428
|
+
}
|
|
429
|
+
static write(args, output) {
|
|
430
|
+
return exports.SendVideoAttentionTimes__ArgsCodec.encode(args, output);
|
|
431
|
+
}
|
|
432
|
+
write(output) {
|
|
433
|
+
return exports.SendVideoAttentionTimes__ArgsCodec.encode(this, output);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
exports.SendVideoAttentionTimes__Args = SendVideoAttentionTimes__Args;
|
|
335
437
|
exports.SetFullscreen__ArgsCodec = {
|
|
336
438
|
encode(args, output) {
|
|
337
439
|
const obj = {
|
|
@@ -363,8 +465,8 @@ exports.SetFullscreen__ArgsCodec = {
|
|
|
363
465
|
switch (fieldId) {
|
|
364
466
|
case 1:
|
|
365
467
|
if (fieldType === thrift.TType.BOOL) {
|
|
366
|
-
const
|
|
367
|
-
_args.isFullscreen =
|
|
468
|
+
const value_21 = input.readBool();
|
|
469
|
+
_args.isFullscreen = value_21;
|
|
368
470
|
}
|
|
369
471
|
else {
|
|
370
472
|
input.skip(fieldType);
|
|
@@ -393,8 +495,8 @@ class SetFullscreen__Args extends thrift.StructLike {
|
|
|
393
495
|
this._annotations = {};
|
|
394
496
|
this._fieldAnnotations = {};
|
|
395
497
|
if (args.isFullscreen != null) {
|
|
396
|
-
const
|
|
397
|
-
this.isFullscreen =
|
|
498
|
+
const value_22 = args.isFullscreen;
|
|
499
|
+
this.isFullscreen = value_22;
|
|
398
500
|
}
|
|
399
501
|
else {
|
|
400
502
|
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[isFullscreen] is unset!");
|
|
@@ -499,8 +601,8 @@ class InsertVideos__Result extends thrift.StructLike {
|
|
|
499
601
|
this._annotations = {};
|
|
500
602
|
this._fieldAnnotations = {};
|
|
501
603
|
if (args.success != null) {
|
|
502
|
-
const
|
|
503
|
-
this.success =
|
|
604
|
+
const value_23 = undefined;
|
|
605
|
+
this.success = value_23;
|
|
504
606
|
}
|
|
505
607
|
}
|
|
506
608
|
static read(input) {
|
|
@@ -558,8 +660,8 @@ class UpdateVideos__Result extends thrift.StructLike {
|
|
|
558
660
|
this._annotations = {};
|
|
559
661
|
this._fieldAnnotations = {};
|
|
560
662
|
if (args.success != null) {
|
|
561
|
-
const
|
|
562
|
-
this.success =
|
|
663
|
+
const value_24 = undefined;
|
|
664
|
+
this.success = value_24;
|
|
563
665
|
}
|
|
564
666
|
}
|
|
565
667
|
static read(input) {
|
|
@@ -617,8 +719,8 @@ class SendVideoEvent__Result extends thrift.StructLike {
|
|
|
617
719
|
this._annotations = {};
|
|
618
720
|
this._fieldAnnotations = {};
|
|
619
721
|
if (args.success != null) {
|
|
620
|
-
const
|
|
621
|
-
this.success =
|
|
722
|
+
const value_25 = undefined;
|
|
723
|
+
this.success = value_25;
|
|
622
724
|
}
|
|
623
725
|
}
|
|
624
726
|
static read(input) {
|
|
@@ -632,6 +734,65 @@ class SendVideoEvent__Result extends thrift.StructLike {
|
|
|
632
734
|
}
|
|
633
735
|
}
|
|
634
736
|
exports.SendVideoEvent__Result = SendVideoEvent__Result;
|
|
737
|
+
exports.SendVideoAttentionTimes__ResultCodec = {
|
|
738
|
+
encode(args, output) {
|
|
739
|
+
output.writeStructBegin("SendVideoAttentionTimes__Result");
|
|
740
|
+
output.writeFieldStop();
|
|
741
|
+
output.writeStructEnd();
|
|
742
|
+
return;
|
|
743
|
+
},
|
|
744
|
+
decode(input) {
|
|
745
|
+
let _args = {};
|
|
746
|
+
input.readStructBegin();
|
|
747
|
+
while (true) {
|
|
748
|
+
const ret = input.readFieldBegin();
|
|
749
|
+
const fieldType = ret.fieldType;
|
|
750
|
+
const fieldId = ret.fieldId;
|
|
751
|
+
if (fieldType === thrift.TType.STOP) {
|
|
752
|
+
break;
|
|
753
|
+
}
|
|
754
|
+
switch (fieldId) {
|
|
755
|
+
case 0:
|
|
756
|
+
if (fieldType === thrift.TType.VOID) {
|
|
757
|
+
input.skip(fieldType);
|
|
758
|
+
}
|
|
759
|
+
else {
|
|
760
|
+
input.skip(fieldType);
|
|
761
|
+
}
|
|
762
|
+
break;
|
|
763
|
+
default: {
|
|
764
|
+
input.skip(fieldType);
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
input.readFieldEnd();
|
|
768
|
+
}
|
|
769
|
+
input.readStructEnd();
|
|
770
|
+
return {
|
|
771
|
+
success: _args.success
|
|
772
|
+
};
|
|
773
|
+
}
|
|
774
|
+
};
|
|
775
|
+
class SendVideoAttentionTimes__Result extends thrift.StructLike {
|
|
776
|
+
constructor(args = {}) {
|
|
777
|
+
super();
|
|
778
|
+
this._annotations = {};
|
|
779
|
+
this._fieldAnnotations = {};
|
|
780
|
+
if (args.success != null) {
|
|
781
|
+
const value_26 = undefined;
|
|
782
|
+
this.success = value_26;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
static read(input) {
|
|
786
|
+
return new SendVideoAttentionTimes__Result(exports.SendVideoAttentionTimes__ResultCodec.decode(input));
|
|
787
|
+
}
|
|
788
|
+
static write(args, output) {
|
|
789
|
+
return exports.SendVideoAttentionTimes__ResultCodec.encode(args, output);
|
|
790
|
+
}
|
|
791
|
+
write(output) {
|
|
792
|
+
return exports.SendVideoAttentionTimes__ResultCodec.encode(this, output);
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
exports.SendVideoAttentionTimes__Result = SendVideoAttentionTimes__Result;
|
|
635
796
|
exports.SetFullscreen__ResultCodec = {
|
|
636
797
|
encode(args, output) {
|
|
637
798
|
const obj = {
|
|
@@ -660,8 +821,8 @@ exports.SetFullscreen__ResultCodec = {
|
|
|
660
821
|
switch (fieldId) {
|
|
661
822
|
case 0:
|
|
662
823
|
if (fieldType === thrift.TType.BOOL) {
|
|
663
|
-
const
|
|
664
|
-
_args.success =
|
|
824
|
+
const value_27 = input.readBool();
|
|
825
|
+
_args.success = value_27;
|
|
665
826
|
}
|
|
666
827
|
else {
|
|
667
828
|
input.skip(fieldType);
|
|
@@ -685,8 +846,8 @@ class SetFullscreen__Result extends thrift.StructLike {
|
|
|
685
846
|
this._annotations = {};
|
|
686
847
|
this._fieldAnnotations = {};
|
|
687
848
|
if (args.success != null) {
|
|
688
|
-
const
|
|
689
|
-
this.success =
|
|
849
|
+
const value_28 = args.success;
|
|
850
|
+
this.success = value_28;
|
|
690
851
|
}
|
|
691
852
|
}
|
|
692
853
|
static read(input) {
|
|
@@ -728,8 +889,8 @@ exports.IsAutoplayEnabled__ResultCodec = {
|
|
|
728
889
|
switch (fieldId) {
|
|
729
890
|
case 0:
|
|
730
891
|
if (fieldType === thrift.TType.BOOL) {
|
|
731
|
-
const
|
|
732
|
-
_args.success =
|
|
892
|
+
const value_29 = input.readBool();
|
|
893
|
+
_args.success = value_29;
|
|
733
894
|
}
|
|
734
895
|
else {
|
|
735
896
|
input.skip(fieldType);
|
|
@@ -753,8 +914,8 @@ class IsAutoplayEnabled__Result extends thrift.StructLike {
|
|
|
753
914
|
this._annotations = {};
|
|
754
915
|
this._fieldAnnotations = {};
|
|
755
916
|
if (args.success != null) {
|
|
756
|
-
const
|
|
757
|
-
this.success =
|
|
917
|
+
const value_30 = args.success;
|
|
918
|
+
this.success = value_30;
|
|
758
919
|
}
|
|
759
920
|
}
|
|
760
921
|
static read(input) {
|
|
@@ -876,6 +1037,39 @@ class Client extends thrift.ThriftClient {
|
|
|
876
1037
|
}
|
|
877
1038
|
});
|
|
878
1039
|
}
|
|
1040
|
+
sendVideoAttentionTimes(componentAttentionMs, context) {
|
|
1041
|
+
const writer = new this.transport();
|
|
1042
|
+
const output = new this.protocol(writer);
|
|
1043
|
+
output.writeMessageBegin("sendVideoAttentionTimes", thrift.MessageType.CALL, this.incrementRequestId());
|
|
1044
|
+
const args = { componentAttentionMs };
|
|
1045
|
+
exports.SendVideoAttentionTimes__ArgsCodec.encode(args, output);
|
|
1046
|
+
output.writeMessageEnd();
|
|
1047
|
+
return this.connection.send(writer.flush(), context).then((data) => {
|
|
1048
|
+
const reader = this.transport.receiver(data);
|
|
1049
|
+
const input = new this.protocol(reader);
|
|
1050
|
+
try {
|
|
1051
|
+
const { fieldName: fieldName, messageType: messageType } = input.readMessageBegin();
|
|
1052
|
+
if (fieldName === "sendVideoAttentionTimes") {
|
|
1053
|
+
if (messageType === thrift.MessageType.EXCEPTION) {
|
|
1054
|
+
const err = thrift.TApplicationExceptionCodec.decode(input);
|
|
1055
|
+
input.readMessageEnd();
|
|
1056
|
+
return Promise.reject(err);
|
|
1057
|
+
}
|
|
1058
|
+
else {
|
|
1059
|
+
const result = exports.SendVideoAttentionTimes__ResultCodec.decode(input);
|
|
1060
|
+
input.readMessageEnd();
|
|
1061
|
+
return Promise.resolve(result.success);
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
else {
|
|
1065
|
+
return Promise.reject(new thrift.TApplicationException(thrift.TApplicationExceptionType.WRONG_METHOD_NAME, "Received a response to an unknown RPC function: " + fieldName));
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
catch (err) {
|
|
1069
|
+
return Promise.reject(err);
|
|
1070
|
+
}
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
879
1073
|
setFullscreen(isFullscreen, context) {
|
|
880
1074
|
const writer = new this.transport();
|
|
881
1075
|
const output = new this.protocol(writer);
|
|
@@ -986,6 +1180,10 @@ class Processor extends thrift.ThriftProcessor {
|
|
|
986
1180
|
resolve(this.process_sendVideoEvent(requestId, input, output, context));
|
|
987
1181
|
break;
|
|
988
1182
|
}
|
|
1183
|
+
case "process_sendVideoAttentionTimes": {
|
|
1184
|
+
resolve(this.process_sendVideoAttentionTimes(requestId, input, output, context));
|
|
1185
|
+
break;
|
|
1186
|
+
}
|
|
989
1187
|
case "process_setFullscreen": {
|
|
990
1188
|
resolve(this.process_setFullscreen(requestId, input, output, context));
|
|
991
1189
|
break;
|
|
@@ -1080,6 +1278,30 @@ class Processor extends thrift.ThriftProcessor {
|
|
|
1080
1278
|
return output.flush();
|
|
1081
1279
|
});
|
|
1082
1280
|
}
|
|
1281
|
+
process_sendVideoAttentionTimes(requestId, input, output, context) {
|
|
1282
|
+
return new Promise((resolve, reject) => {
|
|
1283
|
+
try {
|
|
1284
|
+
const args = exports.SendVideoAttentionTimes__ArgsCodec.decode(input);
|
|
1285
|
+
input.readMessageEnd();
|
|
1286
|
+
resolve(this._handler.sendVideoAttentionTimes(args.componentAttentionMs, context));
|
|
1287
|
+
}
|
|
1288
|
+
catch (err) {
|
|
1289
|
+
reject(err);
|
|
1290
|
+
}
|
|
1291
|
+
}).then((data) => {
|
|
1292
|
+
const result = { success: data };
|
|
1293
|
+
output.writeMessageBegin("sendVideoAttentionTimes", thrift.MessageType.REPLY, requestId);
|
|
1294
|
+
exports.SendVideoAttentionTimes__ResultCodec.encode(result, output);
|
|
1295
|
+
output.writeMessageEnd();
|
|
1296
|
+
return output.flush();
|
|
1297
|
+
}).catch((err) => {
|
|
1298
|
+
const result = new thrift.TApplicationException(thrift.TApplicationExceptionType.UNKNOWN, err.message);
|
|
1299
|
+
output.writeMessageBegin("sendVideoAttentionTimes", thrift.MessageType.EXCEPTION, requestId);
|
|
1300
|
+
thrift.TApplicationExceptionCodec.encode(result, output);
|
|
1301
|
+
output.writeMessageEnd();
|
|
1302
|
+
return output.flush();
|
|
1303
|
+
});
|
|
1304
|
+
}
|
|
1083
1305
|
process_setFullscreen(requestId, input, output, context) {
|
|
1084
1306
|
return new Promise((resolve, reject) => {
|
|
1085
1307
|
try {
|